From 332b5b2e23aca74d5f2df1b74872647d6aa8e9d6 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 11 Apr 2018 08:22:53 +0000 Subject: [PATCH] Petrify when hitting a lower level raidboss. --- .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ .../gameserver/model/actor/L2Attackable.java | 14 ++++++++++++++ 6 files changed, 84 insertions(+) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index 55311b6531..755cbf27c0 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -73,6 +73,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -251,6 +252,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index 0b6b6fa419..75c6e98235 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -247,6 +248,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index 0b6b6fa419..75c6e98235 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -247,6 +248,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index 0b6b6fa419..75c6e98235 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -247,6 +248,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index aaf16566ac..6e200ddb09 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -247,6 +248,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index aaf16566ac..6e200ddb09 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.CommonSkill; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.stats.Stats; @@ -247,6 +248,19 @@ public class L2Attackable extends L2Npc if (attacker != null) { addDamage(attacker, (int) value, skill); + + // Check Raidboss attack. Character will be petrified if attacking a raid that's more than 8 levels lower. In retail you deal damage to raid before curse. + if (isRaid() && giveRaidCurse() && !Config.RAID_DISABLE_CURSE) + { + if (attacker.getLevel() > (getLevel() + 8)) + { + final Skill raidCurse = CommonSkill.RAID_CURSE2.getSkill(); + if (raidCurse != null) + { + raidCurse.applyEffects(this, attacker); + } + } + } } // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle