Changeset 15
- Timestamp:
- 11/19/08 13:23:13 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 3 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); -
trunk/src/game/Spell.h
r6 r15 336 336 337 337 Unit* SelectMagnetTarget(); 338 std::pair <bool,Unit *> m_magnetPair; 338 339 bool CheckTarget( Unit* target, uint32 eff, bool hitPhase ); 339 340 -
trunk/src/game/SpellAuras.h
r2 r15 284 284 285 285 int32 m_procCharges; 286 void SetAuraProcCharges(int32 charges) { m_procCharges = charges; } 286 287 287 288 virtual Unit* GetTriggerTarget() const { return m_target; }