/// <summary> /// Send a message to the player /// </summary> /// <param name="msg">The message to send</param> private void SendMessage(string msg) { SMCharacter smc = new SlackMud().GetCharacter(this.UserID); if (smc != null) { smc.sendMessageToPlayer(msg); } }
public void SendMessageToAllPartyMembers(SMParty sp, string messageToSend) { // Send a message to all the party members to let them know that the person has left. foreach (SMPartyMember smpm in sp.PartyMembers) { // Find the character by their id SMCharacter smc = new SlackMud().GetCharacter(smpm.UserID); // If the character exists... if (smc != null) { // Replace the player character element with the actual character name messageToSend = messageToSend.Replace("{playercharacter", smpm.CharacterName); // ... Send the message to the player smc.sendMessageToPlayer(messageToSend); } } }