diff options
-rw-r--r-- | src/game/BattleGroundAV.cpp | 2 | ||||
-rw-r--r-- | src/game/MovementHandler.cpp | 3 | ||||
-rw-r--r-- | src/game/Player.cpp | 14 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index 34655a1d7bc..c6e319c37b5 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -1234,7 +1234,7 @@ bool BattleGroundAV::SetupBattleGround() return false; } -//spawn node-objects + //spawn node-objects for (uint8 i = BG_AV_NODES_FIRSTAID_STATION ; i < BG_AV_NODES_MAX; ++i) { if( i <= BG_AV_NODES_FROSTWOLF_HUT ) diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 85514353152..e41ad2c14b8 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -66,6 +66,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->SetSemaphoreTeleportFar(false); + Map * oldMap = GetPlayer()->GetMap(); // relocate the player to the teleport destination Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer(), 0); // the CanEnter checks are done in TeleporTo but conditions may change @@ -86,6 +87,8 @@ void WorldSession::HandleMoveWorldportAckOpcode() if(!GetPlayer()->GetMap()->Add(GetPlayer())) { sLog.outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid); + GetPlayer()->ResetMap(); + GetPlayer()->SetMap(oldMap); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); return; } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 2da613aab8e..1d0c9024412 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14656,7 +14656,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) else if (transGUID != 0) { // There are no transports on instances - assert (!instanceId); + instanceId = 0; m_movementInfo.t_x = fields[27].GetFloat(); m_movementInfo.t_y = fields[28].GetFloat(); @@ -14713,7 +14713,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) else if (!taxi_nodes.empty()) // Taxi Flight path loaded from db { // There are no flightpaths in instances - assert (!instanceId); + instanceId = 0; if(!m_taxi.LoadTaxiDestinationsFromString(taxi_nodes,GetTeam())) { @@ -18969,11 +18969,6 @@ void Player::SendInitialPacketsBeforeAddToMap() m_reputationMgr.SendInitialReputations(); m_achievementMgr.SendAllAchievementData(); - // update zone - uint32 newzone, newarea; - GetZoneAndAreaId(newzone,newarea); - UpdateZone(newzone,newarea); // also call SendInitWorldStates(); - SendEquipmentSetList(); data.Initialize(SMSG_LOGIN_SETTIMESPEED, 4 + 4 + 4); @@ -18985,6 +18980,11 @@ void Player::SendInitialPacketsBeforeAddToMap() void Player::SendInitialPacketsAfterAddToMap() { + // update zone + uint32 newzone, newarea; + GetZoneAndAreaId(newzone,newarea); + UpdateZone(newzone,newarea); // also call SendInitWorldStates(); + WorldPacket data(SMSG_TIME_SYNC_REQ, 4); // new 2.0.x, enable movement data << uint32(0x00000000); // on blizz it increments periodically GetSession()->SendPacket(&data); |