mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
Merge commit 'origin/master' into 320
Conflicts: src/game/Map.cpp src/game/MapInstanced.cpp src/game/Player.cpp src/game/SpellEffects.cpp src/game/Totem.cpp
This commit is contained in:
commit
1a47420fe8
43 changed files with 1208 additions and 714 deletions
|
|
@ -65,18 +65,17 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
|||
GetPlayer()->SetSemaphoreTeleportFar(false);
|
||||
|
||||
// relocate the player to the teleport destination
|
||||
GetPlayer()->SetMapId(loc.mapid);
|
||||
GetPlayer()->SetMap(MapManager::Instance().CreateMap(loc.mapid, GetPlayer())); GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
|
||||
GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
|
||||
|
||||
// since the MapId is set before the GetInstance call, the InstanceId must be set to 0
|
||||
// to let GetInstance() determine the proper InstanceId based on the player's binds
|
||||
GetPlayer()->SetInstanceId(0);
|
||||
|
||||
GetPlayer()->SendInitialPacketsBeforeAddToMap();
|
||||
// the CanEnter checks are done in TeleporTo but conditions may change
|
||||
// while the player is in transit, for example the map may get full
|
||||
if(!GetPlayer()->GetMap()->Add(GetPlayer()))
|
||||
{
|
||||
//if player wasn't added to map, reset his map pointer!
|
||||
GetPlayer()->ResetMap();
|
||||
|
||||
sLog.outDebug("WORLD: teleport of player %s (%d) to location %d, %f, %f, %f, %f failed", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
|
||||
// teleport the player home
|
||||
if(!GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue