rendered paste bodyFrom c2f3933c064c0a9e38468530975eda9000655248 Mon Sep 17 00:00:00 2001From: Ebrithil <dragonshard@games-universe.net>Date: Sun, 30 Nov 2008 11:54:13 +0100Subject: [PATCH] Grounding Totem--- src/game/Spell.cpp | 4 ++++ src/game/Totem.cpp | 29 ++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-)diff --git a/src/game/Spell.cpp b/src/game/Spell.cppindex 900e7ed..68b11a1 100644--- a/src/game/Spell.cpp+++ b/src/game/Spell.cpp@@ -4947,6 +4947,10 @@ Unit* Spell::SelectMagnetTarget() { target = magnet; m_targets.setUnitTarget(target);++ if( ((Creature*)magnet)->isTotem() && magnet->isAlive() )+ magnet->DealDamage(magnet, magnet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);+ break; } }diff --git a/src/game/Totem.cpp b/src/game/Totem.cppindex 5c708bf..545bbdf 100644--- a/src/game/Totem.cpp+++ b/src/game/Totem.cpp@@ -162,16 +162,27 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto) bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) {- for (int i=0;i<3;i++)- {- switch(spellInfo->EffectApplyAuraName[i])+ bool check = false;++ for (uint8 j=0;j<3;j++)+ if(spellInfo->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE) {- case SPELL_AURA_PERIODIC_DAMAGE:- case SPELL_AURA_PERIODIC_LEECH:- return true;- default:- continue;+ check = true;+ break; }- }++ if (!check)+ for (uint8 i=0;i<3;i++)+ {+ switch(spellInfo->EffectApplyAuraName[i])+ {+ case SPELL_AURA_PERIODIC_DAMAGE:+ case SPELL_AURA_PERIODIC_LEECH:+ return true;+ default:+ continue;+ }+ }+ return Creature::IsImmunedToSpell(spellInfo, useCharges); }-- 1.5.6.5