Turn mob id magic numbers into constants

This commit is contained in:
P0nk
2021-11-07 12:15:36 +01:00
parent 4efd356cbf
commit 8d10e3d1b0
18 changed files with 205 additions and 90 deletions

View File

@@ -22,6 +22,7 @@
package net.server.channel.handlers;
import client.Client;
import constants.id.MobId;
import net.AbstractPacketHandler;
import net.packet.InPacket;
import server.life.Monster;
@@ -35,7 +36,7 @@ public final class MonsterBombHandler extends AbstractPacketHandler {
if (!c.getPlayer().isAlive() || monster == null) {
return;
}
if (monster.getId() == 8500003 || monster.getId() == 8500004) {
if (monster.getId() == MobId.HIGH_DARKSTAR || monster.getId() == MobId.LOW_DARKSTAR) {
monster.getMap().broadcastMessage(PacketCreator.killMonster(monster.getObjectId(), 4));
c.getPlayer().getMap().removeMapObject(oid);
}