aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-25 15:11:17 -0500
committermegamage <none@none>2009-08-25 15:11:17 -0500
commitdf4fe8c4dc65c43635ae12ba1b6f7f196ea566dd (patch)
tree68413424b83a1bfc93e4a6f1feaa404492a69142 /src/game
parent8cedad1a0f1e8f58b1b0ff1195fed790e66b6408 (diff)
*Fix some typos that break many area aura spells.
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/SpellAuras.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 84840e6b32c..831760ba246 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -592,7 +592,7 @@ AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentB
{
//assert(source->isType(TYPEMASK_DYNAMICOBJECT));
// TODO: creature addon or save? may add persistent AA without correct source
- if(IS_DYNAMICOBJECT_GUID(sourceGuid));
+ if(IS_DYNAMICOBJECT_GUID(sourceGuid))
return new PersistentAreaAuraEffect(parentAura, effIndex, currentBasePoints);
}
return NULL;
@@ -613,7 +613,7 @@ Unit* Aura::GetUnitSource() const
if(m_sourceGuid == m_target->GetGUID())
return m_target;
- return ObjectAccessor::GetObjectInWorld(m_casterGuid, (Unit*)NULL);
+ return ObjectAccessor::GetObjectInWorld(m_sourceGuid, (Unit*)NULL);
}
void Aura::Update(uint32 diff)
@@ -705,16 +705,10 @@ void AuraEffect::Update(uint32 diff)
void AreaAuraEffect::Update(uint32 diff)
{
- Unit *source = GetSource();
- if(!source) // this should never happen
- {
- m_target->RemoveAura(GetParentAura());
- return;
- }
-
// update for the source of the aura
- if(source == m_target)
+ if(GetParentAura()->GetSourceGUID() == m_target->GetGUID())
{
+ Unit *source = m_target;
Unit *caster = GetCaster();
if (!caster)
{