YeSagiraGuards AI timer should be repeatable.
This commit is contained in:
parent
87ea73dd16
commit
b67dcaa78d
@ -44,9 +44,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead())
|
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
|
||||||
if (!npc.isInCombat())
|
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
||||||
{
|
{
|
||||||
@ -58,8 +56,6 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +63,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,9 +44,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead())
|
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
|
||||||
if (!npc.isInCombat())
|
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
||||||
{
|
{
|
||||||
@ -58,8 +56,6 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +63,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,9 +44,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead())
|
if (event.equals("GUARD_AGGRO") && (npc != null) && !npc.isDead() && !npc.isInCombat())
|
||||||
{
|
|
||||||
if (!npc.isInCombat())
|
|
||||||
{
|
{
|
||||||
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
L2World.getInstance().forEachVisibleObjectInRange(npc, L2MonsterInstance.class, 1000, monster ->
|
||||||
{
|
{
|
||||||
@ -58,8 +56,6 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +63,7 @@ public final class YeSagiraGuards extends AbstractNpcAI
|
|||||||
public String onSpawn(L2Npc npc)
|
public String onSpawn(L2Npc npc)
|
||||||
{
|
{
|
||||||
npc.setIsInvul(true);
|
npc.setIsInvul(true);
|
||||||
startQuestTimer("GUARD_AGGRO", 5000, npc, null, false);
|
startQuestTimer("GUARD_AGGRO", 5000, npc, null, true);
|
||||||
return super.onSpawn(npc);
|
return super.onSpawn(npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user