Changeset 15 for trunk/src/game/Spell.cpp
- Timestamp:
- 11/19/08 13:23:13 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Spell.cpp
r6 r15 268 268 m_selfContainer = NULL; 269 269 m_triggeringContainer = triggeringContainer; 270 m_magnetPair.first = false; 271 m_magnetPair.second = NULL; 270 272 m_deletable = true; 271 273 m_delayAtDamageCount = 0; … … 948 950 return; 949 951 952 // remove spell_magnet aura after first spell redirect and destroy target if its totem 953 if(m_magnetPair.first && m_magnetPair.second && m_magnetPair.second == unit) 954 { 955 if(unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->isTotem()) 956 unit->DealDamage(unit,unit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); 957 return; 958 } 959 950 960 // Recheck immune (only for delayed spells) 951 961 if( m_spellInfo->speed && ( … … 4838 4848 { 4839 4849 // Check targets for creature type mask and remove not appropriate (skip explicit self target case, maybe need other explicit targets) 4840 if(m_spellInfo->EffectImplicitTargetA[eff]!=TARGET_SELF )4850 if(m_spellInfo->EffectImplicitTargetA[eff]!=TARGET_SELF && !m_magnetPair.first) 4841 4851 { 4842 4852 if (!CheckTargetCreatureType(target)) … … 4919 4929 if(Unit* magnet = (*itr)->GetCaster()) 4920 4930 { 4921 if(magnet->IsWithinLOSInMap(m_caster)) 4922 { 4931 if((*itr)->m_procCharges>0 && magnet->IsWithinLOSInMap(m_caster)) 4932 { 4933 (*itr)->SetAuraProcCharges((*itr)->m_procCharges-1); 4934 m_magnetPair.first = true; 4935 m_magnetPair.second = magnet; 4936 4923 4937 target = magnet; 4924 4938 m_targets.setUnitTarget(target);