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:
hondacrx
2022-10-11 17:54:34 -04:00
parent d16f8c94c2
commit e5c7244893
8 changed files with 122 additions and 162 deletions
+1 -1
View File
@@ -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());