From 6943ed2f94738288bdeaf9f33fe8bf31c2159c50 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 17 Feb 2019 08:36:58 +0000 Subject: [PATCH] Monsters should not use heal skills on characters. --- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- .../gameserver/model/actor/instance/L2MonsterInstance.java | 6 +++++- 10 files changed, 50 insertions(+), 10 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 27fd6895f0..c7fe70ee1b 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,6 +26,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -248,7 +249,10 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - abortCast(); + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + } return; } super.doCast(skill, item, ctrlPressed, shiftPressed);