Take damage & Summon packets

Fixed some oddities with other player clients when dealing with summons
(spawning, taking damage or attacking). Fixed damage dealt to player not
apearing if the player is a GM on hiding and other players in the area
are GMs as well.
This commit is contained in:
ronancpl
2017-07-04 15:54:32 -03:00
parent c2cbc96975
commit b3734cbaf7
58 changed files with 100 additions and 48 deletions

View File

@@ -224,7 +224,11 @@ public final class TakeDamageHandler extends AbstractMaplePacketHandler {
}
if (!player.isHidden()) {
map.broadcastMessage(player, MaplePacketCreator.damagePlayer(damagefrom, monsteridfrom, player.getId(), damage, fake, direction, is_pgmr, pgmr, is_pg, oid, pos_x, pos_y), false);
player.checkBerserk();
player.checkBerserk(true);
}
else {
map.broadcastGMMessage(player, MaplePacketCreator.damagePlayer(damagefrom, monsteridfrom, player.getId(), damage, fake, direction, is_pgmr, pgmr, is_pg, oid, pos_x, pos_y), false);
player.checkBerserk(false);
}
if (map.getId() >= 925020000 && map.getId() < 925030000) {
player.setDojoEnergy(player.isGM() ? 300 : player.getDojoEnergy() < 300 ? player.getDojoEnergy() + 1 : 0); //Fking gm's