Raid curse addition.

Contributed by Iris.
This commit is contained in:
MobiusDevelopment
2021-04-18 19:21:00 +00:00
parent a7b1b8cf48
commit c6a4789f47
19 changed files with 285 additions and 19 deletions

View File

@ -124,6 +124,7 @@ import org.l2jmobius.gameserver.model.options.OptionsSkillType;
import org.l2jmobius.gameserver.model.skills.AbnormalType;
import org.l2jmobius.gameserver.model.skills.BuffFinishTask;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.CommonSkill;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.skills.SkillCastingType;
@ -1378,6 +1379,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
sendPacket(ActionFailed.get(castingType));
getAI().setIntention(AI_INTENTION_ACTIVE);
}
// Players which are 9 levels above a Raid Boss and cast a skill nearby, are silenced with the Raid Curse skill.
if (!Config.RAID_DISABLE_CURSE && isPlayer())
{
World.getInstance().forEachVisibleObjectInRange(this, Attackable.class, Config.ALT_PARTY_RANGE, attackable ->
{
if (attackable.giveRaidCurse() && attackable.isInCombat() && ((getLevel() - attackable.getLevel()) > 8))
{
final CommonSkill curse = skill.isBad() ? CommonSkill.RAID_CURSE2 : CommonSkill.RAID_CURSE;
curse.getSkill().applyEffects(attackable, this);
}
});
}
}
/**
@ -4852,7 +4866,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
*/
public boolean giveRaidCurse()
{
return true;
return false;
}
/**