Prevent monsters buffing players.
This commit is contained in:
parent
53fa399857
commit
68ad48105f
@ -20,9 +20,11 @@ import java.util.concurrent.ScheduledFuture;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.util.MinionList;
|
import com.l2jmobius.gameserver.util.MinionList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,4 +234,15 @@ public class L2MonsterInstance extends L2Attackable
|
|||||||
{
|
{
|
||||||
return (isRaidMinion() && (getLeader() != null)) ? getLeader().giveRaidCurse() : super.giveRaidCurse();
|
return (isRaidMinion() && (getLeader() != null)) ? getLeader().giveRaidCurse() : super.giveRaidCurse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doCast(Skill skill, L2Character target, L2Object[] targets)
|
||||||
|
{
|
||||||
|
// 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, target, targets);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user