Core/Players: Fixed spell overrides not being removed when unlearning talents
Port From (https://github.com/TrinityCore/TrinityCore/commit/ad0cb188c91501887f4117157dcb450429652b7c)
This commit is contained in:
@@ -2199,6 +2199,7 @@ namespace Game.Entities
|
||||
|
||||
bool cur_active = pSpell.Active;
|
||||
bool cur_dependent = pSpell.Dependent;
|
||||
int? traitDefinitionId = pSpell.TraitDefinitionId;
|
||||
|
||||
if (disabled)
|
||||
{
|
||||
@@ -2315,6 +2316,13 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
if (traitDefinitionId.HasValue)
|
||||
{
|
||||
var traitDefinition = CliDB.TraitDefinitionStorage.LookupByKey(traitDefinitionId.Value);
|
||||
if (traitDefinition != null)
|
||||
RemoveOverrideSpell(traitDefinition.OverridesSpellID, spellId);
|
||||
}
|
||||
|
||||
m_overrideSpells.Remove(spellId);
|
||||
|
||||
if (m_canTitanGrip)
|
||||
|
||||
Reference in New Issue
Block a user