Advertisement
Tavo22

Queen

Sep 6th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.97 KB | None | 0 0
  1. Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
  2. ===================================================================
  3. --- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 5622)
  4. +++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)
  5. @@ -2363,7 +2363,7 @@
  6.     public void returnHome()
  7.     {
  8.         clearAggroList();
  9. -      
  10. +       setisReturningToSpawnPoint(true);
  11.         if (hasAI() && getSpawn() != null)
  12.             getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(getSpawn().getLocx(), getSpawn().getLocy(), getSpawn().getLocz(), 0));
  13.     }
  14. Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
  15. ===================================================================
  16. --- java/com/l2jserver/gameserver/model/actor/L2Character.java  (revision 5622)
  17. +++ java/com/l2jserver/gameserver/model/actor/L2Character.java  (working copy)
  18. @@ -61,6 +61,7 @@
  19.  import com.l2jserver.gameserver.model.L2World;
  20.  import com.l2jserver.gameserver.model.L2WorldRegion;
  21.  import com.l2jserver.gameserver.model.Location;
  22. +import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
  23.  import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
  24.  import com.l2jserver.gameserver.model.actor.instance.L2NpcWalkerInstance;
  25.  import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  26. @@ -793,6 +794,11 @@
  27.         if (isAttackingDisabled())
  28.             return;
  29.        
  30. +       if (target instanceof L2GrandBossInstance && ((L2Attackable) target).isReturningToSpawnPoint())
  31. +       {
  32. +           return;
  33. +       }
  34. +      
  35.         if(!fireAttackListeners(target))
  36.         {
  37.             return;
  38. @@ -6768,6 +6774,14 @@
  39.                         return;
  40.                     }
  41.                    
  42. +                   if (target instanceof L2GrandBossInstance && ((L2Attackable) target).isReturningToSpawnPoint())
  43. +                   {
  44. +                       abortAttack();
  45. +                       abortCast();
  46. +                       getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
  47. +                       return;
  48. +                   }
  49. +                  
  50.                     // Check if over-hit is possible
  51.                     if (skill.isOverhit())
  52.                     {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement