diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 0cb4625c5e..e9a9976e87 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -23,6 +23,8 @@ import com.l2jmobius.gameserver.enums.InstanceType; import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; +import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.MinionList; /** @@ -239,4 +241,15 @@ public class L2MonsterInstance extends L2Attackable { return (isRaidMinion() && (getLeader() != null)) ? getLeader().giveRaidCurse() : super.giveRaidCurse(); } + + @Override + public synchronized void doCast(Skill skill, L2ItemInstance item, boolean ctrlPressed, boolean shiftPressed) + { + // Might need some exceptions here, but it will prevent the monster buffing player bug. + if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) + { + return; + } + super.doCast(skill, item, ctrlPressed, shiftPressed); + } }