From a7e04a252fc04988dea2072241ad8825db747e58 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 8 Apr 2009 17:23:57 -0500 Subject: *Add unit to notify when unit is add to world (including load grid case). *Add some check in remove object function. --HG-- branch : trunk --- src/game/Unit.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index fb0aee82654..beabc0e8668 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -66,11 +66,6 @@ float baseMoveSpeed[MAX_MOVE_TYPE] = void InitTriggerAuraData(); -void Unit::AddToWorld() -{ - WorldObject::AddToWorld(); -} - // auraTypes contains attacker auras capable of proc'ing cast auras static Unit::AuraTypeSet GenerateAttakerProcCastAuraTypes() { @@ -10853,6 +10848,16 @@ uint32 Unit::GetCreatePowers( Powers power ) const return 0; } +void Unit::AddToWorld() +{ + if(!IsInWorld()) + { + m_Notified = false; + m_IsInNotifyList = false; + SetToNotify(); + } +} + void Unit::RemoveFromWorld() { // cleanup -- cgit v1.2.3