Changeset 142 for trunk/src/game/Unit.cpp
- Timestamp:
- 11/19/08 13:40:02 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Unit.cpp
r141 r142 455 455 } 456 456 457 void Unit::RemoveInterruptableAura(uint32 flag) 458 { 459 AuraList::iterator iter, next; 460 for (iter = m_interruptableAuras.begin(); iter != m_interruptableAuras.end(); iter = next) 461 { 462 next = iter; 463 ++next; 464 465 //sLog.outDetail("auraflag:%u flag:%u = %u",(*iter)->GetSpellProto()->AuraInterruptFlags,flag,(*iter)->GetSpellProto()->AuraInterruptFlags & flag); 466 if(*iter && ((*iter)->GetSpellProto()->AuraInterruptFlags & flag) == flag) 467 { 468 RemoveAurasDueToSpell((*iter)->GetId()); 469 if (!m_interruptableAuras.empty()) 470 next = m_interruptableAuras.begin(); 471 else 472 return; 473 } 474 } 475 } 476 457 477 bool Unit::HasAuraType(AuraType auraType) const 458 478 { … … 475 495 476 496 // remove affects from victim (including from 0 damage and DoTs) 477 if(pVictim != this)478 pVictim->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);497 //if(pVictim != this) 498 // pVictim->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 479 499 480 500 // remove affects from attacker at any non-DoT damage (including 0 damage) 481 501 if( damagetype != DOT) 482 502 { 483 RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 484 RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); 503 RemoveInterruptableAura(AURA_INTERRUPT_FLAG_STEALTH); 485 504 486 505 if(pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->IsStandState() && !pVictim->hasUnitState(UNIT_STAT_STUNNED)) … … 3739 3758 { 3740 3759 m_modAuras[Aur->GetModifier()->m_auraname].push_back(Aur); 3760 if(Aur->GetSpellProto()->AuraInterruptFlags) 3761 m_interruptableAuras.push_back(Aur); 3741 3762 } 3742 3763 … … 4111 4132 { 4112 4133 m_modAuras[(*i).second->GetModifier()->m_auraname].remove((*i).second); 4134 if((*i).second->GetSpellProto()->AuraInterruptFlags) 4135 m_interruptableAuras.remove((*i).second); 4113 4136 } 4114 4137