private void BroadcastTableUpdate(int id, string str) { if (_network.IsClient) { return; } var message = _network.CreateNetMessage <MsgStringTableEntry>(); message.EntryId = id; message.EntryString = str; _network.ServerSendToAll(message); }
/// <summary> /// Event handler for when a tile is modified in the MapManager. /// </summary> /// <param name="gridId">The id of the grid being modified.</param> /// <param name="tileRef">A reference to the new tile.</param> /// <param name="oldTile">The old tile being modified.</param> private void MapMgrOnTileChanged(int gridId, TileRef tileRef, Tile oldTile) { Debug.Assert(_netManager.IsServer, "Why is the client calling this?"); var message = _netManager.CreateNetMessage <MsgMap>(); message.MessageType = MapMessage.TurfUpdate; message.SingleTurf = new MsgMap.Turf { X = tileRef.X, Y = tileRef.Y, Tile = (uint)tileRef.Tile }; _netManager.ServerSendToAll(message); }
private void BroadcastTableUpdate(int id, string str) { if (_network.IsClient) { return; } if (!_network.IsRunning) { return; } var message = _network.CreateNetMessage <MsgStringTableEntries>(); message.Entries = new MsgStringTableEntries.Entry[1]; message.Entries[0].Id = id; message.Entries[0].String = str; _network.ServerSendToAll(message); }