diff options
author | QAston <none@none> | 2010-01-30 13:22:55 +0100 |
---|---|---|
committer | QAston <none@none> | 2010-01-30 13:22:55 +0100 |
commit | f587fd14af2eac97ae916ca3c1ab4efe700eee1b (patch) | |
tree | 4d674d6bf5fddba6a17cb9812c6191d890cc9dd9 /src/game/QueryHandler.cpp | |
parent | 23f589efa3caf01de0ad04d092e782ef5f349ee6 (diff) |
*Fix second crash in the opcode handler.
--HG--
branch : trunk
Diffstat (limited to 'src/game/QueryHandler.cpp')
-rw-r--r-- | src/game/QueryHandler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index 010fda345bc..849388575c5 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -479,7 +479,8 @@ void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data ) { float mx, my; bool entranceFound = corpseMapEntry->GetEntrancePos(mapId, mx, my); - assert(entranceFound); + if (!entranceFound) + return; Map const * newMap = MapManager::Instance().CreateBaseMap(mapId); uint32 zoneId = newMap->GetZoneId(mx, my, 0); @@ -509,14 +510,15 @@ void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data ) if (!ClosestGrave) return; - uint32 zoneId = corpse->GetZoneId(); + float x = corpse->GetPositionX(); + float y = corpse->GetPositionY(); + + Map const * newMap = MapManager::Instance().CreateBaseMap(mapId); + uint32 zoneId = newMap->GetZoneId(x, y, 0); float gx = ClosestGrave->x; float gy = ClosestGrave->y; Map2ZoneCoordinates(gx, gy, zoneId); - - float x = corpse->GetPositionX(); - float y = corpse->GetPositionY(); Map2ZoneCoordinates(x, y, zoneId); cx = x - gx; |