mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +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
|
|
@ -43,7 +43,7 @@ INSTANTIATE_SINGLETON_1( InstanceSaveManager );
|
|||
|
||||
InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset)
|
||||
: m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId),
|
||||
m_difficulty(difficulty), m_canReset(canReset)
|
||||
m_difficulty(difficulty), m_canReset(canReset), m_usedByMap(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ void InstanceSave::DeleteFromDB()
|
|||
/* true if the instance save is still valid */
|
||||
bool InstanceSave::UnloadIfEmpty()
|
||||
{
|
||||
if(m_playerList.empty() && m_groupList.empty())
|
||||
if (m_playerList.empty() && m_groupList.empty() && !m_usedByMap)
|
||||
{
|
||||
sInstanceSaveMgr.RemoveInstanceSave(GetInstanceId());
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue