aboutsummaryrefslogtreecommitdiff
path: root/src/game/DynamicObject.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-26 16:01:30 -0700
committermaximius <none@none>2009-09-26 16:01:30 -0700
commit7396b641ae82adcf5afd2591957ff944b7964203 (patch)
treeb6d54ca311e779ae4e77b569b9a367dc26a4938a /src/game/DynamicObject.cpp
parentff3f556423bc90f8476c8b09bacb60cd621b2664 (diff)
*Gundrak: GO Handling & Slad Ran script by Tartalo
*Cleanup, and don't consider creatures to be in combat if they have no victim, or if their victim is a GM. --HG-- branch : trunk
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r--src/game/DynamicObject.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp
index 5dd4059e21c..e616dc2f809 100644
--- a/src/game/DynamicObject.cpp
+++ b/src/game/DynamicObject.cpp
@@ -113,7 +113,7 @@ void DynamicObject::Update(uint32 p_time)
{
// caster can be not in world at time dynamic object update, but dynamic object not yet deleted in Unit destructor
Unit* caster = GetCaster();
- if(!caster)
+ if (!caster)
{
Delete();
return;
@@ -126,17 +126,17 @@ void DynamicObject::Update(uint32 p_time)
else
deleteThis = true;
- if(m_effMask)
+ if (m_effMask)
{
- if(m_updateTimer < p_time)
+ if (m_updateTimer < p_time)
{
Trinity::DynamicObjectUpdater notifier(*this,caster);
VisitNearbyObject(GetRadius(), notifier);
m_updateTimer = 500; // is this official-like?
- }else m_updateTimer -= p_time;
+ } else m_updateTimer -= p_time;
}
- if(deleteThis)
+ if (deleteThis)
{
caster->RemoveDynObjectWithGUID(GetGUID());
Delete();
@@ -153,9 +153,9 @@ void DynamicObject::Delete()
void DynamicObject::Delay(int32 delaytime)
{
m_aliveDuration -= delaytime;
- for(AffectedSet::iterator iunit= m_affected.begin(); iunit != m_affected.end(); ++iunit)
+ for (AffectedSet::iterator iunit = m_affected.begin(); iunit != m_affected.end(); ++iunit)
if (*iunit)
- (*iunit)->DelayAura(m_spellId, GetCaster()->GetGUID() , delaytime);
+ (*iunit)->DelayAura(m_spellId, GetCaster()->GetGUID(), delaytime);
}
bool DynamicObject::isVisibleForInState(Player const* u, bool inVisibleList) const