Code improvements.
This commit is contained in:
@@ -356,16 +356,13 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
if (tmpworld instanceof DNPWorld)
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
if (npc.isScriptValue(0) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.1)))
|
||||
{
|
||||
if (npc.getCurrentHp() < (npc.getMaxHp() * 0.1))
|
||||
{
|
||||
giveItems(player, SEAL_OF_BINDING, 1);
|
||||
player.sendPacket(SystemMessageId.THE_SEALING_DEVICE_GLITTERS_AND_MOVES_ACTIVATION_COMPLETE_NORMALLY);
|
||||
npc.setScriptValue(1);
|
||||
startQuestTimer("FINISH", 1000, npc, player);
|
||||
cancelQuestTimer("FIGHT", npc, player);
|
||||
}
|
||||
giveItems(player, SEAL_OF_BINDING, 1);
|
||||
player.sendPacket(SystemMessageId.THE_SEALING_DEVICE_GLITTERS_AND_MOVES_ACTIVATION_COMPLETE_NORMALLY);
|
||||
npc.setScriptValue(1);
|
||||
startQuestTimer("FINISH", 1000, npc, player);
|
||||
cancelQuestTimer("FIGHT", npc, player);
|
||||
}
|
||||
if (getRandom(100) < 50)
|
||||
{
|
||||
@@ -387,8 +384,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
if (tmpworld instanceof DNPWorld)
|
||||
{
|
||||
final DNPWorld world = (DNPWorld) tmpworld;
|
||||
checkDoors(npc, world);
|
||||
checkDoors(npc, (DNPWorld) tmpworld);
|
||||
}
|
||||
|
||||
switch (npc.getId())
|
||||
|
Reference in New Issue
Block a user