/// <summary> /// Sends a textual informational message to a player /// </summary> /// <param name="msg">the message</param> /// <param name="includeObservers">if observers should be included</param> /// <param name="targetPlayers">explicit list of message targets, or null for everyone</param> public void SendGameInfoMessageToPlayer(ServerCharacterInfo toon, string msg) { PacketGameInfoNotification note = new PacketGameInfoNotification(); note.Message = msg; SendPacketToPlayer(toon, note); }
/// <summary> /// Sends a textual informational message to all players /// </summary> /// <param name="msg">the message</param> /// <param name="includeObservers">if observers should be included</param> /// <param name="targetPlayers">explicit list of message targets, or null for everyone</param> public void BroadcastGameInfoMessage(string msg, bool includeObservers) { PacketGameInfoNotification note = new PacketGameInfoNotification(); note.Message = msg; BroadcastToPlayersInGame(note, includeObservers); }
private void OnGameInfoNotification(INetworkConnection con, Packet msg) { PacketGameInfoNotification info = msg as PacketGameInfoNotification; if (info != null) { OnGameInfoNotification(con, info); } }
protected virtual void OnGameInfoNotification(INetworkConnection con, PacketGameInfoNotification msg) { Log.LogMsg(">>> Game Info Message: " + msg.Message); AddMessage(FormatString(GameStringType.SystemMessage, "-->" + msg.Message)); }