Scripts/Auras: Lookup aura scripts by their type, not name

Port From (https://github.com/TrinityCore/TrinityCore/commit/9fc8c86e9a47194a1b271fbcf7bf9e85cb3f0826)
This commit is contained in:
hondacrx
2021-11-03 12:31:46 -04:00
parent b1e6aabee7
commit 5a90a3ddde
6 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Scripts.Spells.Rogue
Aura aura = GetCaster().GetAura(SpellIds.KillingSpree);
if (aura != null)
{
var script = aura.GetScript<spell_rog_killing_spree_AuraScript>(nameof(spell_rog_killing_spree_AuraScript));
var script = aura.GetScript<spell_rog_killing_spree_AuraScript>();
if (script != null)
script.AddTarget(GetHitUnit());
}