mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Players: Fixed nested spell overrides (priest Mind Spike)
This commit is contained in:
@@ -30041,7 +30041,7 @@ SpellInfo const* Player::GetCastSpellInfo(SpellInfo const* spellInfo, TriggerCas
|
||||
if (overrides != m_overrideSpells.end())
|
||||
for (uint32 spellId : overrides->second)
|
||||
if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(spellId, GetMap()->GetDifficultyID()))
|
||||
return Unit::GetCastSpellInfo(newInfo, triggerFlag);
|
||||
return GetCastSpellInfo(newInfo, triggerFlag);
|
||||
|
||||
return Unit::GetCastSpellInfo(spellInfo, triggerFlag);
|
||||
}
|
||||
|
||||
@@ -13871,9 +13871,13 @@ SpellInfo const* Unit::GetCastSpellInfo(SpellInfo const* spellInfo, TriggerCastF
|
||||
{
|
||||
if (auraEffect->GetSpellInfo()->HasAttribute(SPELL_ATTR8_IGNORE_SPELLCAST_OVERRIDE_COST))
|
||||
triggerFlag |= TRIGGERED_IGNORE_POWER_AND_REAGENT_COST;
|
||||
else
|
||||
triggerFlag &= ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST;
|
||||
|
||||
if (auraEffect->GetSpellInfo()->HasAttribute(SPELL_ATTR11_IGNORE_SPELLCAST_OVERRIDE_SHAPESHIFT_REQUIREMENTS))
|
||||
triggerFlag |= TRIGGERED_IGNORE_SHAPESHIFT;
|
||||
else
|
||||
triggerFlag &= ~TRIGGERED_IGNORE_SHAPESHIFT;
|
||||
|
||||
return newInfo;
|
||||
}
|
||||
@@ -13884,12 +13888,15 @@ SpellInfo const* Unit::GetCastSpellInfo(SpellInfo const* spellInfo, TriggerCastF
|
||||
};
|
||||
|
||||
if (SpellInfo const* newInfo = findMatchingAuraEffectIn(SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS))
|
||||
return newInfo;
|
||||
{
|
||||
triggerFlag &= ~TRIGGERED_IGNORE_CAST_TIME;
|
||||
return GetCastSpellInfo(newInfo, triggerFlag);
|
||||
}
|
||||
|
||||
if (SpellInfo const* newInfo = findMatchingAuraEffectIn(SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED))
|
||||
{
|
||||
triggerFlag |= TRIGGERED_IGNORE_CAST_TIME;
|
||||
return newInfo;
|
||||
return GetCastSpellInfo(newInfo, triggerFlag);
|
||||
}
|
||||
|
||||
return spellInfo;
|
||||
|
||||
Reference in New Issue
Block a user