setCurrentHp(1, true);
for (Creature cha : World.getAroundCharacters(this))
{
ThreadPoolManager.getInstance().execute(new GameObjectTasks.NotifyAITask(cha, CtrlEvent.EVT_FORGET_OBJECT, this, null));
}
ClanHallSiegeEvent siegeEvent = getEvent(ClanHallSiegeEvent.class);
if (siegeEvent == null)
{
return;
}
SpawnExObject obj = siegeEvent.getFirstObject(ClanHallSiegeEvent.BOSS);
for (int i = 0; i < 3; i++)
{
final NpcInstance npc = obj.getSpawns().get(i).getFirstSpawned();
Functions.npcSay(npc, ((_34SiegeGuard) npc).teleChatSay());
npc.broadcastPacket(new MagicSkillUse(npc, npc, 4235, 1, 10000, 0));
_teleportTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
{
@Override
public void runImpl()
{
Location loc = Location.findAroundPosition(177134, -18807, -2256, 50, 100, npc.getGeoIndex());
npc.teleToLocation(loc);
if (npc == GustavInstance.this)
{
npc.reduceCurrentHp(npc.getCurrentHp(), 0, npc, null, false, false, false, false, false, false, false);
}
}
}, 10000L);
}
}
else
{
if (_teleportTask != null)
{
_teleportTask.cancel(false);
_teleportTask = null;
}
SiegeEvent<?, ?> siegeEvent = getEvent(SiegeEvent.class);
if (siegeEvent == null)
{
return;
}
siegeEvent.processStep(getMostDamagedClan());
super.onDeath(killer);
}
}