*Try to fix the bug that client get freezed when players teleported out of bg/arena.
--HG-- branch : trunk
This commit is contained in:
+4
-4
@@ -614,14 +614,14 @@ void Map::RelocationNotify()
|
|||||||
for(std::vector<uint64>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
|
for(std::vector<uint64>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
|
||||||
{
|
{
|
||||||
Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL);
|
Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL);
|
||||||
if(!unit)
|
if(!unit || !unit->IsInWorld() || !unit->GetMapId() == GetId())
|
||||||
|
{
|
||||||
|
*iter = 0;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
unit->m_Notified = true;
|
unit->m_Notified = true;
|
||||||
|
|
||||||
if(!unit->IsInWorld())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
||||||
|
|||||||
Reference in New Issue
Block a user