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
@@ -273,7 +273,7 @@ namespace Scripts.Spells.Shaman
Aura aura = GetCaster().GetAura(SpellIds.EarthenRagePassive);
if (aura != null)
{
var earthen_rage_script = aura.GetScript<spell_sha_earthen_rage_passive>("spell_sha_earthen_rage_passive");
var earthen_rage_script = aura.GetScript<spell_sha_earthen_rage_passive>();
if (earthen_rage_script != null)
{
Unit procTarget = Global.ObjAccessor.GetUnit(GetCaster(), earthen_rage_script.GetProcTargetGuid());
@@ -393,7 +393,7 @@ namespace Scripts.Spells.Shaman
summon.CastSpell(summon, SpellIds.HealingRainVisual, true);
var script = aura.GetScript<spell_sha_healing_rain_AuraScript>("spell_sha_healing_rain");
var script = aura.GetScript<spell_sha_healing_rain_AuraScript>();
if (script != null)
script.SetVisualDummy(summon);
}