Advertisement
Deedlit

Untitled

Jul 5th, 2011
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.62 KB | None | 0 0
  1. Index: java/com/l2jserver/gameserver/ai/L2SummonAI.java
  2. ===================================================================
  3. --- java/com/l2jserver/gameserver/ai/L2SummonAI.java    (revision 521)
  4. +++ java/com/l2jserver/gameserver/ai/L2SummonAI.java    (working copy)
  5. @@ -48,7 +48,7 @@
  6.    
  7.     public boolean isWithinOwnersRange()
  8.     {
  9. -       return (!((L2Summon) _actor).isInsideRadius(((L2Summon) _actor).getOwner(), 3000, true, false));
  10. +       return (((L2Summon) _actor).isInsideRadius(((L2Summon) _actor).getOwner(), 3000, false, false));
  11.     }
  12.    
  13.     @Override
  14. @@ -82,6 +82,9 @@
  15.                 stopAvoidTask();
  16.         }
  17.        
  18. +//     if (intention == AI_INTENTION_ATTACK && arg0 != null && arg0 instanceof L2Character && arg0 != _actor)
  19. +//         setAttackTarget(((L2Character)arg0));
  20. +      
  21.         super.changeIntention(intention, arg0, arg1);
  22.     }
  23.    
  24. @@ -89,6 +92,7 @@
  25.     {
  26.         if (checkTargetLostOrDead(getAttackTarget()))
  27.         {
  28. +           // Notify the target
  29.             setAttackTarget(null);
  30.             return;
  31.         }
  32. @@ -138,9 +142,10 @@
  33.     @Override
  34.     protected void onEvtThink()
  35.     {
  36. -       if (_thinking || _actor.isCastingNow() || _actor.isAllSkillsDisabled())
  37. +       if (!_actor.isRunning()) _actor.setRunning();      
  38. +       if (_thinking || _actor.isCastingNow())
  39.             return;
  40. -       _thinking = true;
  41. +       _thinking = true;      
  42.         try
  43.         {
  44.             switch (getIntention())
  45. @@ -168,7 +173,7 @@
  46.     @Override
  47.     protected void onEvtFinishCasting()
  48.     {
  49. -       if (_lastAttack == null)
  50. +       if (_actor.getAI().getIntention() != AI_INTENTION_ATTACK)
  51.             ((L2Summon) _actor).setFollowStatus(_startFollow);
  52.         else
  53.         {
  54. @@ -224,6 +229,8 @@
  55.                     moveTo(targetX, targetY, _actor.getZ());
  56.             }
  57.         }
  58. +      
  59. +       onEvtThink();
  60.     }
  61.    
  62.     public void notifyFollowStatusChange()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement