diff options
-rw-r--r-- | src/game/Player.cpp | 7 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 7d2767275c6..56877656876 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14576,7 +14576,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) SetBattleGroundEntryPoint(fields[36].GetUInt32(),fields[37].GetFloat(),fields[38].GetFloat(),fields[39].GetFloat(),fields[40].GetFloat()); // check entry point and fix to homebind if need - if(!MapManager::IsValidMapCoord(m_bgEntryPoint)) + MapEntry const* mapEntry = sMapStore.LookupEntry(m_bgEntryPoint.mapid); + if(!mapEntry || mapEntry->Instanceable() || !MapManager::IsValidMapCoord(m_bgEntryPoint)) SetBattleGroundEntryPoint(m_homebindMapId,m_homebindX,m_homebindY,m_homebindZ,0.0f); BattleGround *currentBg = sBattleGroundMgr.GetBattleGround(bgid); @@ -14607,8 +14608,10 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) // return to BG master SetMapId(fields[36].GetUInt32()); Relocate(fields[37].GetFloat(),fields[38].GetFloat(),fields[39].GetFloat(),fields[40].GetFloat()); + // check entry point and fix to homebind if need - if(!IsPositionValid()) + mapEntry = sMapStore.LookupEntry(GetMapId()); + if(!mapEntry || mapEntry->IsBattleGroundOrArena() || !IsPositionValid()) RelocateToHomebind(); } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7beb04f0c5e..7b7bc6e7cf7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7260" + #define REVISION_NR "7261" #endif // __REVISION_NR_H__ |