From 87241270c933885f30cab3db3b632da660519792 Mon Sep 17 00:00:00 2001 From: Zealar <zealar@mail.bg> Date: Sun, 14 May 2017 23:57:03 +0100 Subject: [PATCH] Datapack for triggers changes https://bitbucket.org/l2jserver/l2j_server/commits/ba8baa87562ec16f0743a7d5ce923415637585c8 --- .../game/data/scripts/handlers/effecthandlers/Backstab.java | 2 +- .../data/scripts/handlers/effecthandlers/DamOverTime.java | 2 +- .../scripts/handlers/effecthandlers/DamOverTimePercent.java | 2 +- .../data/scripts/handlers/effecthandlers/DeathLink.java | 4 ++-- .../data/scripts/handlers/effecthandlers/EnergyAttack.java | 2 +- .../data/scripts/handlers/effecthandlers/FatalBlow.java | 2 +- dist/game/data/scripts/handlers/effecthandlers/HpDrain.java | 2 +- dist/game/data/scripts/handlers/effecthandlers/Lethal.java | 6 +++--- .../data/scripts/handlers/effecthandlers/MagicalAttack.java | 4 ++-- .../handlers/effecthandlers/MagicalAttackByAbnormal.java | 4 ++-- .../scripts/handlers/effecthandlers/MagicalSoulAttack.java | 4 ++-- .../scripts/handlers/effecthandlers/PhysicalAttack.java | 2 +- .../handlers/effecthandlers/PhysicalAttackHpLink.java | 2 +- .../scripts/handlers/effecthandlers/PhysicalSoulAttack.java | 2 +- .../game/data/scripts/handlers/effecthandlers/SoulBlow.java | 2 +- .../data/scripts/handlers/effecthandlers/StaticDamage.java | 2 +- .../handlers/effecthandlers/TriggerSkillByAttack.java | 2 +- 17 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dist/game/data/scripts/handlers/effecthandlers/Backstab.java b/dist/game/data/scripts/handlers/effecthandlers/Backstab.java index 8fac52466d..110210b10a 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/Backstab.java +++ b/dist/game/data/scripts/handlers/effecthandlers/Backstab.java @@ -80,7 +80,7 @@ public final class Backstab extends AbstractEffect } target.reduceCurrentHp(damage, activeChar, skill); - target.notifyDamageReceived(damage, activeChar, skill, true, false); + target.notifyDamageReceived(damage, activeChar, skill, true, false, false); // Manage attack or cast break of the target (calculating rate, sending message...) if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) diff --git a/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index e8b968c104..b0ae58d3ee 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -77,7 +77,7 @@ public final class DamOverTime extends AbstractEffect } info.getEffected().reduceCurrentHpByDOT(damage, info.getEffector(), info.getSkill()); - info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true); + info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true, false); return info.getSkill().isToggle(); } } diff --git a/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index 51ab82cb35..60e1997f7a 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -78,7 +78,7 @@ public final class DamOverTimePercent extends AbstractEffect } } info.getEffected().reduceCurrentHpByDOT(damage, info.getEffector(), info.getSkill()); - info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true); + info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true, false); return info.getSkill().isToggle(); } diff --git a/dist/game/data/scripts/handlers/effecthandlers/DeathLink.java b/dist/game/data/scripts/handlers/effecthandlers/DeathLink.java index 9ef4aca2eb..95322cb41e 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/DeathLink.java +++ b/dist/game/data/scripts/handlers/effecthandlers/DeathLink.java @@ -88,12 +88,12 @@ public final class DeathLink extends AbstractEffect if (target.getStat().calcStat(Stats.VENGEANCE_SKILL_MAGIC_DAMAGE, 0, target, info.getSkill()) > Rnd.get(100)) { activeChar.reduceCurrentHp(damage, target, info.getSkill()); - activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false); + activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false, true); } else { target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false, false); activeChar.sendDamageMessage(target, damage, mcrit, false, false); } } diff --git a/dist/game/data/scripts/handlers/effecthandlers/EnergyAttack.java b/dist/game/data/scripts/handlers/effecthandlers/EnergyAttack.java index c64a5d2f4b..e991c70f2d 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/EnergyAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/EnergyAttack.java @@ -159,7 +159,7 @@ public final class EnergyAttack extends AbstractEffect { attacker.sendDamageMessage(target, (int) damage, false, critical, false); target.reduceCurrentHp(damage, attacker, skill); - target.notifyDamageReceived(damage, attacker, skill, critical, false); + target.notifyDamageReceived(damage, attacker, skill, critical, false, false); // Check if damage should be reflected Formulas.calcDamageReflected(attacker, target, skill, critical); diff --git a/dist/game/data/scripts/handlers/effecthandlers/FatalBlow.java b/dist/game/data/scripts/handlers/effecthandlers/FatalBlow.java index 17e3375957..793f6986fb 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/FatalBlow.java +++ b/dist/game/data/scripts/handlers/effecthandlers/FatalBlow.java @@ -81,7 +81,7 @@ public final class FatalBlow extends AbstractEffect } target.reduceCurrentHp(damage, activeChar, skill); - target.notifyDamageReceived(damage, activeChar, skill, crit, false); + target.notifyDamageReceived(damage, activeChar, skill, crit, false, false); // Manage attack or cast break of the target (calculating rate, sending message...) if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) diff --git a/dist/game/data/scripts/handlers/effecthandlers/HpDrain.java b/dist/game/data/scripts/handlers/effecthandlers/HpDrain.java index 7e270565b5..c63fccdf2f 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/HpDrain.java +++ b/dist/game/data/scripts/handlers/effecthandlers/HpDrain.java @@ -103,7 +103,7 @@ public final class HpDrain extends AbstractEffect } activeChar.sendDamageMessage(target, damage, mcrit, false, false); target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false, false); } } } \ No newline at end of file diff --git a/dist/game/data/scripts/handlers/effecthandlers/Lethal.java b/dist/game/data/scripts/handlers/effecthandlers/Lethal.java index 78ee6b62bb..af930e0b7d 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/Lethal.java +++ b/dist/game/data/scripts/handlers/effecthandlers/Lethal.java @@ -79,7 +79,7 @@ public final class Lethal extends AbstractEffect // for Players CP and HP is set to 1. if (target.isPlayer()) { - target.notifyDamageReceived(target.getCurrentHp() - 1, activeChar, skill, true, false); + target.notifyDamageReceived(target.getCurrentHp() - 1, activeChar, skill, true, false, false); target.setCurrentCp(1); target.setCurrentHp(1); target.sendPacket(SystemMessageId.LETHAL_STRIKE); @@ -87,7 +87,7 @@ public final class Lethal extends AbstractEffect // for Monsters HP is set to 1. else if (target.isMonster() || target.isSummon()) { - target.notifyDamageReceived(target.getCurrentHp() - 1, activeChar, skill, true, false); + target.notifyDamageReceived(target.getCurrentHp() - 1, activeChar, skill, true, false, false); target.setCurrentHp(1); } activeChar.sendPacket(SystemMessageId.LETHAL_STRIKE_SUCCESSFUL); @@ -105,7 +105,7 @@ public final class Lethal extends AbstractEffect // for Monsters HP is set to 50%. else if (target.isMonster() || target.isSummon()) { - target.notifyDamageReceived(target.getCurrentHp() * 0.5, activeChar, skill, true, false); + target.notifyDamageReceived(target.getCurrentHp() * 0.5, activeChar, skill, true, false, false); target.setCurrentHp(target.getCurrentHp() * 0.5); } activeChar.sendPacket(SystemMessageId.HALF_KILL); diff --git a/dist/game/data/scripts/handlers/effecthandlers/MagicalAttack.java b/dist/game/data/scripts/handlers/effecthandlers/MagicalAttack.java index 6eeb60ce2a..140a7a58e6 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/MagicalAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/MagicalAttack.java @@ -88,12 +88,12 @@ public final class MagicalAttack extends AbstractEffect if (target.getStat().calcStat(Stats.VENGEANCE_SKILL_MAGIC_DAMAGE, 0, target, info.getSkill()) > Rnd.get(100)) { activeChar.reduceCurrentHp(damage, target, info.getSkill()); - activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false); + activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false, true); } else { target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false, false); activeChar.sendDamageMessage(target, damage, mcrit, false, false); } } diff --git a/dist/game/data/scripts/handlers/effecthandlers/MagicalAttackByAbnormal.java b/dist/game/data/scripts/handlers/effecthandlers/MagicalAttackByAbnormal.java index 342a8c3b3b..391cd35fc4 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/MagicalAttackByAbnormal.java +++ b/dist/game/data/scripts/handlers/effecthandlers/MagicalAttackByAbnormal.java @@ -90,12 +90,12 @@ public final class MagicalAttackByAbnormal extends AbstractEffect if (target.getStat().calcStat(Stats.VENGEANCE_SKILL_MAGIC_DAMAGE, 0, target, info.getSkill()) > Rnd.get(100)) { activeChar.reduceCurrentHp(damage, target, info.getSkill()); - activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false); + activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false, true); } else { target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false, false); activeChar.sendDamageMessage(target, damage, mcrit, false, false); } } diff --git a/dist/game/data/scripts/handlers/effecthandlers/MagicalSoulAttack.java b/dist/game/data/scripts/handlers/effecthandlers/MagicalSoulAttack.java index 2ed7719c0a..51a236f283 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/MagicalSoulAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/MagicalSoulAttack.java @@ -93,12 +93,12 @@ public final class MagicalSoulAttack extends AbstractEffect if (target.getStat().calcStat(Stats.VENGEANCE_SKILL_MAGIC_DAMAGE, 0, target, info.getSkill()) > Rnd.get(100)) { activeChar.reduceCurrentHp(damage, target, info.getSkill()); - activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false); + activeChar.notifyDamageReceived(damage, target, info.getSkill(), mcrit, false, true); } else { target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), mcrit, false, false); activeChar.sendDamageMessage(target, damage, mcrit, false, false); } } diff --git a/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 122f6ad2d6..6e9f90ab41 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -105,7 +105,7 @@ public final class PhysicalAttack extends AbstractEffect { activeChar.sendDamageMessage(target, damage, false, crit, false); target.reduceCurrentHp(damage, activeChar, skill); - target.notifyDamageReceived(damage, activeChar, skill, crit, false); + target.notifyDamageReceived(damage, activeChar, skill, crit, false, false); // Check if damage should be reflected Formulas.calcDamageReflected(activeChar, target, skill, crit); diff --git a/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttackHpLink.java b/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttackHpLink.java index 3968ecf5b5..a71b9b2d0b 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttackHpLink.java +++ b/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttackHpLink.java @@ -95,7 +95,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect { activeChar.sendDamageMessage(target, damage, false, crit, false); target.reduceCurrentHp(damage, activeChar, skill); - target.notifyDamageReceived(damage, activeChar, skill, crit, false); + target.notifyDamageReceived(damage, activeChar, skill, crit, false, false); // Check if damage should be reflected. Formulas.calcDamageReflected(activeChar, target, skill, crit); diff --git a/dist/game/data/scripts/handlers/effecthandlers/PhysicalSoulAttack.java b/dist/game/data/scripts/handlers/effecthandlers/PhysicalSoulAttack.java index 15893cdb8f..7354885e16 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/PhysicalSoulAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/PhysicalSoulAttack.java @@ -110,7 +110,7 @@ public final class PhysicalSoulAttack extends AbstractEffect { activeChar.sendDamageMessage(target, damage, false, crit, false); target.reduceCurrentHp(damage, activeChar, skill); - target.notifyDamageReceived(damage, activeChar, skill, crit, false); + target.notifyDamageReceived(damage, activeChar, skill, crit, false, false); // Check if damage should be reflected Formulas.calcDamageReflected(activeChar, target, skill, crit); diff --git a/dist/game/data/scripts/handlers/effecthandlers/SoulBlow.java b/dist/game/data/scripts/handlers/effecthandlers/SoulBlow.java index 8027e323fc..c46e96f18c 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/SoulBlow.java +++ b/dist/game/data/scripts/handlers/effecthandlers/SoulBlow.java @@ -81,7 +81,7 @@ public final class SoulBlow extends AbstractEffect } target.reduceCurrentHp(damage, activeChar, info.getSkill()); - target.notifyDamageReceived(damage, activeChar, info.getSkill(), false, false); + target.notifyDamageReceived(damage, activeChar, info.getSkill(), false, false, false); // Manage attack or cast break of the target (calculating rate, sending message...) if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) diff --git a/dist/game/data/scripts/handlers/effecthandlers/StaticDamage.java b/dist/game/data/scripts/handlers/effecthandlers/StaticDamage.java index bb8ae41bb9..3e5e12c75b 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/StaticDamage.java +++ b/dist/game/data/scripts/handlers/effecthandlers/StaticDamage.java @@ -53,7 +53,7 @@ public final class StaticDamage extends AbstractEffect } info.getEffected().reduceCurrentHp(_power, info.getEffector(), info.getSkill()); - info.getEffected().notifyDamageReceived(_power, info.getEffector(), info.getSkill(), false, false); + info.getEffected().notifyDamageReceived(_power, info.getEffector(), info.getSkill(), false, false, false); if (info.getEffector().isPlayer()) { diff --git a/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 9cc11ee5d3..2d4e335ef0 100644 --- a/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -88,7 +88,7 @@ public final class TriggerSkillByAttack extends AbstractEffect public void onAttackEvent(OnCreatureDamageDealt event) { - if ((event.getSkill() != null) || event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0))) + if ((event.getSkill() != null) || event.isDamageOverTime() || event.isReflect() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0))) { return; } -- GitLab