mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10114] Store associated InstanceSave for dungeon map in Map object
This commit is contained in:
parent
6f4481a591
commit
67a7892075
9 changed files with 89 additions and 62 deletions
|
|
@ -15213,12 +15213,14 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
}
|
||||
}
|
||||
|
||||
// NOW player must have valid map
|
||||
// player bounded instance saves loaded in _LoadBoundInstances, group versions at group loading
|
||||
InstanceSave* instanceSave = GetBoundInstanceSaveForSelfOrGroup(GetMapId());
|
||||
|
||||
// load the player's map here if it's not already loaded
|
||||
SetMap(sMapMgr.CreateMap(GetMapId(), this));
|
||||
|
||||
// if the player is in an instance and it has been reset in the meantime teleport him to the entrance
|
||||
if(GetInstanceId() && !sInstanceSaveMgr.GetInstanceSave(GetInstanceId()))
|
||||
if(GetInstanceId() && !instanceSave)
|
||||
{
|
||||
AreaTrigger const* at = sObjectMgr.GetMapEntranceTrigger(GetMapId());
|
||||
if(at)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue