Core/Auras: Implemented SPELL_AURA_LEARN_SPELL

Port From (https://github.com/TrinityCore/TrinityCore/commit/d2a995368459b28af0309292587a39f95fbf754c)
This commit is contained in:
hondacrx
2021-02-22 15:42:51 -05:00
parent bfb732e72b
commit 16d64a1695
+16
View File
@@ -4581,6 +4581,22 @@ namespace Game.Spells
}
}
[AuraEffectHandler(AuraType.LearnSpell)]
void HandleLearnSpell(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
return;
Player player = aurApp.GetTarget().ToPlayer();
if (player == null)
return;
if (apply)
player.LearnSpell((uint)GetMiscValue(), true, 0, true);
else
player.RemoveSpell((uint)GetMiscValue(), false, false, true);
}
[AuraEffectHandler(AuraType.ComprehendLanguage)]
void HandleComprehendLanguage(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{