From ba8fe260abadf34e932d3b1ba3006f8d6ecd3b1c Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 28 Aug 2020 09:48:13 +0000 Subject: [PATCH] Partial improvement for lag caused by soulshots. --- .../gameserver/handler/itemhandlers/BeastSoulShot.java | 2 +- .../gameserver/handler/itemhandlers/BeastSpiritShot.java | 2 +- .../gameserver/handler/itemhandlers/BlessedSpiritShot.java | 5 ++++- .../l2jmobius/gameserver/handler/itemhandlers/SoulShots.java | 5 ++++- .../gameserver/handler/itemhandlers/SpiritShot.java | 5 ++++- .../gameserver/handler/itemhandlers/BeastSoulShot.java | 2 +- .../gameserver/handler/itemhandlers/BeastSpiritShot.java | 2 +- .../gameserver/handler/itemhandlers/BlessedSpiritShot.java | 5 ++++- .../l2jmobius/gameserver/handler/itemhandlers/SoulShots.java | 5 ++++- .../gameserver/handler/itemhandlers/SpiritShot.java | 5 ++++- 10 files changed, 28 insertions(+), 10 deletions(-) diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java index d2b124cb3a..5fdc1294bc 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java @@ -148,7 +148,7 @@ public class BeastSoulShot implements IItemHandler // Pet uses the power of spirit. activeOwner.sendPacket(SystemMessageId.PET_USES_THE_POWER_OF_SPIRIT); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 360000/* 600 */); + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 360000); } @Override diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java index 25fd3933ae..2238c01c31 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java @@ -163,7 +163,7 @@ public class BeastSpiritShot implements IItemHandler // Pet uses the power of spirit. activeOwner.sendPacket(SystemMessageId.PET_USES_THE_POWER_OF_SPIRIT); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/* 600 */); + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000); } @Override diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java index 9d6dac58a9..e488e91b14 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java @@ -122,11 +122,14 @@ public class BlessedSpiritShot implements IItemHandler } // Charge Blessed Spiritshot + if (weaponInst.getChargedSpiritshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSpiritshot(ItemInstance.CHARGED_BLESSED_SPIRITSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_MANA_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java index 6e0508ffa7..2f2d45b7d3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java @@ -115,11 +115,14 @@ public class SoulShots implements IItemHandler } // Charge soulshot + if (weaponInst.getChargedSoulshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSoulshot(ItemInstance.CHARGED_SOULSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_THE_SPIRITS_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java index 3859c34e93..d64d6d08c3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java @@ -112,11 +112,14 @@ public class SpiritShot implements IItemHandler } // Charge Spiritshot + if (weaponInst.getChargedSpiritshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSpiritshot(ItemInstance.CHARGED_SPIRITSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_MANA_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java index d2b124cb3a..5fdc1294bc 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java @@ -148,7 +148,7 @@ public class BeastSoulShot implements IItemHandler // Pet uses the power of spirit. activeOwner.sendPacket(SystemMessageId.PET_USES_THE_POWER_OF_SPIRIT); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 360000/* 600 */); + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 360000); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java index 25fd3933ae..2238c01c31 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java @@ -163,7 +163,7 @@ public class BeastSpiritShot implements IItemHandler // Pet uses the power of spirit. activeOwner.sendPacket(SystemMessageId.PET_USES_THE_POWER_OF_SPIRIT); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/* 600 */); + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java index 9d6dac58a9..e488e91b14 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java @@ -122,11 +122,14 @@ public class BlessedSpiritShot implements IItemHandler } // Charge Blessed Spiritshot + if (weaponInst.getChargedSpiritshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSpiritshot(ItemInstance.CHARGED_BLESSED_SPIRITSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_MANA_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java index 6e0508ffa7..2f2d45b7d3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java @@ -115,11 +115,14 @@ public class SoulShots implements IItemHandler } // Charge soulshot + if (weaponInst.getChargedSoulshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSoulshot(ItemInstance.CHARGED_SOULSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_THE_SPIRITS_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java index 3859c34e93..d64d6d08c3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java @@ -112,11 +112,14 @@ public class SpiritShot implements IItemHandler } // Charge Spiritshot + if (weaponInst.getChargedSpiritshot() != itemId) + { + Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000); + } weaponInst.setChargedSpiritshot(ItemInstance.CHARGED_SPIRITSHOT); // Send message to client player.sendPacket(SystemMessageId.POWER_OF_MANA_ENABLED); - Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/* 600 */); } @Override