mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
[7487] Avoid attempt use InstanceSave data for non-dungeons. Author: VladimirMangos
Also check map existance and correctness at instance data loading.
Removed unused and totally bugged InstanceMap::GetResetTime.
--HG--
branch : trunk
This commit is contained in:
@@ -2808,7 +2808,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;
|
||||
|
||||
Reference in New Issue
Block a user