rendered paste bodyIndex: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (working copy)
@@ -98,7 +98,7 @@
// Send message to client
activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SOULSHOT));
- Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0));
+ Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0),500);
}
public int[] getItemIds()
Index: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (working copy)
@@ -98,7 +98,7 @@
// Send message to client
activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT));
- Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0));
+ Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0),500);
}
public int[] getItemIds()
Index: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (working copy)
@@ -98,7 +98,7 @@
// Send message to client
activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT));
- Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0));
+ Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, _skillIds[weaponGrade], 1, 0, 0),500);
}
public int[] getItemIds()
Index: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (working copy)
@@ -57,7 +57,7 @@
activeChar.disableAllSkills();
MagicSkillUser msk = new MagicSkillUser(activeChar, 1050, 1, unstuckTimer, 0);
- Broadcast.toSelfAndKnownPlayers(activeChar, msk);
+ Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk,500);
SetupGauge sg = new SetupGauge(0, unstuckTimer);
activeChar.sendPacket(sg);
//End SoE Animation section
Index: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (working copy)
@@ -134,6 +134,24 @@
toKnownPlayers(character, mov);
}
+ public static void toSelfAndKnownPlayersInRadius(L2Character character, ServerBasePacket mov, int radius)
+ {
+ if (radius < 0)
+ radius = 500;
+
+ if (character instanceof L2PcInstance)
+ character.sendPacket(mov);
+
+ for (L2PcInstance player : character.getKnownList().getKnownPlayers())
+ {
+ if (player == null)
+ continue;
+
+ if (character.getDistance(player.getX(), player.getY()) <= radius)
+ player.sendPacket(mov);
+ }
+ }
+
/**
* Send a packet to all L2PcInstance in the _KnownPlayers of the L2Character and to the specified characters within
* the given radius.<BR><BR>
Index: D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1927)
+++ D:/l2jc3pack/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -4029,7 +4029,7 @@
MagicSkillCanceld msc = new MagicSkillCanceld(getObjectId());
// Broadcast the packet to self and known players.
- Broadcast.toSelfAndKnownPlayers(this, msc);
+ Broadcast.toSelfAndKnownPlayersInRadius(this, msc,500);
}
/**