Last active
August 29, 2015 13:57
-
-
Save Pandragon/9614666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Eclipse Workspace Patch 1.0 | |
#P L2J_Server_BETA | |
Index: java/com/l2jserver/gameserver/ai/L2AttackableAI.java | |
=================================================================== | |
--- java/com/l2jserver/gameserver/ai/L2AttackableAI.java (revision 6577) | |
+++ java/com/l2jserver/gameserver/ai/L2AttackableAI.java (working copy) | |
@@ -723,7 +723,7 @@ | |
L2Character originalAttackTarget = getAttackTarget(); | |
// Check if target is dead or if timeout is expired to stop this attack | |
- if ((originalAttackTarget == null) || originalAttackTarget.isAlikeDead() || (_attackTimeout < GameTimeController.getInstance().getGameTicks())) | |
+ if ((originalAttackTarget == null) || originalAttackTarget.isAlikeDead()) | |
{ | |
// Stop hating this target after the attack timeout or if target is dead | |
if (originalAttackTarget != null) | |
@@ -738,6 +738,21 @@ | |
return; | |
} | |
+ if (_attackTimeout < GameTimeController.getInstance().getGameTicks()) | |
+ { | |
+ // Set the AI Intention to AI_INTENTION_ACTIVE | |
+ setIntention(AI_INTENTION_ACTIVE); | |
+ | |
+ npc.setWalking(); | |
+ | |
+ // Monster teleport to spawn | |
+ if (npc.isMonster() && (npc.getSpawn() != null)) | |
+ { | |
+ npc.teleToLocation(npc.getSpawn(), false); | |
+ } | |
+ return; | |
+ } | |
+ | |
final int collision = npc.getTemplate().getCollisionRadius(); | |
// Handle all L2Object of its Faction inside the Faction Range |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment