Core/Spells: Some cleanup and missing stuff in a6eee516bd

This commit is contained in:
Vincent-Michael
2013-08-11 01:46:29 +02:00
parent 2e9547b4ff
commit fa0aaa5fa4
2 changed files with 4 additions and 15 deletions

View File

@@ -1285,7 +1285,8 @@ public:
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_SOUL_SWAP_MOD_COST) || !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_SOUL_SWAP_OVERRIDE))
if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_SOUL_SWAP_MOD_COST) ||
!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_SOUL_SWAP_OVERRIDE))
return false;
return true;
}
@@ -1295,7 +1296,7 @@ public:
Unit* currentTarget = GetExplTargetUnit();
Unit* swapTarget = NULL;
if (Aura const* swapOverride = GetCaster()->GetAura(SPELL_WARLOCK_SOUL_SWAP_OVERRIDE))
if (SoulSwapOverrideAuraScript* swapScript = dynamic_cast<SoulSwapOverrideAuraScript*>(swapOverride->GetScriptByName("spell_warlock_soul_swap_override")))
if (SoulSwapOverrideAuraScript* swapScript = dynamic_cast<SoulSwapOverrideAuraScript*>(swapOverride->GetScriptByName("spell_warl_soul_swap_override")))
swapTarget = swapScript->GetOriginalSwapSource();
// Soul Swap Exhale can't be cast on the same target than Soul Swap
@@ -1314,7 +1315,7 @@ public:
Unit* swapSource = NULL;
if (Aura const* swapOverride = GetCaster()->GetAura(SPELL_WARLOCK_SOUL_SWAP_OVERRIDE))
{
SoulSwapOverrideAuraScript* swapScript = dynamic_cast<SoulSwapOverrideAuraScript*>(swapOverride->GetScriptByName("spell_warlock_soul_swap_override"));
SoulSwapOverrideAuraScript* swapScript = dynamic_cast<SoulSwapOverrideAuraScript*>(swapOverride->GetScriptByName("spell_warl_soul_swap_override"));
if (!swapScript)
return;
dotList = swapScript->GetDotList();