From 247a5bc9f53b57ce2576ba986e4144adbb6dba46 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 9 Dec 2017 07:32:32 +0000 Subject: [PATCH] Removed BuffInfo from effect handlers. --- .../events/HuntForSanta/HuntForSanta.java | 46 +++++++++++-- .../scripts/handlers/EffectMasterHandler.java | 1 - .../effecthandlers/AbnormalShield.java | 11 +-- .../handlers/effecthandlers/AbsorbDamage.java | 15 +++-- .../effecthandlers/AddSkillBySkill.java | 5 +- .../handlers/effecthandlers/AirBind.java | 7 +- .../handlers/effecthandlers/AttackTrait.java | 5 +- .../handlers/effecthandlers/Betray.java | 9 ++- .../handlers/effecthandlers/Blink.java | 5 +- .../effecthandlers/BlockAbnormalSlot.java | 5 +- .../handlers/effecthandlers/BlockAction.java | 11 ++- .../handlers/effecthandlers/BlockActions.java | 4 +- .../handlers/effecthandlers/BlockChat.java | 9 ++- .../handlers/effecthandlers/BlockMove.java | 5 +- .../handlers/effecthandlers/BlockParty.java | 9 ++- .../handlers/effecthandlers/BlockSkill.java | 11 +-- .../handlers/effecthandlers/BlockTarget.java | 5 +- .../effecthandlers/CallSkillOnActionTime.java | 28 +++----- .../effecthandlers/ChameleonRest.java | 17 +++-- .../handlers/effecthandlers/ChangeBody.java | 9 ++- .../effecthandlers/CpHealOverTime.java | 15 +++-- .../CriticalDamagePosition.java | 11 +-- .../CriticalRatePositionBonus.java | 11 +-- .../effecthandlers/CrystalGradeModify.java | 9 ++- .../handlers/effecthandlers/DamOverTime.java | 35 +++++----- .../effecthandlers/DamOverTimePercent.java | 25 +++---- .../handlers/effecthandlers/DefenceTrait.java | 11 +-- .../handlers/effecthandlers/Disarm.java | 5 +- .../handlers/effecthandlers/Disarmor.java | 17 +++-- .../handlers/effecthandlers/DoubleCast.java | 26 +++---- .../handlers/effecthandlers/EnableCloak.java | 9 ++- .../effecthandlers/EnlargeAbnormalSlot.java | 9 ++- .../handlers/effecthandlers/Escape.java | 5 +- .../handlers/effecthandlers/Faceoff.java | 19 +++--- .../handlers/effecthandlers/FakeDeath.java | 31 ++++----- .../scripts/handlers/effecthandlers/Fear.java | 15 ++--- .../scripts/handlers/effecthandlers/Flag.java | 9 ++- .../handlers/effecthandlers/GetMomentum.java | 11 +-- .../scripts/handlers/effecthandlers/Grow.java | 7 +- .../handlers/effecthandlers/HealOverTime.java | 21 +++--- .../scripts/handlers/effecthandlers/Hide.java | 7 +- .../handlers/effecthandlers/HpToOwner.java | 23 ++++--- .../effecthandlers/ImmobilePetBuff.java | 13 ++-- .../handlers/effecthandlers/KnockBack.java | 7 +- .../handlers/effecthandlers/Lucky.java | 7 +- .../handlers/effecthandlers/MagicMpCost.java | 11 +-- .../effecthandlers/MagicalDamOverTime.java | 18 ++--- .../effecthandlers/ManaDamOverTime.java | 15 +++-- .../effecthandlers/ManaHealOverTime.java | 17 ++--- .../effecthandlers/MpConsumePerLevel.java | 17 ++--- .../effecthandlers/NoblesseBless.java | 7 +- .../handlers/effecthandlers/Passive.java | 11 ++- .../effecthandlers/PolearmSingleTarget.java | 7 +- .../effecthandlers/ProtectionBlessing.java | 7 +- .../RecoverVitalityInPeaceZone.java | 39 ++++++----- .../handlers/effecthandlers/ReduceDamage.java | 11 +-- .../handlers/effecthandlers/Relax.java | 25 ++++--- .../handlers/effecthandlers/ResistSkill.java | 5 +- .../effecthandlers/ResurrectionSpecial.java | 20 +++--- .../handlers/effecthandlers/Reuse.java | 11 +-- .../effecthandlers/RewardItemOnExit.java | 50 -------------- .../scripts/handlers/effecthandlers/Root.java | 7 +- .../effecthandlers/SacrificeSummon.java | 5 +- .../handlers/effecthandlers/SkillEvasion.java | 11 +-- .../effecthandlers/SkillTurningOverTime.java | 13 ++-- .../handlers/effecthandlers/SoulEating.java | 7 +- .../effecthandlers/StatByMoveType.java | 15 +++-- .../handlers/effecthandlers/Synergy.java | 19 +++--- .../handlers/effecthandlers/TalismanSlot.java | 9 ++- .../handlers/effecthandlers/TargetMe.java | 19 +++--- .../effecthandlers/TeleportToSummon.java | 5 +- .../TransferDamageToPlayer.java | 15 +++-- .../handlers/effecthandlers/TransferHate.java | 5 +- .../effecthandlers/Transformation.java | 9 ++- .../effecthandlers/TriggerSkillByAttack.java | 8 +-- .../effecthandlers/TriggerSkillByAvoid.java | 9 ++- .../effecthandlers/TriggerSkillByDamage.java | 9 ++- .../TriggerSkillByDeathBlow.java | 9 ++- .../effecthandlers/TriggerSkillByKill.java | 9 ++- .../TriggerSkillByMagicType.java | 9 ++- .../effecthandlers/TriggerSkillBySkill.java | 4 +- .../TriggerSkillBySkillAttack.java | 4 +- .../handlers/effecthandlers/Unsummon.java | 5 +- .../handlers/effecthandlers/Untargetable.java | 5 +- .../effecthandlers/VitalityPointUp.java | 5 +- .../game/data/stats/skills/16400-16499.xml | 12 ---- .../game/data/stats/skills/documentation.txt | 1 - .../gameserver/model/actor/stat/CharStat.java | 4 +- .../model/effects/AbstractEffect.java | 67 ++++++++----------- .../gameserver/model/options/Options.java | 2 +- .../gameserver/model/skills/BuffInfo.java | 5 +- .../gameserver/model/skills/Skill.java | 2 +- .../events/HuntForSanta/HuntForSanta.java | 46 +++++++++++-- .../scripts/handlers/EffectMasterHandler.java | 1 - .../effecthandlers/AbnormalShield.java | 11 +-- .../handlers/effecthandlers/AbsorbDamage.java | 15 +++-- .../effecthandlers/AddSkillBySkill.java | 5 +- .../handlers/effecthandlers/AirBind.java | 7 +- .../handlers/effecthandlers/AttackTrait.java | 5 +- .../handlers/effecthandlers/Betray.java | 9 ++- .../handlers/effecthandlers/Blink.java | 5 +- .../effecthandlers/BlockAbnormalSlot.java | 5 +- .../handlers/effecthandlers/BlockAction.java | 11 ++- .../handlers/effecthandlers/BlockActions.java | 4 +- .../handlers/effecthandlers/BlockChat.java | 9 ++- .../handlers/effecthandlers/BlockMove.java | 5 +- .../handlers/effecthandlers/BlockParty.java | 9 ++- .../handlers/effecthandlers/BlockSkill.java | 11 +-- .../handlers/effecthandlers/BlockTarget.java | 5 +- .../effecthandlers/CallSkillOnActionTime.java | 28 +++----- .../effecthandlers/ChameleonRest.java | 17 +++-- .../handlers/effecthandlers/ChangeBody.java | 9 ++- .../effecthandlers/CpHealOverTime.java | 15 +++-- .../CriticalDamagePosition.java | 11 +-- .../CriticalRatePositionBonus.java | 11 +-- .../effecthandlers/CrystalGradeModify.java | 9 ++- .../handlers/effecthandlers/DamOverTime.java | 35 +++++----- .../effecthandlers/DamOverTimePercent.java | 25 +++---- .../handlers/effecthandlers/DefenceTrait.java | 11 +-- .../handlers/effecthandlers/Disarm.java | 5 +- .../handlers/effecthandlers/Disarmor.java | 17 +++-- .../handlers/effecthandlers/DoubleCast.java | 26 +++---- .../handlers/effecthandlers/EnableCloak.java | 9 ++- .../effecthandlers/EnlargeAbnormalSlot.java | 9 ++- .../handlers/effecthandlers/Escape.java | 5 +- .../handlers/effecthandlers/Faceoff.java | 19 +++--- .../handlers/effecthandlers/FakeDeath.java | 31 ++++----- .../scripts/handlers/effecthandlers/Fear.java | 15 ++--- .../scripts/handlers/effecthandlers/Flag.java | 9 ++- .../handlers/effecthandlers/GetMomentum.java | 11 +-- .../scripts/handlers/effecthandlers/Grow.java | 7 +- .../handlers/effecthandlers/HealOverTime.java | 21 +++--- .../scripts/handlers/effecthandlers/Hide.java | 7 +- .../handlers/effecthandlers/HpToOwner.java | 23 ++++--- .../effecthandlers/ImmobilePetBuff.java | 13 ++-- .../handlers/effecthandlers/KnockBack.java | 7 +- .../handlers/effecthandlers/Lucky.java | 7 +- .../handlers/effecthandlers/MagicMpCost.java | 11 +-- .../effecthandlers/MagicalDamOverTime.java | 18 ++--- .../effecthandlers/ManaDamOverTime.java | 15 +++-- .../effecthandlers/ManaHealOverTime.java | 17 ++--- .../effecthandlers/MpConsumePerLevel.java | 17 ++--- .../effecthandlers/NoblesseBless.java | 7 +- .../handlers/effecthandlers/Passive.java | 11 ++- .../effecthandlers/PolearmSingleTarget.java | 7 +- .../effecthandlers/ProtectionBlessing.java | 7 +- .../RecoverVitalityInPeaceZone.java | 39 ++++++----- .../handlers/effecthandlers/ReduceDamage.java | 11 +-- .../handlers/effecthandlers/Relax.java | 25 ++++--- .../handlers/effecthandlers/ResistSkill.java | 5 +- .../effecthandlers/ResurrectionSpecial.java | 20 +++--- .../handlers/effecthandlers/Reuse.java | 11 +-- .../effecthandlers/RewardItemOnExit.java | 50 -------------- .../scripts/handlers/effecthandlers/Root.java | 7 +- .../effecthandlers/SacrificeSummon.java | 5 +- .../handlers/effecthandlers/SkillEvasion.java | 11 +-- .../effecthandlers/SkillTurningOverTime.java | 13 ++-- .../handlers/effecthandlers/SoulEating.java | 7 +- .../effecthandlers/StatByMoveType.java | 15 +++-- .../handlers/effecthandlers/Synergy.java | 19 +++--- .../handlers/effecthandlers/TalismanSlot.java | 9 ++- .../handlers/effecthandlers/TargetMe.java | 19 +++--- .../effecthandlers/TeleportToSummon.java | 5 +- .../TransferDamageToPlayer.java | 15 +++-- .../handlers/effecthandlers/TransferHate.java | 5 +- .../effecthandlers/Transformation.java | 9 ++- .../effecthandlers/TriggerSkillByAttack.java | 8 +-- .../effecthandlers/TriggerSkillByAvoid.java | 9 ++- .../effecthandlers/TriggerSkillByDamage.java | 9 ++- .../TriggerSkillByDeathBlow.java | 9 ++- .../effecthandlers/TriggerSkillByKill.java | 9 ++- .../TriggerSkillByMagicType.java | 9 ++- .../effecthandlers/TriggerSkillBySkill.java | 4 +- .../TriggerSkillBySkillAttack.java | 4 +- .../handlers/effecthandlers/Unsummon.java | 5 +- .../handlers/effecthandlers/Untargetable.java | 5 +- .../effecthandlers/VitalityPointUp.java | 5 +- .../game/data/stats/skills/16400-16499.xml | 12 ---- .../game/data/stats/skills/documentation.txt | 1 - .../gameserver/model/actor/stat/CharStat.java | 4 +- .../model/effects/AbstractEffect.java | 67 ++++++++----------- .../gameserver/model/options/Options.java | 2 +- .../gameserver/model/skills/BuffInfo.java | 5 +- .../gameserver/model/skills/Skill.java | 2 +- .../events/HuntForSanta/HuntForSanta.java | 46 +++++++++++-- .../scripts/handlers/EffectMasterHandler.java | 1 - .../effecthandlers/AbnormalShield.java | 11 +-- .../handlers/effecthandlers/AbsorbDamage.java | 15 +++-- .../effecthandlers/AddSkillBySkill.java | 5 +- .../handlers/effecthandlers/AirBind.java | 7 +- .../handlers/effecthandlers/AttackTrait.java | 5 +- .../handlers/effecthandlers/Betray.java | 9 ++- .../handlers/effecthandlers/Blink.java | 5 +- .../effecthandlers/BlockAbnormalSlot.java | 5 +- .../handlers/effecthandlers/BlockAction.java | 11 ++- .../handlers/effecthandlers/BlockActions.java | 4 +- .../handlers/effecthandlers/BlockChat.java | 9 ++- .../handlers/effecthandlers/BlockMove.java | 5 +- .../handlers/effecthandlers/BlockParty.java | 9 ++- .../handlers/effecthandlers/BlockSkill.java | 11 +-- .../handlers/effecthandlers/BlockTarget.java | 5 +- .../effecthandlers/CallSkillOnActionTime.java | 28 +++----- .../effecthandlers/ChameleonRest.java | 17 +++-- .../handlers/effecthandlers/ChangeBody.java | 9 ++- .../effecthandlers/CpHealOverTime.java | 15 +++-- .../CriticalDamagePosition.java | 11 +-- .../CriticalRatePositionBonus.java | 11 +-- .../effecthandlers/CrystalGradeModify.java | 9 ++- .../handlers/effecthandlers/DamOverTime.java | 35 +++++----- .../effecthandlers/DamOverTimePercent.java | 25 +++---- .../handlers/effecthandlers/DefenceTrait.java | 11 +-- .../handlers/effecthandlers/Disarm.java | 5 +- .../handlers/effecthandlers/Disarmor.java | 17 +++-- .../handlers/effecthandlers/DoubleCast.java | 26 +++---- .../handlers/effecthandlers/EnableCloak.java | 9 ++- .../effecthandlers/EnlargeAbnormalSlot.java | 9 ++- .../handlers/effecthandlers/Escape.java | 5 +- .../handlers/effecthandlers/Faceoff.java | 19 +++--- .../handlers/effecthandlers/FakeDeath.java | 31 ++++----- .../scripts/handlers/effecthandlers/Fear.java | 15 ++--- .../scripts/handlers/effecthandlers/Flag.java | 9 ++- .../handlers/effecthandlers/GetMomentum.java | 11 +-- .../scripts/handlers/effecthandlers/Grow.java | 7 +- .../handlers/effecthandlers/HealOverTime.java | 21 +++--- .../scripts/handlers/effecthandlers/Hide.java | 7 +- .../handlers/effecthandlers/HpToOwner.java | 23 ++++--- .../effecthandlers/ImmobilePetBuff.java | 13 ++-- .../handlers/effecthandlers/KnockBack.java | 7 +- .../handlers/effecthandlers/Lucky.java | 7 +- .../handlers/effecthandlers/MagicMpCost.java | 11 +-- .../effecthandlers/MagicalDamOverTime.java | 18 ++--- .../effecthandlers/ManaDamOverTime.java | 15 +++-- .../effecthandlers/ManaHealOverTime.java | 17 ++--- .../effecthandlers/MpConsumePerLevel.java | 17 ++--- .../effecthandlers/NoblesseBless.java | 7 +- .../handlers/effecthandlers/Passive.java | 11 ++- .../effecthandlers/PolearmSingleTarget.java | 7 +- .../effecthandlers/ProtectionBlessing.java | 7 +- .../RecoverVitalityInPeaceZone.java | 39 ++++++----- .../handlers/effecthandlers/ReduceDamage.java | 11 +-- .../handlers/effecthandlers/Relax.java | 25 ++++--- .../handlers/effecthandlers/ResistSkill.java | 5 +- .../effecthandlers/ResurrectionSpecial.java | 20 +++--- .../handlers/effecthandlers/Reuse.java | 11 +-- .../effecthandlers/RewardItemOnExit.java | 50 -------------- .../scripts/handlers/effecthandlers/Root.java | 7 +- .../effecthandlers/SacrificeSummon.java | 5 +- .../handlers/effecthandlers/SkillEvasion.java | 11 +-- .../effecthandlers/SkillTurningOverTime.java | 13 ++-- .../handlers/effecthandlers/SoulEating.java | 7 +- .../effecthandlers/StatByMoveType.java | 15 +++-- .../handlers/effecthandlers/Synergy.java | 19 +++--- .../handlers/effecthandlers/TalismanSlot.java | 9 ++- .../handlers/effecthandlers/TargetMe.java | 19 +++--- .../effecthandlers/TeleportToSummon.java | 5 +- .../TransferDamageToPlayer.java | 15 +++-- .../handlers/effecthandlers/TransferHate.java | 5 +- .../effecthandlers/Transformation.java | 9 ++- .../effecthandlers/TriggerSkillByAttack.java | 8 +-- .../effecthandlers/TriggerSkillByAvoid.java | 9 ++- .../effecthandlers/TriggerSkillByDamage.java | 9 ++- .../TriggerSkillByDeathBlow.java | 9 ++- .../effecthandlers/TriggerSkillByKill.java | 9 ++- .../TriggerSkillByMagicType.java | 9 ++- .../effecthandlers/TriggerSkillBySkill.java | 4 +- .../TriggerSkillBySkillAttack.java | 4 +- .../handlers/effecthandlers/Unsummon.java | 5 +- .../handlers/effecthandlers/Untargetable.java | 5 +- .../effecthandlers/VitalityPointUp.java | 5 +- .../game/data/stats/skills/16400-16499.xml | 12 ---- .../game/data/stats/skills/documentation.txt | 1 - .../gameserver/model/actor/stat/CharStat.java | 4 +- .../model/effects/AbstractEffect.java | 67 ++++++++----------- .../gameserver/model/options/Options.java | 2 +- .../gameserver/model/skills/BuffInfo.java | 5 +- .../gameserver/model/skills/Skill.java | 2 +- .../events/HuntForSanta/HuntForSanta.java | 46 +++++++++++-- .../scripts/handlers/EffectMasterHandler.java | 1 - .../effecthandlers/AbnormalShield.java | 11 +-- .../handlers/effecthandlers/AbsorbDamage.java | 15 +++-- .../effecthandlers/AddSkillBySkill.java | 5 +- .../handlers/effecthandlers/AirBind.java | 7 +- .../handlers/effecthandlers/AttackTrait.java | 5 +- .../handlers/effecthandlers/Betray.java | 9 ++- .../handlers/effecthandlers/Blink.java | 5 +- .../effecthandlers/BlockAbnormalSlot.java | 5 +- .../handlers/effecthandlers/BlockAction.java | 11 ++- .../handlers/effecthandlers/BlockActions.java | 4 +- .../handlers/effecthandlers/BlockChat.java | 9 ++- .../handlers/effecthandlers/BlockMove.java | 5 +- .../handlers/effecthandlers/BlockParty.java | 9 ++- .../handlers/effecthandlers/BlockSkill.java | 11 +-- .../handlers/effecthandlers/BlockTarget.java | 5 +- .../effecthandlers/CallSkillOnActionTime.java | 28 +++----- .../effecthandlers/ChameleonRest.java | 17 +++-- .../handlers/effecthandlers/ChangeBody.java | 9 ++- .../effecthandlers/CpHealOverTime.java | 15 +++-- .../effecthandlers/CreateCommonItem.java | 9 ++- .../handlers/effecthandlers/CreateItem.java | 9 ++- .../CriticalDamagePosition.java | 11 +-- .../CriticalRatePositionBonus.java | 11 +-- .../effecthandlers/CrystalGradeModify.java | 9 ++- .../handlers/effecthandlers/Crystallize.java | 9 ++- .../handlers/effecthandlers/DamOverTime.java | 35 +++++----- .../effecthandlers/DamOverTimePercent.java | 25 +++---- .../handlers/effecthandlers/DefenceTrait.java | 11 +-- .../handlers/effecthandlers/Disarm.java | 5 +- .../handlers/effecthandlers/Disarmor.java | 17 +++-- .../handlers/effecthandlers/DoubleCast.java | 26 +++---- .../handlers/effecthandlers/EnableCloak.java | 9 ++- .../effecthandlers/EnlargeAbnormalSlot.java | 9 ++- .../handlers/effecthandlers/Escape.java | 5 +- .../handlers/effecthandlers/Faceoff.java | 19 +++--- .../handlers/effecthandlers/FakeDeath.java | 31 ++++----- .../scripts/handlers/effecthandlers/Fear.java | 15 ++--- .../scripts/handlers/effecthandlers/Flag.java | 9 ++- .../handlers/effecthandlers/GetMomentum.java | 11 +-- .../scripts/handlers/effecthandlers/Grow.java | 7 +- .../handlers/effecthandlers/HealOverTime.java | 21 +++--- .../scripts/handlers/effecthandlers/Hide.java | 7 +- .../handlers/effecthandlers/HpToOwner.java | 23 ++++--- .../effecthandlers/ImmobilePetBuff.java | 13 ++-- .../handlers/effecthandlers/KnockBack.java | 7 +- .../handlers/effecthandlers/Lucky.java | 7 +- .../handlers/effecthandlers/MagicMpCost.java | 11 +-- .../effecthandlers/MagicalDamOverTime.java | 18 ++--- .../effecthandlers/ManaDamOverTime.java | 15 +++-- .../effecthandlers/ManaHealOverTime.java | 17 ++--- .../effecthandlers/MpConsumePerLevel.java | 17 ++--- .../effecthandlers/NoblesseBless.java | 7 +- .../handlers/effecthandlers/Passive.java | 11 ++- .../effecthandlers/PolearmSingleTarget.java | 7 +- .../effecthandlers/ProtectionBlessing.java | 7 +- .../RecoverVitalityInPeaceZone.java | 39 ++++++----- .../handlers/effecthandlers/ReduceDamage.java | 11 +-- .../handlers/effecthandlers/Relax.java | 25 ++++--- .../effecthandlers/RemoveEquipPenalty.java | 9 ++- .../handlers/effecthandlers/ResistSkill.java | 5 +- .../effecthandlers/ResurrectionSpecial.java | 20 +++--- .../handlers/effecthandlers/Reuse.java | 11 +-- .../effecthandlers/RewardItemOnExit.java | 50 -------------- .../scripts/handlers/effecthandlers/Root.java | 7 +- .../effecthandlers/SacrificeSummon.java | 5 +- .../handlers/effecthandlers/SkillEvasion.java | 11 +-- .../effecthandlers/SkillTurningOverTime.java | 13 ++-- .../handlers/effecthandlers/SoulEating.java | 7 +- .../effecthandlers/StatByMoveType.java | 15 +++-- .../handlers/effecthandlers/Synergy.java | 19 +++--- .../handlers/effecthandlers/TalismanSlot.java | 9 ++- .../handlers/effecthandlers/TargetMe.java | 19 +++--- .../effecthandlers/TeleportToSummon.java | 5 +- .../TransferDamageToPlayer.java | 15 +++-- .../handlers/effecthandlers/TransferHate.java | 5 +- .../effecthandlers/Transformation.java | 9 ++- .../effecthandlers/TriggerSkillByAttack.java | 8 +-- .../effecthandlers/TriggerSkillByAvoid.java | 9 ++- .../effecthandlers/TriggerSkillByDamage.java | 9 ++- .../TriggerSkillByDeathBlow.java | 9 ++- .../effecthandlers/TriggerSkillByKill.java | 9 ++- .../TriggerSkillByMagicType.java | 9 ++- .../effecthandlers/TriggerSkillBySkill.java | 4 +- .../TriggerSkillBySkillAttack.java | 4 +- .../handlers/effecthandlers/Unsummon.java | 5 +- .../handlers/effecthandlers/Untargetable.java | 5 +- .../effecthandlers/VitalityPointUp.java | 5 +- .../game/data/stats/skills/16400-16499.xml | 12 ---- .../game/data/stats/skills/documentation.txt | 1 - .../gameserver/model/actor/stat/CharStat.java | 4 +- .../model/effects/AbstractEffect.java | 67 ++++++++----------- .../gameserver/model/options/Options.java | 2 +- .../gameserver/model/skills/BuffInfo.java | 5 +- .../gameserver/model/skills/Skill.java | 2 +- .../scripts/handlers/EffectMasterHandler.java | 1 - .../effecthandlers/AbnormalShield.java | 11 +-- .../handlers/effecthandlers/AbsorbDamage.java | 15 +++-- .../effecthandlers/AddSkillBySkill.java | 5 +- .../handlers/effecthandlers/AttackTrait.java | 5 +- .../handlers/effecthandlers/Betray.java | 9 ++- .../handlers/effecthandlers/Blink.java | 5 +- .../effecthandlers/BlockAbnormalSlot.java | 5 +- .../handlers/effecthandlers/BlockAction.java | 11 ++- .../handlers/effecthandlers/BlockActions.java | 4 +- .../handlers/effecthandlers/BlockChat.java | 9 ++- .../handlers/effecthandlers/BlockMove.java | 5 +- .../handlers/effecthandlers/BlockParty.java | 9 ++- .../handlers/effecthandlers/BlockSkill.java | 11 +-- .../handlers/effecthandlers/BlockTarget.java | 5 +- .../effecthandlers/CallSkillOnActionTime.java | 28 +++----- .../effecthandlers/ChameleonRest.java | 17 +++-- .../handlers/effecthandlers/ChangeBody.java | 9 ++- .../effecthandlers/CpHealOverTime.java | 15 +++-- .../CriticalDamagePosition.java | 11 +-- .../CriticalRatePositionBonus.java | 11 +-- .../effecthandlers/CrystalGradeModify.java | 9 ++- .../handlers/effecthandlers/DamOverTime.java | 35 +++++----- .../effecthandlers/DamOverTimePercent.java | 25 +++---- .../handlers/effecthandlers/DefenceTrait.java | 11 +-- .../handlers/effecthandlers/Disarm.java | 5 +- .../handlers/effecthandlers/Disarmor.java | 17 +++-- .../handlers/effecthandlers/DoubleCast.java | 26 +++---- .../handlers/effecthandlers/EnableCloak.java | 9 ++- .../effecthandlers/EnlargeAbnormalSlot.java | 9 ++- .../handlers/effecthandlers/Escape.java | 5 +- .../handlers/effecthandlers/Faceoff.java | 19 +++--- .../handlers/effecthandlers/FakeDeath.java | 31 ++++----- .../scripts/handlers/effecthandlers/Fear.java | 15 ++--- .../scripts/handlers/effecthandlers/Flag.java | 9 ++- .../handlers/effecthandlers/GetMomentum.java | 11 +-- .../scripts/handlers/effecthandlers/Grow.java | 7 +- .../handlers/effecthandlers/HealOverTime.java | 21 +++--- .../scripts/handlers/effecthandlers/Hide.java | 7 +- .../handlers/effecthandlers/HpToOwner.java | 23 ++++--- .../effecthandlers/ImmobilePetBuff.java | 13 ++-- .../handlers/effecthandlers/KnockBack.java | 7 +- .../handlers/effecthandlers/Lucky.java | 7 +- .../handlers/effecthandlers/MagicMpCost.java | 11 +-- .../effecthandlers/MagicalDamOverTime.java | 18 ++--- .../effecthandlers/ManaDamOverTime.java | 15 +++-- .../effecthandlers/ManaHealOverTime.java | 17 ++--- .../effecthandlers/MpConsumePerLevel.java | 17 ++--- .../effecthandlers/NoblesseBless.java | 7 +- .../handlers/effecthandlers/Passive.java | 11 ++- .../effecthandlers/PolearmSingleTarget.java | 7 +- .../effecthandlers/ProtectionBlessing.java | 7 +- .../RecoverVitalityInPeaceZone.java | 39 ++++++----- .../handlers/effecthandlers/ReduceDamage.java | 11 +-- .../handlers/effecthandlers/Relax.java | 25 ++++--- .../handlers/effecthandlers/ResistSkill.java | 5 +- .../effecthandlers/ResurrectionSpecial.java | 20 +++--- .../handlers/effecthandlers/Reuse.java | 11 +-- .../effecthandlers/RewardItemOnExit.java | 50 -------------- .../scripts/handlers/effecthandlers/Root.java | 7 +- .../effecthandlers/SacrificeSummon.java | 5 +- .../handlers/effecthandlers/SkillEvasion.java | 11 +-- .../effecthandlers/SkillTurningOverTime.java | 13 ++-- .../handlers/effecthandlers/SoulEating.java | 7 +- .../effecthandlers/StatByMoveType.java | 15 +++-- .../handlers/effecthandlers/Synergy.java | 19 +++--- .../handlers/effecthandlers/TalismanSlot.java | 9 ++- .../handlers/effecthandlers/TargetMe.java | 19 +++--- .../effecthandlers/TeleportToSummon.java | 5 +- .../TransferDamageToPlayer.java | 15 +++-- .../handlers/effecthandlers/TransferHate.java | 5 +- .../effecthandlers/Transformation.java | 9 ++- .../effecthandlers/TriggerSkillByAttack.java | 8 +-- .../effecthandlers/TriggerSkillByAvoid.java | 9 ++- .../effecthandlers/TriggerSkillByDamage.java | 9 ++- .../TriggerSkillByDeathBlow.java | 9 ++- .../effecthandlers/TriggerSkillByKill.java | 9 ++- .../TriggerSkillByMagicType.java | 9 ++- .../effecthandlers/TriggerSkillBySkill.java | 4 +- .../TriggerSkillBySkillAttack.java | 4 +- .../handlers/effecthandlers/Unsummon.java | 5 +- .../handlers/effecthandlers/Untargetable.java | 5 +- .../effecthandlers/VitalityPointUp.java | 5 +- .../game/data/stats/skills/documentation.txt | 1 - .../gameserver/model/actor/stat/CharStat.java | 4 +- .../model/effects/AbstractEffect.java | 67 ++++++++----------- .../gameserver/model/options/Options.java | 2 +- .../gameserver/model/skills/BuffInfo.java | 5 +- .../gameserver/model/skills/Skill.java | 2 +- 461 files changed, 2706 insertions(+), 3035 deletions(-) delete mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java delete mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java delete mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java delete mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java delete mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java index 3e9a609e27..61f879a4b1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java @@ -18,6 +18,11 @@ package events.HuntForSanta; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.quest.LongTimeEvent; import com.l2jmobius.gameserver.model.skills.BuffInfo; @@ -39,7 +44,7 @@ public final class HuntForSanta extends LongTimeEvent private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1); private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1); // Item - // private static final int SANTAS_MARK = 40313; + private static final int SANTAS_MARK = 40313; private HuntForSanta() { @@ -63,21 +68,27 @@ public final class HuntForSanta extends LongTimeEvent case "receiveBuffStocking": { htmltext = applyBuff(npc, player, BUFF_STOCKING.getSkill()); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffTree": { htmltext = applyBuff(npc, player, BUFF_TREE.getSkill()); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffSnowman": { htmltext = applyBuff(npc, player, BUFF_SNOWMAN.getSkill()); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffAll": { htmltext = applyAllBuffs(npc, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "changeBuff": @@ -87,6 +98,17 @@ public final class HuntForSanta extends LongTimeEvent break; } } + + if (event.startsWith("rewardBuffStocking") // + || event.startsWith("rewardBuffSnowman") // + || event.startsWith("rewardBuffTree")) + { + if ((player != null) && (player.isOnlineInt() == 1)) + { + giveItems(player, SANTAS_MARK, 1); + } + } + return htmltext; } @@ -128,20 +150,36 @@ public final class HuntForSanta extends LongTimeEvent private void removeBuffs(L2PcInstance player) { + player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + } + + @RegisterEvent(EventType.ON_PLAYER_LOGIN) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerLogin(OnPlayerLogin event) + { + final L2PcInstance player = event.getActiveChar(); final BuffInfo buffStocking = player.getEffectList().getBuffInfoBySkillId(BUFF_STOCKING.getSkillId()); final BuffInfo buffTree = player.getEffectList().getBuffInfoBySkillId(BUFF_TREE.getSkillId()); final BuffInfo buffSnowman = player.getEffectList().getBuffInfoBySkillId(BUFF_SNOWMAN.getSkillId()); if (buffStocking != null) { - player.getEffectList().stopSkillEffects(true, buffStocking.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), buffStocking.getTime() * 1000, null, player); } if (buffTree != null) { - player.getEffectList().stopSkillEffects(true, buffTree.getSkill()); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), buffTree.getTime() * 1000, null, player); } if (buffSnowman != null) { - player.getEffectList().stopSkillEffects(true, buffSnowman.getSkill()); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), buffSnowman.getTime() * 1000, null, player); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java index 30fff039b3..2285d2836c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -280,7 +280,6 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new); EffectHandler.getInstance().registerHandler("Reuse", Reuse::new); EffectHandler.getInstance().registerHandler("ReuseSkillById", ReuseSkillById::new); - EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new); EffectHandler.getInstance().registerHandler("Root", Root::new); EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new); EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java index caae4afaef..33ddc02a86 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An effect that blocks a debuff. Acts like DOTA's Linken Sphere. @@ -36,9 +37,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(_times); + effected.setAbnormalShieldBlocks(_times); } @Override @@ -48,9 +49,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(Integer.MIN_VALUE); + effected.setAbnormalShieldBlocks(Integer.MIN_VALUE); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java index 6c9dd598d6..e9c88553fe 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java @@ -20,12 +20,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -60,16 +61,16 @@ public class AbsorbDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); - _damageHolder.remove(info.getEffected().getObjectId()); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + _damageHolder.remove(effected.getObjectId()); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - _damageHolder.put(info.getEffected().getObjectId(), _damage); - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + _damageHolder.put(effected.getObjectId(), _damage); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java index 838b3c2d0c..c3400d7890 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -52,8 +51,8 @@ public class AddSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeSkill(_addedSkill.getSkill(), true); + effected.removeSkill(_addedSkill.getSkill(), true); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index 2b1aed91f3..b526b6c4fc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -101,11 +100,11 @@ public final class AirBind extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5101ecb949..26ee9c8fc8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; @@ -51,9 +50,9 @@ public final class AttackTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getAttackTraits()) { for (Entry trait : _attackTraits.entrySet()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Betray.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Betray.java index c96c435a61..a7e0626ef3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Betray.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Betray.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Betray extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffector().isPlayer() && info.getEffected().isSummon(); + return effector.isPlayer() && effected.isSummon(); } @Override @@ -53,8 +52,8 @@ public final class Betray extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Blink.java index db1463c04d..18891823cf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -70,10 +69,10 @@ public final class Blink extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return !info.getEffected().cannotEscape(); + return !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java index cd8741e950..143ff0cb20 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -47,8 +46,8 @@ public final class BlockAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); + effected.getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java index 191f846d67..a722b8f0bd 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,9 +47,9 @@ public final class BlockAction extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -74,15 +73,15 @@ public final class BlockAction extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 204c280a80..aba1c6b66a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,9 +62,8 @@ public final class BlockActions extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); _allowedSkills.stream().forEach(effected::removeBlockActionsAllowedSkill); if (!effected.isPlayer()) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java index c175e48897..89c3e54971 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class BlockChat extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -56,8 +55,8 @@ public final class BlockChat extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java index b87b6418fd..a58ad8b1f4 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -39,8 +38,8 @@ public final class BlockMove extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java index 05ac115c08..e49dc6c64b 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class BlockParty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -49,8 +48,8 @@ public final class BlockParty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index cc24155ef8..34efcfba26 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -18,12 +18,13 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Block Skills by isMagic type. @@ -49,20 +50,20 @@ public final class BlockSkill extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_magicTypes == null) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java index 06a12b6e96..2cb9267e0e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -46,8 +45,8 @@ public class BlockTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setTargetable(true); + effected.setTargetable(true); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java index 91080ab874..924b08d8f7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -40,40 +39,35 @@ public final class CallSkillOnActionTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return castSkill(info); - } - - private boolean castSkill(BuffInfo info) - { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } - final Skill skill = _skill.getSkill(); - if (skill != null) + final Skill triggerSkill = _skill.getSkill(); + if (triggerSkill != null) { - if (skill.isSynergySkill()) + if (triggerSkill.isSynergySkill()) { - skill.applyEffects(info.getEffector(), info.getEffector()); + triggerSkill.applyEffects(effector, effector); } - L2World.getInstance().forEachVisibleObjectInRange(info.getEffector(), L2Character.class, _skill.getSkill().getAffectRange(), c -> + L2World.getInstance().forEachVisibleObjectInRange(effector, L2Character.class, _skill.getSkill().getAffectRange(), c -> { - final L2Object target = skill.getTarget(info.getEffector(), c, false, false, false); + final L2Object target = triggerSkill.getTarget(effector, c, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, skill); + SkillCaster.triggerCast(effector, (L2Character) target, triggerSkill); } }); } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java index a431b998d7..8be7f869c6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -52,30 +51,30 @@ public final class ChameleonRest extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java index 461153971c..405b767faf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.TemplateChanceHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,9 +43,9 @@ public final class ChangeBody extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -63,8 +62,8 @@ public final class ChangeBody extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java index 6a6c25702b..bc5e693a78 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Cp Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class CpHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double cp = info.getEffected().getCurrentCp(); - final double maxcp = info.getEffected().getMaxRecoverableCp(); + double cp = effected.getCurrentCp(); + final double maxcp = effected.getMaxRecoverableCp(); // Not needed to set the CP and send update packet if player is already at max CP if (cp >= maxcp) @@ -52,8 +53,8 @@ public final class CpHealOverTime extends AbstractEffect cp += _power * getTicksMultiplier(); cp = Math.min(cp, maxcp); - info.getEffected().setCurrentCp(cp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); + effected.setCurrentCp(cp, false); + effected.broadcastStatusUpdate(effector); return true; } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index b8eebc366c..e096752577 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalDamagePosition extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index bca8357f83..dad04ebbdd 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalRatePositionBonus extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java index 248727ab7d..717406c0c2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -49,9 +48,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertisePenaltyBonus(0); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index ffd0364a12..07759f9e7d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -39,22 +40,22 @@ public final class DamOverTime extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - if (!_canKill && (damage >= (info.getEffected().getCurrentHp() - 1))) + if (!_canKill && (damage >= (effected.getCurrentHp() - 1))) { - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -66,19 +67,19 @@ public final class DamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } double damage = _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -86,15 +87,15 @@ public final class DamOverTime extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index ef87a82dfa..044b4d98bc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -45,19 +46,19 @@ public final class DamOverTimePercent extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double damage = info.getEffected().getCurrentHp() * _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + double damage = effected.getCurrentHp() * _power * getTicksMultiplier(); + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -65,17 +66,17 @@ public final class DamOverTimePercent extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index a901fd5e38..0332a2ee2e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; /** @@ -66,9 +67,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) @@ -87,9 +88,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarm.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarm.java index 8d040f9746..c5f64c3551 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarm.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarm.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class Disarm extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java index 9d06ee3437..b6d50cd89c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -54,9 +53,9 @@ public final class Disarmor extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (_slot != L2Item.SLOT_NONE) && info.getEffected().isPlayer(); + return (_slot != L2Item.SLOT_NONE) && effected.isPlayer(); } @Override @@ -98,18 +97,18 @@ public final class Disarmor extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { return; } - final Integer disarmedObjId = _unequippedItems.remove(info.getEffected().getObjectId()); + final Integer disarmedObjId = _unequippedItems.remove(effected.getObjectId()); if ((disarmedObjId != null) && (disarmedObjId > 0)) { - final L2PcInstance player = info.getEffected().getActingPlayer(); - info.getEffected().getInventory().unblockItemSlot(_slot); + final L2PcInstance player = effected.getActingPlayer(); + player.getInventory().unblockItemSlot(_slot); final L2ItemInstance item = player.getInventory().getItemByObjectId(disarmedObjId); if (item != null) @@ -137,6 +136,6 @@ public final class Disarmor extends AbstractEffect } } } - super.onExit(info); + super.onExit(effector, effected, skill); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java index 55e476feee..c11228e931 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -56,34 +56,34 @@ public final class DoubleCast extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { for (SkillHolder holder : TOGGLE_SKILLS) { - final Skill skill = holder.getSkill(); - if ((skill != null) && !info.getEffected().isAffectedBySkill(holder)) + final Skill s = holder.getSkill(); + if ((s != null) && !effected.isAffectedBySkill(holder)) { - _addedToggles.computeIfAbsent(info.getEffected().getObjectId(), v -> new ArrayList<>()).add(holder); - skill.applyEffects(info.getEffected(), info.getEffected()); + _addedToggles.computeIfAbsent(effected.getObjectId(), v -> new ArrayList<>()).add(holder); + s.applyEffects(effected, effected); } } } - super.onStart(info); + super.onStart(effector, effected, skill); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - _addedToggles.computeIfPresent(info.getEffected().getObjectId(), (k, v) -> + _addedToggles.computeIfPresent(effected.getObjectId(), (k, v) -> { - v.forEach(h -> info.getEffected().stopSkillEffects(h.getSkill())); + v.forEach(h -> effected.stopSkillEffects(h.getSkill())); return null; }); } - super.onExit(info); + super.onExit(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java index b5aa3ce382..640bf5f0d9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class EnableCloak extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class EnableCloak extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().setCloakSlotStatus(false); + effected.getActingPlayer().getStat().setCloakSlotStatus(false); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java index 32f856ab48..2c1012dbb1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().setMaxBuffCount(Math.max(0, info.getEffected().getStat().getMaxBuffCount() - _slots)); + effected.getStat().setMaxBuffCount(Math.max(0, effected.getStat().getMaxBuffCount() - _slots)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Escape.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Escape.java index 9de8e8bc89..a89e887f3d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Escape.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Escape.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -51,10 +50,10 @@ public final class Escape extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return super.canStart(info) && !info.getEffected().cannotEscape(); + return super.canStart(effector, effected, skill) && !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java index a7e71242d8..4325b19161 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -37,22 +38,22 @@ public class Faceoff extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(info.getEffected().getObjectId()); - info.getEffected().getActingPlayer().setAttackerObjId(info.getEffector().getObjectId()); + effector.getActingPlayer().setAttackerObjId(effected.getObjectId()); + effected.getActingPlayer().setAttackerObjId(effector.getObjectId()); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(0); - info.getEffected().getActingPlayer().setAttackerObjId(0); + effector.getActingPlayer().setAttackerObjId(0); + effected.getActingPlayer().setAttackerObjId(0); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java index fa1651864a..66817daf19 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ChangeWaitType; import com.l2jmobius.gameserver.network.serverpackets.Revive; @@ -45,43 +46,43 @@ public final class FakeDeath extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().setRecentFakeDeath(true); + effected.getActingPlayer().setRecentFakeDeath(true); } - info.getEffected().broadcastPacket(new ChangeWaitType(info.getEffected(), ChangeWaitType.WT_STOP_FAKEDEATH)); - info.getEffected().broadcastPacket(new Revive(info.getEffected())); + effected.broadcastPacket(new ChangeWaitType(effected, ChangeWaitType.WT_STOP_FAKEDEATH)); + effected.broadcastPacket(new Revive(effected)); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().startFakeDeath(); + effected.startFakeDeath(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 78fc694005..4e61caf974 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.Util; @@ -45,9 +44,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character creature = info.getEffected(); + final L2Character creature = effected; return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && // !((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || // (creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON))); @@ -60,9 +59,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - fearAction(null, info.getEffected()); + fearAction(null, effected); return false; } @@ -74,11 +73,11 @@ public final class Fear extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Flag.java index 0b542a7d75..85a7701506 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Flag.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Flag extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class Flag extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().updatePvPFlag(0); + effected.getActingPlayer().updatePvPFlag(0); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index 82a36fbbdc..bf91e7c2e8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate; @@ -44,11 +45,11 @@ public class GetMomentum extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); final int maxCharge = (int) player.getStat().getValue(Stats.MAX_MOMENTUM, 0); final int newCharge = Math.min(player.getCharges() + 1, maxCharge); @@ -68,6 +69,6 @@ public class GetMomentum extends AbstractEffect player.sendPacket(new EtcStatusUpdate(player)); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Grow.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Grow.java index c5f9a21bcf..4eb28677e3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Grow.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Grow.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,11 +43,11 @@ public final class Grow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isNpc()) + if (effected.isNpc()) { - final L2Npc npc = (L2Npc) info.getEffected(); + final L2Npc npc = (L2Npc) effected; npc.setCollisionHeight(npc.getTemplate().getCollisionHeight()); npc.setCollisionRadius(npc.getTemplate().getfCollisionRadius()); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java index 7562521eaf..fc88d64de0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax; @@ -38,15 +37,15 @@ public final class HealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead() || info.getEffected().isDoor()) + if (effected.isDead() || effected.isDoor()) { return false; } - double hp = info.getEffected().getCurrentHp(); - final double maxhp = info.getEffected().getMaxRecoverableHp(); + double hp = effected.getCurrentHp(); + final double maxhp = effected.getMaxRecoverableHp(); // Not needed to set the HP and send update packet if player is already at max HP if (hp >= maxhp) @@ -56,19 +55,17 @@ public final class HealOverTime extends AbstractEffect hp += _power * getTicksMultiplier(); hp = Math.min(hp, maxhp); - info.getEffected().setCurrentHp(hp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentHp(hp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); - final Skill skill = info.getSkill(); if (effected.isPlayer() && (getTicks() > 0) && (skill.getAbnormalType() == AbnormalType.HP_RECOVER)) { - effected.sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power)); + effected.sendPacket(new ExRegenMax(skill.getAbnormalTime(), getTicks(), _power)); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Hide.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Hide.java index da2ac54c54..1f71330b6e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Hide.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Hide.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -61,11 +60,11 @@ public final class Hide extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance activeChar = info.getEffected().getActingPlayer(); + final L2PcInstance activeChar = effected.getActingPlayer(); if (!activeChar.inObserverMode()) { activeChar.setInvisible(false); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java index 1ad15ccdde..853236001c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -39,16 +40,16 @@ public final class HpToOwner extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { final double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -60,22 +61,22 @@ public final class HpToOwner extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double damage = _power * getTicksMultiplier(); - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); if (_stealAmount > 0) { final double amount = (damage * _stealAmount) / 100; - info.getEffector().setCurrentHp(info.getEffector().getCurrentHp() + amount); - info.getEffector().setCurrentMp(info.getEffector().getCurrentMp() + amount); + effector.setCurrentHp(effector.getCurrentHp() + amount); + effector.setCurrentMp(effector.getCurrentMp() + amount); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java index 570a854ae3..c7e7969777 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Immobile Pet Buff effect implementation. @@ -32,17 +33,17 @@ public final class ImmobilePetBuff extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isSummon() && info.getEffector().isPlayer() && (((L2Summon) info.getEffected()).getOwner() == info.getEffector())) + if (effected.isSummon() && effector.isPlayer() && (((L2Summon) effected).getOwner() == effector)) { - info.getEffected().setIsImmobilized(true); + effected.setIsImmobilized(true); } } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 81b8f8134c..d94354ed72 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -141,11 +140,11 @@ public final class KnockBack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Lucky.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Lucky.java index 2ebec1b47e..611c210e9d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Lucky.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Lucky.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Lucky effect implementation. @@ -31,8 +32,8 @@ public final class Lucky extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java index d605d89ff7..259edcf3c0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class MagicMpCost extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java index 0f41184d19..bebbaefdca 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -47,22 +47,22 @@ public final class MagicalDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - final L2Character activeChar = info.getEffector(); - final L2Character target = info.getEffected(); + final L2Character activeChar = effector; + final L2Character target = effected; if (target.isDead()) { return false; } - double damage = Formulas.calcMagicDam(activeChar, target, info.getSkill(), activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. + double damage = Formulas.calcMagicDam(activeChar, target, skill, activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. damage *= getTicksMultiplier(); if (damage >= (target.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { target.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; @@ -74,13 +74,13 @@ public final class MagicalDamOverTime extends AbstractEffect // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them if (target.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } damage = target.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java index 7b6dc8f966..6405a3a837 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,21 +36,21 @@ public final class ManaDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if ((manaDam > info.getEffected().getCurrentMp()) && info.getSkill().isToggle()) + if ((manaDam > effected.getCurrentMp()) && skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java index b9fb295056..fefa4ffef1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Mana Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class ManaHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double mp = info.getEffected().getCurrentMp(); - final double maxmp = info.getEffected().getMaxRecoverableMp(); + double mp = effected.getCurrentMp(); + final double maxmp = effected.getMaxRecoverableMp(); // Not needed to set the MP and send update packet if player is already at max MP if (mp >= maxmp) @@ -52,8 +53,8 @@ public final class ManaHealOverTime extends AbstractEffect mp += _power * getTicksMultiplier(); mp = Math.min(mp, maxmp); - info.getEffected().setCurrentMp(mp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentMp(mp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java index 986913d63f..3f1d4e464c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,22 +36,22 @@ public final class MpConsumePerLevel extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double base = _power * getTicksMultiplier(); - final double consume = (info.getAbnormalTime() > 0) ? ((info.getEffected().getLevel() - 1) / 7.5) * base * info.getAbnormalTime() : base; - if (consume > info.getEffected().getCurrentMp()) + final double consume = (skill.getAbnormalTime() > 0) ? ((effected.getLevel() - 1) / 7.5) * base * skill.getAbnormalTime() : base; + if (consume > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(consume); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(consume); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java index af204b5579..d12759271d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Noblesse Blessing effect implementation. @@ -33,9 +34,9 @@ public final class NoblesseBless extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayable(); + return (effector != null) && (effected != null) && effected.isPlayable(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Passive.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Passive.java index 3f7d04eacc..c183e9b5af 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Passive.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Passive.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Passive extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isAttackable(); + return effected.isAttackable(); } @Override @@ -48,9 +47,9 @@ public final class Passive extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().enableAllSkills(); - info.getEffected().setIsImmobilized(false); + effected.enableAllSkills(); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java index 340030133f..831e5d3cf0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; @@ -42,11 +41,11 @@ public class PolearmSingleTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); + effected.getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java index e8366e855f..c0e2c52b35 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Protection Blessing effect implementation. @@ -32,9 +33,9 @@ public final class ProtectionBlessing extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java index 510b5ecaa5..9438b97eaa 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java @@ -17,9 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.PcStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.ZoneId; /** @@ -44,41 +46,44 @@ public final class RecoverVitalityInPeaceZone extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) // - || info.getEffected().isDead() // - || !info.getEffected().isPlayer() // - || !info.getEffected().isInsideZone(ZoneId.PEACE)) + if ((effected == null) // + || effected.isDead() // + || !effected.isPlayer() // + || !effected.isInsideZone(ZoneId.PEACE)) { return false; } - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); + long vitality = effected.getActingPlayer().getVitalityPoints(); vitality += _amount; if (vitality >= PcStat.MAX_VITALITY_POINTS) { vitality = PcStat.MAX_VITALITY_POINTS; } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); + effected.getActingPlayer().setVitalityPoints((int) vitality, true); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() != null) // - && info.getEffected().isPlayer() // - && !info.isRemoved()) + if ((effected != null) // + && effected.isPlayer()) { - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); - vitality += _amount * 100; - if (vitality >= PcStat.MAX_VITALITY_POINTS) + final BuffInfo info = effected.getEffectList().getBuffInfoBySkillId(skill.getId()); + if ((info != null) && !info.isRemoved()) { - vitality = PcStat.MAX_VITALITY_POINTS; + long vitality = effected.getActingPlayer().getVitalityPoints(); + vitality += _amount * 100; + if (vitality >= PcStat.MAX_VITALITY_POINTS) + { + vitality = PcStat.MAX_VITALITY_POINTS; + } + effected.getActingPlayer().setVitalityPoints((int) vitality, true); } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 60bd6d90b6..335eb252de 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java @@ -17,12 +17,13 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -50,14 +51,14 @@ public class ReduceDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Relax.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Relax.java index 8539080614..f802e0574c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Relax.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Relax.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -65,42 +64,42 @@ public final class Relax extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } - if ((info.getEffected().getCurrentHp() + 1) > info.getEffected().getMaxRecoverableHp()) + if ((effected.getCurrentHp() + 1) > effected.getMaxRecoverableHp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); + effected.sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java index 01cafb9d92..a85a91b2f3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,11 +62,11 @@ public final class ResistSkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { for (SkillHolder holder : _skills) { - info.getEffected().removeIgnoreSkillEffects(holder); + effected.removeIgnoreSkillEffects(holder); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java index 220e7625d5..2c57e48c7e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java @@ -21,13 +21,13 @@ import java.util.HashSet; import java.util.Set; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.instancezone.Instance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -71,30 +71,28 @@ public final class ResurrectionSpecial extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer() && !info.getEffected().isPet()) + if (!effected.isPlayer() && !effected.isPet()) { return; } - final L2PcInstance caster = info.getEffector().getActingPlayer(); + final L2PcInstance caster = effector.getActingPlayer(); final Instance instance = caster.getInstanceWorld(); if (!_instanceId.isEmpty() && ((instance == null) || !_instanceId.contains(instance.getTemplateId()))) { return; } - final Skill skill = info.getSkill(); - - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().reviveRequest(caster, skill, false, _power); + effected.getActingPlayer().reviveRequest(caster, skill, false, _power); } - else if (info.getEffected().isPet()) + else if (effected.isPet()) { - final L2PetInstance pet = (L2PetInstance) info.getEffected(); - info.getEffected().getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); + final L2PetInstance pet = (L2PetInstance) effected; + effected.getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); } } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Reuse.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Reuse.java index 5d44cd483f..c297d532b7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Reuse.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Reuse.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class Reuse extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java deleted file mode 100644 index b32762f485..0000000000 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.StatsSet; -import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; - -/** - * Reward Item on Exit effect implementation. - * @author Mobius - */ -public final class RewardItemOnExit extends AbstractEffect -{ - private final int _itemId; - private final long _itemCount; - - public RewardItemOnExit(StatsSet params) - { - _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark. - _itemCount = params.getLong("itemCount", 1); - } - - @Override - public void onExit(BuffInfo info) - { - if (!info.isRemoved() && (info.getEffected() != null) && info.getEffected().isPlayer() && !info.getEffected().isDead()) - { - ThreadPoolManager.execute(() -> // Make sure item is saved. - { - info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected(), true); - }); - } - } -} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Root.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Root.java index 7e69ac579b..76983697aa 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Root.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Root.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,11 +47,11 @@ public final class Root extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java index 7b21d8cdfc..72880477ad 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -35,9 +34,9 @@ public final class SacrificeSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java index f02c2336b3..eaa75cd64c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Note: In retail this effect doesn't stack. It appears that the active value is taken from the last such effect. @@ -36,14 +37,14 @@ public class SkillEvasion extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().addSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().addSkillEvasionTypeValue(_magicType, _amount); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().removeSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().removeSkillEvasionTypeValue(_magicType, _amount); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java index 3cb5192097..cba30b2644 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -38,19 +39,19 @@ public final class SkillTurningOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) || (info.getEffected() == info.getEffector()) || info.getEffected().isRaid()) + if ((effected == null) || (effected == effector) || effected.isRaid()) { return false; } - final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill()) : ((_chance >= 100) || (Rnd.get(100) < _chance)); + final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, effector, effected, skill) : ((_chance >= 100) || (Rnd.get(100) < _chance)); if (skillSuccess) { - info.getEffected().breakCast(); + effected.breakCast(); } - return super.onActionTime(info); + return super.onActionTime(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 8ef35604fa..70ea70e917 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -56,11 +55,11 @@ public final class SoulEating extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java index 1d30737f06..beffb920fe 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.MoveType; import com.l2jmobius.gameserver.model.stats.Stats; @@ -40,20 +41,20 @@ public class StatByMoveType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, _value); + effected.getStat().mergeMoveTypeValue(_stat, _type, _value); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, -_value); + effected.getStat().mergeMoveTypeValue(_stat, _type, -_value); } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return info.getSkill().isPassive() || info.getSkill().isToggle(); + return skill.isPassive() || skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Synergy.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Synergy.java index 24f8d10972..c3a9b08bde 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Synergy.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Synergy.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -78,22 +77,22 @@ public final class Synergy extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } for (AbnormalType required : _requiredSlots) { - if (!info.getEffector().hasAbnormalType(required)) + if (!effector.hasAbnormalType(required)) { - return info.getSkill().isToggle(); + return skill.isToggle(); } } - final int abnormalCount = (int) _optionalSlots.stream().filter(info.getEffector()::hasAbnormalType).count(); + final int abnormalCount = (int) _optionalSlots.stream().filter(effector::hasAbnormalType).count(); if (abnormalCount >= _minSlot) { @@ -102,19 +101,19 @@ public final class Synergy extends AbstractEffect if (partyBuffSkill != null) { - final L2Object target = partyBuffSkill.getTarget(info.getEffector(), info.getEffected(), false, false, false); + final L2Object target = partyBuffSkill.getTarget(effector, effected, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, partyBuffSkill); + SkillCaster.triggerCast(effector, (L2Character) target, partyBuffSkill); } } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java index 5f57db9956..c4f2ef9e0c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class TalismanSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class TalismanSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().addTalismanSlots(-_slots); + effected.getActingPlayer().getStat().addTalismanSlots(-_slots); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java index 6f0bb3c84b..0f06888ace 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Target Me effect implementation. @@ -32,25 +33,25 @@ public final class TargetMe extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - ((L2Playable) info.getEffected()).setLockedTarget(null); + ((L2Playable) effected).setLockedTarget(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - if (info.getEffected().getTarget() != info.getEffector()) + if (effected.getTarget() != effector) { - info.getEffected().setTarget(info.getEffector()); + effected.setTarget(effector); } - ((L2Playable) info.getEffected()).setLockedTarget(info.getEffector()); + ((L2Playable) effected).setLockedTarget(effector); } } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java index bffc2aecce..13053a9adc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -58,9 +57,9 @@ public final class TeleportToSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().hasServitors(); + return effected.hasServitors(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java index 33cab39e03..e9e47242d7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -33,20 +34,20 @@ public final class TransferDamageToPlayer extends AbstractStatAddEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(null); + ((L2Playable) effected).setTransferDamageTo(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(info.getEffector().getActingPlayer()); + ((L2Playable) effected).setTransferDamageTo(effector.getActingPlayer()); } } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java index 5f822f2af5..75d4a88f17 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.util.Util; @@ -47,9 +46,9 @@ public final class TransferHate extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true); + return Util.checkIfInRange(skill.getEffectRange(), effector, effected, true); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Transformation.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Transformation.java index 1b389e9af7..92df00cb49 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Transformation.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Transformation.java @@ -24,7 +24,6 @@ import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -53,9 +52,9 @@ public final class Transformation extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -68,8 +67,8 @@ public final class Transformation extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 2e8cd38512..32ac16aa59 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -160,14 +160,14 @@ public final class TriggerSkillByAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index 82a3bb14dc..c9ce6cc000 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -92,14 +91,14 @@ public final class TriggerSkillByAvoid extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 5fca763c99..351e687f0f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -99,14 +98,14 @@ public final class TriggerSkillByDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index cfd2d77548..c950983e3d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -102,14 +101,14 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index 2db572e6c5..b7ec10f540 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -64,14 +63,14 @@ public final class TriggerSkillByKill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, info.getEffected()), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, effected), this)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index d5e54a6e95..7a474f5b8d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -112,20 +112,19 @@ public final class TriggerSkillByMagicType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index e43cda5682..fefd166e0d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java @@ -62,9 +62,9 @@ public final class TriggerSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } private void onSkillUseEvent(OnCreatureSkillFinishCast event) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java index 4ba7fcfdf7..23a72039a7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java @@ -72,9 +72,9 @@ public final class TriggerSkillBySkillAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } private void onAttackEvent(OnCreatureDamageDealt event) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java index b58b293380..b687d563c6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -63,9 +62,9 @@ public final class Unsummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java index ba1c0ab53f..ed1350c021 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Untargetable extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java index 7a27415002..e30776b49a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; @@ -38,9 +37,9 @@ public final class VitalityPointUp extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16400-16499.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16400-16499.xml index f5906bdf1a..f14b295d64 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16400-16499.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16400-16499.xml @@ -203,10 +203,6 @@ 7 DIFF - - 40313 - 1 - @@ -241,10 +237,6 @@ 30 DIFF - - 40313 - 1 - @@ -279,10 +271,6 @@ 2013 DIFF - - 40313 - 1 - diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt index 9a6c720053..fdf52a8404 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt @@ -248,7 +248,6 @@ Resurrection: Resurrects target Player or Summon. ResurrectionSpecial: Resurrects target Player or Summon only in specified instance IDs. Reuse: Decreases skill reuse time based on its magic type. ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius) -RewardItemOnExit: Reward an item when effect ends. (l2jmobius) Root: Stops movement. SacrificeSummon: Sacrifices the players summon. (l2jmobius) SafeFallHeight: Minimum falling height for taking damage stat. diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index 8a09cbfcb4..756ee0146c 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -780,7 +780,7 @@ public class CharStat // Call pump to each effect //@formatter:off effectsStream.forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(info.getEffector(), info.getEffected(), info.getSkill())) .forEach(effect -> effect.pump(info.getEffected(), info.getSkill()))); //@formatter:on @@ -792,7 +792,7 @@ public class CharStat .filter(BuffInfo::isInUse) .filter(info -> info.isAbnormalType(AbnormalType.ABILITY_CHANGE)) .forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(_activeChar, _activeChar, info.getSkill())) .forEach(effect -> effect.pump(_activeChar, info.getSkill()))); //@formatter:on diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java index be0615be3e..90ac2108aa 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java @@ -21,14 +21,13 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** * Abstract effect implementation.
- * Instant effects should not override {@link #onExit(BuffInfo)}.
- * Instant effects should not override {@link #canStart(BuffInfo)}, all checks should be done {@link #onStart(BuffInfo)}.
- * Do not call super class methods {@link #onStart(BuffInfo)} nor {@link #onExit(BuffInfo)}. + * Instant effects should not override {@link #onExit(L2Character, L2Character, Skill)}.
+ * Instant effects should not override {@link #canStart(L2Character, L2Character, Skill)}, all checks should be done {@link #onStart(L2Character, L2Character, Skill)}.
+ * Do not call super class methods {@link #onStart(L2Character, L2Character, Skill)} nor {@link #onExit(L2Character, L2Character, Skill)}. * @author Zoey76 */ public abstract class AbstractEffect @@ -75,23 +74,15 @@ public abstract class AbstractEffect return true; } - /** - * Get this effect's type.
- * TODO: Remove. - * @return the effect type - */ - public L2EffectType getEffectType() - { - return L2EffectType.NONE; - } - /** * Verify if the buff can start.
* Used for continuous effects. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return {@code true} if all the start conditions are meet, {@code false} otherwise */ - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { return true; } @@ -111,34 +102,24 @@ public abstract class AbstractEffect } - /** - * Called on effect start. - * @param info the buff info - */ - public void onStart(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { + } /** * Called on each tick.
* If the abnormal time is lesser than zero it will last forever. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return if {@code true} this effect will continue forever, if {@code false} it will stop after abnormal time has passed */ - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { return false; } - /** - * Called when the effect is exited. - * @param info the buff info - */ - public void onExit(BuffInfo info) - { - - } - /** * Get the effect flags. * @return bit flag for current effect @@ -148,12 +129,6 @@ public abstract class AbstractEffect return EffectFlag.NONE.getMask(); } - @Override - public String toString() - { - return "Effect " + getClass().getSimpleName(); - } - public boolean checkCondition(Object obj) { return true; @@ -187,4 +162,20 @@ public abstract class AbstractEffect { } + + /** + * Get this effect's type.
+ * TODO: Remove. + * @return the effect type + */ + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public String toString() + { + return "Effect " + getClass().getSimpleName(); + } } \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/options/Options.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/options/Options.java index 475f2a94d8..813ec8f6db 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/options/Options.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/options/Options.java @@ -176,7 +176,7 @@ public class Options effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.pump(player, info.getSkill()); - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java index d2aa392e10..9696330565 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -334,7 +334,6 @@ public final class BuffInfo // Call on start. effect.onStart(getEffector(), getEffected(), getSkill()); - effect.onStart(this); // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) @@ -361,7 +360,7 @@ public final class BuffInfo if (_isInUse) { // Callback for on action time event. - continueForever = effect.onActionTime(this); + continueForever = effect.onActionTime(getEffector(), getEffected(), getSkill()); } if (!continueForever && _skill.isToggle()) @@ -392,7 +391,7 @@ public final class BuffInfo // Instant effects shouldn't call onExit(..). if (!effect.isInstant()) { - effect.onExit(this); + effect.onExit(getEffector(), getEffected(), getSkill()); } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java index 164957d7a5..8c4ba4eb64 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -1265,7 +1265,7 @@ public final class Skill implements IIdentifiable effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); } - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java index 3e9a609e27..61f879a4b1 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java @@ -18,6 +18,11 @@ package events.HuntForSanta; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.quest.LongTimeEvent; import com.l2jmobius.gameserver.model.skills.BuffInfo; @@ -39,7 +44,7 @@ public final class HuntForSanta extends LongTimeEvent private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1); private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1); // Item - // private static final int SANTAS_MARK = 40313; + private static final int SANTAS_MARK = 40313; private HuntForSanta() { @@ -63,21 +68,27 @@ public final class HuntForSanta extends LongTimeEvent case "receiveBuffStocking": { htmltext = applyBuff(npc, player, BUFF_STOCKING.getSkill()); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffTree": { htmltext = applyBuff(npc, player, BUFF_TREE.getSkill()); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffSnowman": { htmltext = applyBuff(npc, player, BUFF_SNOWMAN.getSkill()); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffAll": { htmltext = applyAllBuffs(npc, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "changeBuff": @@ -87,6 +98,17 @@ public final class HuntForSanta extends LongTimeEvent break; } } + + if (event.startsWith("rewardBuffStocking") // + || event.startsWith("rewardBuffSnowman") // + || event.startsWith("rewardBuffTree")) + { + if ((player != null) && (player.isOnlineInt() == 1)) + { + giveItems(player, SANTAS_MARK, 1); + } + } + return htmltext; } @@ -128,20 +150,36 @@ public final class HuntForSanta extends LongTimeEvent private void removeBuffs(L2PcInstance player) { + player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + } + + @RegisterEvent(EventType.ON_PLAYER_LOGIN) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerLogin(OnPlayerLogin event) + { + final L2PcInstance player = event.getActiveChar(); final BuffInfo buffStocking = player.getEffectList().getBuffInfoBySkillId(BUFF_STOCKING.getSkillId()); final BuffInfo buffTree = player.getEffectList().getBuffInfoBySkillId(BUFF_TREE.getSkillId()); final BuffInfo buffSnowman = player.getEffectList().getBuffInfoBySkillId(BUFF_SNOWMAN.getSkillId()); if (buffStocking != null) { - player.getEffectList().stopSkillEffects(true, buffStocking.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), buffStocking.getTime() * 1000, null, player); } if (buffTree != null) { - player.getEffectList().stopSkillEffects(true, buffTree.getSkill()); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), buffTree.getTime() * 1000, null, player); } if (buffSnowman != null) { - player.getEffectList().stopSkillEffects(true, buffSnowman.getSkill()); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), buffSnowman.getTime() * 1000, null, player); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java index 30fff039b3..2285d2836c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -280,7 +280,6 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new); EffectHandler.getInstance().registerHandler("Reuse", Reuse::new); EffectHandler.getInstance().registerHandler("ReuseSkillById", ReuseSkillById::new); - EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new); EffectHandler.getInstance().registerHandler("Root", Root::new); EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new); EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java index caae4afaef..33ddc02a86 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An effect that blocks a debuff. Acts like DOTA's Linken Sphere. @@ -36,9 +37,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(_times); + effected.setAbnormalShieldBlocks(_times); } @Override @@ -48,9 +49,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(Integer.MIN_VALUE); + effected.setAbnormalShieldBlocks(Integer.MIN_VALUE); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java index 6c9dd598d6..e9c88553fe 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java @@ -20,12 +20,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -60,16 +61,16 @@ public class AbsorbDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); - _damageHolder.remove(info.getEffected().getObjectId()); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + _damageHolder.remove(effected.getObjectId()); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - _damageHolder.put(info.getEffected().getObjectId(), _damage); - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + _damageHolder.put(effected.getObjectId(), _damage); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java index 838b3c2d0c..c3400d7890 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -52,8 +51,8 @@ public class AddSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeSkill(_addedSkill.getSkill(), true); + effected.removeSkill(_addedSkill.getSkill(), true); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index 2b1aed91f3..b526b6c4fc 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -101,11 +100,11 @@ public final class AirBind extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5101ecb949..26ee9c8fc8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; @@ -51,9 +50,9 @@ public final class AttackTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getAttackTraits()) { for (Entry trait : _attackTraits.entrySet()) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Betray.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Betray.java index c96c435a61..a7e0626ef3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Betray.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Betray.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Betray extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffector().isPlayer() && info.getEffected().isSummon(); + return effector.isPlayer() && effected.isSummon(); } @Override @@ -53,8 +52,8 @@ public final class Betray extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Blink.java index db1463c04d..18891823cf 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -70,10 +69,10 @@ public final class Blink extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return !info.getEffected().cannotEscape(); + return !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java index cd8741e950..143ff0cb20 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -47,8 +46,8 @@ public final class BlockAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); + effected.getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java index 191f846d67..a722b8f0bd 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,9 +47,9 @@ public final class BlockAction extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -74,15 +73,15 @@ public final class BlockAction extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 204c280a80..aba1c6b66a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,9 +62,8 @@ public final class BlockActions extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); _allowedSkills.stream().forEach(effected::removeBlockActionsAllowedSkill); if (!effected.isPlayer()) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java index c175e48897..89c3e54971 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class BlockChat extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -56,8 +55,8 @@ public final class BlockChat extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java index b87b6418fd..a58ad8b1f4 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -39,8 +38,8 @@ public final class BlockMove extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java index 05ac115c08..e49dc6c64b 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class BlockParty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -49,8 +48,8 @@ public final class BlockParty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index cc24155ef8..34efcfba26 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -18,12 +18,13 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Block Skills by isMagic type. @@ -49,20 +50,20 @@ public final class BlockSkill extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_magicTypes == null) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java index 06a12b6e96..2cb9267e0e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -46,8 +45,8 @@ public class BlockTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setTargetable(true); + effected.setTargetable(true); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java index 91080ab874..924b08d8f7 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -40,40 +39,35 @@ public final class CallSkillOnActionTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return castSkill(info); - } - - private boolean castSkill(BuffInfo info) - { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } - final Skill skill = _skill.getSkill(); - if (skill != null) + final Skill triggerSkill = _skill.getSkill(); + if (triggerSkill != null) { - if (skill.isSynergySkill()) + if (triggerSkill.isSynergySkill()) { - skill.applyEffects(info.getEffector(), info.getEffector()); + triggerSkill.applyEffects(effector, effector); } - L2World.getInstance().forEachVisibleObjectInRange(info.getEffector(), L2Character.class, _skill.getSkill().getAffectRange(), c -> + L2World.getInstance().forEachVisibleObjectInRange(effector, L2Character.class, _skill.getSkill().getAffectRange(), c -> { - final L2Object target = skill.getTarget(info.getEffector(), c, false, false, false); + final L2Object target = triggerSkill.getTarget(effector, c, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, skill); + SkillCaster.triggerCast(effector, (L2Character) target, triggerSkill); } }); } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java index a431b998d7..8be7f869c6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -52,30 +51,30 @@ public final class ChameleonRest extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java index 461153971c..405b767faf 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.TemplateChanceHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,9 +43,9 @@ public final class ChangeBody extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -63,8 +62,8 @@ public final class ChangeBody extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java index 6a6c25702b..bc5e693a78 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Cp Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class CpHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double cp = info.getEffected().getCurrentCp(); - final double maxcp = info.getEffected().getMaxRecoverableCp(); + double cp = effected.getCurrentCp(); + final double maxcp = effected.getMaxRecoverableCp(); // Not needed to set the CP and send update packet if player is already at max CP if (cp >= maxcp) @@ -52,8 +53,8 @@ public final class CpHealOverTime extends AbstractEffect cp += _power * getTicksMultiplier(); cp = Math.min(cp, maxcp); - info.getEffected().setCurrentCp(cp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); + effected.setCurrentCp(cp, false); + effected.broadcastStatusUpdate(effector); return true; } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index b8eebc366c..e096752577 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalDamagePosition extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index bca8357f83..dad04ebbdd 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalRatePositionBonus extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java index 248727ab7d..717406c0c2 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -49,9 +48,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertisePenaltyBonus(0); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index ffd0364a12..07759f9e7d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -39,22 +40,22 @@ public final class DamOverTime extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - if (!_canKill && (damage >= (info.getEffected().getCurrentHp() - 1))) + if (!_canKill && (damage >= (effected.getCurrentHp() - 1))) { - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -66,19 +67,19 @@ public final class DamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } double damage = _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -86,15 +87,15 @@ public final class DamOverTime extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index ef87a82dfa..044b4d98bc 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -45,19 +46,19 @@ public final class DamOverTimePercent extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double damage = info.getEffected().getCurrentHp() * _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + double damage = effected.getCurrentHp() * _power * getTicksMultiplier(); + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -65,17 +66,17 @@ public final class DamOverTimePercent extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index a901fd5e38..0332a2ee2e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; /** @@ -66,9 +67,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) @@ -87,9 +88,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarm.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarm.java index 8d040f9746..c5f64c3551 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarm.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarm.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class Disarm extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java index 9d06ee3437..b6d50cd89c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -54,9 +53,9 @@ public final class Disarmor extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (_slot != L2Item.SLOT_NONE) && info.getEffected().isPlayer(); + return (_slot != L2Item.SLOT_NONE) && effected.isPlayer(); } @Override @@ -98,18 +97,18 @@ public final class Disarmor extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { return; } - final Integer disarmedObjId = _unequippedItems.remove(info.getEffected().getObjectId()); + final Integer disarmedObjId = _unequippedItems.remove(effected.getObjectId()); if ((disarmedObjId != null) && (disarmedObjId > 0)) { - final L2PcInstance player = info.getEffected().getActingPlayer(); - info.getEffected().getInventory().unblockItemSlot(_slot); + final L2PcInstance player = effected.getActingPlayer(); + player.getInventory().unblockItemSlot(_slot); final L2ItemInstance item = player.getInventory().getItemByObjectId(disarmedObjId); if (item != null) @@ -137,6 +136,6 @@ public final class Disarmor extends AbstractEffect } } } - super.onExit(info); + super.onExit(effector, effected, skill); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java index 55e476feee..c11228e931 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -56,34 +56,34 @@ public final class DoubleCast extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { for (SkillHolder holder : TOGGLE_SKILLS) { - final Skill skill = holder.getSkill(); - if ((skill != null) && !info.getEffected().isAffectedBySkill(holder)) + final Skill s = holder.getSkill(); + if ((s != null) && !effected.isAffectedBySkill(holder)) { - _addedToggles.computeIfAbsent(info.getEffected().getObjectId(), v -> new ArrayList<>()).add(holder); - skill.applyEffects(info.getEffected(), info.getEffected()); + _addedToggles.computeIfAbsent(effected.getObjectId(), v -> new ArrayList<>()).add(holder); + s.applyEffects(effected, effected); } } } - super.onStart(info); + super.onStart(effector, effected, skill); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - _addedToggles.computeIfPresent(info.getEffected().getObjectId(), (k, v) -> + _addedToggles.computeIfPresent(effected.getObjectId(), (k, v) -> { - v.forEach(h -> info.getEffected().stopSkillEffects(h.getSkill())); + v.forEach(h -> effected.stopSkillEffects(h.getSkill())); return null; }); } - super.onExit(info); + super.onExit(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java index b5aa3ce382..640bf5f0d9 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class EnableCloak extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class EnableCloak extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().setCloakSlotStatus(false); + effected.getActingPlayer().getStat().setCloakSlotStatus(false); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java index 32f856ab48..2c1012dbb1 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().setMaxBuffCount(Math.max(0, info.getEffected().getStat().getMaxBuffCount() - _slots)); + effected.getStat().setMaxBuffCount(Math.max(0, effected.getStat().getMaxBuffCount() - _slots)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Escape.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Escape.java index 9de8e8bc89..a89e887f3d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Escape.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Escape.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -51,10 +50,10 @@ public final class Escape extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return super.canStart(info) && !info.getEffected().cannotEscape(); + return super.canStart(effector, effected, skill) && !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java index a7e71242d8..4325b19161 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -37,22 +38,22 @@ public class Faceoff extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(info.getEffected().getObjectId()); - info.getEffected().getActingPlayer().setAttackerObjId(info.getEffector().getObjectId()); + effector.getActingPlayer().setAttackerObjId(effected.getObjectId()); + effected.getActingPlayer().setAttackerObjId(effector.getObjectId()); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(0); - info.getEffected().getActingPlayer().setAttackerObjId(0); + effector.getActingPlayer().setAttackerObjId(0); + effected.getActingPlayer().setAttackerObjId(0); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java index fa1651864a..66817daf19 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ChangeWaitType; import com.l2jmobius.gameserver.network.serverpackets.Revive; @@ -45,43 +46,43 @@ public final class FakeDeath extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().setRecentFakeDeath(true); + effected.getActingPlayer().setRecentFakeDeath(true); } - info.getEffected().broadcastPacket(new ChangeWaitType(info.getEffected(), ChangeWaitType.WT_STOP_FAKEDEATH)); - info.getEffected().broadcastPacket(new Revive(info.getEffected())); + effected.broadcastPacket(new ChangeWaitType(effected, ChangeWaitType.WT_STOP_FAKEDEATH)); + effected.broadcastPacket(new Revive(effected)); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().startFakeDeath(); + effected.startFakeDeath(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 78fc694005..4e61caf974 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.Util; @@ -45,9 +44,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character creature = info.getEffected(); + final L2Character creature = effected; return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && // !((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || // (creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON))); @@ -60,9 +59,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - fearAction(null, info.getEffected()); + fearAction(null, effected); return false; } @@ -74,11 +73,11 @@ public final class Fear extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Flag.java index 0b542a7d75..85a7701506 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Flag.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Flag extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class Flag extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().updatePvPFlag(0); + effected.getActingPlayer().updatePvPFlag(0); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index 82a36fbbdc..bf91e7c2e8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate; @@ -44,11 +45,11 @@ public class GetMomentum extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); final int maxCharge = (int) player.getStat().getValue(Stats.MAX_MOMENTUM, 0); final int newCharge = Math.min(player.getCharges() + 1, maxCharge); @@ -68,6 +69,6 @@ public class GetMomentum extends AbstractEffect player.sendPacket(new EtcStatusUpdate(player)); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Grow.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Grow.java index c5f9a21bcf..4eb28677e3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Grow.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Grow.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,11 +43,11 @@ public final class Grow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isNpc()) + if (effected.isNpc()) { - final L2Npc npc = (L2Npc) info.getEffected(); + final L2Npc npc = (L2Npc) effected; npc.setCollisionHeight(npc.getTemplate().getCollisionHeight()); npc.setCollisionRadius(npc.getTemplate().getfCollisionRadius()); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java index 7562521eaf..fc88d64de0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax; @@ -38,15 +37,15 @@ public final class HealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead() || info.getEffected().isDoor()) + if (effected.isDead() || effected.isDoor()) { return false; } - double hp = info.getEffected().getCurrentHp(); - final double maxhp = info.getEffected().getMaxRecoverableHp(); + double hp = effected.getCurrentHp(); + final double maxhp = effected.getMaxRecoverableHp(); // Not needed to set the HP and send update packet if player is already at max HP if (hp >= maxhp) @@ -56,19 +55,17 @@ public final class HealOverTime extends AbstractEffect hp += _power * getTicksMultiplier(); hp = Math.min(hp, maxhp); - info.getEffected().setCurrentHp(hp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentHp(hp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); - final Skill skill = info.getSkill(); if (effected.isPlayer() && (getTicks() > 0) && (skill.getAbnormalType() == AbnormalType.HP_RECOVER)) { - effected.sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power)); + effected.sendPacket(new ExRegenMax(skill.getAbnormalTime(), getTicks(), _power)); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Hide.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Hide.java index da2ac54c54..1f71330b6e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Hide.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Hide.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -61,11 +60,11 @@ public final class Hide extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance activeChar = info.getEffected().getActingPlayer(); + final L2PcInstance activeChar = effected.getActingPlayer(); if (!activeChar.inObserverMode()) { activeChar.setInvisible(false); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java index 1ad15ccdde..853236001c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -39,16 +40,16 @@ public final class HpToOwner extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { final double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -60,22 +61,22 @@ public final class HpToOwner extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double damage = _power * getTicksMultiplier(); - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); if (_stealAmount > 0) { final double amount = (damage * _stealAmount) / 100; - info.getEffector().setCurrentHp(info.getEffector().getCurrentHp() + amount); - info.getEffector().setCurrentMp(info.getEffector().getCurrentMp() + amount); + effector.setCurrentHp(effector.getCurrentHp() + amount); + effector.setCurrentMp(effector.getCurrentMp() + amount); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java index 570a854ae3..c7e7969777 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Immobile Pet Buff effect implementation. @@ -32,17 +33,17 @@ public final class ImmobilePetBuff extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isSummon() && info.getEffector().isPlayer() && (((L2Summon) info.getEffected()).getOwner() == info.getEffector())) + if (effected.isSummon() && effector.isPlayer() && (((L2Summon) effected).getOwner() == effector)) { - info.getEffected().setIsImmobilized(true); + effected.setIsImmobilized(true); } } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 81b8f8134c..d94354ed72 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -141,11 +140,11 @@ public final class KnockBack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Lucky.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Lucky.java index 2ebec1b47e..611c210e9d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Lucky.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Lucky.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Lucky effect implementation. @@ -31,8 +32,8 @@ public final class Lucky extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java index d605d89ff7..259edcf3c0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class MagicMpCost extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java index 0f41184d19..bebbaefdca 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -47,22 +47,22 @@ public final class MagicalDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - final L2Character activeChar = info.getEffector(); - final L2Character target = info.getEffected(); + final L2Character activeChar = effector; + final L2Character target = effected; if (target.isDead()) { return false; } - double damage = Formulas.calcMagicDam(activeChar, target, info.getSkill(), activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. + double damage = Formulas.calcMagicDam(activeChar, target, skill, activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. damage *= getTicksMultiplier(); if (damage >= (target.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { target.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; @@ -74,13 +74,13 @@ public final class MagicalDamOverTime extends AbstractEffect // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them if (target.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } damage = target.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java index 7b6dc8f966..6405a3a837 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,21 +36,21 @@ public final class ManaDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if ((manaDam > info.getEffected().getCurrentMp()) && info.getSkill().isToggle()) + if ((manaDam > effected.getCurrentMp()) && skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java index b9fb295056..fefa4ffef1 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Mana Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class ManaHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double mp = info.getEffected().getCurrentMp(); - final double maxmp = info.getEffected().getMaxRecoverableMp(); + double mp = effected.getCurrentMp(); + final double maxmp = effected.getMaxRecoverableMp(); // Not needed to set the MP and send update packet if player is already at max MP if (mp >= maxmp) @@ -52,8 +53,8 @@ public final class ManaHealOverTime extends AbstractEffect mp += _power * getTicksMultiplier(); mp = Math.min(mp, maxmp); - info.getEffected().setCurrentMp(mp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentMp(mp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java index 986913d63f..3f1d4e464c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,22 +36,22 @@ public final class MpConsumePerLevel extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double base = _power * getTicksMultiplier(); - final double consume = (info.getAbnormalTime() > 0) ? ((info.getEffected().getLevel() - 1) / 7.5) * base * info.getAbnormalTime() : base; - if (consume > info.getEffected().getCurrentMp()) + final double consume = (skill.getAbnormalTime() > 0) ? ((effected.getLevel() - 1) / 7.5) * base * skill.getAbnormalTime() : base; + if (consume > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(consume); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(consume); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java index af204b5579..d12759271d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Noblesse Blessing effect implementation. @@ -33,9 +34,9 @@ public final class NoblesseBless extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayable(); + return (effector != null) && (effected != null) && effected.isPlayable(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Passive.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Passive.java index 3f7d04eacc..c183e9b5af 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Passive.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Passive.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Passive extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isAttackable(); + return effected.isAttackable(); } @Override @@ -48,9 +47,9 @@ public final class Passive extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().enableAllSkills(); - info.getEffected().setIsImmobilized(false); + effected.enableAllSkills(); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java index 340030133f..831e5d3cf0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; @@ -42,11 +41,11 @@ public class PolearmSingleTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); + effected.getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java index e8366e855f..c0e2c52b35 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Protection Blessing effect implementation. @@ -32,9 +33,9 @@ public final class ProtectionBlessing extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java index 510b5ecaa5..9438b97eaa 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java @@ -17,9 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.PcStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.ZoneId; /** @@ -44,41 +46,44 @@ public final class RecoverVitalityInPeaceZone extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) // - || info.getEffected().isDead() // - || !info.getEffected().isPlayer() // - || !info.getEffected().isInsideZone(ZoneId.PEACE)) + if ((effected == null) // + || effected.isDead() // + || !effected.isPlayer() // + || !effected.isInsideZone(ZoneId.PEACE)) { return false; } - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); + long vitality = effected.getActingPlayer().getVitalityPoints(); vitality += _amount; if (vitality >= PcStat.MAX_VITALITY_POINTS) { vitality = PcStat.MAX_VITALITY_POINTS; } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); + effected.getActingPlayer().setVitalityPoints((int) vitality, true); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() != null) // - && info.getEffected().isPlayer() // - && !info.isRemoved()) + if ((effected != null) // + && effected.isPlayer()) { - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); - vitality += _amount * 100; - if (vitality >= PcStat.MAX_VITALITY_POINTS) + final BuffInfo info = effected.getEffectList().getBuffInfoBySkillId(skill.getId()); + if ((info != null) && !info.isRemoved()) { - vitality = PcStat.MAX_VITALITY_POINTS; + long vitality = effected.getActingPlayer().getVitalityPoints(); + vitality += _amount * 100; + if (vitality >= PcStat.MAX_VITALITY_POINTS) + { + vitality = PcStat.MAX_VITALITY_POINTS; + } + effected.getActingPlayer().setVitalityPoints((int) vitality, true); } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 60bd6d90b6..335eb252de 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java @@ -17,12 +17,13 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -50,14 +51,14 @@ public class ReduceDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Relax.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Relax.java index 8539080614..f802e0574c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Relax.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Relax.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -65,42 +64,42 @@ public final class Relax extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } - if ((info.getEffected().getCurrentHp() + 1) > info.getEffected().getMaxRecoverableHp()) + if ((effected.getCurrentHp() + 1) > effected.getMaxRecoverableHp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); + effected.sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java index 01cafb9d92..a85a91b2f3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,11 +62,11 @@ public final class ResistSkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { for (SkillHolder holder : _skills) { - info.getEffected().removeIgnoreSkillEffects(holder); + effected.removeIgnoreSkillEffects(holder); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java index 220e7625d5..2c57e48c7e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java @@ -21,13 +21,13 @@ import java.util.HashSet; import java.util.Set; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.instancezone.Instance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -71,30 +71,28 @@ public final class ResurrectionSpecial extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer() && !info.getEffected().isPet()) + if (!effected.isPlayer() && !effected.isPet()) { return; } - final L2PcInstance caster = info.getEffector().getActingPlayer(); + final L2PcInstance caster = effector.getActingPlayer(); final Instance instance = caster.getInstanceWorld(); if (!_instanceId.isEmpty() && ((instance == null) || !_instanceId.contains(instance.getTemplateId()))) { return; } - final Skill skill = info.getSkill(); - - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().reviveRequest(caster, skill, false, _power); + effected.getActingPlayer().reviveRequest(caster, skill, false, _power); } - else if (info.getEffected().isPet()) + else if (effected.isPet()) { - final L2PetInstance pet = (L2PetInstance) info.getEffected(); - info.getEffected().getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); + final L2PetInstance pet = (L2PetInstance) effected; + effected.getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); } } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Reuse.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Reuse.java index 5d44cd483f..c297d532b7 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Reuse.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Reuse.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class Reuse extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java deleted file mode 100644 index b32762f485..0000000000 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.StatsSet; -import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; - -/** - * Reward Item on Exit effect implementation. - * @author Mobius - */ -public final class RewardItemOnExit extends AbstractEffect -{ - private final int _itemId; - private final long _itemCount; - - public RewardItemOnExit(StatsSet params) - { - _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark. - _itemCount = params.getLong("itemCount", 1); - } - - @Override - public void onExit(BuffInfo info) - { - if (!info.isRemoved() && (info.getEffected() != null) && info.getEffected().isPlayer() && !info.getEffected().isDead()) - { - ThreadPoolManager.execute(() -> // Make sure item is saved. - { - info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected(), true); - }); - } - } -} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Root.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Root.java index 7e69ac579b..76983697aa 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Root.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Root.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,11 +47,11 @@ public final class Root extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java index 7b21d8cdfc..72880477ad 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -35,9 +34,9 @@ public final class SacrificeSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java index f02c2336b3..eaa75cd64c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Note: In retail this effect doesn't stack. It appears that the active value is taken from the last such effect. @@ -36,14 +37,14 @@ public class SkillEvasion extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().addSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().addSkillEvasionTypeValue(_magicType, _amount); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().removeSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().removeSkillEvasionTypeValue(_magicType, _amount); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java index 3cb5192097..cba30b2644 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -38,19 +39,19 @@ public final class SkillTurningOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) || (info.getEffected() == info.getEffector()) || info.getEffected().isRaid()) + if ((effected == null) || (effected == effector) || effected.isRaid()) { return false; } - final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill()) : ((_chance >= 100) || (Rnd.get(100) < _chance)); + final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, effector, effected, skill) : ((_chance >= 100) || (Rnd.get(100) < _chance)); if (skillSuccess) { - info.getEffected().breakCast(); + effected.breakCast(); } - return super.onActionTime(info); + return super.onActionTime(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 8ef35604fa..70ea70e917 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -56,11 +55,11 @@ public final class SoulEating extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java index 1d30737f06..beffb920fe 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.MoveType; import com.l2jmobius.gameserver.model.stats.Stats; @@ -40,20 +41,20 @@ public class StatByMoveType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, _value); + effected.getStat().mergeMoveTypeValue(_stat, _type, _value); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, -_value); + effected.getStat().mergeMoveTypeValue(_stat, _type, -_value); } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return info.getSkill().isPassive() || info.getSkill().isToggle(); + return skill.isPassive() || skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Synergy.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Synergy.java index 24f8d10972..c3a9b08bde 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Synergy.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Synergy.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -78,22 +77,22 @@ public final class Synergy extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } for (AbnormalType required : _requiredSlots) { - if (!info.getEffector().hasAbnormalType(required)) + if (!effector.hasAbnormalType(required)) { - return info.getSkill().isToggle(); + return skill.isToggle(); } } - final int abnormalCount = (int) _optionalSlots.stream().filter(info.getEffector()::hasAbnormalType).count(); + final int abnormalCount = (int) _optionalSlots.stream().filter(effector::hasAbnormalType).count(); if (abnormalCount >= _minSlot) { @@ -102,19 +101,19 @@ public final class Synergy extends AbstractEffect if (partyBuffSkill != null) { - final L2Object target = partyBuffSkill.getTarget(info.getEffector(), info.getEffected(), false, false, false); + final L2Object target = partyBuffSkill.getTarget(effector, effected, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, partyBuffSkill); + SkillCaster.triggerCast(effector, (L2Character) target, partyBuffSkill); } } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java index 5f57db9956..c4f2ef9e0c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class TalismanSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class TalismanSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().addTalismanSlots(-_slots); + effected.getActingPlayer().getStat().addTalismanSlots(-_slots); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java index 6f0bb3c84b..0f06888ace 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Target Me effect implementation. @@ -32,25 +33,25 @@ public final class TargetMe extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - ((L2Playable) info.getEffected()).setLockedTarget(null); + ((L2Playable) effected).setLockedTarget(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - if (info.getEffected().getTarget() != info.getEffector()) + if (effected.getTarget() != effector) { - info.getEffected().setTarget(info.getEffector()); + effected.setTarget(effector); } - ((L2Playable) info.getEffected()).setLockedTarget(info.getEffector()); + ((L2Playable) effected).setLockedTarget(effector); } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java index bffc2aecce..13053a9adc 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -58,9 +57,9 @@ public final class TeleportToSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().hasServitors(); + return effected.hasServitors(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java index 33cab39e03..e9e47242d7 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -33,20 +34,20 @@ public final class TransferDamageToPlayer extends AbstractStatAddEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(null); + ((L2Playable) effected).setTransferDamageTo(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(info.getEffector().getActingPlayer()); + ((L2Playable) effected).setTransferDamageTo(effector.getActingPlayer()); } } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java index 5f822f2af5..75d4a88f17 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.util.Util; @@ -47,9 +46,9 @@ public final class TransferHate extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true); + return Util.checkIfInRange(skill.getEffectRange(), effector, effected, true); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Transformation.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Transformation.java index 1b389e9af7..92df00cb49 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Transformation.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Transformation.java @@ -24,7 +24,6 @@ import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -53,9 +52,9 @@ public final class Transformation extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -68,8 +67,8 @@ public final class Transformation extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 2e8cd38512..32ac16aa59 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -160,14 +160,14 @@ public final class TriggerSkillByAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index 82a3bb14dc..c9ce6cc000 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -92,14 +91,14 @@ public final class TriggerSkillByAvoid extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 5fca763c99..351e687f0f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -99,14 +98,14 @@ public final class TriggerSkillByDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index cfd2d77548..c950983e3d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -102,14 +101,14 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index 2db572e6c5..b7ec10f540 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -64,14 +63,14 @@ public final class TriggerSkillByKill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, info.getEffected()), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, effected), this)); } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index d5e54a6e95..7a474f5b8d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -112,20 +112,19 @@ public final class TriggerSkillByMagicType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index e43cda5682..fefd166e0d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java @@ -62,9 +62,9 @@ public final class TriggerSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } private void onSkillUseEvent(OnCreatureSkillFinishCast event) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java index 4ba7fcfdf7..23a72039a7 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java @@ -72,9 +72,9 @@ public final class TriggerSkillBySkillAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } private void onAttackEvent(OnCreatureDamageDealt event) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java index b58b293380..b687d563c6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -63,9 +62,9 @@ public final class Unsummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java index ba1c0ab53f..ed1350c021 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Untargetable extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java index 7a27415002..e30776b49a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; @@ -38,9 +37,9 @@ public final class VitalityPointUp extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16400-16499.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16400-16499.xml index bbd2085def..6663569062 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16400-16499.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16400-16499.xml @@ -203,10 +203,6 @@ 7 DIFF - - 40313 - 1 -
@@ -241,10 +237,6 @@ 30 DIFF - - 40313 - 1 - @@ -279,10 +271,6 @@ 2013 DIFF - - 40313 - 1 - diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt index 9a6c720053..fdf52a8404 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt @@ -248,7 +248,6 @@ Resurrection: Resurrects target Player or Summon. ResurrectionSpecial: Resurrects target Player or Summon only in specified instance IDs. Reuse: Decreases skill reuse time based on its magic type. ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius) -RewardItemOnExit: Reward an item when effect ends. (l2jmobius) Root: Stops movement. SacrificeSummon: Sacrifices the players summon. (l2jmobius) SafeFallHeight: Minimum falling height for taking damage stat. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index 8a09cbfcb4..756ee0146c 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -780,7 +780,7 @@ public class CharStat // Call pump to each effect //@formatter:off effectsStream.forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(info.getEffector(), info.getEffected(), info.getSkill())) .forEach(effect -> effect.pump(info.getEffected(), info.getSkill()))); //@formatter:on @@ -792,7 +792,7 @@ public class CharStat .filter(BuffInfo::isInUse) .filter(info -> info.isAbnormalType(AbnormalType.ABILITY_CHANGE)) .forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(_activeChar, _activeChar, info.getSkill())) .forEach(effect -> effect.pump(_activeChar, info.getSkill()))); //@formatter:on diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java index be0615be3e..90ac2108aa 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java @@ -21,14 +21,13 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** * Abstract effect implementation.
- * Instant effects should not override {@link #onExit(BuffInfo)}.
- * Instant effects should not override {@link #canStart(BuffInfo)}, all checks should be done {@link #onStart(BuffInfo)}.
- * Do not call super class methods {@link #onStart(BuffInfo)} nor {@link #onExit(BuffInfo)}. + * Instant effects should not override {@link #onExit(L2Character, L2Character, Skill)}.
+ * Instant effects should not override {@link #canStart(L2Character, L2Character, Skill)}, all checks should be done {@link #onStart(L2Character, L2Character, Skill)}.
+ * Do not call super class methods {@link #onStart(L2Character, L2Character, Skill)} nor {@link #onExit(L2Character, L2Character, Skill)}. * @author Zoey76 */ public abstract class AbstractEffect @@ -75,23 +74,15 @@ public abstract class AbstractEffect return true; } - /** - * Get this effect's type.
- * TODO: Remove. - * @return the effect type - */ - public L2EffectType getEffectType() - { - return L2EffectType.NONE; - } - /** * Verify if the buff can start.
* Used for continuous effects. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return {@code true} if all the start conditions are meet, {@code false} otherwise */ - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { return true; } @@ -111,34 +102,24 @@ public abstract class AbstractEffect } - /** - * Called on effect start. - * @param info the buff info - */ - public void onStart(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { + } /** * Called on each tick.
* If the abnormal time is lesser than zero it will last forever. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return if {@code true} this effect will continue forever, if {@code false} it will stop after abnormal time has passed */ - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { return false; } - /** - * Called when the effect is exited. - * @param info the buff info - */ - public void onExit(BuffInfo info) - { - - } - /** * Get the effect flags. * @return bit flag for current effect @@ -148,12 +129,6 @@ public abstract class AbstractEffect return EffectFlag.NONE.getMask(); } - @Override - public String toString() - { - return "Effect " + getClass().getSimpleName(); - } - public boolean checkCondition(Object obj) { return true; @@ -187,4 +162,20 @@ public abstract class AbstractEffect { } + + /** + * Get this effect's type.
+ * TODO: Remove. + * @return the effect type + */ + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public String toString() + { + return "Effect " + getClass().getSimpleName(); + } } \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/options/Options.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/options/Options.java index 475f2a94d8..813ec8f6db 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/options/Options.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/options/Options.java @@ -176,7 +176,7 @@ public class Options effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.pump(player, info.getSkill()); - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java index d2aa392e10..9696330565 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -334,7 +334,6 @@ public final class BuffInfo // Call on start. effect.onStart(getEffector(), getEffected(), getSkill()); - effect.onStart(this); // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) @@ -361,7 +360,7 @@ public final class BuffInfo if (_isInUse) { // Callback for on action time event. - continueForever = effect.onActionTime(this); + continueForever = effect.onActionTime(getEffector(), getEffected(), getSkill()); } if (!continueForever && _skill.isToggle()) @@ -392,7 +391,7 @@ public final class BuffInfo // Instant effects shouldn't call onExit(..). if (!effect.isInstant()) { - effect.onExit(this); + effect.onExit(getEffector(), getEffected(), getSkill()); } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java index 164957d7a5..8c4ba4eb64 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -1265,7 +1265,7 @@ public final class Skill implements IIdentifiable effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); } - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java index 3e9a609e27..61f879a4b1 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java @@ -18,6 +18,11 @@ package events.HuntForSanta; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.quest.LongTimeEvent; import com.l2jmobius.gameserver.model.skills.BuffInfo; @@ -39,7 +44,7 @@ public final class HuntForSanta extends LongTimeEvent private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1); private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1); // Item - // private static final int SANTAS_MARK = 40313; + private static final int SANTAS_MARK = 40313; private HuntForSanta() { @@ -63,21 +68,27 @@ public final class HuntForSanta extends LongTimeEvent case "receiveBuffStocking": { htmltext = applyBuff(npc, player, BUFF_STOCKING.getSkill()); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffTree": { htmltext = applyBuff(npc, player, BUFF_TREE.getSkill()); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffSnowman": { htmltext = applyBuff(npc, player, BUFF_SNOWMAN.getSkill()); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffAll": { htmltext = applyAllBuffs(npc, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "changeBuff": @@ -87,6 +98,17 @@ public final class HuntForSanta extends LongTimeEvent break; } } + + if (event.startsWith("rewardBuffStocking") // + || event.startsWith("rewardBuffSnowman") // + || event.startsWith("rewardBuffTree")) + { + if ((player != null) && (player.isOnlineInt() == 1)) + { + giveItems(player, SANTAS_MARK, 1); + } + } + return htmltext; } @@ -128,20 +150,36 @@ public final class HuntForSanta extends LongTimeEvent private void removeBuffs(L2PcInstance player) { + player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + } + + @RegisterEvent(EventType.ON_PLAYER_LOGIN) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerLogin(OnPlayerLogin event) + { + final L2PcInstance player = event.getActiveChar(); final BuffInfo buffStocking = player.getEffectList().getBuffInfoBySkillId(BUFF_STOCKING.getSkillId()); final BuffInfo buffTree = player.getEffectList().getBuffInfoBySkillId(BUFF_TREE.getSkillId()); final BuffInfo buffSnowman = player.getEffectList().getBuffInfoBySkillId(BUFF_SNOWMAN.getSkillId()); if (buffStocking != null) { - player.getEffectList().stopSkillEffects(true, buffStocking.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), buffStocking.getTime() * 1000, null, player); } if (buffTree != null) { - player.getEffectList().stopSkillEffects(true, buffTree.getSkill()); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), buffTree.getTime() * 1000, null, player); } if (buffSnowman != null) { - player.getEffectList().stopSkillEffects(true, buffSnowman.getSkill()); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), buffSnowman.getTime() * 1000, null, player); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java index 30fff039b3..2285d2836c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -280,7 +280,6 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new); EffectHandler.getInstance().registerHandler("Reuse", Reuse::new); EffectHandler.getInstance().registerHandler("ReuseSkillById", ReuseSkillById::new); - EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new); EffectHandler.getInstance().registerHandler("Root", Root::new); EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new); EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java index caae4afaef..33ddc02a86 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An effect that blocks a debuff. Acts like DOTA's Linken Sphere. @@ -36,9 +37,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(_times); + effected.setAbnormalShieldBlocks(_times); } @Override @@ -48,9 +49,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(Integer.MIN_VALUE); + effected.setAbnormalShieldBlocks(Integer.MIN_VALUE); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java index 6c9dd598d6..e9c88553fe 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java @@ -20,12 +20,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -60,16 +61,16 @@ public class AbsorbDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); - _damageHolder.remove(info.getEffected().getObjectId()); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + _damageHolder.remove(effected.getObjectId()); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - _damageHolder.put(info.getEffected().getObjectId(), _damage); - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + _damageHolder.put(effected.getObjectId(), _damage); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java index 838b3c2d0c..c3400d7890 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -52,8 +51,8 @@ public class AddSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeSkill(_addedSkill.getSkill(), true); + effected.removeSkill(_addedSkill.getSkill(), true); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index 2b1aed91f3..b526b6c4fc 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -101,11 +100,11 @@ public final class AirBind extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5101ecb949..26ee9c8fc8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; @@ -51,9 +50,9 @@ public final class AttackTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getAttackTraits()) { for (Entry trait : _attackTraits.entrySet()) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Betray.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Betray.java index c96c435a61..a7e0626ef3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Betray.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Betray.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Betray extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffector().isPlayer() && info.getEffected().isSummon(); + return effector.isPlayer() && effected.isSummon(); } @Override @@ -53,8 +52,8 @@ public final class Betray extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Blink.java index db1463c04d..18891823cf 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -70,10 +69,10 @@ public final class Blink extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return !info.getEffected().cannotEscape(); + return !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java index cd8741e950..143ff0cb20 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -47,8 +46,8 @@ public final class BlockAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); + effected.getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java index 191f846d67..a722b8f0bd 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,9 +47,9 @@ public final class BlockAction extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -74,15 +73,15 @@ public final class BlockAction extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 204c280a80..aba1c6b66a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,9 +62,8 @@ public final class BlockActions extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); _allowedSkills.stream().forEach(effected::removeBlockActionsAllowedSkill); if (!effected.isPlayer()) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java index c175e48897..89c3e54971 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class BlockChat extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -56,8 +55,8 @@ public final class BlockChat extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java index b87b6418fd..a58ad8b1f4 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -39,8 +38,8 @@ public final class BlockMove extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java index 05ac115c08..e49dc6c64b 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class BlockParty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -49,8 +48,8 @@ public final class BlockParty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index cc24155ef8..34efcfba26 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -18,12 +18,13 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Block Skills by isMagic type. @@ -49,20 +50,20 @@ public final class BlockSkill extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_magicTypes == null) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java index 06a12b6e96..2cb9267e0e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -46,8 +45,8 @@ public class BlockTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setTargetable(true); + effected.setTargetable(true); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java index 91080ab874..924b08d8f7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -40,40 +39,35 @@ public final class CallSkillOnActionTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return castSkill(info); - } - - private boolean castSkill(BuffInfo info) - { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } - final Skill skill = _skill.getSkill(); - if (skill != null) + final Skill triggerSkill = _skill.getSkill(); + if (triggerSkill != null) { - if (skill.isSynergySkill()) + if (triggerSkill.isSynergySkill()) { - skill.applyEffects(info.getEffector(), info.getEffector()); + triggerSkill.applyEffects(effector, effector); } - L2World.getInstance().forEachVisibleObjectInRange(info.getEffector(), L2Character.class, _skill.getSkill().getAffectRange(), c -> + L2World.getInstance().forEachVisibleObjectInRange(effector, L2Character.class, _skill.getSkill().getAffectRange(), c -> { - final L2Object target = skill.getTarget(info.getEffector(), c, false, false, false); + final L2Object target = triggerSkill.getTarget(effector, c, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, skill); + SkillCaster.triggerCast(effector, (L2Character) target, triggerSkill); } }); } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java index a431b998d7..8be7f869c6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -52,30 +51,30 @@ public final class ChameleonRest extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java index 461153971c..405b767faf 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.TemplateChanceHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,9 +43,9 @@ public final class ChangeBody extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -63,8 +62,8 @@ public final class ChangeBody extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java index 6a6c25702b..bc5e693a78 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Cp Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class CpHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double cp = info.getEffected().getCurrentCp(); - final double maxcp = info.getEffected().getMaxRecoverableCp(); + double cp = effected.getCurrentCp(); + final double maxcp = effected.getMaxRecoverableCp(); // Not needed to set the CP and send update packet if player is already at max CP if (cp >= maxcp) @@ -52,8 +53,8 @@ public final class CpHealOverTime extends AbstractEffect cp += _power * getTicksMultiplier(); cp = Math.min(cp, maxcp); - info.getEffected().setCurrentCp(cp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); + effected.setCurrentCp(cp, false); + effected.broadcastStatusUpdate(effector); return true; } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index b8eebc366c..e096752577 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalDamagePosition extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index bca8357f83..dad04ebbdd 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalRatePositionBonus extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java index 248727ab7d..717406c0c2 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -49,9 +48,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertisePenaltyBonus(0); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index ffd0364a12..07759f9e7d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -39,22 +40,22 @@ public final class DamOverTime extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - if (!_canKill && (damage >= (info.getEffected().getCurrentHp() - 1))) + if (!_canKill && (damage >= (effected.getCurrentHp() - 1))) { - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -66,19 +67,19 @@ public final class DamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } double damage = _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -86,15 +87,15 @@ public final class DamOverTime extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index ef87a82dfa..044b4d98bc 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -45,19 +46,19 @@ public final class DamOverTimePercent extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double damage = info.getEffected().getCurrentHp() * _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + double damage = effected.getCurrentHp() * _power * getTicksMultiplier(); + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -65,17 +66,17 @@ public final class DamOverTimePercent extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index a901fd5e38..0332a2ee2e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; /** @@ -66,9 +67,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) @@ -87,9 +88,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarm.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarm.java index 8d040f9746..c5f64c3551 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarm.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarm.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class Disarm extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java index 9d06ee3437..b6d50cd89c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -54,9 +53,9 @@ public final class Disarmor extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (_slot != L2Item.SLOT_NONE) && info.getEffected().isPlayer(); + return (_slot != L2Item.SLOT_NONE) && effected.isPlayer(); } @Override @@ -98,18 +97,18 @@ public final class Disarmor extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { return; } - final Integer disarmedObjId = _unequippedItems.remove(info.getEffected().getObjectId()); + final Integer disarmedObjId = _unequippedItems.remove(effected.getObjectId()); if ((disarmedObjId != null) && (disarmedObjId > 0)) { - final L2PcInstance player = info.getEffected().getActingPlayer(); - info.getEffected().getInventory().unblockItemSlot(_slot); + final L2PcInstance player = effected.getActingPlayer(); + player.getInventory().unblockItemSlot(_slot); final L2ItemInstance item = player.getInventory().getItemByObjectId(disarmedObjId); if (item != null) @@ -137,6 +136,6 @@ public final class Disarmor extends AbstractEffect } } } - super.onExit(info); + super.onExit(effector, effected, skill); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java index 55e476feee..c11228e931 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -56,34 +56,34 @@ public final class DoubleCast extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { for (SkillHolder holder : TOGGLE_SKILLS) { - final Skill skill = holder.getSkill(); - if ((skill != null) && !info.getEffected().isAffectedBySkill(holder)) + final Skill s = holder.getSkill(); + if ((s != null) && !effected.isAffectedBySkill(holder)) { - _addedToggles.computeIfAbsent(info.getEffected().getObjectId(), v -> new ArrayList<>()).add(holder); - skill.applyEffects(info.getEffected(), info.getEffected()); + _addedToggles.computeIfAbsent(effected.getObjectId(), v -> new ArrayList<>()).add(holder); + s.applyEffects(effected, effected); } } } - super.onStart(info); + super.onStart(effector, effected, skill); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - _addedToggles.computeIfPresent(info.getEffected().getObjectId(), (k, v) -> + _addedToggles.computeIfPresent(effected.getObjectId(), (k, v) -> { - v.forEach(h -> info.getEffected().stopSkillEffects(h.getSkill())); + v.forEach(h -> effected.stopSkillEffects(h.getSkill())); return null; }); } - super.onExit(info); + super.onExit(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java index b5aa3ce382..640bf5f0d9 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class EnableCloak extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class EnableCloak extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().setCloakSlotStatus(false); + effected.getActingPlayer().getStat().setCloakSlotStatus(false); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java index 32f856ab48..2c1012dbb1 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().setMaxBuffCount(Math.max(0, info.getEffected().getStat().getMaxBuffCount() - _slots)); + effected.getStat().setMaxBuffCount(Math.max(0, effected.getStat().getMaxBuffCount() - _slots)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Escape.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Escape.java index 9de8e8bc89..a89e887f3d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Escape.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Escape.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -51,10 +50,10 @@ public final class Escape extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return super.canStart(info) && !info.getEffected().cannotEscape(); + return super.canStart(effector, effected, skill) && !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java index a7e71242d8..4325b19161 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -37,22 +38,22 @@ public class Faceoff extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(info.getEffected().getObjectId()); - info.getEffected().getActingPlayer().setAttackerObjId(info.getEffector().getObjectId()); + effector.getActingPlayer().setAttackerObjId(effected.getObjectId()); + effected.getActingPlayer().setAttackerObjId(effector.getObjectId()); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(0); - info.getEffected().getActingPlayer().setAttackerObjId(0); + effector.getActingPlayer().setAttackerObjId(0); + effected.getActingPlayer().setAttackerObjId(0); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java index fa1651864a..66817daf19 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ChangeWaitType; import com.l2jmobius.gameserver.network.serverpackets.Revive; @@ -45,43 +46,43 @@ public final class FakeDeath extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().setRecentFakeDeath(true); + effected.getActingPlayer().setRecentFakeDeath(true); } - info.getEffected().broadcastPacket(new ChangeWaitType(info.getEffected(), ChangeWaitType.WT_STOP_FAKEDEATH)); - info.getEffected().broadcastPacket(new Revive(info.getEffected())); + effected.broadcastPacket(new ChangeWaitType(effected, ChangeWaitType.WT_STOP_FAKEDEATH)); + effected.broadcastPacket(new Revive(effected)); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().startFakeDeath(); + effected.startFakeDeath(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 78fc694005..4e61caf974 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.Util; @@ -45,9 +44,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character creature = info.getEffected(); + final L2Character creature = effected; return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && // !((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || // (creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON))); @@ -60,9 +59,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - fearAction(null, info.getEffected()); + fearAction(null, effected); return false; } @@ -74,11 +73,11 @@ public final class Fear extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Flag.java index 0b542a7d75..85a7701506 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Flag.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Flag extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class Flag extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().updatePvPFlag(0); + effected.getActingPlayer().updatePvPFlag(0); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index 82a36fbbdc..bf91e7c2e8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate; @@ -44,11 +45,11 @@ public class GetMomentum extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); final int maxCharge = (int) player.getStat().getValue(Stats.MAX_MOMENTUM, 0); final int newCharge = Math.min(player.getCharges() + 1, maxCharge); @@ -68,6 +69,6 @@ public class GetMomentum extends AbstractEffect player.sendPacket(new EtcStatusUpdate(player)); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Grow.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Grow.java index c5f9a21bcf..4eb28677e3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Grow.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Grow.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,11 +43,11 @@ public final class Grow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isNpc()) + if (effected.isNpc()) { - final L2Npc npc = (L2Npc) info.getEffected(); + final L2Npc npc = (L2Npc) effected; npc.setCollisionHeight(npc.getTemplate().getCollisionHeight()); npc.setCollisionRadius(npc.getTemplate().getfCollisionRadius()); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java index 7562521eaf..fc88d64de0 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax; @@ -38,15 +37,15 @@ public final class HealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead() || info.getEffected().isDoor()) + if (effected.isDead() || effected.isDoor()) { return false; } - double hp = info.getEffected().getCurrentHp(); - final double maxhp = info.getEffected().getMaxRecoverableHp(); + double hp = effected.getCurrentHp(); + final double maxhp = effected.getMaxRecoverableHp(); // Not needed to set the HP and send update packet if player is already at max HP if (hp >= maxhp) @@ -56,19 +55,17 @@ public final class HealOverTime extends AbstractEffect hp += _power * getTicksMultiplier(); hp = Math.min(hp, maxhp); - info.getEffected().setCurrentHp(hp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentHp(hp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); - final Skill skill = info.getSkill(); if (effected.isPlayer() && (getTicks() > 0) && (skill.getAbnormalType() == AbnormalType.HP_RECOVER)) { - effected.sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power)); + effected.sendPacket(new ExRegenMax(skill.getAbnormalTime(), getTicks(), _power)); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Hide.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Hide.java index da2ac54c54..1f71330b6e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Hide.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Hide.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -61,11 +60,11 @@ public final class Hide extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance activeChar = info.getEffected().getActingPlayer(); + final L2PcInstance activeChar = effected.getActingPlayer(); if (!activeChar.inObserverMode()) { activeChar.setInvisible(false); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java index 1ad15ccdde..853236001c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -39,16 +40,16 @@ public final class HpToOwner extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { final double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -60,22 +61,22 @@ public final class HpToOwner extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double damage = _power * getTicksMultiplier(); - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); if (_stealAmount > 0) { final double amount = (damage * _stealAmount) / 100; - info.getEffector().setCurrentHp(info.getEffector().getCurrentHp() + amount); - info.getEffector().setCurrentMp(info.getEffector().getCurrentMp() + amount); + effector.setCurrentHp(effector.getCurrentHp() + amount); + effector.setCurrentMp(effector.getCurrentMp() + amount); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java index 570a854ae3..c7e7969777 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Immobile Pet Buff effect implementation. @@ -32,17 +33,17 @@ public final class ImmobilePetBuff extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isSummon() && info.getEffector().isPlayer() && (((L2Summon) info.getEffected()).getOwner() == info.getEffector())) + if (effected.isSummon() && effector.isPlayer() && (((L2Summon) effected).getOwner() == effector)) { - info.getEffected().setIsImmobilized(true); + effected.setIsImmobilized(true); } } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 81b8f8134c..d94354ed72 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -141,11 +140,11 @@ public final class KnockBack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Lucky.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Lucky.java index 2ebec1b47e..611c210e9d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Lucky.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Lucky.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Lucky effect implementation. @@ -31,8 +32,8 @@ public final class Lucky extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java index d605d89ff7..259edcf3c0 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class MagicMpCost extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java index 0f41184d19..bebbaefdca 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -47,22 +47,22 @@ public final class MagicalDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - final L2Character activeChar = info.getEffector(); - final L2Character target = info.getEffected(); + final L2Character activeChar = effector; + final L2Character target = effected; if (target.isDead()) { return false; } - double damage = Formulas.calcMagicDam(activeChar, target, info.getSkill(), activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. + double damage = Formulas.calcMagicDam(activeChar, target, skill, activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. damage *= getTicksMultiplier(); if (damage >= (target.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { target.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; @@ -74,13 +74,13 @@ public final class MagicalDamOverTime extends AbstractEffect // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them if (target.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } damage = target.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java index 7b6dc8f966..6405a3a837 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,21 +36,21 @@ public final class ManaDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if ((manaDam > info.getEffected().getCurrentMp()) && info.getSkill().isToggle()) + if ((manaDam > effected.getCurrentMp()) && skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java index b9fb295056..fefa4ffef1 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Mana Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class ManaHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double mp = info.getEffected().getCurrentMp(); - final double maxmp = info.getEffected().getMaxRecoverableMp(); + double mp = effected.getCurrentMp(); + final double maxmp = effected.getMaxRecoverableMp(); // Not needed to set the MP and send update packet if player is already at max MP if (mp >= maxmp) @@ -52,8 +53,8 @@ public final class ManaHealOverTime extends AbstractEffect mp += _power * getTicksMultiplier(); mp = Math.min(mp, maxmp); - info.getEffected().setCurrentMp(mp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentMp(mp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java index 986913d63f..3f1d4e464c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,22 +36,22 @@ public final class MpConsumePerLevel extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double base = _power * getTicksMultiplier(); - final double consume = (info.getAbnormalTime() > 0) ? ((info.getEffected().getLevel() - 1) / 7.5) * base * info.getAbnormalTime() : base; - if (consume > info.getEffected().getCurrentMp()) + final double consume = (skill.getAbnormalTime() > 0) ? ((effected.getLevel() - 1) / 7.5) * base * skill.getAbnormalTime() : base; + if (consume > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(consume); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(consume); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java index af204b5579..d12759271d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Noblesse Blessing effect implementation. @@ -33,9 +34,9 @@ public final class NoblesseBless extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayable(); + return (effector != null) && (effected != null) && effected.isPlayable(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Passive.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Passive.java index 3f7d04eacc..c183e9b5af 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Passive.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Passive.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Passive extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isAttackable(); + return effected.isAttackable(); } @Override @@ -48,9 +47,9 @@ public final class Passive extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().enableAllSkills(); - info.getEffected().setIsImmobilized(false); + effected.enableAllSkills(); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java index 340030133f..831e5d3cf0 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; @@ -42,11 +41,11 @@ public class PolearmSingleTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); + effected.getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java index e8366e855f..c0e2c52b35 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Protection Blessing effect implementation. @@ -32,9 +33,9 @@ public final class ProtectionBlessing extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java index 510b5ecaa5..9438b97eaa 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java @@ -17,9 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.PcStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.ZoneId; /** @@ -44,41 +46,44 @@ public final class RecoverVitalityInPeaceZone extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) // - || info.getEffected().isDead() // - || !info.getEffected().isPlayer() // - || !info.getEffected().isInsideZone(ZoneId.PEACE)) + if ((effected == null) // + || effected.isDead() // + || !effected.isPlayer() // + || !effected.isInsideZone(ZoneId.PEACE)) { return false; } - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); + long vitality = effected.getActingPlayer().getVitalityPoints(); vitality += _amount; if (vitality >= PcStat.MAX_VITALITY_POINTS) { vitality = PcStat.MAX_VITALITY_POINTS; } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); + effected.getActingPlayer().setVitalityPoints((int) vitality, true); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() != null) // - && info.getEffected().isPlayer() // - && !info.isRemoved()) + if ((effected != null) // + && effected.isPlayer()) { - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); - vitality += _amount * 100; - if (vitality >= PcStat.MAX_VITALITY_POINTS) + final BuffInfo info = effected.getEffectList().getBuffInfoBySkillId(skill.getId()); + if ((info != null) && !info.isRemoved()) { - vitality = PcStat.MAX_VITALITY_POINTS; + long vitality = effected.getActingPlayer().getVitalityPoints(); + vitality += _amount * 100; + if (vitality >= PcStat.MAX_VITALITY_POINTS) + { + vitality = PcStat.MAX_VITALITY_POINTS; + } + effected.getActingPlayer().setVitalityPoints((int) vitality, true); } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 60bd6d90b6..335eb252de 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java @@ -17,12 +17,13 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -50,14 +51,14 @@ public class ReduceDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Relax.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Relax.java index 8539080614..f802e0574c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Relax.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Relax.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -65,42 +64,42 @@ public final class Relax extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } - if ((info.getEffected().getCurrentHp() + 1) > info.getEffected().getMaxRecoverableHp()) + if ((effected.getCurrentHp() + 1) > effected.getMaxRecoverableHp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); + effected.sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java index 01cafb9d92..a85a91b2f3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,11 +62,11 @@ public final class ResistSkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { for (SkillHolder holder : _skills) { - info.getEffected().removeIgnoreSkillEffects(holder); + effected.removeIgnoreSkillEffects(holder); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java index 220e7625d5..2c57e48c7e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java @@ -21,13 +21,13 @@ import java.util.HashSet; import java.util.Set; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.instancezone.Instance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -71,30 +71,28 @@ public final class ResurrectionSpecial extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer() && !info.getEffected().isPet()) + if (!effected.isPlayer() && !effected.isPet()) { return; } - final L2PcInstance caster = info.getEffector().getActingPlayer(); + final L2PcInstance caster = effector.getActingPlayer(); final Instance instance = caster.getInstanceWorld(); if (!_instanceId.isEmpty() && ((instance == null) || !_instanceId.contains(instance.getTemplateId()))) { return; } - final Skill skill = info.getSkill(); - - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().reviveRequest(caster, skill, false, _power); + effected.getActingPlayer().reviveRequest(caster, skill, false, _power); } - else if (info.getEffected().isPet()) + else if (effected.isPet()) { - final L2PetInstance pet = (L2PetInstance) info.getEffected(); - info.getEffected().getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); + final L2PetInstance pet = (L2PetInstance) effected; + effected.getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); } } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Reuse.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Reuse.java index 5d44cd483f..c297d532b7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Reuse.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Reuse.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class Reuse extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java deleted file mode 100644 index b32762f485..0000000000 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.StatsSet; -import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; - -/** - * Reward Item on Exit effect implementation. - * @author Mobius - */ -public final class RewardItemOnExit extends AbstractEffect -{ - private final int _itemId; - private final long _itemCount; - - public RewardItemOnExit(StatsSet params) - { - _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark. - _itemCount = params.getLong("itemCount", 1); - } - - @Override - public void onExit(BuffInfo info) - { - if (!info.isRemoved() && (info.getEffected() != null) && info.getEffected().isPlayer() && !info.getEffected().isDead()) - { - ThreadPoolManager.execute(() -> // Make sure item is saved. - { - info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected(), true); - }); - } - } -} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Root.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Root.java index 7e69ac579b..76983697aa 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Root.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Root.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,11 +47,11 @@ public final class Root extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java index 7b21d8cdfc..72880477ad 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -35,9 +34,9 @@ public final class SacrificeSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java index f02c2336b3..eaa75cd64c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Note: In retail this effect doesn't stack. It appears that the active value is taken from the last such effect. @@ -36,14 +37,14 @@ public class SkillEvasion extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().addSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().addSkillEvasionTypeValue(_magicType, _amount); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().removeSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().removeSkillEvasionTypeValue(_magicType, _amount); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java index 3cb5192097..cba30b2644 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -38,19 +39,19 @@ public final class SkillTurningOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) || (info.getEffected() == info.getEffector()) || info.getEffected().isRaid()) + if ((effected == null) || (effected == effector) || effected.isRaid()) { return false; } - final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill()) : ((_chance >= 100) || (Rnd.get(100) < _chance)); + final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, effector, effected, skill) : ((_chance >= 100) || (Rnd.get(100) < _chance)); if (skillSuccess) { - info.getEffected().breakCast(); + effected.breakCast(); } - return super.onActionTime(info); + return super.onActionTime(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 8ef35604fa..70ea70e917 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -56,11 +55,11 @@ public final class SoulEating extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java index 1d30737f06..beffb920fe 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.MoveType; import com.l2jmobius.gameserver.model.stats.Stats; @@ -40,20 +41,20 @@ public class StatByMoveType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, _value); + effected.getStat().mergeMoveTypeValue(_stat, _type, _value); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, -_value); + effected.getStat().mergeMoveTypeValue(_stat, _type, -_value); } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return info.getSkill().isPassive() || info.getSkill().isToggle(); + return skill.isPassive() || skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Synergy.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Synergy.java index 24f8d10972..c3a9b08bde 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Synergy.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Synergy.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -78,22 +77,22 @@ public final class Synergy extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } for (AbnormalType required : _requiredSlots) { - if (!info.getEffector().hasAbnormalType(required)) + if (!effector.hasAbnormalType(required)) { - return info.getSkill().isToggle(); + return skill.isToggle(); } } - final int abnormalCount = (int) _optionalSlots.stream().filter(info.getEffector()::hasAbnormalType).count(); + final int abnormalCount = (int) _optionalSlots.stream().filter(effector::hasAbnormalType).count(); if (abnormalCount >= _minSlot) { @@ -102,19 +101,19 @@ public final class Synergy extends AbstractEffect if (partyBuffSkill != null) { - final L2Object target = partyBuffSkill.getTarget(info.getEffector(), info.getEffected(), false, false, false); + final L2Object target = partyBuffSkill.getTarget(effector, effected, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, partyBuffSkill); + SkillCaster.triggerCast(effector, (L2Character) target, partyBuffSkill); } } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java index 5f57db9956..c4f2ef9e0c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class TalismanSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class TalismanSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().addTalismanSlots(-_slots); + effected.getActingPlayer().getStat().addTalismanSlots(-_slots); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java index 6f0bb3c84b..0f06888ace 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Target Me effect implementation. @@ -32,25 +33,25 @@ public final class TargetMe extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - ((L2Playable) info.getEffected()).setLockedTarget(null); + ((L2Playable) effected).setLockedTarget(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - if (info.getEffected().getTarget() != info.getEffector()) + if (effected.getTarget() != effector) { - info.getEffected().setTarget(info.getEffector()); + effected.setTarget(effector); } - ((L2Playable) info.getEffected()).setLockedTarget(info.getEffector()); + ((L2Playable) effected).setLockedTarget(effector); } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java index bffc2aecce..13053a9adc 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -58,9 +57,9 @@ public final class TeleportToSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().hasServitors(); + return effected.hasServitors(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java index 33cab39e03..e9e47242d7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -33,20 +34,20 @@ public final class TransferDamageToPlayer extends AbstractStatAddEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(null); + ((L2Playable) effected).setTransferDamageTo(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(info.getEffector().getActingPlayer()); + ((L2Playable) effected).setTransferDamageTo(effector.getActingPlayer()); } } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java index 5f822f2af5..75d4a88f17 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.util.Util; @@ -47,9 +46,9 @@ public final class TransferHate extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true); + return Util.checkIfInRange(skill.getEffectRange(), effector, effected, true); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Transformation.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Transformation.java index 1b389e9af7..92df00cb49 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Transformation.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Transformation.java @@ -24,7 +24,6 @@ import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -53,9 +52,9 @@ public final class Transformation extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -68,8 +67,8 @@ public final class Transformation extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 2e8cd38512..32ac16aa59 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -160,14 +160,14 @@ public final class TriggerSkillByAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index 82a3bb14dc..c9ce6cc000 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -92,14 +91,14 @@ public final class TriggerSkillByAvoid extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 5fca763c99..351e687f0f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -99,14 +98,14 @@ public final class TriggerSkillByDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index cfd2d77548..c950983e3d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -102,14 +101,14 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index 2db572e6c5..b7ec10f540 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -64,14 +63,14 @@ public final class TriggerSkillByKill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, info.getEffected()), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, effected), this)); } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index d5e54a6e95..7a474f5b8d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -112,20 +112,19 @@ public final class TriggerSkillByMagicType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index e43cda5682..fefd166e0d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java @@ -62,9 +62,9 @@ public final class TriggerSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } private void onSkillUseEvent(OnCreatureSkillFinishCast event) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java index 4ba7fcfdf7..23a72039a7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java @@ -72,9 +72,9 @@ public final class TriggerSkillBySkillAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } private void onAttackEvent(OnCreatureDamageDealt event) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java index b58b293380..b687d563c6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -63,9 +62,9 @@ public final class Unsummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java index ba1c0ab53f..ed1350c021 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Untargetable extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java index 7a27415002..e30776b49a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; @@ -38,9 +37,9 @@ public final class VitalityPointUp extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16400-16499.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16400-16499.xml index bbd2085def..6663569062 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16400-16499.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16400-16499.xml @@ -203,10 +203,6 @@ 7 DIFF - - 40313 - 1 -
@@ -241,10 +237,6 @@ 30 DIFF - - 40313 - 1 - @@ -279,10 +271,6 @@ 2013 DIFF - - 40313 - 1 - diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt index 9a6c720053..fdf52a8404 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt @@ -248,7 +248,6 @@ Resurrection: Resurrects target Player or Summon. ResurrectionSpecial: Resurrects target Player or Summon only in specified instance IDs. Reuse: Decreases skill reuse time based on its magic type. ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius) -RewardItemOnExit: Reward an item when effect ends. (l2jmobius) Root: Stops movement. SacrificeSummon: Sacrifices the players summon. (l2jmobius) SafeFallHeight: Minimum falling height for taking damage stat. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index 8a09cbfcb4..756ee0146c 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -780,7 +780,7 @@ public class CharStat // Call pump to each effect //@formatter:off effectsStream.forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(info.getEffector(), info.getEffected(), info.getSkill())) .forEach(effect -> effect.pump(info.getEffected(), info.getSkill()))); //@formatter:on @@ -792,7 +792,7 @@ public class CharStat .filter(BuffInfo::isInUse) .filter(info -> info.isAbnormalType(AbnormalType.ABILITY_CHANGE)) .forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(_activeChar, _activeChar, info.getSkill())) .forEach(effect -> effect.pump(_activeChar, info.getSkill()))); //@formatter:on diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java index be0615be3e..90ac2108aa 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java @@ -21,14 +21,13 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** * Abstract effect implementation.
- * Instant effects should not override {@link #onExit(BuffInfo)}.
- * Instant effects should not override {@link #canStart(BuffInfo)}, all checks should be done {@link #onStart(BuffInfo)}.
- * Do not call super class methods {@link #onStart(BuffInfo)} nor {@link #onExit(BuffInfo)}. + * Instant effects should not override {@link #onExit(L2Character, L2Character, Skill)}.
+ * Instant effects should not override {@link #canStart(L2Character, L2Character, Skill)}, all checks should be done {@link #onStart(L2Character, L2Character, Skill)}.
+ * Do not call super class methods {@link #onStart(L2Character, L2Character, Skill)} nor {@link #onExit(L2Character, L2Character, Skill)}. * @author Zoey76 */ public abstract class AbstractEffect @@ -75,23 +74,15 @@ public abstract class AbstractEffect return true; } - /** - * Get this effect's type.
- * TODO: Remove. - * @return the effect type - */ - public L2EffectType getEffectType() - { - return L2EffectType.NONE; - } - /** * Verify if the buff can start.
* Used for continuous effects. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return {@code true} if all the start conditions are meet, {@code false} otherwise */ - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { return true; } @@ -111,34 +102,24 @@ public abstract class AbstractEffect } - /** - * Called on effect start. - * @param info the buff info - */ - public void onStart(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { + } /** * Called on each tick.
* If the abnormal time is lesser than zero it will last forever. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return if {@code true} this effect will continue forever, if {@code false} it will stop after abnormal time has passed */ - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { return false; } - /** - * Called when the effect is exited. - * @param info the buff info - */ - public void onExit(BuffInfo info) - { - - } - /** * Get the effect flags. * @return bit flag for current effect @@ -148,12 +129,6 @@ public abstract class AbstractEffect return EffectFlag.NONE.getMask(); } - @Override - public String toString() - { - return "Effect " + getClass().getSimpleName(); - } - public boolean checkCondition(Object obj) { return true; @@ -187,4 +162,20 @@ public abstract class AbstractEffect { } + + /** + * Get this effect's type.
+ * TODO: Remove. + * @return the effect type + */ + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public String toString() + { + return "Effect " + getClass().getSimpleName(); + } } \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/options/Options.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/options/Options.java index 475f2a94d8..813ec8f6db 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/options/Options.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/options/Options.java @@ -176,7 +176,7 @@ public class Options effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.pump(player, info.getSkill()); - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java index d2aa392e10..9696330565 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -334,7 +334,6 @@ public final class BuffInfo // Call on start. effect.onStart(getEffector(), getEffected(), getSkill()); - effect.onStart(this); // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) @@ -361,7 +360,7 @@ public final class BuffInfo if (_isInUse) { // Callback for on action time event. - continueForever = effect.onActionTime(this); + continueForever = effect.onActionTime(getEffector(), getEffected(), getSkill()); } if (!continueForever && _skill.isToggle()) @@ -392,7 +391,7 @@ public final class BuffInfo // Instant effects shouldn't call onExit(..). if (!effect.isInstant()) { - effect.onExit(this); + effect.onExit(getEffector(), getEffected(), getSkill()); } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java index 164957d7a5..8c4ba4eb64 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -1265,7 +1265,7 @@ public final class Skill implements IIdentifiable effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); } - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java index 3e9a609e27..61f879a4b1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/HuntForSanta/HuntForSanta.java @@ -18,6 +18,11 @@ package events.HuntForSanta; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.quest.LongTimeEvent; import com.l2jmobius.gameserver.model.skills.BuffInfo; @@ -39,7 +44,7 @@ public final class HuntForSanta extends LongTimeEvent private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1); private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1); // Item - // private static final int SANTAS_MARK = 40313; + private static final int SANTAS_MARK = 40313; private HuntForSanta() { @@ -63,21 +68,27 @@ public final class HuntForSanta extends LongTimeEvent case "receiveBuffStocking": { htmltext = applyBuff(npc, player, BUFF_STOCKING.getSkill()); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffTree": { htmltext = applyBuff(npc, player, BUFF_TREE.getSkill()); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffSnowman": { htmltext = applyBuff(npc, player, BUFF_SNOWMAN.getSkill()); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "receiveBuffAll": { htmltext = applyAllBuffs(npc, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), 7200000, null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), 7200000, null, player); break; } case "changeBuff": @@ -87,6 +98,17 @@ public final class HuntForSanta extends LongTimeEvent break; } } + + if (event.startsWith("rewardBuffStocking") // + || event.startsWith("rewardBuffSnowman") // + || event.startsWith("rewardBuffTree")) + { + if ((player != null) && (player.isOnlineInt() == 1)) + { + giveItems(player, SANTAS_MARK, 1); + } + } + return htmltext; } @@ -128,20 +150,36 @@ public final class HuntForSanta extends LongTimeEvent private void removeBuffs(L2PcInstance player) { + player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill()); + player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + } + + @RegisterEvent(EventType.ON_PLAYER_LOGIN) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerLogin(OnPlayerLogin event) + { + final L2PcInstance player = event.getActiveChar(); final BuffInfo buffStocking = player.getEffectList().getBuffInfoBySkillId(BUFF_STOCKING.getSkillId()); final BuffInfo buffTree = player.getEffectList().getBuffInfoBySkillId(BUFF_TREE.getSkillId()); final BuffInfo buffSnowman = player.getEffectList().getBuffInfoBySkillId(BUFF_SNOWMAN.getSkillId()); if (buffStocking != null) { - player.getEffectList().stopSkillEffects(true, buffStocking.getSkill()); + cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffStocking" + player.getObjectId(), buffStocking.getTime() * 1000, null, player); } if (buffTree != null) { - player.getEffectList().stopSkillEffects(true, buffTree.getSkill()); + cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffTree" + player.getObjectId(), buffTree.getTime() * 1000, null, player); } if (buffSnowman != null) { - player.getEffectList().stopSkillEffects(true, buffSnowman.getSkill()); + cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player); + startQuestTimer("rewardBuffSnowman" + player.getObjectId(), buffSnowman.getTime() * 1000, null, player); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java index ee5e22dacc..35e15369d7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -285,7 +285,6 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new); EffectHandler.getInstance().registerHandler("Reuse", Reuse::new); EffectHandler.getInstance().registerHandler("ReuseSkillById", ReuseSkillById::new); - EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new); EffectHandler.getInstance().registerHandler("Root", Root::new); EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new); EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java index caae4afaef..33ddc02a86 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An effect that blocks a debuff. Acts like DOTA's Linken Sphere. @@ -36,9 +37,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(_times); + effected.setAbnormalShieldBlocks(_times); } @Override @@ -48,9 +49,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(Integer.MIN_VALUE); + effected.setAbnormalShieldBlocks(Integer.MIN_VALUE); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java index 6c9dd598d6..e9c88553fe 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java @@ -20,12 +20,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -60,16 +61,16 @@ public class AbsorbDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); - _damageHolder.remove(info.getEffected().getObjectId()); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + _damageHolder.remove(effected.getObjectId()); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - _damageHolder.put(info.getEffected().getObjectId(), _damage); - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + _damageHolder.put(effected.getObjectId(), _damage); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java index 838b3c2d0c..c3400d7890 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -52,8 +51,8 @@ public class AddSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeSkill(_addedSkill.getSkill(), true); + effected.removeSkill(_addedSkill.getSkill(), true); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index 2b1aed91f3..b526b6c4fc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -101,11 +100,11 @@ public final class AirBind extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5101ecb949..26ee9c8fc8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; @@ -51,9 +50,9 @@ public final class AttackTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getAttackTraits()) { for (Entry trait : _attackTraits.entrySet()) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Betray.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Betray.java index c96c435a61..a7e0626ef3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Betray.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Betray.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Betray extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffector().isPlayer() && info.getEffected().isSummon(); + return effector.isPlayer() && effected.isSummon(); } @Override @@ -53,8 +52,8 @@ public final class Betray extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Blink.java index db1463c04d..18891823cf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -70,10 +69,10 @@ public final class Blink extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return !info.getEffected().cannotEscape(); + return !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java index cd8741e950..143ff0cb20 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -47,8 +46,8 @@ public final class BlockAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); + effected.getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java index 191f846d67..a722b8f0bd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,9 +47,9 @@ public final class BlockAction extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -74,15 +73,15 @@ public final class BlockAction extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 204c280a80..aba1c6b66a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,9 +62,8 @@ public final class BlockActions extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); _allowedSkills.stream().forEach(effected::removeBlockActionsAllowedSkill); if (!effected.isPlayer()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java index c175e48897..89c3e54971 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class BlockChat extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -56,8 +55,8 @@ public final class BlockChat extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java index b87b6418fd..a58ad8b1f4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -39,8 +38,8 @@ public final class BlockMove extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java index 05ac115c08..e49dc6c64b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class BlockParty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -49,8 +48,8 @@ public final class BlockParty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index cc24155ef8..34efcfba26 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -18,12 +18,13 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Block Skills by isMagic type. @@ -49,20 +50,20 @@ public final class BlockSkill extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_magicTypes == null) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java index 06a12b6e96..2cb9267e0e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -46,8 +45,8 @@ public class BlockTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setTargetable(true); + effected.setTargetable(true); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java index 91080ab874..924b08d8f7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -40,40 +39,35 @@ public final class CallSkillOnActionTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return castSkill(info); - } - - private boolean castSkill(BuffInfo info) - { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } - final Skill skill = _skill.getSkill(); - if (skill != null) + final Skill triggerSkill = _skill.getSkill(); + if (triggerSkill != null) { - if (skill.isSynergySkill()) + if (triggerSkill.isSynergySkill()) { - skill.applyEffects(info.getEffector(), info.getEffector()); + triggerSkill.applyEffects(effector, effector); } - L2World.getInstance().forEachVisibleObjectInRange(info.getEffector(), L2Character.class, _skill.getSkill().getAffectRange(), c -> + L2World.getInstance().forEachVisibleObjectInRange(effector, L2Character.class, _skill.getSkill().getAffectRange(), c -> { - final L2Object target = skill.getTarget(info.getEffector(), c, false, false, false); + final L2Object target = triggerSkill.getTarget(effector, c, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, skill); + SkillCaster.triggerCast(effector, (L2Character) target, triggerSkill); } }); } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java index a431b998d7..8be7f869c6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -52,30 +51,30 @@ public final class ChameleonRest extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java index 461153971c..405b767faf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.TemplateChanceHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,9 +43,9 @@ public final class ChangeBody extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -63,8 +62,8 @@ public final class ChangeBody extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java index 6a6c25702b..bc5e693a78 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Cp Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class CpHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double cp = info.getEffected().getCurrentCp(); - final double maxcp = info.getEffected().getMaxRecoverableCp(); + double cp = effected.getCurrentCp(); + final double maxcp = effected.getMaxRecoverableCp(); // Not needed to set the CP and send update packet if player is already at max CP if (cp >= maxcp) @@ -52,8 +53,8 @@ public final class CpHealOverTime extends AbstractEffect cp += _power * getTicksMultiplier(); cp = Math.min(cp, maxcp); - info.getEffected().setCurrentCp(cp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); + effected.setCurrentCp(cp, false); + effected.broadcastStatusUpdate(effector); return true; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateCommonItem.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateCommonItem.java index d189eb6f48..3e2ec29712 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateCommonItem.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateCommonItem.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CreateCommonItem extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -53,9 +52,9 @@ public final class CreateCommonItem extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setCreateCommonItemLevel(0); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateItem.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateItem.java index a18650feb0..4be551bec0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateItem.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CreateItem.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CreateItem extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -53,9 +52,9 @@ public final class CreateItem extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setCreateItemLevel(0); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index b8eebc366c..e096752577 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalDamagePosition extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index bca8357f83..dad04ebbdd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalRatePositionBonus extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java index 49807b42a7..ca64a7d8f6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -49,9 +48,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertisePenaltyBonus(0); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Crystallize.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Crystallize.java index 070fbd5193..1900e6fe76 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Crystallize.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Crystallize.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class Crystallize extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -54,9 +53,9 @@ public final class Crystallize extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setCrystallizeGrade(null); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index ffd0364a12..07759f9e7d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -39,22 +40,22 @@ public final class DamOverTime extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - if (!_canKill && (damage >= (info.getEffected().getCurrentHp() - 1))) + if (!_canKill && (damage >= (effected.getCurrentHp() - 1))) { - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -66,19 +67,19 @@ public final class DamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } double damage = _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -86,15 +87,15 @@ public final class DamOverTime extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index ef87a82dfa..044b4d98bc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -45,19 +46,19 @@ public final class DamOverTimePercent extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double damage = info.getEffected().getCurrentHp() * _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + double damage = effected.getCurrentHp() * _power * getTicksMultiplier(); + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -65,17 +66,17 @@ public final class DamOverTimePercent extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index a901fd5e38..0332a2ee2e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; /** @@ -66,9 +67,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) @@ -87,9 +88,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarm.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarm.java index 8d040f9746..c5f64c3551 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarm.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarm.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class Disarm extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java index 9d06ee3437..b6d50cd89c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -54,9 +53,9 @@ public final class Disarmor extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (_slot != L2Item.SLOT_NONE) && info.getEffected().isPlayer(); + return (_slot != L2Item.SLOT_NONE) && effected.isPlayer(); } @Override @@ -98,18 +97,18 @@ public final class Disarmor extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { return; } - final Integer disarmedObjId = _unequippedItems.remove(info.getEffected().getObjectId()); + final Integer disarmedObjId = _unequippedItems.remove(effected.getObjectId()); if ((disarmedObjId != null) && (disarmedObjId > 0)) { - final L2PcInstance player = info.getEffected().getActingPlayer(); - info.getEffected().getInventory().unblockItemSlot(_slot); + final L2PcInstance player = effected.getActingPlayer(); + player.getInventory().unblockItemSlot(_slot); final L2ItemInstance item = player.getInventory().getItemByObjectId(disarmedObjId); if (item != null) @@ -137,6 +136,6 @@ public final class Disarmor extends AbstractEffect } } } - super.onExit(info); + super.onExit(effector, effected, skill); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java index 55e476feee..c11228e931 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -56,34 +56,34 @@ public final class DoubleCast extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { for (SkillHolder holder : TOGGLE_SKILLS) { - final Skill skill = holder.getSkill(); - if ((skill != null) && !info.getEffected().isAffectedBySkill(holder)) + final Skill s = holder.getSkill(); + if ((s != null) && !effected.isAffectedBySkill(holder)) { - _addedToggles.computeIfAbsent(info.getEffected().getObjectId(), v -> new ArrayList<>()).add(holder); - skill.applyEffects(info.getEffected(), info.getEffected()); + _addedToggles.computeIfAbsent(effected.getObjectId(), v -> new ArrayList<>()).add(holder); + s.applyEffects(effected, effected); } } } - super.onStart(info); + super.onStart(effector, effected, skill); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - _addedToggles.computeIfPresent(info.getEffected().getObjectId(), (k, v) -> + _addedToggles.computeIfPresent(effected.getObjectId(), (k, v) -> { - v.forEach(h -> info.getEffected().stopSkillEffects(h.getSkill())); + v.forEach(h -> effected.stopSkillEffects(h.getSkill())); return null; }); } - super.onExit(info); + super.onExit(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java index b5aa3ce382..640bf5f0d9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class EnableCloak extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class EnableCloak extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().setCloakSlotStatus(false); + effected.getActingPlayer().getStat().setCloakSlotStatus(false); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java index 32f856ab48..2c1012dbb1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().setMaxBuffCount(Math.max(0, info.getEffected().getStat().getMaxBuffCount() - _slots)); + effected.getStat().setMaxBuffCount(Math.max(0, effected.getStat().getMaxBuffCount() - _slots)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Escape.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Escape.java index 9de8e8bc89..a89e887f3d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Escape.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Escape.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -51,10 +50,10 @@ public final class Escape extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return super.canStart(info) && !info.getEffected().cannotEscape(); + return super.canStart(effector, effected, skill) && !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java index a7e71242d8..4325b19161 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -37,22 +38,22 @@ public class Faceoff extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(info.getEffected().getObjectId()); - info.getEffected().getActingPlayer().setAttackerObjId(info.getEffector().getObjectId()); + effector.getActingPlayer().setAttackerObjId(effected.getObjectId()); + effected.getActingPlayer().setAttackerObjId(effector.getObjectId()); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(0); - info.getEffected().getActingPlayer().setAttackerObjId(0); + effector.getActingPlayer().setAttackerObjId(0); + effected.getActingPlayer().setAttackerObjId(0); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java index fa1651864a..66817daf19 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ChangeWaitType; import com.l2jmobius.gameserver.network.serverpackets.Revive; @@ -45,43 +46,43 @@ public final class FakeDeath extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().setRecentFakeDeath(true); + effected.getActingPlayer().setRecentFakeDeath(true); } - info.getEffected().broadcastPacket(new ChangeWaitType(info.getEffected(), ChangeWaitType.WT_STOP_FAKEDEATH)); - info.getEffected().broadcastPacket(new Revive(info.getEffected())); + effected.broadcastPacket(new ChangeWaitType(effected, ChangeWaitType.WT_STOP_FAKEDEATH)); + effected.broadcastPacket(new Revive(effected)); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().startFakeDeath(); + effected.startFakeDeath(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 78fc694005..4e61caf974 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.Util; @@ -45,9 +44,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character creature = info.getEffected(); + final L2Character creature = effected; return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && // !((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || // (creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON))); @@ -60,9 +59,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - fearAction(null, info.getEffected()); + fearAction(null, effected); return false; } @@ -74,11 +73,11 @@ public final class Fear extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Flag.java index 0b542a7d75..85a7701506 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Flag.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Flag extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class Flag extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().updatePvPFlag(0); + effected.getActingPlayer().updatePvPFlag(0); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index 82a36fbbdc..bf91e7c2e8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate; @@ -44,11 +45,11 @@ public class GetMomentum extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); final int maxCharge = (int) player.getStat().getValue(Stats.MAX_MOMENTUM, 0); final int newCharge = Math.min(player.getCharges() + 1, maxCharge); @@ -68,6 +69,6 @@ public class GetMomentum extends AbstractEffect player.sendPacket(new EtcStatusUpdate(player)); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Grow.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Grow.java index c5f9a21bcf..4eb28677e3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Grow.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Grow.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,11 +43,11 @@ public final class Grow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isNpc()) + if (effected.isNpc()) { - final L2Npc npc = (L2Npc) info.getEffected(); + final L2Npc npc = (L2Npc) effected; npc.setCollisionHeight(npc.getTemplate().getCollisionHeight()); npc.setCollisionRadius(npc.getTemplate().getfCollisionRadius()); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java index 7562521eaf..fc88d64de0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax; @@ -38,15 +37,15 @@ public final class HealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead() || info.getEffected().isDoor()) + if (effected.isDead() || effected.isDoor()) { return false; } - double hp = info.getEffected().getCurrentHp(); - final double maxhp = info.getEffected().getMaxRecoverableHp(); + double hp = effected.getCurrentHp(); + final double maxhp = effected.getMaxRecoverableHp(); // Not needed to set the HP and send update packet if player is already at max HP if (hp >= maxhp) @@ -56,19 +55,17 @@ public final class HealOverTime extends AbstractEffect hp += _power * getTicksMultiplier(); hp = Math.min(hp, maxhp); - info.getEffected().setCurrentHp(hp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentHp(hp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); - final Skill skill = info.getSkill(); if (effected.isPlayer() && (getTicks() > 0) && (skill.getAbnormalType() == AbnormalType.HP_RECOVER)) { - effected.sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power)); + effected.sendPacket(new ExRegenMax(skill.getAbnormalTime(), getTicks(), _power)); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Hide.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Hide.java index da2ac54c54..1f71330b6e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Hide.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Hide.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -61,11 +60,11 @@ public final class Hide extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance activeChar = info.getEffected().getActingPlayer(); + final L2PcInstance activeChar = effected.getActingPlayer(); if (!activeChar.inObserverMode()) { activeChar.setInvisible(false); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java index 1ad15ccdde..853236001c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -39,16 +40,16 @@ public final class HpToOwner extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { final double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -60,22 +61,22 @@ public final class HpToOwner extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double damage = _power * getTicksMultiplier(); - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); if (_stealAmount > 0) { final double amount = (damage * _stealAmount) / 100; - info.getEffector().setCurrentHp(info.getEffector().getCurrentHp() + amount); - info.getEffector().setCurrentMp(info.getEffector().getCurrentMp() + amount); + effector.setCurrentHp(effector.getCurrentHp() + amount); + effector.setCurrentMp(effector.getCurrentMp() + amount); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java index 570a854ae3..c7e7969777 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Immobile Pet Buff effect implementation. @@ -32,17 +33,17 @@ public final class ImmobilePetBuff extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isSummon() && info.getEffector().isPlayer() && (((L2Summon) info.getEffected()).getOwner() == info.getEffector())) + if (effected.isSummon() && effector.isPlayer() && (((L2Summon) effected).getOwner() == effector)) { - info.getEffected().setIsImmobilized(true); + effected.setIsImmobilized(true); } } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 81b8f8134c..d94354ed72 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest; @@ -141,11 +140,11 @@ public final class KnockBack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Lucky.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Lucky.java index 2ebec1b47e..611c210e9d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Lucky.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Lucky.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Lucky effect implementation. @@ -31,8 +32,8 @@ public final class Lucky extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java index d605d89ff7..259edcf3c0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class MagicMpCost extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java index 0f41184d19..bebbaefdca 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -47,22 +47,22 @@ public final class MagicalDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - final L2Character activeChar = info.getEffector(); - final L2Character target = info.getEffected(); + final L2Character activeChar = effector; + final L2Character target = effected; if (target.isDead()) { return false; } - double damage = Formulas.calcMagicDam(activeChar, target, info.getSkill(), activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. + double damage = Formulas.calcMagicDam(activeChar, target, skill, activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. damage *= getTicksMultiplier(); if (damage >= (target.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { target.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; @@ -74,13 +74,13 @@ public final class MagicalDamOverTime extends AbstractEffect // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them if (target.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } damage = target.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java index 7b6dc8f966..6405a3a837 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,21 +36,21 @@ public final class ManaDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if ((manaDam > info.getEffected().getCurrentMp()) && info.getSkill().isToggle()) + if ((manaDam > effected.getCurrentMp()) && skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java index b9fb295056..fefa4ffef1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Mana Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class ManaHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double mp = info.getEffected().getCurrentMp(); - final double maxmp = info.getEffected().getMaxRecoverableMp(); + double mp = effected.getCurrentMp(); + final double maxmp = effected.getMaxRecoverableMp(); // Not needed to set the MP and send update packet if player is already at max MP if (mp >= maxmp) @@ -52,8 +53,8 @@ public final class ManaHealOverTime extends AbstractEffect mp += _power * getTicksMultiplier(); mp = Math.min(mp, maxmp); - info.getEffected().setCurrentMp(mp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentMp(mp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java index 986913d63f..3f1d4e464c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,22 +36,22 @@ public final class MpConsumePerLevel extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double base = _power * getTicksMultiplier(); - final double consume = (info.getAbnormalTime() > 0) ? ((info.getEffected().getLevel() - 1) / 7.5) * base * info.getAbnormalTime() : base; - if (consume > info.getEffected().getCurrentMp()) + final double consume = (skill.getAbnormalTime() > 0) ? ((effected.getLevel() - 1) / 7.5) * base * skill.getAbnormalTime() : base; + if (consume > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(consume); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(consume); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java index af204b5579..d12759271d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Noblesse Blessing effect implementation. @@ -33,9 +34,9 @@ public final class NoblesseBless extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayable(); + return (effector != null) && (effected != null) && effected.isPlayable(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Passive.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Passive.java index 3f7d04eacc..c183e9b5af 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Passive.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Passive.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Passive extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isAttackable(); + return effected.isAttackable(); } @Override @@ -48,9 +47,9 @@ public final class Passive extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().enableAllSkills(); - info.getEffected().setIsImmobilized(false); + effected.enableAllSkills(); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java index 340030133f..831e5d3cf0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; @@ -42,11 +41,11 @@ public class PolearmSingleTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); + effected.getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java index e8366e855f..c0e2c52b35 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Protection Blessing effect implementation. @@ -32,9 +33,9 @@ public final class ProtectionBlessing extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java index 510b5ecaa5..9438b97eaa 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java @@ -17,9 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.PcStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.ZoneId; /** @@ -44,41 +46,44 @@ public final class RecoverVitalityInPeaceZone extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) // - || info.getEffected().isDead() // - || !info.getEffected().isPlayer() // - || !info.getEffected().isInsideZone(ZoneId.PEACE)) + if ((effected == null) // + || effected.isDead() // + || !effected.isPlayer() // + || !effected.isInsideZone(ZoneId.PEACE)) { return false; } - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); + long vitality = effected.getActingPlayer().getVitalityPoints(); vitality += _amount; if (vitality >= PcStat.MAX_VITALITY_POINTS) { vitality = PcStat.MAX_VITALITY_POINTS; } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); + effected.getActingPlayer().setVitalityPoints((int) vitality, true); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() != null) // - && info.getEffected().isPlayer() // - && !info.isRemoved()) + if ((effected != null) // + && effected.isPlayer()) { - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); - vitality += _amount * 100; - if (vitality >= PcStat.MAX_VITALITY_POINTS) + final BuffInfo info = effected.getEffectList().getBuffInfoBySkillId(skill.getId()); + if ((info != null) && !info.isRemoved()) { - vitality = PcStat.MAX_VITALITY_POINTS; + long vitality = effected.getActingPlayer().getVitalityPoints(); + vitality += _amount * 100; + if (vitality >= PcStat.MAX_VITALITY_POINTS) + { + vitality = PcStat.MAX_VITALITY_POINTS; + } + effected.getActingPlayer().setVitalityPoints((int) vitality, true); } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 60bd6d90b6..335eb252de 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java @@ -17,12 +17,13 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -50,14 +51,14 @@ public class ReduceDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Relax.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Relax.java index 8539080614..f802e0574c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Relax.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Relax.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -65,42 +64,42 @@ public final class Relax extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } - if ((info.getEffected().getCurrentHp() + 1) > info.getEffected().getMaxRecoverableHp()) + if ((effected.getCurrentHp() + 1) > effected.getMaxRecoverableHp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); + effected.sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java index 4841f0a023..91cb6d7b39 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.type.CrystalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class RemoveEquipPenalty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -54,9 +53,9 @@ public final class RemoveEquipPenalty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertiseLevel(null); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java index 01cafb9d92..a85a91b2f3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,11 +62,11 @@ public final class ResistSkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { for (SkillHolder holder : _skills) { - info.getEffected().removeIgnoreSkillEffects(holder); + effected.removeIgnoreSkillEffects(holder); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java index 220e7625d5..2c57e48c7e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java @@ -21,13 +21,13 @@ import java.util.HashSet; import java.util.Set; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.instancezone.Instance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -71,30 +71,28 @@ public final class ResurrectionSpecial extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer() && !info.getEffected().isPet()) + if (!effected.isPlayer() && !effected.isPet()) { return; } - final L2PcInstance caster = info.getEffector().getActingPlayer(); + final L2PcInstance caster = effector.getActingPlayer(); final Instance instance = caster.getInstanceWorld(); if (!_instanceId.isEmpty() && ((instance == null) || !_instanceId.contains(instance.getTemplateId()))) { return; } - final Skill skill = info.getSkill(); - - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().reviveRequest(caster, skill, false, _power); + effected.getActingPlayer().reviveRequest(caster, skill, false, _power); } - else if (info.getEffected().isPet()) + else if (effected.isPet()) { - final L2PetInstance pet = (L2PetInstance) info.getEffected(); - info.getEffected().getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); + final L2PetInstance pet = (L2PetInstance) effected; + effected.getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); } } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Reuse.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Reuse.java index 5d44cd483f..c297d532b7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Reuse.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Reuse.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class Reuse extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java deleted file mode 100644 index b32762f485..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.StatsSet; -import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; - -/** - * Reward Item on Exit effect implementation. - * @author Mobius - */ -public final class RewardItemOnExit extends AbstractEffect -{ - private final int _itemId; - private final long _itemCount; - - public RewardItemOnExit(StatsSet params) - { - _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark. - _itemCount = params.getLong("itemCount", 1); - } - - @Override - public void onExit(BuffInfo info) - { - if (!info.isRemoved() && (info.getEffected() != null) && info.getEffected().isPlayer() && !info.getEffected().isDead()) - { - ThreadPoolManager.execute(() -> // Make sure item is saved. - { - info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected(), true); - }); - } - } -} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Root.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Root.java index 7e69ac579b..76983697aa 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Root.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Root.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,11 +47,11 @@ public final class Root extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java index 7b21d8cdfc..72880477ad 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -35,9 +34,9 @@ public final class SacrificeSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java index f02c2336b3..eaa75cd64c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Note: In retail this effect doesn't stack. It appears that the active value is taken from the last such effect. @@ -36,14 +37,14 @@ public class SkillEvasion extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().addSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().addSkillEvasionTypeValue(_magicType, _amount); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().removeSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().removeSkillEvasionTypeValue(_magicType, _amount); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java index 3cb5192097..cba30b2644 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -38,19 +39,19 @@ public final class SkillTurningOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) || (info.getEffected() == info.getEffector()) || info.getEffected().isRaid()) + if ((effected == null) || (effected == effector) || effected.isRaid()) { return false; } - final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill()) : ((_chance >= 100) || (Rnd.get(100) < _chance)); + final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, effector, effected, skill) : ((_chance >= 100) || (Rnd.get(100) < _chance)); if (skillSuccess) { - info.getEffected().breakCast(); + effected.breakCast(); } - return super.onActionTime(info); + return super.onActionTime(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 8ef35604fa..70ea70e917 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -56,11 +55,11 @@ public final class SoulEating extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java index 1d30737f06..beffb920fe 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.MoveType; import com.l2jmobius.gameserver.model.stats.Stats; @@ -40,20 +41,20 @@ public class StatByMoveType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, _value); + effected.getStat().mergeMoveTypeValue(_stat, _type, _value); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, -_value); + effected.getStat().mergeMoveTypeValue(_stat, _type, -_value); } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return info.getSkill().isPassive() || info.getSkill().isToggle(); + return skill.isPassive() || skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Synergy.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Synergy.java index 24f8d10972..c3a9b08bde 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Synergy.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Synergy.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -78,22 +77,22 @@ public final class Synergy extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } for (AbnormalType required : _requiredSlots) { - if (!info.getEffector().hasAbnormalType(required)) + if (!effector.hasAbnormalType(required)) { - return info.getSkill().isToggle(); + return skill.isToggle(); } } - final int abnormalCount = (int) _optionalSlots.stream().filter(info.getEffector()::hasAbnormalType).count(); + final int abnormalCount = (int) _optionalSlots.stream().filter(effector::hasAbnormalType).count(); if (abnormalCount >= _minSlot) { @@ -102,19 +101,19 @@ public final class Synergy extends AbstractEffect if (partyBuffSkill != null) { - final L2Object target = partyBuffSkill.getTarget(info.getEffector(), info.getEffected(), false, false, false); + final L2Object target = partyBuffSkill.getTarget(effector, effected, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, partyBuffSkill); + SkillCaster.triggerCast(effector, (L2Character) target, partyBuffSkill); } } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java index 5f57db9956..c4f2ef9e0c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class TalismanSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class TalismanSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().addTalismanSlots(-_slots); + effected.getActingPlayer().getStat().addTalismanSlots(-_slots); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java index 6f0bb3c84b..0f06888ace 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Target Me effect implementation. @@ -32,25 +33,25 @@ public final class TargetMe extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - ((L2Playable) info.getEffected()).setLockedTarget(null); + ((L2Playable) effected).setLockedTarget(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - if (info.getEffected().getTarget() != info.getEffector()) + if (effected.getTarget() != effector) { - info.getEffected().setTarget(info.getEffector()); + effected.setTarget(effector); } - ((L2Playable) info.getEffected()).setLockedTarget(info.getEffector()); + ((L2Playable) effected).setLockedTarget(effector); } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java index bffc2aecce..13053a9adc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -58,9 +57,9 @@ public final class TeleportToSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().hasServitors(); + return effected.hasServitors(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java index 33cab39e03..e9e47242d7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -33,20 +34,20 @@ public final class TransferDamageToPlayer extends AbstractStatAddEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(null); + ((L2Playable) effected).setTransferDamageTo(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(info.getEffector().getActingPlayer()); + ((L2Playable) effected).setTransferDamageTo(effector.getActingPlayer()); } } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java index 5f822f2af5..75d4a88f17 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.util.Util; @@ -47,9 +46,9 @@ public final class TransferHate extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true); + return Util.checkIfInRange(skill.getEffectRange(), effector, effected, true); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Transformation.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Transformation.java index 1b389e9af7..92df00cb49 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Transformation.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Transformation.java @@ -24,7 +24,6 @@ import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -53,9 +52,9 @@ public final class Transformation extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -68,8 +67,8 @@ public final class Transformation extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 2e8cd38512..32ac16aa59 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -160,14 +160,14 @@ public final class TriggerSkillByAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index 82a3bb14dc..c9ce6cc000 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -92,14 +91,14 @@ public final class TriggerSkillByAvoid extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 5fca763c99..351e687f0f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -99,14 +98,14 @@ public final class TriggerSkillByDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index cfd2d77548..c950983e3d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -102,14 +101,14 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index 2db572e6c5..b7ec10f540 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -64,14 +63,14 @@ public final class TriggerSkillByKill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, info.getEffected()), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, effected), this)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index d5e54a6e95..7a474f5b8d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -112,20 +112,19 @@ public final class TriggerSkillByMagicType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index e43cda5682..fefd166e0d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java @@ -62,9 +62,9 @@ public final class TriggerSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } private void onSkillUseEvent(OnCreatureSkillFinishCast event) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java index 4ba7fcfdf7..23a72039a7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java @@ -72,9 +72,9 @@ public final class TriggerSkillBySkillAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } private void onAttackEvent(OnCreatureDamageDealt event) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java index b58b293380..b687d563c6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -63,9 +62,9 @@ public final class Unsummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java index ba1c0ab53f..ed1350c021 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Untargetable extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java index 7a27415002..e30776b49a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; @@ -38,9 +37,9 @@ public final class VitalityPointUp extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/16400-16499.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/16400-16499.xml index 6a8fb6e2b2..98055c8c10 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/16400-16499.xml +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/16400-16499.xml @@ -203,10 +203,6 @@ 7 DIFF - - 40313 - 1 -
@@ -241,10 +237,6 @@ 30 DIFF - - 40313 - 1 - @@ -279,10 +271,6 @@ 2013 DIFF - - 40313 - 1 - diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt index 7c468ade24..e45ff590d7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt @@ -253,7 +253,6 @@ Resurrection: Resurrects target Player or Summon. ResurrectionSpecial: Resurrects target Player or Summon only in specified instance IDs. Reuse: Decreases skill reuse time based on its magic type. ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius) -RewardItemOnExit: Reward an item when effect ends. (l2jmobius) Root: Stops movement. SacrificeSummon: Sacrifices the players summon. (l2jmobius) SafeFallHeight: Minimum falling height for taking damage stat. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index 8a09cbfcb4..756ee0146c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -780,7 +780,7 @@ public class CharStat // Call pump to each effect //@formatter:off effectsStream.forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(info.getEffector(), info.getEffected(), info.getSkill())) .forEach(effect -> effect.pump(info.getEffected(), info.getSkill()))); //@formatter:on @@ -792,7 +792,7 @@ public class CharStat .filter(BuffInfo::isInUse) .filter(info -> info.isAbnormalType(AbnormalType.ABILITY_CHANGE)) .forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(_activeChar, _activeChar, info.getSkill())) .forEach(effect -> effect.pump(_activeChar, info.getSkill()))); //@formatter:on diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java index be0615be3e..90ac2108aa 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java @@ -21,14 +21,13 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** * Abstract effect implementation.
- * Instant effects should not override {@link #onExit(BuffInfo)}.
- * Instant effects should not override {@link #canStart(BuffInfo)}, all checks should be done {@link #onStart(BuffInfo)}.
- * Do not call super class methods {@link #onStart(BuffInfo)} nor {@link #onExit(BuffInfo)}. + * Instant effects should not override {@link #onExit(L2Character, L2Character, Skill)}.
+ * Instant effects should not override {@link #canStart(L2Character, L2Character, Skill)}, all checks should be done {@link #onStart(L2Character, L2Character, Skill)}.
+ * Do not call super class methods {@link #onStart(L2Character, L2Character, Skill)} nor {@link #onExit(L2Character, L2Character, Skill)}. * @author Zoey76 */ public abstract class AbstractEffect @@ -75,23 +74,15 @@ public abstract class AbstractEffect return true; } - /** - * Get this effect's type.
- * TODO: Remove. - * @return the effect type - */ - public L2EffectType getEffectType() - { - return L2EffectType.NONE; - } - /** * Verify if the buff can start.
* Used for continuous effects. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return {@code true} if all the start conditions are meet, {@code false} otherwise */ - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { return true; } @@ -111,34 +102,24 @@ public abstract class AbstractEffect } - /** - * Called on effect start. - * @param info the buff info - */ - public void onStart(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { + } /** * Called on each tick.
* If the abnormal time is lesser than zero it will last forever. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return if {@code true} this effect will continue forever, if {@code false} it will stop after abnormal time has passed */ - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { return false; } - /** - * Called when the effect is exited. - * @param info the buff info - */ - public void onExit(BuffInfo info) - { - - } - /** * Get the effect flags. * @return bit flag for current effect @@ -148,12 +129,6 @@ public abstract class AbstractEffect return EffectFlag.NONE.getMask(); } - @Override - public String toString() - { - return "Effect " + getClass().getSimpleName(); - } - public boolean checkCondition(Object obj) { return true; @@ -187,4 +162,20 @@ public abstract class AbstractEffect { } + + /** + * Get this effect's type.
+ * TODO: Remove. + * @return the effect type + */ + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public String toString() + { + return "Effect " + getClass().getSimpleName(); + } } \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/options/Options.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/options/Options.java index 475f2a94d8..813ec8f6db 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/options/Options.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/options/Options.java @@ -176,7 +176,7 @@ public class Options effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.pump(player, info.getSkill()); - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java index d2aa392e10..9696330565 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -334,7 +334,6 @@ public final class BuffInfo // Call on start. effect.onStart(getEffector(), getEffected(), getSkill()); - effect.onStart(this); // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) @@ -361,7 +360,7 @@ public final class BuffInfo if (_isInUse) { // Callback for on action time event. - continueForever = effect.onActionTime(this); + continueForever = effect.onActionTime(getEffector(), getEffected(), getSkill()); } if (!continueForever && _skill.isToggle()) @@ -392,7 +391,7 @@ public final class BuffInfo // Instant effects shouldn't call onExit(..). if (!effect.isInstant()) { - effect.onExit(this); + effect.onExit(getEffector(), getEffected(), getSkill()); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java index 164957d7a5..8c4ba4eb64 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -1265,7 +1265,7 @@ public final class Skill implements IIdentifiable effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); } - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java index e1fc3d2594..233d2c48d0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -279,7 +279,6 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("ResurrectionSpecial", ResurrectionSpecial::new); EffectHandler.getInstance().registerHandler("Reuse", Reuse::new); EffectHandler.getInstance().registerHandler("ReuseSkillById", ReuseSkillById::new); - EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new); EffectHandler.getInstance().registerHandler("Root", Root::new); EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new); EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java index caae4afaef..33ddc02a86 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbnormalShield.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An effect that blocks a debuff. Acts like DOTA's Linken Sphere. @@ -36,9 +37,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(_times); + effected.setAbnormalShieldBlocks(_times); } @Override @@ -48,9 +49,9 @@ public final class AbnormalShield extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setAbnormalShieldBlocks(Integer.MIN_VALUE); + effected.setAbnormalShieldBlocks(Integer.MIN_VALUE); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java index 6c9dd598d6..e9c88553fe 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbsorbDamage.java @@ -20,12 +20,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -60,16 +61,16 @@ public class AbsorbDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); - _damageHolder.remove(info.getEffected().getObjectId()); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + _damageHolder.remove(effected.getObjectId()); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - _damageHolder.put(info.getEffected().getObjectId(), _damage); - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + _damageHolder.put(effected.getObjectId(), _damage); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java index 838b3c2d0c..c3400d7890 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -52,8 +51,8 @@ public class AddSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeSkill(_addedSkill.getSkill(), true); + effected.removeSkill(_addedSkill.getSkill(), true); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5101ecb949..26ee9c8fc8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; @@ -51,9 +50,9 @@ public final class AttackTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getAttackTraits()) { for (Entry trait : _attackTraits.entrySet()) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Betray.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Betray.java index c96c435a61..a7e0626ef3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Betray.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Betray.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Betray extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffector().isPlayer() && info.getEffected().isSummon(); + return effector.isPlayer() && effected.isSummon(); } @Override @@ -53,8 +52,8 @@ public final class Betray extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Blink.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Blink.java index db1463c04d..18891823cf 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Blink.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Blink.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -70,10 +69,10 @@ public final class Blink extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return !info.getEffected().cannotEscape(); + return !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java index cd8741e950..143ff0cb20 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAbnormalSlot.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -47,8 +46,8 @@ public final class BlockAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); + effected.getEffectList().removeBlockedAbnormalTypes(_blockAbnormalSlots); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java index 191f846d67..a722b8f0bd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,9 +47,9 @@ public final class BlockAction extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -74,15 +73,15 @@ public final class BlockAction extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 204c280a80..aba1c6b66a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,9 +62,8 @@ public final class BlockActions extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); _allowedSkills.stream().forEach(effected::removeBlockActionsAllowedSkill); if (!effected.isPlayer()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java index c175e48897..89c3e54971 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -38,9 +37,9 @@ public final class BlockChat extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -56,8 +55,8 @@ public final class BlockChat extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java index b87b6418fd..a58ad8b1f4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockMove.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -39,8 +38,8 @@ public final class BlockMove extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java index 05ac115c08..e49dc6c64b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class BlockParty extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -49,8 +48,8 @@ public final class BlockParty extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - PunishmentManager.getInstance().stopPunishment(info.getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + PunishmentManager.getInstance().stopPunishment(effected.getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index cc24155ef8..34efcfba26 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -18,12 +18,13 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Block Skills by isMagic type. @@ -49,20 +50,20 @@ public final class BlockSkill extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_magicTypes == null) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java index 06a12b6e96..2cb9267e0e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockTarget.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -46,8 +45,8 @@ public class BlockTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setTargetable(true); + effected.setTargetable(true); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java index 91080ab874..924b08d8f7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CallSkillOnActionTime.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -40,40 +39,35 @@ public final class CallSkillOnActionTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return castSkill(info); - } - - private boolean castSkill(BuffInfo info) - { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } - final Skill skill = _skill.getSkill(); - if (skill != null) + final Skill triggerSkill = _skill.getSkill(); + if (triggerSkill != null) { - if (skill.isSynergySkill()) + if (triggerSkill.isSynergySkill()) { - skill.applyEffects(info.getEffector(), info.getEffector()); + triggerSkill.applyEffects(effector, effector); } - L2World.getInstance().forEachVisibleObjectInRange(info.getEffector(), L2Character.class, _skill.getSkill().getAffectRange(), c -> + L2World.getInstance().forEachVisibleObjectInRange(effector, L2Character.class, _skill.getSkill().getAffectRange(), c -> { - final L2Object target = skill.getTarget(info.getEffector(), c, false, false, false); + final L2Object target = triggerSkill.getTarget(effector, c, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, skill); + SkillCaster.triggerCast(effector, (L2Character) target, triggerSkill); } }); } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java index a431b998d7..8be7f869c6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChameleonRest.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -52,30 +51,30 @@ public final class ChameleonRest extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java index 461153971c..405b767faf 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ChangeBody.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.TemplateChanceHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,9 +43,9 @@ public final class ChangeBody extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -63,8 +62,8 @@ public final class ChangeBody extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java index 6a6c25702b..bc5e693a78 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Cp Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class CpHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double cp = info.getEffected().getCurrentCp(); - final double maxcp = info.getEffected().getMaxRecoverableCp(); + double cp = effected.getCurrentCp(); + final double maxcp = effected.getMaxRecoverableCp(); // Not needed to set the CP and send update packet if player is already at max CP if (cp >= maxcp) @@ -52,8 +53,8 @@ public final class CpHealOverTime extends AbstractEffect cp += _power * getTicksMultiplier(); cp = Math.min(cp, maxcp); - info.getEffected().setCurrentCp(cp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); + effected.setCurrentCp(cp, false); + effected.broadcastStatusUpdate(effector); return true; } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index b8eebc366c..e096752577 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalDamagePosition extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_DAMAGE, _position, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index bca8357f83..dad04ebbdd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -19,8 +19,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.enums.Position; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -38,14 +39,14 @@ public class CriticalRatePositionBonus extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); + effected.getStat().mergePositionTypeValue(Stats.CRITICAL_RATE, _position, (-_amount / 100) - 1, MathUtil::div); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java index 248727ab7d..717406c0c2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -37,9 +36,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override @@ -49,9 +48,9 @@ public final class CrystalGradeModify extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); if (player != null) { player.setExpertisePenaltyBonus(0); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java index ffd0364a12..07759f9e7d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTime.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -39,22 +40,22 @@ public final class DamOverTime extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - if (!_canKill && (damage >= (info.getEffected().getCurrentHp() - 1))) + if (!_canKill && (damage >= (effected.getCurrentHp() - 1))) { - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -66,19 +67,19 @@ public final class DamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } double damage = _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -86,15 +87,15 @@ public final class DamOverTime extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java index ef87a82dfa..044b4d98bc 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DamOverTimePercent.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -45,19 +46,19 @@ public final class DamOverTimePercent extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double damage = info.getEffected().getCurrentHp() * _power * getTicksMultiplier(); - if (damage >= (info.getEffected().getCurrentHp() - 1)) + double damage = effected.getCurrentHp() * _power * getTicksMultiplier(); + if (damage >= (effected.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; } @@ -65,17 +66,17 @@ public final class DamOverTimePercent extends AbstractEffect if (!_canKill) { // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them - if (info.getEffected().getCurrentHp() <= 1) + if (effected.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } - damage = info.getEffected().getCurrentHp() - 1; + damage = effected.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index a901fd5e38..0332a2ee2e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.CharStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.TraitType; /** @@ -66,9 +67,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) @@ -87,9 +88,9 @@ public final class DefenceTrait extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final CharStat charStat = info.getEffected().getStat(); + final CharStat charStat = effected.getStat(); synchronized (charStat.getDefenceTraits()) { for (Entry trait : _defenceTraits.entrySet()) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarm.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarm.java index 8d040f9746..c5f64c3551 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarm.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarm.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class Disarm extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java index 9d06ee3437..b6d50cd89c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Disarmor.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -54,9 +53,9 @@ public final class Disarmor extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (_slot != L2Item.SLOT_NONE) && info.getEffected().isPlayer(); + return (_slot != L2Item.SLOT_NONE) && effected.isPlayer(); } @Override @@ -98,18 +97,18 @@ public final class Disarmor extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { return; } - final Integer disarmedObjId = _unequippedItems.remove(info.getEffected().getObjectId()); + final Integer disarmedObjId = _unequippedItems.remove(effected.getObjectId()); if ((disarmedObjId != null) && (disarmedObjId > 0)) { - final L2PcInstance player = info.getEffected().getActingPlayer(); - info.getEffected().getInventory().unblockItemSlot(_slot); + final L2PcInstance player = effected.getActingPlayer(); + player.getInventory().unblockItemSlot(_slot); final L2ItemInstance item = player.getInventory().getItemByObjectId(disarmedObjId); if (item != null) @@ -137,6 +136,6 @@ public final class Disarmor extends AbstractEffect } } } - super.onExit(info); + super.onExit(effector, effected, skill); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java index 55e476feee..c11228e931 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/DoubleCast.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -56,34 +56,34 @@ public final class DoubleCast extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { for (SkillHolder holder : TOGGLE_SKILLS) { - final Skill skill = holder.getSkill(); - if ((skill != null) && !info.getEffected().isAffectedBySkill(holder)) + final Skill s = holder.getSkill(); + if ((s != null) && !effected.isAffectedBySkill(holder)) { - _addedToggles.computeIfAbsent(info.getEffected().getObjectId(), v -> new ArrayList<>()).add(holder); - skill.applyEffects(info.getEffected(), info.getEffected()); + _addedToggles.computeIfAbsent(effected.getObjectId(), v -> new ArrayList<>()).add(holder); + s.applyEffects(effected, effected); } } } - super.onStart(info); + super.onStart(effector, effected, skill); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - _addedToggles.computeIfPresent(info.getEffected().getObjectId(), (k, v) -> + _addedToggles.computeIfPresent(effected.getObjectId(), (k, v) -> { - v.forEach(h -> info.getEffected().stopSkillEffects(h.getSkill())); + v.forEach(h -> effected.stopSkillEffects(h.getSkill())); return null; }); } - super.onExit(info); + super.onExit(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java index b5aa3ce382..640bf5f0d9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnableCloak.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class EnableCloak extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class EnableCloak extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().setCloakSlotStatus(false); + effected.getActingPlayer().getStat().setCloakSlotStatus(false); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java index 32f856ab48..2c1012dbb1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/EnlargeAbnormalSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class EnlargeAbnormalSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().setMaxBuffCount(Math.max(0, info.getEffected().getStat().getMaxBuffCount() - _slots)); + effected.getStat().setMaxBuffCount(Math.max(0, effected.getStat().getMaxBuffCount() - _slots)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Escape.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Escape.java index 9de8e8bc89..a89e887f3d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Escape.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Escape.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -51,10 +50,10 @@ public final class Escape extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { // While affected by escape blocking effect you cannot use Blink or Scroll of Escape - return super.canStart(info) && !info.getEffected().cannotEscape(); + return super.canStart(effector, effected, skill) && !effected.cannotEscape(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java index a7e71242d8..4325b19161 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Faceoff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -37,22 +38,22 @@ public class Faceoff extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(info.getEffected().getObjectId()); - info.getEffected().getActingPlayer().setAttackerObjId(info.getEffector().getObjectId()); + effector.getActingPlayer().setAttackerObjId(effected.getObjectId()); + effected.getActingPlayer().setAttackerObjId(effector.getObjectId()); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffector().getActingPlayer().setAttackerObjId(0); - info.getEffected().getActingPlayer().setAttackerObjId(0); + effector.getActingPlayer().setAttackerObjId(0); + effected.getActingPlayer().setAttackerObjId(0); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java index fa1651864a..66817daf19 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/FakeDeath.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ChangeWaitType; import com.l2jmobius.gameserver.network.serverpackets.Revive; @@ -45,43 +46,43 @@ public final class FakeDeath extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().setRecentFakeDeath(true); + effected.getActingPlayer().setRecentFakeDeath(true); } - info.getEffected().broadcastPacket(new ChangeWaitType(info.getEffected(), ChangeWaitType.WT_STOP_FAKEDEATH)); - info.getEffected().broadcastPacket(new Revive(info.getEffected())); + effected.broadcastPacket(new ChangeWaitType(effected, ChangeWaitType.WT_STOP_FAKEDEATH)); + effected.broadcastPacket(new Revive(effected)); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().startFakeDeath(); + effected.startFakeDeath(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 78fc694005..4e61caf974 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance; import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.util.Util; @@ -45,9 +44,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character creature = info.getEffected(); + final L2Character creature = effected; return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && // !((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || // (creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON))); @@ -60,9 +59,9 @@ public final class Fear extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - fearAction(null, info.getEffected()); + fearAction(null, effected); return false; } @@ -74,11 +73,11 @@ public final class Fear extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Flag.java index 0b542a7d75..85a7701506 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Flag.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Flag extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override @@ -45,8 +44,8 @@ public final class Flag extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().updatePvPFlag(0); + effected.getActingPlayer().updatePvPFlag(0); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index 82a36fbbdc..bf91e7c2e8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate; @@ -44,11 +45,11 @@ public class GetMomentum extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance player = info.getEffected().getActingPlayer(); + final L2PcInstance player = effected.getActingPlayer(); final int maxCharge = (int) player.getStat().getValue(Stats.MAX_MOMENTUM, 0); final int newCharge = Math.min(player.getCharges() + 1, maxCharge); @@ -68,6 +69,6 @@ public class GetMomentum extends AbstractEffect player.sendPacket(new EtcStatusUpdate(player)); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Grow.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Grow.java index c5f9a21bcf..4eb28677e3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Grow.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Grow.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -44,11 +43,11 @@ public final class Grow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isNpc()) + if (effected.isNpc()) { - final L2Npc npc = (L2Npc) info.getEffected(); + final L2Npc npc = (L2Npc) effected; npc.setCollisionHeight(npc.getTemplate().getCollisionHeight()); npc.setCollisionRadius(npc.getTemplate().getfCollisionRadius()); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java index 7562521eaf..fc88d64de0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HealOverTime.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax; @@ -38,15 +37,15 @@ public final class HealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead() || info.getEffected().isDoor()) + if (effected.isDead() || effected.isDoor()) { return false; } - double hp = info.getEffected().getCurrentHp(); - final double maxhp = info.getEffected().getMaxRecoverableHp(); + double hp = effected.getCurrentHp(); + final double maxhp = effected.getMaxRecoverableHp(); // Not needed to set the HP and send update packet if player is already at max HP if (hp >= maxhp) @@ -56,19 +55,17 @@ public final class HealOverTime extends AbstractEffect hp += _power * getTicksMultiplier(); hp = Math.min(hp, maxhp); - info.getEffected().setCurrentHp(hp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentHp(hp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - final L2Character effected = info.getEffected(); - final Skill skill = info.getSkill(); if (effected.isPlayer() && (getTicks() > 0) && (skill.getAbnormalType() == AbnormalType.HP_RECOVER)) { - effected.sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power)); + effected.sendPacket(new ExRegenMax(skill.getAbnormalTime(), getTicks(), _power)); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Hide.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Hide.java index da2ac54c54..1f71330b6e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Hide.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Hide.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -61,11 +60,11 @@ public final class Hide extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - final L2PcInstance activeChar = info.getEffected().getActingPlayer(); + final L2PcInstance activeChar = effected.getActingPlayer(); if (!activeChar.inObserverMode()) { activeChar.setInvisible(false); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java index 1ad15ccdde..853236001c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/HpToOwner.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -39,16 +40,16 @@ public final class HpToOwner extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (!info.getSkill().isToggle() && info.getSkill().isMagic()) + if (!skill.isToggle() && skill.isMagic()) { // TODO: M.Crit can occur even if this skill is resisted. Only then m.crit damage is applied and not debuff - final boolean mcrit = Formulas.calcCrit(info.getSkill().getMagicCriticalRate(), info.getEffector(), info.getEffected(), info.getSkill()); + final boolean mcrit = Formulas.calcCrit(skill.getMagicCriticalRate(), effector, effected, skill); if (mcrit) { final double damage = _power * 10; // Tests show that 10 times HP DOT is taken during magic critical. - info.getEffected().reduceCurrentHp(damage, info.getEffector(), info.getSkill(), true, false, true, false); + effected.reduceCurrentHp(damage, effector, skill, true, false, true, false); } } } @@ -60,22 +61,22 @@ public final class HpToOwner extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double damage = _power * getTicksMultiplier(); - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); + effector.doAttack(damage, effected, skill, true, false, false, false); if (_stealAmount > 0) { final double amount = (damage * _stealAmount) / 100; - info.getEffector().setCurrentHp(info.getEffector().getCurrentHp() + amount); - info.getEffector().setCurrentMp(info.getEffector().getCurrentMp() + amount); + effector.setCurrentHp(effector.getCurrentHp() + amount); + effector.setCurrentMp(effector.getCurrentMp() + amount); } - return info.getSkill().isToggle(); + return skill.isToggle(); } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java index 570a854ae3..c7e7969777 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobilePetBuff.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Immobile Pet Buff effect implementation. @@ -32,17 +33,17 @@ public final class ImmobilePetBuff extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().setIsImmobilized(false); + effected.setIsImmobilized(false); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isSummon() && info.getEffector().isPlayer() && (((L2Summon) info.getEffected()).getOwner() == info.getEffector())) + if (effected.isSummon() && effector.isPlayer() && (((L2Summon) effected).getOwner() == effector)) { - info.getEffected().setIsImmobilized(true); + effected.setIsImmobilized(true); } } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index e2ddb48286..6dcc3787a1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; @@ -93,11 +92,11 @@ public final class KnockBack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Lucky.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Lucky.java index 2ebec1b47e..611c210e9d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Lucky.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Lucky.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Lucky effect implementation. @@ -31,8 +32,8 @@ public final class Lucky extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java index d605d89ff7..259edcf3c0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicMpCost.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class MagicMpCost extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeMpConsumeTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java index 0f41184d19..bebbaefdca 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalDamOverTime.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -47,22 +47,22 @@ public final class MagicalDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - final L2Character activeChar = info.getEffector(); - final L2Character target = info.getEffected(); + final L2Character activeChar = effector; + final L2Character target = effected; if (target.isDead()) { return false; } - double damage = Formulas.calcMagicDam(activeChar, target, info.getSkill(), activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. + double damage = Formulas.calcMagicDam(activeChar, target, skill, activeChar.getMAtk(), _power, target.getMDef(), false, false, false); // In retail spiritshots change nothing. damage *= getTicksMultiplier(); if (damage >= (target.getCurrentHp() - 1)) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { target.sendPacket(SystemMessageId.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP); return false; @@ -74,13 +74,13 @@ public final class MagicalDamOverTime extends AbstractEffect // Fix for players dying by DOTs if HP < 1 since reduceCurrentHP method will kill them if (target.getCurrentHp() <= 1) { - return info.getSkill().isToggle(); + return skill.isToggle(); } damage = target.getCurrentHp() - 1; } } - info.getEffector().doAttack(damage, info.getEffected(), info.getSkill(), true, false, false, false); - return info.getSkill().isToggle(); + effector.doAttack(damage, effected, skill, true, false, false, false); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java index 7b6dc8f966..6405a3a837 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaDamOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,21 +36,21 @@ public final class ManaDamOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double manaDam = _power * getTicksMultiplier(); - if ((manaDam > info.getEffected().getCurrentMp()) && info.getSkill().isToggle()) + if ((manaDam > effected.getCurrentMp()) && skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(manaDam); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java index b9fb295056..fefa4ffef1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ManaHealOverTime.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Mana Heal Over Time effect implementation. @@ -34,15 +35,15 @@ public final class ManaHealOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - double mp = info.getEffected().getCurrentMp(); - final double maxmp = info.getEffected().getMaxRecoverableMp(); + double mp = effected.getCurrentMp(); + final double maxmp = effected.getMaxRecoverableMp(); // Not needed to set the MP and send update packet if player is already at max MP if (mp >= maxmp) @@ -52,8 +53,8 @@ public final class ManaHealOverTime extends AbstractEffect mp += _power * getTicksMultiplier(); mp = Math.min(mp, maxmp); - info.getEffected().setCurrentMp(mp, false); - info.getEffected().broadcastStatusUpdate(info.getEffector()); - return info.getSkill().isToggle(); + effected.setCurrentMp(mp, false); + effected.broadcastStatusUpdate(effector); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java index 986913d63f..3f1d4e464c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MpConsumePerLevel.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; /** @@ -35,22 +36,22 @@ public final class MpConsumePerLevel extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } final double base = _power * getTicksMultiplier(); - final double consume = (info.getAbnormalTime() > 0) ? ((info.getEffected().getLevel() - 1) / 7.5) * base * info.getAbnormalTime() : base; - if (consume > info.getEffected().getCurrentMp()) + final double consume = (skill.getAbnormalTime() > 0) ? ((effected.getLevel() - 1) / 7.5) * base * skill.getAbnormalTime() : base; + if (consume > effected.getCurrentMp()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } - info.getEffected().reduceCurrentMp(consume); - return info.getSkill().isToggle(); + effected.reduceCurrentMp(consume); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java index af204b5579..d12759271d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/NoblesseBless.java @@ -17,10 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Noblesse Blessing effect implementation. @@ -33,9 +34,9 @@ public final class NoblesseBless extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayable(); + return (effector != null) && (effected != null) && effected.isPlayable(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Passive.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Passive.java index 3f7d04eacc..c183e9b5af 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Passive.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Passive.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -33,9 +32,9 @@ public final class Passive extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isAttackable(); + return effected.isAttackable(); } @Override @@ -48,9 +47,9 @@ public final class Passive extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().enableAllSkills(); - info.getEffected().setIsImmobilized(false); + effected.enableAllSkills(); + effected.setIsImmobilized(false); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java index 340030133f..831e5d3cf0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PolearmSingleTarget.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; @@ -42,11 +41,11 @@ public class PolearmSingleTarget extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); + effected.getStat().removeFixedValue(Stats.PHYSICAL_POLEARM_TARGET_SINGLE); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java index e8366e855f..c0e2c52b35 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ProtectionBlessing.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Protection Blessing effect implementation. @@ -32,9 +33,9 @@ public final class ProtectionBlessing extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java index 510b5ecaa5..9438b97eaa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java @@ -17,9 +17,11 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.stat.PcStat; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.ZoneId; /** @@ -44,41 +46,44 @@ public final class RecoverVitalityInPeaceZone extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) // - || info.getEffected().isDead() // - || !info.getEffected().isPlayer() // - || !info.getEffected().isInsideZone(ZoneId.PEACE)) + if ((effected == null) // + || effected.isDead() // + || !effected.isPlayer() // + || !effected.isInsideZone(ZoneId.PEACE)) { return false; } - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); + long vitality = effected.getActingPlayer().getVitalityPoints(); vitality += _amount; if (vitality >= PcStat.MAX_VITALITY_POINTS) { vitality = PcStat.MAX_VITALITY_POINTS; } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); + effected.getActingPlayer().setVitalityPoints((int) vitality, true); - return info.getSkill().isToggle(); + return skill.isToggle(); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() != null) // - && info.getEffected().isPlayer() // - && !info.isRemoved()) + if ((effected != null) // + && effected.isPlayer()) { - long vitality = info.getEffected().getActingPlayer().getVitalityPoints(); - vitality += _amount * 100; - if (vitality >= PcStat.MAX_VITALITY_POINTS) + final BuffInfo info = effected.getEffectList().getBuffInfoBySkillId(skill.getId()); + if ((info != null) && !info.isRemoved()) { - vitality = PcStat.MAX_VITALITY_POINTS; + long vitality = effected.getActingPlayer().getVitalityPoints(); + vitality += _amount * 100; + if (vitality >= PcStat.MAX_VITALITY_POINTS) + { + vitality = PcStat.MAX_VITALITY_POINTS; + } + effected.getActingPlayer().setVitalityPoints((int) vitality, true); } - info.getEffected().getActingPlayer().setVitalityPoints((int) vitality, true); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 60bd6d90b6..335eb252de 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java @@ -17,12 +17,13 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.FunctionEventListener; import com.l2jmobius.gameserver.model.events.returns.DamageReturn; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -50,14 +51,14 @@ public class ReduceDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new FunctionEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new FunctionEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Relax.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Relax.java index 8539080614..f802e0574c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Relax.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Relax.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -65,42 +64,42 @@ public final class Relax extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isDead()) + if (effected.isDead()) { return false; } - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - if (!info.getEffected().getActingPlayer().isSitting()) + if (!effected.getActingPlayer().isSitting()) { return false; } } - if ((info.getEffected().getCurrentHp() + 1) > info.getEffected().getMaxRecoverableHp()) + if ((effected.getCurrentHp() + 1) > effected.getMaxRecoverableHp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); + effected.sendPacket(SystemMessageId.THAT_SKILL_HAS_BEEN_DE_ACTIVATED_AS_HP_WAS_FULLY_RECOVERED); return false; } } final double manaDam = _power * getTicksMultiplier(); - if (manaDam > info.getEffected().getCurrentMp()) + if (manaDam > effected.getCurrentMp()) { - if (info.getSkill().isToggle()) + if (skill.isToggle()) { - info.getEffected().sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); + effected.sendPacket(SystemMessageId.YOUR_SKILL_WAS_DEACTIVATED_DUE_TO_LACK_OF_MP); return false; } } - info.getEffected().reduceCurrentMp(manaDam); + effected.reduceCurrentMp(manaDam); - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java index 01cafb9d92..a85a91b2f3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResistSkill.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -63,11 +62,11 @@ public final class ResistSkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { for (SkillHolder holder : _skills) { - info.getEffected().removeIgnoreSkillEffects(holder); + effected.removeIgnoreSkillEffects(holder); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java index 220e7625d5..2c57e48c7e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResurrectionSpecial.java @@ -21,13 +21,13 @@ import java.util.HashSet; import java.util.Set; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.instancezone.Instance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -71,30 +71,28 @@ public final class ResurrectionSpecial extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer() && !info.getEffected().isPet()) + if (!effected.isPlayer() && !effected.isPet()) { return; } - final L2PcInstance caster = info.getEffector().getActingPlayer(); + final L2PcInstance caster = effector.getActingPlayer(); final Instance instance = caster.getInstanceWorld(); if (!_instanceId.isEmpty() && ((instance == null) || !_instanceId.contains(instance.getTemplateId()))) { return; } - final Skill skill = info.getSkill(); - - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().getActingPlayer().reviveRequest(caster, skill, false, _power); + effected.getActingPlayer().reviveRequest(caster, skill, false, _power); } - else if (info.getEffected().isPet()) + else if (effected.isPet()) { - final L2PetInstance pet = (L2PetInstance) info.getEffected(); - info.getEffected().getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); + final L2PetInstance pet = (L2PetInstance) effected; + effected.getActingPlayer().reviveRequest(pet.getActingPlayer(), skill, true, _power); } } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Reuse.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Reuse.java index 5d44cd483f..c297d532b7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Reuse.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Reuse.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.MathUtil; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * @author Sdw @@ -36,14 +37,14 @@ public class Reuse extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::mul); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); + effected.getStat().mergeReuseTypeValue(_magicType, (_amount / 100) + 1, MathUtil::div); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java deleted file mode 100644 index b32762f485..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RewardItemOnExit.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.StatsSet; -import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; - -/** - * Reward Item on Exit effect implementation. - * @author Mobius - */ -public final class RewardItemOnExit extends AbstractEffect -{ - private final int _itemId; - private final long _itemCount; - - public RewardItemOnExit(StatsSet params) - { - _itemId = params.getInt("itemId", 40313); // Default item is Santa's Mark. - _itemCount = params.getLong("itemCount", 1); - } - - @Override - public void onExit(BuffInfo info) - { - if (!info.isRemoved() && (info.getEffected() != null) && info.getEffected().isPlayer() && !info.getEffected().isDead()) - { - ThreadPoolManager.execute(() -> // Make sure item is saved. - { - info.getEffected().getActingPlayer().addItem("RewardItemOnExitEffect", _itemId, _itemCount, info.getEffected(), true); - }); - } - } -} diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Root.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Root.java index 7e69ac579b..76983697aa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Root.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Root.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -48,11 +47,11 @@ public final class Root extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (!info.getEffected().isPlayer()) + if (!effected.isPlayer()) { - info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK); + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java index 7b21d8cdfc..72880477ad 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SacrificeSummon.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -35,9 +34,9 @@ public final class SacrificeSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java index f02c2336b3..eaa75cd64c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillEvasion.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Note: In retail this effect doesn't stack. It appears that the active value is taken from the last such effect. @@ -36,14 +37,14 @@ public class SkillEvasion extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().addSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().addSkillEvasionTypeValue(_magicType, _amount); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().removeSkillEvasionTypeValue(_magicType, _amount); + effected.getStat().removeSkillEvasionTypeValue(_magicType, _amount); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java index 3cb5192097..cba30b2644 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SkillTurningOverTime.java @@ -18,8 +18,9 @@ package handlers.effecthandlers; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; /** @@ -38,19 +39,19 @@ public final class SkillTurningOverTime extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if ((info.getEffected() == null) || (info.getEffected() == info.getEffector()) || info.getEffected().isRaid()) + if ((effected == null) || (effected == effector) || effected.isRaid()) { return false; } - final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill()) : ((_chance >= 100) || (Rnd.get(100) < _chance)); + final boolean skillSuccess = _staticChance ? Formulas.calcProbability(_chance, effector, effected, skill) : ((_chance >= 100) || (Rnd.get(100) < _chance)); if (skillSuccess) { - info.getEffected().breakCast(); + effected.breakCast(); } - return super.onActionTime(info); + return super.onActionTime(effector, effected, skill); } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 8ef35604fa..70ea70e917 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -56,11 +55,11 @@ public final class SoulEating extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayer()) + if (effected.isPlayer()) { - info.getEffected().removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_PLAYABLE_EXP_CHANGED, listener -> listener.getOwner() == this); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java index 1d30737f06..beffb920fe 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatByMoveType.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.MoveType; import com.l2jmobius.gameserver.model.stats.Stats; @@ -40,20 +41,20 @@ public class StatByMoveType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, _value); + effected.getStat().mergeMoveTypeValue(_stat, _type, _value); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getStat().mergeMoveTypeValue(_stat, _type, -_value); + effected.getStat().mergeMoveTypeValue(_stat, _type, -_value); } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - return info.getSkill().isPassive() || info.getSkill().isToggle(); + return skill.isPassive() || skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Synergy.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Synergy.java index 24f8d10972..c3a9b08bde 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Synergy.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Synergy.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.AbnormalType; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -78,22 +77,22 @@ public final class Synergy extends AbstractEffect } @Override - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffector().isDead()) + if (effector.isDead()) { return false; } for (AbnormalType required : _requiredSlots) { - if (!info.getEffector().hasAbnormalType(required)) + if (!effector.hasAbnormalType(required)) { - return info.getSkill().isToggle(); + return skill.isToggle(); } } - final int abnormalCount = (int) _optionalSlots.stream().filter(info.getEffector()::hasAbnormalType).count(); + final int abnormalCount = (int) _optionalSlots.stream().filter(effector::hasAbnormalType).count(); if (abnormalCount >= _minSlot) { @@ -102,19 +101,19 @@ public final class Synergy extends AbstractEffect if (partyBuffSkill != null) { - final L2Object target = partyBuffSkill.getTarget(info.getEffector(), info.getEffected(), false, false, false); + final L2Object target = partyBuffSkill.getTarget(effector, effected, false, false, false); if ((target != null) && target.isCharacter()) { - SkillCaster.triggerCast(info.getEffector(), (L2Character) target, partyBuffSkill); + SkillCaster.triggerCast(effector, (L2Character) target, partyBuffSkill); } } else { - _log.warning("Skill not found effect called from " + info.getSkill()); + _log.warning("Skill not found effect called from " + skill); } } - return info.getSkill().isToggle(); + return skill.isToggle(); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java index 5f57db9956..c4f2ef9e0c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TalismanSlot.java @@ -19,7 +19,6 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -36,9 +35,9 @@ public final class TalismanSlot extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffector() != null) && (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effector != null) && (effected != null) && effected.isPlayer(); } @Override @@ -48,8 +47,8 @@ public final class TalismanSlot extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().getActingPlayer().getStat().addTalismanSlots(-_slots); + effected.getActingPlayer().getStat().addTalismanSlots(-_slots); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java index 6f0bb3c84b..0f06888ace 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TargetMe.java @@ -17,9 +17,10 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; /** * Target Me effect implementation. @@ -32,25 +33,25 @@ public final class TargetMe extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - ((L2Playable) info.getEffected()).setLockedTarget(null); + ((L2Playable) effected).setLockedTarget(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable()) + if (effected.isPlayable()) { - if (info.getEffected().getTarget() != info.getEffector()) + if (effected.getTarget() != effector) { - info.getEffected().setTarget(info.getEffector()); + effected.setTarget(effector); } - ((L2Playable) info.getEffected()).setLockedTarget(info.getEffector()); + ((L2Playable) effected).setLockedTarget(effector); } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java index bffc2aecce..13053a9adc 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TeleportToSummon.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation; import com.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType; @@ -58,9 +57,9 @@ public final class TeleportToSummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().hasServitors(); + return effected.hasServitors(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java index 33cab39e03..e9e47242d7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferDamageToPlayer.java @@ -17,8 +17,9 @@ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Playable; -import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** @@ -33,20 +34,20 @@ public final class TransferDamageToPlayer extends AbstractStatAddEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(null); + ((L2Playable) effected).setTransferDamageTo(null); } } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - if (info.getEffected().isPlayable() && info.getEffector().isPlayer()) + if (effected.isPlayable() && effector.isPlayer()) { - ((L2Playable) info.getEffected()).setTransferDamageTo(info.getEffector().getActingPlayer()); + ((L2Playable) effected).setTransferDamageTo(effector.getActingPlayer()); } } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java index 5f822f2af5..75d4a88f17 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TransferHate.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.util.Util; @@ -47,9 +46,9 @@ public final class TransferHate extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true); + return Util.checkIfInRange(skill.getEffectRange(), effector, effected, true); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Transformation.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Transformation.java index 1b389e9af7..92df00cb49 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Transformation.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Transformation.java @@ -24,7 +24,6 @@ import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -53,9 +52,9 @@ public final class Transformation extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return !info.getEffected().isDoor(); + return !effected.isDoor(); } @Override @@ -68,8 +67,8 @@ public final class Transformation extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().stopTransformation(false); + effected.stopTransformation(false); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 2e8cd38512..32ac16aa59 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -160,14 +160,14 @@ public final class TriggerSkillByAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_DEALT, (OnCreatureDamageDealt event) -> onAttackEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index 82a3bb14dc..c9ce6cc000 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -92,14 +91,14 @@ public final class TriggerSkillByAvoid extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_ATTACK_AVOID, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_ATTACK_AVOID, (OnCreatureAttackAvoid event) -> onAvoidEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 5fca763c99..351e687f0f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -99,14 +98,14 @@ public final class TriggerSkillByDamage extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index cfd2d77548..c950983e3d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.skills.targets.TargetType; @@ -102,14 +101,14 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_RECEIVED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_DAMAGE_RECEIVED, (OnCreatureDamageReceived event) -> onDamageReceivedEvent(event), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index 2db572e6c5..b7ec10f540 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled; import com.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; @@ -64,14 +63,14 @@ public final class TriggerSkillByKill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_KILLED, listener -> listener.getOwner() == this); } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, info.getEffected()), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_KILLED, (OnCreatureKilled event) -> onCreatureKilled(event, effected), this)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index d5e54a6e95..7a474f5b8d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -112,20 +112,19 @@ public final class TriggerSkillByMagicType extends AbstractEffect } @Override - public void onStart(BuffInfo info) + public void onStart(L2Character effector, L2Character effected, Skill skill) { if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0) || (_magicTypes.length == 0)) { return; } - info.getEffected().addListener(new ConsumerEventListener(info.getEffected(), EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); + effected.addListener(new ConsumerEventListener(effected, EventType.ON_CREATURE_SKILL_FINISH_CAST, (OnCreatureSkillFinishCast event) -> onSkillUseEvent(event), this)); } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index e43cda5682..fefd166e0d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java @@ -62,9 +62,9 @@ public final class TriggerSkillBySkill extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_SKILL_FINISH_CAST, listener -> listener.getOwner() == this); } private void onSkillUseEvent(OnCreatureSkillFinishCast event) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java index 4ba7fcfdf7..23a72039a7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkillAttack.java @@ -72,9 +72,9 @@ public final class TriggerSkillBySkillAttack extends AbstractEffect } @Override - public void onExit(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { - info.getEffected().removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); + effected.removeListenerIf(EventType.ON_CREATURE_DAMAGE_DEALT, listener -> listener.getOwner() == this); } private void onAttackEvent(OnCreatureDamageDealt event) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java index b58b293380..b687d563c6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Unsummon.java @@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Formulas; import com.l2jmobius.gameserver.network.SystemMessageId; @@ -63,9 +62,9 @@ public final class Unsummon extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isSummon(); + return effected.isSummon(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java index ba1c0ab53f..ed1350c021 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Untargetable.java @@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** @@ -35,9 +34,9 @@ public final class Untargetable extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return info.getEffected().isPlayer(); + return effected.isPlayer(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java index 7a27415002..e30776b49a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityPointUp.java @@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; @@ -38,9 +37,9 @@ public final class VitalityPointUp extends AbstractEffect } @Override - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { - return (info.getEffected() != null) && info.getEffected().isPlayer(); + return (effected != null) && effected.isPlayer(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt index c48ec30be0..133fad41c9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt @@ -247,7 +247,6 @@ Resurrection: Resurrects target Player or Summon. ResurrectionSpecial: Resurrects target Player or Summon only in specified instance IDs. Reuse: Decreases skill reuse time based on its magic type. ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius) -RewardItemOnExit: Reward an item when effect ends. (l2jmobius) Root: Stops movement. SacrificeSummon: Sacrifices the players summon. (l2jmobius) SafeFallHeight: Minimum falling height for taking damage stat. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index 8a09cbfcb4..756ee0146c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -780,7 +780,7 @@ public class CharStat // Call pump to each effect //@formatter:off effectsStream.forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(info.getEffector(), info.getEffected(), info.getSkill())) .forEach(effect -> effect.pump(info.getEffected(), info.getSkill()))); //@formatter:on @@ -792,7 +792,7 @@ public class CharStat .filter(BuffInfo::isInUse) .filter(info -> info.isAbnormalType(AbnormalType.ABILITY_CHANGE)) .forEach(info -> info.getEffects().stream() - .filter(effect -> effect.canStart(info)) + .filter(effect -> effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) .filter(effect -> effect.canPump(_activeChar, _activeChar, info.getSkill())) .forEach(effect -> effect.pump(_activeChar, info.getSkill()))); //@formatter:on diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java index be0615be3e..90ac2108aa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/effects/AbstractEffect.java @@ -21,14 +21,13 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.model.skills.BuffInfo; import com.l2jmobius.gameserver.model.skills.Skill; /** * Abstract effect implementation.
- * Instant effects should not override {@link #onExit(BuffInfo)}.
- * Instant effects should not override {@link #canStart(BuffInfo)}, all checks should be done {@link #onStart(BuffInfo)}.
- * Do not call super class methods {@link #onStart(BuffInfo)} nor {@link #onExit(BuffInfo)}. + * Instant effects should not override {@link #onExit(L2Character, L2Character, Skill)}.
+ * Instant effects should not override {@link #canStart(L2Character, L2Character, Skill)}, all checks should be done {@link #onStart(L2Character, L2Character, Skill)}.
+ * Do not call super class methods {@link #onStart(L2Character, L2Character, Skill)} nor {@link #onExit(L2Character, L2Character, Skill)}. * @author Zoey76 */ public abstract class AbstractEffect @@ -75,23 +74,15 @@ public abstract class AbstractEffect return true; } - /** - * Get this effect's type.
- * TODO: Remove. - * @return the effect type - */ - public L2EffectType getEffectType() - { - return L2EffectType.NONE; - } - /** * Verify if the buff can start.
* Used for continuous effects. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return {@code true} if all the start conditions are meet, {@code false} otherwise */ - public boolean canStart(BuffInfo info) + public boolean canStart(L2Character effector, L2Character effected, Skill skill) { return true; } @@ -111,34 +102,24 @@ public abstract class AbstractEffect } - /** - * Called on effect start. - * @param info the buff info - */ - public void onStart(BuffInfo info) + public void onExit(L2Character effector, L2Character effected, Skill skill) { + } /** * Called on each tick.
* If the abnormal time is lesser than zero it will last forever. - * @param info the buff info + * @param effector + * @param effected + * @param skill * @return if {@code true} this effect will continue forever, if {@code false} it will stop after abnormal time has passed */ - public boolean onActionTime(BuffInfo info) + public boolean onActionTime(L2Character effector, L2Character effected, Skill skill) { return false; } - /** - * Called when the effect is exited. - * @param info the buff info - */ - public void onExit(BuffInfo info) - { - - } - /** * Get the effect flags. * @return bit flag for current effect @@ -148,12 +129,6 @@ public abstract class AbstractEffect return EffectFlag.NONE.getMask(); } - @Override - public String toString() - { - return "Effect " + getClass().getSimpleName(); - } - public boolean checkCondition(Object obj) { return true; @@ -187,4 +162,20 @@ public abstract class AbstractEffect { } + + /** + * Get this effect's type.
+ * TODO: Remove. + * @return the effect type + */ + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public String toString() + { + return "Effect " + getClass().getSimpleName(); + } } \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/options/Options.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/options/Options.java index 475f2a94d8..813ec8f6db 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/options/Options.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/options/Options.java @@ -176,7 +176,7 @@ public class Options effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.pump(player, info.getSkill()); - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java index d2aa392e10..9696330565 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/BuffInfo.java @@ -334,7 +334,6 @@ public final class BuffInfo // Call on start. effect.onStart(getEffector(), getEffected(), getSkill()); - effect.onStart(this); // If it's a continuous effect, if has ticks schedule a task with period, otherwise schedule a simple task to end it. if (effect.getTicks() > 0) @@ -361,7 +360,7 @@ public final class BuffInfo if (_isInUse) { // Callback for on action time event. - continueForever = effect.onActionTime(this); + continueForever = effect.onActionTime(getEffector(), getEffected(), getSkill()); } if (!continueForever && _skill.isToggle()) @@ -392,7 +391,7 @@ public final class BuffInfo // Instant effects shouldn't call onExit(..). if (!effect.isInstant()) { - effect.onExit(this); + effect.onExit(getEffector(), getEffected(), getSkill()); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java index 164957d7a5..8c4ba4eb64 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -1265,7 +1265,7 @@ public final class Skill implements IIdentifiable effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); } - if (effect.canStart(info)) + if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) { info.addEffect(effect); }