aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-15 00:10:54 -0700
committermaximius <none@none>2009-10-15 00:10:54 -0700
commit47079eb853337bf11fe2dbf1007f07b3048566e7 (patch)
treef333d989fcd9c86e127cfd3c96070849a928ec90 /src/game/SpellAuras.cpp
parentae3a82feed6c46a87c0c36f5572352131e9d1864 (diff)
*Improved Fire Nova Totem & Earthen Power, patch converted by QuaLiT1
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c663061ae74..f1f5b4f21f4 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6271,6 +6271,26 @@ void AuraEffect::PeriodicTick()
}
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
{
+ Unit *pCaster = GetCaster();
+ if (!pCaster)
+ return;
+
+ if (pCaster->GetTypeId() == TYPEID_UNIT && ((Creature*)pCaster)->isTotem() && ((Totem*)pCaster)->GetTotemType() != TOTEM_STATUE)
+ {
+ uint32 procAttacker = PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT; // | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT;
+ uint32 procVictim = PROC_FLAG_SUCCESSFUL_AOE_SPELL_HIT; // | PROC_FLAG_TAKEN_HARMFUL_SPELL_HIT;
+ SpellEntry const *spellProto = GetSpellProto();
+
+ if (spellProto->SpellFamilyName == SPELLFAMILY_GENERIC) // SPELLFAMILY_GENERIC proc by triggered spell
+ {
+ uint32 trigger_spell_id = spellProto->EffectTriggerSpell[m_effIndex];
+ SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id);
+ ((Totem*)pCaster)->GetOwner()->ProcDamageAndSpell(pCaster, procAttacker, procVictim, PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, triggeredSpellInfo);
+ }
+ else
+ ((Totem*)pCaster)->GetOwner()->ProcDamageAndSpell(pCaster, procAttacker, procVictim, PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, spellProto);
+ }
+
TriggerSpell();
break;
}