diff options
| author | Shocker <shocker@freakz.ro> | 2012-01-06 07:51:14 +0200 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2012-01-06 07:51:14 +0200 |
| commit | bad912e69d843135734fca3ec3f753b5c0da6c60 (patch) | |
| tree | 818fc4e477739bad9998b00bd1d3678bf23f817f /src/server/game | |
| parent | 0b10ded2d890cf327ed53bb887d3c891b53e7cd1 (diff) | |
| parent | 33de07e2dc72166d35b8ac839ac048934838e795 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 26 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Spells/SpellMgr.cpp | 11 |
3 files changed, 36 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index af6bf6cf6ce..b5fdf38a4b6 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -431,12 +431,36 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data) MovepointReached(Data); } +void SmartAI::RemoveAuras() +{ + Unit::AuraApplicationMap appliedAuras = me->GetAppliedAuras(); + for (Unit::AuraApplicationMap::iterator iter = appliedAuras.begin(); iter != appliedAuras.end();) + { + Aura const* aura = iter->second->GetBase(); + if (!aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) && !(iter->second->GetTarget() == me && aura->GetCaster() == me)) + me->_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT); + else + ++iter; + } + + Unit::AuraMap ownedAuras = me->GetOwnedAuras(); + for (Unit::AuraMap::iterator iter = ownedAuras.begin(); iter != ownedAuras.end();) + { + Aura* aura = iter->second; + if (!aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE)) + me->RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT); + else + ++iter; + } +} + void SmartAI::EnterEvadeMode() { if (!me->isAlive()) return; - me->RemoveAllAuras(); + RemoveAuras(); + me->DeleteThreatList(); me->CombatStop(true); me->LoadCreaturesAddon(); diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 1059e2a01c4..b33bfebf912 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -193,6 +193,8 @@ class SmartAI : public CreatureAI mDespawnState = t ? 1 : 0; } void StartDespawn() { mDespawnState = 2; } + + void RemoveAuras(); private: uint32 mFollowCreditType; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index b7c31ee29c6..e57cbf4a390 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2960,8 +2960,10 @@ void SpellMgr::LoadDbcDataCorrections() switch (spellInfo->Id) { - case 42835: // Spout - spellInfo->Effect[0] = 0; // remove damage effect, only anim is needed + case 40244: case 40245: // Simon Game Visual + case 40246: case 40247: // Simon Game Visual + case 42835: // Spout, remove damage effect, only anim is needed + spellInfo->Effect[0] = 0; break; case 30657: // Quake spellInfo->EffectTriggerSpell[0] = 30571; @@ -3495,6 +3497,11 @@ void SpellMgr::LoadDbcDataCorrections() case 72405: // Broken Frostmourne spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd break; + case 40055: // Introspection + case 40165: // Introspection + case 40166: // Introspection + case 40167: // Introspection + spellInfo->Attributes |= SPELL_ATTR0_NEGATIVE_1; default: break; } |
