Fix few crashes while loading server.

This commit is contained in:
hondacrx
2021-02-04 20:24:46 -05:00
parent 4fae9757ea
commit eb8b62276e
4 changed files with 4 additions and 4 deletions
@@ -308,7 +308,7 @@ namespace Game.DataStorage
AreaTriggerSpawn spawn = new AreaTriggerSpawn();
spawn.SpawnId = spawnId;
spawn.Id = areaTriggerId;
spawn.Location.WorldRelocate(location);
spawn.Location = new WorldLocation(location);
spawn.PhaseUseFlags = templates.Read<byte>(8);
spawn.PhaseId = templates.Read<uint>(9);
@@ -199,7 +199,7 @@ namespace Game.Entities
public override bool Equals(object obj)
{
return Equals((AreaTriggerId)obj);
return this == (AreaTriggerId)obj;
}
public static bool operator ==(AreaTriggerId left, AreaTriggerId right)
+1 -1
View File
@@ -80,7 +80,7 @@ namespace Game.Maps
{
CellCoord cellCoord = i_cell.GetCellCoord();
SortedSet<ulong> areaTriggers = Global.AreaTriggerDataStorage.GetAreaTriggersForMapAndCell(i_map.GetId(), cellCoord.GetId());
if (areaTriggers.Empty())
if (areaTriggers == null)
return;
LoadHelper<AreaTrigger>(areaTriggers, cellCoord, ref i_areaTriggers, i_map);
@@ -515,7 +515,7 @@ namespace Game.Networking.Packets
}
//Structs
class BracketInfo
struct BracketInfo
{
public int PersonalRating;
public int Ranking;