mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7487] Avoid attempt use InstanceSave data for non-dungeons.
Also check map existance and correctness at instance data loading. Removed unused and totally bugged InstanceMap::GetResetTime.
This commit is contained in:
parent
b3490d3b74
commit
a7fd57cc74
6 changed files with 85 additions and 70 deletions
|
|
@ -2709,7 +2709,14 @@ void ObjectMgr::LoadGroups()
|
|||
}
|
||||
}
|
||||
|
||||
InstanceSave *save = sInstanceSaveManager.AddInstanceSave(fields[1].GetUInt32(), fields[2].GetUInt32(), fields[4].GetUInt8(), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true);
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt32());
|
||||
if(!mapEntry || !mapEntry->IsDungeon())
|
||||
{
|
||||
sLog.outErrorDb("Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt32());
|
||||
continue;
|
||||
}
|
||||
|
||||
InstanceSave *save = sInstanceSaveManager.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), fields[4].GetUInt8(), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true);
|
||||
group->BindToInstance(save, fields[3].GetBool(), true);
|
||||
}while( result->NextRow() );
|
||||
delete result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue