public void UpdateKey(string key, string value, GameSaveKeyType kind) { foreach (ServerPlayerKey temp in _keys) if (temp.key.Equals(key)) { temp.value = value; return; } ServerPlayerKey newkey = new ServerPlayerKey(); newkey.key = key; newkey.value = value; newkey.kind = kind; _keys.Add(newkey); }
public void ReceiveKeys(ServerMessage msg, GameSaveKeyType kind) { int count = msg.ReadWord(); while (count>0) { string key = msg.ReadString(); string value = msg.ReadString(); //Value := DecompressBinaryData(Value); this.UpdateKey(key, value, kind); count--; } }