Advertisement
Nik

NexusEvents target fixes

Nik
Nov 3rd, 2012
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.24 KB | None | 0 0
  1. Index: TargetPartyClan.java
  2. ===================================================================
  3. --- TargetPartyClan.java    (revision 1204)
  4. +++ TargetPartyClan.java    (working copy)
  5. @@ -28,6 +28,8 @@
  6.  import com.l2jserver.gameserver.model.skills.L2Skill;
  7.  import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
  8.  
  9. +import cz.nxs.interf.NexusEvents;
  10. +
  11.  /**
  12.   * @author UnAfraid
  13.   */
  14. @@ -92,6 +94,10 @@
  15.             if (!player.checkPvpSkill(obj, skill))
  16.                 continue;
  17.            
  18. +           // Even ally members are considered as enemies in the events.
  19. +           if(NexusEvents.isInEvent(player) && obj.isCharacter() && NexusEvents.canAttack(player, obj))
  20. +               continue;
  21. +          
  22.             if (!TvTEvent.checkForTvTSkill(player, obj, skill))
  23.                 continue;
  24.            
  25. Index: TargetAlly.java
  26. ===================================================================
  27. --- TargetAlly.java (revision 1204)
  28. +++ TargetAlly.java (working copy)
  29. @@ -29,6 +29,8 @@
  30.  import com.l2jserver.gameserver.model.skills.L2Skill;
  31.  import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
  32.  
  33. +import cz.nxs.interf.NexusEvents;
  34. +
  35.  /**
  36.   * @author UnAfraid
  37.   */
  38. @@ -81,6 +83,10 @@
  39.                     if (!player.checkPvpSkill(obj, skill))
  40.                         continue;
  41.                    
  42. +                   // Even ally members are considered as enemies in the events.
  43. +                   if(NexusEvents.isInEvent(player) && obj.isCharacter() && NexusEvents.canAttack(player, obj))
  44. +                       continue;
  45. +                  
  46.                     if (!TvTEvent.checkForTvTSkill(player, obj, skill))
  47.                         continue;
  48.                    
  49. Index: TargetChainHeal.java
  50. ===================================================================
  51. --- TargetChainHeal.java    (revision 1204)
  52. +++ TargetChainHeal.java    (working copy)
  53. @@ -30,6 +30,8 @@
  54.  import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
  55.  import com.l2jserver.gameserver.network.SystemMessageId;
  56.  
  57. +import cz.nxs.interf.NexusEvents;
  58. +
  59.  public class TargetChainHeal implements ITargetTypeHandler
  60.  {      
  61.         @Override
  62. @@ -59,6 +61,10 @@
  63.                          {
  64.                                  if (o == activeChar)
  65.                                          continue;
  66. +                                
  67. +                               // Even ally members are considered as enemies in the events.
  68. +                               if(NexusEvents.isInEvent(activeChar) && NexusEvents.canAttack(activeChar.getActingPlayer(), o))
  69. +                                   continue;
  70.                                
  71.                                  if (!GeoData.getInstance().canSeeTarget(primarytarget, o))
  72.                                          continue;
  73. Index: TargetClan.java
  74. ===================================================================
  75. --- TargetClan.java (revision 1204)
  76. +++ TargetClan.java (working copy)
  77. @@ -32,6 +32,8 @@
  78.  import com.l2jserver.gameserver.model.skills.L2Skill;
  79.  import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
  80.  
  81. +import cz.nxs.interf.NexusEvents;
  82. +
  83.  /**
  84.   * @author UnAfraid
  85.   */
  86. @@ -84,6 +86,10 @@
  87.                     if (!player.checkPvpSkill(obj, skill))
  88.                         continue;
  89.                    
  90. +                   // Even ally members are considered as enemies in the events.
  91. +                   if(NexusEvents.isInEvent(player) && obj.isCharacter() && NexusEvents.canAttack(player, obj))
  92. +                       continue;
  93. +                  
  94.                     if (!TvTEvent.checkForTvTSkill(player, obj, skill))
  95.                         continue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement