aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-07 17:21:07 -0500
committermegamage <none@none>2009-05-07 17:21:07 -0500
commite0a6e3aedcd64f7c211ad8e8373e883a11c7f776 (patch)
tree7787b9f0d5aadf9e3be25f7152ba8be9cad29b8c /src/game/Unit.cpp
parent22eeafa996110fe3b81f3a9824009f80e97391c4 (diff)
*Simply some writing of array pointer in aura functions.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index bc437a4b88b..d57ace725b1 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<<effIndex, &amount[0], this ,caster);
+ aur = new Aura(spellInfo, 1<<effIndex, amount, this ,caster);
}
else
{