From af406ef27196a3784f245b7b877a416de80c9dc3 Mon Sep 17 00:00:00 2001 From: QAston Date: Tue, 7 Apr 2009 23:53:13 +0200 Subject: *Again a typofix-sorry for that --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7d56e3442b3..f27cf4bf0c6 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2050,7 +2050,7 @@ void Spell::EffectTriggerSpell(uint32 i) { uint32 dispelMask = GetDispellMask(DISPEL_ALL); Unit::AuraMap& Auras = m_caster->GetAuras(); - for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); ++iter) + for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();) { // remove all harmful spells on you... SpellEntry const* spell = iter->second->GetSpellProto(); -- cgit v1.2.3 From ebc7176678debd7597acc1b14682052e3f52ac56 Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 8 Apr 2009 00:07:32 +0200 Subject: *Fix auras amount after relog --HG-- branch : trunk --- src/game/Player.cpp | 2 +- src/game/SpellAuras.cpp | 2 +- src/game/SpellEffects.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index fb784afca2d..f29b81c11f4 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -15862,7 +15862,7 @@ void Player::_SaveAuras() CharacterDatabase.PExecute("INSERT INTO character_aura (guid,caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2,maxduration,remaintime,remaincharges) " "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", GetGUIDLow(), itr->second->GetCasterGUID(),(uint32)itr->second->GetId(), (uint32)itr->second->GetEffectMask(), - (uint32)itr->second->GetStackAmount(), (int32)amounts[0], (int32)amounts[1], (int32)amounts[2] + (int32)itr->second->GetStackAmount(), (int32)amounts[0], (int32)amounts[1], (int32)amounts[2] ,int(itr->second->GetAuraMaxDuration()),int(itr->second->GetAuraDuration()),int(itr->second->GetAuraCharges())); } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 11e8abb2d08..f2721efb485 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1310,7 +1310,7 @@ void Aura::SetLoadedState(uint64 caster_guid,int32 maxduration,int32 duration,in m_stackAmount = stackamount; for (uint8 i=0; iSetAmount(amount[0]+i); + m_partAuras[i]->SetAmount(amount[i]); } void AuraEffect::HandleShapeshiftBoosts(bool apply) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f27cf4bf0c6..eb3ff67c243 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2061,6 +2061,8 @@ void Spell::EffectTriggerSpell(uint32 i) { m_caster->RemoveAura(iter->second); } + else + iter++; } return; } -- cgit v1.2.3 From f646e0cc24b9681227d651fe0e64548e5a477b5e Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 8 Apr 2009 00:21:11 +0200 Subject: *Fix a crash with cloak of shadows. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index eb3ff67c243..54bee661408 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2059,7 +2059,7 @@ void Spell::EffectTriggerSpell(uint32 i) // ignore positive and passive auras && !iter->second->IsPositive() && !iter->second->IsPassive()) { - m_caster->RemoveAura(iter->second); + m_caster->RemoveAura(iter); } else iter++; -- cgit v1.2.3