From 513f9ce6b9d539790a2b43cb621f6d8b6d72b0e1 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 29 Dec 2008 15:57:27 -0600 Subject: [PATCH] *Fix a crash bug about dynobj. --HG-- branch : trunk --- src/game/Unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1fed4717db..b830b7b4c7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4432,7 +4432,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit { int32 basePoints = aur->GetBasePoints(); // construct the new aura for the attacker - Aura * new_aur = CreateAura(aur->GetSpellProto(), aur->GetEffIndex(), &basePoints, stealer); + Aura * new_aur = CreateAura(aur->GetSpellProto(), aur->GetEffIndex(), NULL/*&basePoints*/, stealer); if(!new_aur) continue; @@ -4808,7 +4808,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId, uint32 effIndex) { for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();) { - DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this,*m_dynObjGUIDs.begin()); + DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this, *i); if(!dynObj) { i = m_dynObjGUIDs.erase(i); @@ -4826,7 +4826,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId) { for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();) { - DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this,*m_dynObjGUIDs.begin()); + DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this, *i); if(!dynObj) { i = m_dynObjGUIDs.erase(i);