Mystic Doors review + Togglable SrvMessage-BossHP + Map-Event patch

Reviewed Mystic Doors.
Fixed several issues showing up on Duey in uncommon scenarios.
Fixed a concurrency issue with XMLDomMapleData.
Scheduled forward the "lock disposal" action within the source. Now, it's expected that, after a set while, no method should require usage of a disposed lock and, during that while, a supposed "disposed lock" is still available to run (although no new processes is expected to require use of these locks).
Fixed concurrency issues with player's current event instance, generating several inconsistencies when swiftly registering/unregistering from events.
Implemented a mutually exclusive approach for server message - Boss HPbar.
Fixed item-making Kage requiring lv71~80 ETC instead of the expected 81~90.
Removed the possibility to buy cosmetic coupons with mesos through the NPCs.
Sleepywood JQ's no longer gives cash items when they finish the quest repeatedly.
Added Duey trucks in several maps lacking it. Added NPC Duey in New Leaf City.
Fixed scripted quests not calculating QUEST_RATE (if applied) when rewarding experience and meso.
This commit is contained in:
ronancpl
2018-08-07 23:37:24 -03:00
parent cc541f39d5
commit 4c25c07e28
173 changed files with 38064 additions and 37254 deletions

View File

@@ -112,6 +112,7 @@ public class MapleClient {
private static final Lock loginLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.CLIENT_LOGIN, true);
private int votePoints;
private int voteTime = -1;
private int visibleWorlds;
private long lastNpcClick;
private long sessionId;
@@ -1268,6 +1269,16 @@ public class MapleClient {
}
}
private void announceDisableServerMessage() {
if(!this.getWorldServer().registerDisabledServerMessage(player.getId())) {
announce(MaplePacketCreator.serverMessage(""));
}
}
public void announceServerMessage() {
announce(MaplePacketCreator.serverMessage(this.getChannelServer().getServerMessage()));
}
public synchronized void announceBossHpBar(MapleMonster mm, final int mobHash, final byte[] packet) {
long timeNow = System.currentTimeMillis();
int targetHash = player.getTargetHpBarHash();
@@ -1275,12 +1286,14 @@ public class MapleClient {
if(mobHash != targetHash) {
if(timeNow - player.getTargetHpBarTime() >= 5 * 1000) {
// is there a way to INTERRUPT this annoying thread running on the client that drops the boss bar after some time at every attack?
announceDisableServerMessage();
announce(packet);
player.setTargetHpBarHash(mobHash);
player.setTargetHpBarTime(timeNow);
}
} else {
announceDisableServerMessage();
announce(packet);
player.setTargetHpBarTime(timeNow);
@@ -1311,10 +1324,8 @@ public class MapleClient {
return;
}
String[] socket;
try {
socket = Server.getInstance().getIP(getWorld(), channel).split(":");
} catch (Exception e) {
String[] socket = Server.getInstance().getInetSocket(getWorld(), channel);
if(socket == null) {
announce(MaplePacketCreator.serverNotice(1, "Channel " + channel + " is currently disabled. Try another channel."));
announce(MaplePacketCreator.enableActions());
return;
@@ -1387,6 +1398,15 @@ public class MapleClient {
lastNpcClick = 0;
}
public int getVisibleWorlds(){
return visibleWorlds;
}
public void requestedServerlist(int worlds) {
visibleWorlds = worlds;
setClickedNPC();
}
public void closePlayerScriptInteractions() {
this.removeClickedNPC();
NPCScriptManager.getInstance().dispose(this);