mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*Fix a crash in relocation notify.
--HG-- branch : trunk
This commit is contained in:
@@ -616,7 +616,7 @@ void Map::RelocationNotify()
|
||||
|
||||
void Map::AddUnitToNotify(Unit* u)
|
||||
{
|
||||
if(u->m_NotifyListPos < 0)
|
||||
if(u->m_NotifyListPos < 0 && u->IsInWorld())
|
||||
{
|
||||
u->oldX = u->GetPositionX();
|
||||
u->oldY = u->GetPositionY();
|
||||
|
||||
@@ -11684,8 +11684,8 @@ void Unit::AddToWorld()
|
||||
{
|
||||
WorldObject::AddToWorld();
|
||||
m_Notified = false;
|
||||
//assert(m_NotifyListPos < 0); instance : crash
|
||||
m_NotifyListPos = -1;
|
||||
assert(m_NotifyListPos < 0); //instance : crash
|
||||
//m_NotifyListPos = -1;
|
||||
SetToNotify();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user