Savior Commit

Fixed some bugs regarding dojo, updated drop data, minor tweaks on
Mystic Doors, added expeditions for Showa Manor, Zakum and Pink Bean,
smart search for item slots on quest/npc rewarding system, attempt on
boss HPbar to focus on player's current target, quests with selectable
rewards now hands the item correctly, after the first PQ instance next
ones are loaded more smoothly.
This commit is contained in:
ronancpl
2017-08-04 00:04:46 -03:00
parent c09bc02c85
commit 0a2e382c3b
968 changed files with 25555 additions and 7362 deletions

View File

@@ -69,6 +69,7 @@ import scripting.quest.QuestActionManager;
import scripting.quest.QuestScriptManager;
import server.MapleMiniGame;
import server.MaplePlayerShop;
import server.life.MapleMonster;
import server.MapleTrade;
import server.TimerManager;
import server.maps.*;
@@ -1165,6 +1166,25 @@ public class MapleClient {
e.printStackTrace();
}
}
public synchronized void announceBossHpBar(MapleMonster mm, final int mobHash, final byte[] packet) {
long timeNow = System.currentTimeMillis();
int targetHash = player.getTargetHpBarHash();
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?
announce(packet);
player.setTargetHpBarHash(mobHash);
player.setTargetHpBarTime(timeNow);
}
} else {
announce(packet);
player.setTargetHpBarTime(timeNow);
}
}
public synchronized void announce(final byte[] packet) {//MINA CORE IS A FUCKING BITCH AND I HATE IT <3
session.write(packet);