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
+2 -2
View File
@@ -175,7 +175,7 @@ namespace Scripts.Spells.Priest
Aura atonement = caster.GetAura(SpellIds.Atonement);
if (atonement != null)
{
var script = atonement.GetScript<spell_pri_atonement>("spell_pri_atonement");
var script = atonement.GetScript<spell_pri_atonement>();
if (script != null)
script.AddAtonementTarget(GetTarget().GetGUID());
}
@@ -190,7 +190,7 @@ namespace Scripts.Spells.Priest
Aura atonement = caster.GetAura(SpellIds.Atonement);
if (atonement != null)
{
var script = atonement.GetScript<spell_pri_atonement>("spell_pri_atonement");
var script = atonement.GetScript<spell_pri_atonement>();
if (script != null)
script.RemoveAtonementTarget(GetTarget().GetGUID());
}