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 TakenTotalMod = 1.0f;
|
||||||
float minval = 0.0f;
|
float minval = 0.0f;
|
||||||
// Healing taken percent
|
|
||||||
|
|
||||||
|
// Healing taken percent
|
||||||
if (!sScriptMgr->OnSpellHealingBonusTakenNegativeModifiers(this, caster, spellProto, minval))
|
if (!sScriptMgr->OnSpellHealingBonusTakenNegativeModifiers(this, caster, spellProto, minval))
|
||||||
{
|
{
|
||||||
minval = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT));
|
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)
|
auto ret = IsValidBoolScript<GlobalScript>([&](GlobalScript* script)
|
||||||
{
|
{
|
||||||
return !script->OnSpellHealingBonusTakenNegativeModifiers(target, caster, spellInfo, val);
|
return script->OnSpellHealingBonusTakenNegativeModifiers(target, caster, spellInfo, val);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ret && *ret)
|
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; };
|
virtual bool OnIsAffectedBySpellModCheck(SpellInfo const* /*affectSpell*/, SpellInfo const* /*checkSpell*/, SpellModifier const* /*mod*/) { return true; };
|
||||||
|
|
||||||
// Called when checking for spell negative healing modifiers
|
// 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
|
class BGScript : public ScriptObject
|
||||||
|
|||||||
Reference in New Issue
Block a user