mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11137] Fixed crash at reset normal dungeon while map loaded.
* Map Persistent noe have direct pointer back to map if map loaded. That let simplify some code and avoid map search. * Crash showup in result changes in code logic related to reset processing. * Also fix more old bug with reset normal dungeon with not loaded map. * Reverse MapPersistentState::HasRespawnTimes and MapPersistentState::HasBounds() results to expected for function names and update related calls. Thanks to Schmoozerd for help in research problem.
This commit is contained in:
parent
5858aae4d9
commit
47060fe4b1
5 changed files with 30 additions and 23 deletions
|
|
@ -47,7 +47,7 @@ Map::~Map()
|
|||
sWorld.DecreaseScheduledScriptCount(m_scriptSchedule.size());
|
||||
|
||||
if (m_persistentState)
|
||||
m_persistentState->SetUsedByMapState(false); // field pointer can be deleted after this
|
||||
m_persistentState->SetUsedByMapState(NULL); // field pointer can be deleted after this
|
||||
|
||||
if(i_data)
|
||||
{
|
||||
|
|
@ -96,7 +96,7 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode)
|
|||
m_TerrainData->AddRef();
|
||||
|
||||
m_persistentState = sMapPersistentStateMgr.AddPersistentState(i_mapEntry, GetInstanceId(), GetDifficulty(), 0, IsDungeon());
|
||||
m_persistentState->SetUsedByMapState(true);
|
||||
m_persistentState->SetUsedByMapState(this);
|
||||
}
|
||||
|
||||
void Map::InitVisibilityDistance()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue