From 8833a59e55b2a6946f95de723f620a4490eb942d Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 6 Feb 2021 20:32:25 +0000 Subject: [PATCH] Do not add continuous effect if target just died from the initial effect. Contributed by Sahar. --- .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ .../org/l2jmobius/gameserver/model/skills/BuffInfo.java | 6 ++++++ 19 files changed, 114 insertions(+) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index dbaf4aaa57..98324e47e1 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -263,6 +263,12 @@ public class BuffInfo // Call on start. effect.onStart(this); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index dbaf4aaa57..98324e47e1 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -263,6 +263,12 @@ public class BuffInfo // Call on start. effect.onStart(this); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) { diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java index c62912f93e..b3d65c7cc4 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -330,6 +330,12 @@ public class BuffInfo // Call on start. effect.onStart(_effector, _effected, _skill, _item); + // Do not add continuous effect if target just died from the initial effect, otherwise they'll be ticked forever. + if (_effected.isDead()) + { + continue; + } + // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) {