mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Core/Scripting): Fix healing reduction abilities not applying cor… (#10435)
This commit is contained in:
@@ -11979,8 +11979,8 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
{
|
||||
float TakenTotalMod = 1.0f;
|
||||
float minval = 0.0f;
|
||||
// Healing taken percent
|
||||
|
||||
// Healing taken percent
|
||||
if (!sScriptMgr->OnSpellHealingBonusTakenNegativeModifiers(this, caster, spellProto, minval))
|
||||
{
|
||||
minval = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT));
|
||||
|
||||
@@ -143,13 +143,13 @@ bool ScriptMgr::OnSpellHealingBonusTakenNegativeModifiers(Unit const* target, Un
|
||||
{
|
||||
auto ret = IsValidBoolScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
return !script->OnSpellHealingBonusTakenNegativeModifiers(target, caster, spellInfo, val);
|
||||
return script->OnSpellHealingBonusTakenNegativeModifiers(target, caster, spellInfo, val);
|
||||
});
|
||||
|
||||
if (ret && *ret)
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1530,7 +1530,7 @@ public:
|
||||
virtual bool OnIsAffectedBySpellModCheck(SpellInfo const* /*affectSpell*/, SpellInfo const* /*checkSpell*/, SpellModifier const* /*mod*/) { return true; };
|
||||
|
||||
// Called when checking for spell negative healing modifiers
|
||||
virtual bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* /*target*/, Unit const* /*caster*/, SpellInfo const* /*spellInfo*/, float& /*val*/) { return true; };
|
||||
virtual bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* /*target*/, Unit const* /*caster*/, SpellInfo const* /*spellInfo*/, float& /*val*/) { return false; };
|
||||
};
|
||||
|
||||
class BGScript : public ScriptObject
|
||||
|
||||
Reference in New Issue
Block a user