/// <summary> /// Adds the faction netcon link if it's not already there. /// </summary> /// <param name="faction">Faction.</param> /// <param name="netCon">Net con.</param> private void AddFactionNetconLink(Entity faction, NetConnection netCon) { if (!_connectedFactions.ContainsKey(netCon)) { _connectedFactions.Add(netCon, faction.Guid); } else { _connectedFactions[netCon] = faction.Guid; } if (!FactionConnections.ContainsKey(faction.Guid)) { FactionConnections.Add(faction.Guid, new List <NetConnection>()); } if (!FactionConnections[faction.Guid].Contains(netCon)) { FactionConnections[faction.Guid].Add(netCon); } if (!FactionEntityListners.ContainsKey(faction.Guid)) { FactionEntityListners[faction.Guid] = new NetEntityChangeListner(Game.GlobalManager, faction); } }