Core/Misc: Fixed thread-unsafe access to list of objects that should be spawned in a cell
Port From (https://github.com/TrinityCore/TrinityCore/commit/7b6589c1ecc159f6949c5535785fba79a04b2c4a)
This commit is contained in:
@@ -10376,16 +10376,15 @@ namespace Game
|
||||
{
|
||||
var key = (mapid, difficulty);
|
||||
|
||||
if (mapObjectGuidsStore.ContainsKey(key) && mapObjectGuidsStore[key].ContainsKey(cellid))
|
||||
return mapObjectGuidsStore[key][cellid];
|
||||
if (mapObjectGuidsStore.ContainsKey(key) && mapObjectGuidsStore[key].TryGetValue(cellid, out CellObjectGuids guids))
|
||||
return guids;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Dictionary<uint, CellObjectGuids> GetMapObjectGuids(uint mapid, Difficulty difficulty)
|
||||
{
|
||||
var key = (mapid, difficulty);
|
||||
return mapObjectGuidsStore.LookupByKey(key);
|
||||
return mapObjectGuidsStore.LookupByKey((mapid, difficulty));
|
||||
}
|
||||
|
||||
public PageText GetPageText(uint pageEntry)
|
||||
|
||||
Reference in New Issue
Block a user