aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 215902cb30f..85f12812014 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -16875,7 +16875,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
const WorldLocation& _loc = GetBattlegroundEntryPoint();
mapId = _loc.GetMapId(); instanceId = 0;
- if (mapId == MAPID_INVALID) // Battleground Entry Point not found (???)
+ // Db field type is type int16, so it can never be MAPID_INVALID
+ //if (mapId == MAPID_INVALID) -- code kept for reference
+ if (int16(mapId) == int16(-1)) // Battleground Entry Point not found (???)
{
sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid);
RelocateToHomebind();