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

@@ -179,7 +179,7 @@ public class MapleMonster extends AbstractLoadedMapleLife {
}
public boolean isBoss() {
return stats.isBoss() || isHT();
return stats.isBoss();
}
public int getAnimationTime(String name) {
@@ -209,18 +209,19 @@ public class MapleMonster extends AbstractLoadedMapleLife {
}
int trueDamage = Math.min(hp, damage); // since magic happens otherwise B^)
if(ServerConstants.USE_DEBUG == true && from != null) from.dropMessage(5, "Hitted MOB " + this.getId() + ", OID " + this.getObjectId());
if(ServerConstants.USE_DEBUG == true) from.dropMessage(5, "Hitted MOB " + this.getId() + ", OID " + this.getObjectId());
dispatchMonsterDamaged(from, trueDamage);
hp -= damage;
if (takenDamage.containsKey(from.getId())) {
takenDamage.get(from.getId()).addAndGet(trueDamage);
} else {
hp -= trueDamage;
if (!takenDamage.containsKey(from.getId())) {
takenDamage.put(from.getId(), new AtomicInteger(trueDamage));
} else {
takenDamage.get(from.getId()).addAndGet(trueDamage);
}
if (hasBossHPBar()) {
from.getMap().broadcastMessage(makeBossHPBarPacket(), getPosition());
from.setPlayerAggro(this.hashCode());
from.getMap().broadcastBossHpMessage(this, this.hashCode(), makeBossHPBarPacket(), getPosition());
} else if (!isBoss()) {
int remainingHP = (int) Math.max(1, hp * 100f / getMaxHp());
byte[] packet = MaplePacketCreator.showMonsterHP(getObjectId(), remainingHP);
@@ -531,11 +532,7 @@ public class MapleMonster extends AbstractLoadedMapleLife {
}
public boolean hasBossHPBar() {
return (isBoss() && getTagColor() > 0) || isHT();
}
private boolean isHT() {
return getId() == 8810018;
return isBoss() && getTagColor() > 0;
}
@Override
@@ -558,7 +555,7 @@ public class MapleMonster extends AbstractLoadedMapleLife {
this.getMap().killAllMonsters();
return;
}
c.announce(makeBossHPBarPacket());
c.announceBossHpBar(this, this.hashCode(), makeBossHPBarPacket());
}
}