Remove a check which always returns true. Correct me if I am wrong.
This commit is contained in:
@@ -2205,10 +2205,11 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
if (!sMapMgr->CanPlayerEnter(mapid, this, false))
|
if (!sMapMgr->CanPlayerEnter(mapid, this, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
//I think this always returns true. Correct me if I am wrong.
|
||||||
// If the map is not created, assume it is possible to enter it.
|
// If the map is not created, assume it is possible to enter it.
|
||||||
// It will be created in the WorldPortAck.
|
// It will be created in the WorldPortAck.
|
||||||
Map* map = sMapMgr->FindBaseNonInstanceMap(mapid);
|
//Map* map = sMapMgr->FindBaseNonInstanceMap(mapid);
|
||||||
if (!map || map->CanEnter(this))
|
//if (!map || map->CanEnter(this))
|
||||||
{
|
{
|
||||||
//lets reset near teleport flag if it wasn't reset during chained teleports
|
//lets reset near teleport flag if it wasn't reset during chained teleports
|
||||||
SetSemaphoreTeleportNear(false);
|
SetSemaphoreTeleportNear(false);
|
||||||
@@ -2317,8 +2318,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
// code for finish transfer to new map called in WorldSession::HandleMoveWorldportAckOpcode at client packet
|
// code for finish transfer to new map called in WorldSession::HandleMoveWorldportAckOpcode at client packet
|
||||||
SetSemaphoreTeleportFar(true);
|
SetSemaphoreTeleportFar(true);
|
||||||
}
|
}
|
||||||
else
|
//else
|
||||||
return false;
|
// return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user