From e0a6e3aedcd64f7c211ad8e8373e883a11c7f776 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 7 May 2009 17:21:07 -0500 Subject: [PATCH] *Simply some writing of array pointer in aura functions. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 4 ++-- src/game/Unit.cpp | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index b8d742c7f3..b84b19424c 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -410,8 +410,8 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_aura { if (m_auraFlags & (uint8(1) << i)) { - if (¤tBasePoints[0]) - m_partAuras[i]=CreateAuraEffect(this, i,¤tBasePoints[0]+i, caster, NULL, formalCaster); + if (currentBasePoints) + m_partAuras[i]=CreateAuraEffect(this, i,¤tBasePoints[i], caster, NULL, formalCaster); else m_partAuras[i]=CreateAuraEffect(this, i, NULL , caster, NULL, formalCaster); // correct flags if aura couldn't be created diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bc437a4b88..d57ace725b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13595,18 +13595,16 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * if (aur) { AuraEffect *aurEffect = CreateAuraEffect(aur, effIndex, basePoints, caster); - if (!aurEffect) - return aur; - if (!aur->SetPartAura(aurEffect, effIndex)) + if (aurEffect && !aur->SetPartAura(aurEffect, effIndex)) delete aurEffect; } else { if (basePoints) { - int32 amount [3]; + int32 amount[3]; amount[effIndex] = *basePoints; - aur = new Aura(spellInfo, 1<