Core/Maps: Changed functions checking if map can be entered to use TransferAbortReason directly instead of intermediate Map::EnterState enum
Port From (https://github.com/TrinityCore/TrinityCore/commit/c3e1ff90a5a217691990ea4662bcaa2405b57fde)
This commit is contained in:
@@ -270,7 +270,7 @@ namespace Game
|
||||
// relocate the player to the teleport destination
|
||||
// the CannotEnter checks are done in TeleporTo but conditions may change
|
||||
// while the player is in transit, for example the map may get full
|
||||
if (newMap == null || newMap.CannotEnter(player) != 0)
|
||||
if (newMap == null || newMap.CannotEnter(player) != null)
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Map {loc.GetMapId()} could not be created for {(newMap ? newMap.GetMapName() : "Unknown")} ({player.GetGUID()}), porting player to homebind");
|
||||
player.TeleportTo(player.GetHomebind());
|
||||
|
||||
Reference in New Issue
Block a user