コード例 #1
0
 private void Out(string message)
 {
     CreatureSpeechPacket.Send(
         client,
         "",
         0,
         message,
         SpeechType.ChannelYellow,
         ChatChannel.Custom);
 }
コード例 #2
0
        public void SendChannelSpeech(string sender, SpeechType type, ChatChannel channelId, string message)
        {
            NetworkMessage outMessage = new NetworkMessage();

            CreatureSpeechPacket.Add(
                outMessage,
                sender,
                1,
                type,
                message,
                null,
                channelId,
                0
                );
            Send(outMessage);
        }
コード例 #3
0
        public void SendCreatureSpeech(Creature creature, SpeechType speechType, string message)
        {
            NetworkMessage outMessage = new NetworkMessage();

            CreatureSpeechPacket.Add(
                outMessage,
                creature.Name,
                1,
                speechType,
                message,
                creature.Tile.Location,
                ChatChannel.None,
                0000
                );
            Send(outMessage);
        }
コード例 #4
0
        bool ReceivedPlayerSpeechOutgoingPacket(OutgoingPacket packet)
        {
            PlayerSpeechPacket p = (PlayerSpeechPacket)packet;

            if (p.SpeechType == SpeechType.ChannelYellow &&
                p.ChannelId == ChatChannel.Custom)
            {
                CreatureSpeechPacket.Send(
                    client,
                    "$",
                    0,
                    p.Message,
                    SpeechType.ChannelOrange,
                    ChatChannel.Custom);
                Out(p.Message);
                return(false);
            }
            else
            {
                return(true);
            }
        }