From 3d8d45c57a84538afbf716fc9304ea3207ea1948 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 29 Nov 2008 13:08:23 -0600 Subject: *Do unit relocation notification only once per update. Hope this can solve the stealth crash problem once for all. --HG-- branch : trunk --- src/game/Unit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f23f450c201..645ff194eba 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -148,6 +148,7 @@ bool IsPassiveStackableSpell( uint32 spellId ) Unit::Unit() : WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostilRefManager(this) +, m_IsInNotifyList(false), m_Notified(false) { m_objectType |= TYPEMASK_UNIT; m_objectTypeId = TYPEID_UNIT; @@ -12562,3 +12563,11 @@ void Unit::RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo) ++iter; } } + +/*-----------------------TRINITY-----------------------------*/ + +void Unit::SetToNotify() +{ + if(Map *map = GetMap()) + map->AddUnitToNotify(this); +} \ No newline at end of file -- cgit v1.2.3