示例#1
0
文件: Player.cs 项目: trjate/Infantry
        /// <summary>
        /// Like the above, but sends messages to multiple players
        /// </summary>
        static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat)
        {               //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = chat.chatType;

            schat.from    = from._alias;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                if (player == from)
                {
                    continue;
                }
                if (from != null)
                {
                    if (player._accountIgnore.ContainsKey(from._alias))
                    {
                        continue;
                    }
                    if (player._accountIgnore.ContainsValue(from._ipAddress))
                    {
                        continue;
                    }
                }
                player._client.sendReliable(schat);
            }
        }
示例#2
0
        /// <summary>
        /// Provides an easy means of routing chat messages between players
        /// </summary>
        static public void Player_RouteChat(Player p, SC_PrivateChat <Data.Database> pkt)
        {       //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.PrivateChat;
            schat.message  = pkt.message;
            schat.from     = pkt.from;

            //Go!
            p._client.sendReliable(schat);
        }
示例#3
0
        ///////////////////////////////////////////////////
        // Member Functions
        //////////////////////////////////////////////////
        /// <summary>
        /// Sends arena messages to a player
        /// </summary>
        static public void Social_ArenaChat(Player target, string message, int bong)
        {               //Prepare the chat packet
            SC_Chat chat = new SC_Chat();

            chat.bong     = (byte)bong;
            chat.chatType = Chat_Type.Arena;
            chat.message  = message;
            chat.from     = "";

            //Send it
            target._client.sendReliable(chat);
        }
示例#4
0
        /// <summary>
        /// Provides an easy means of routing chat messages between players
        /// </summary>
        static public void Player_RouteChat(Player p, Player from, SC_Whisper <Data.Database> chat)
        {       //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.Whisper;

            schat.from    = chat.from;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            p._client.sendReliable(schat);
        }
示例#5
0
        /// <summary>
        /// Provides an easy means of routing chat messages between players
        /// </summary>
        static public void Player_RouteChat(Player p, Player from, CS_Chat chat)
        {               //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = chat.chatType;

            schat.from    = from._alias;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            p._client.sendReliable(schat);
        }
示例#6
0
文件: Player.cs 项目: trjate/Infantry
        static public void Player_RouteChatRaw(Player p, string from, string message, byte bong)
        {
            //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.Whisper;

            schat.from    = from;
            schat.message = message;
            schat.bong    = bong;

            //Go!
            p._client.sendReliable(schat);
        }
示例#7
0
        /// <summary>
        /// Sends arena messages to players
        /// </summary>
        static public void Social_ArenaChat(IChatTarget a, string message, int bong)
        {               //Prepare the chat packet
            SC_Chat chat = new SC_Chat();

            chat.bong     = (byte)bong;
            chat.chatType = Chat_Type.Arena;
            chat.message  = message;
            chat.from     = "";

            //Send it to all arena participants
            foreach (Player player in a.getChatTargets())
            {
                player._client.sendReliable(chat);
            }
        }
示例#8
0
文件: Player.cs 项目: trjate/Infantry
        static public void Player_RouteChatRaw(IChatTarget target, String from, string message, byte bong, Chat_Type chatType)
        {
            SC_Chat schat = new SC_Chat();

            schat.chatType = chatType;

            schat.from    = from;
            schat.message = message;
            schat.bong    = bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                player._client.sendReliable(schat);
            }
        }
示例#9
0
文件: Player.cs 项目: trjate/Infantry
        /// <summary>
        /// Provides an easy means of routing chat messages between players
        /// </summary>
        static public void Player_RouteChat(Player p, SC_PrivateChat <Data.Database> pkt)
        {
            //We ignoring them?
            if (!String.IsNullOrWhiteSpace(pkt.from) && p._accountIgnore.ContainsKey(pkt.from))
            {
                return;
            }

            //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.PrivateChat;
            schat.message  = pkt.message;
            schat.from     = pkt.from;

            //Go!
            p._client.sendReliable(schat);
        }
示例#10
0
        /// <summary>
        /// Like the above, but sends messages to multiple players
        /// </summary>
        static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat)
        {               //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = chat.chatType;

            schat.from    = from._alias;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                if (player != from)
                {
                    player._client.sendReliable(schat);
                }
            }
        }
示例#11
0
        ///////////////////////////////////////////////////
        // Member Functions
        //////////////////////////////////////////////////
        /// <summary>
        /// Sends arena messages to a player
        /// </summary>
        static public void Social_ArenaChat(Arena target, string chat, string from, string message)
        {       //Prepare the chat packet
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.PrivateChat;
            schat.message  = chat + ":" + message;
            schat.from     = from;


            foreach (Player p in target.Players)
            {
                if (p._alias == from)
                {
                    continue;
                }

                p._client.sendReliable(schat);
            }
        }
示例#12
0
文件: Player.cs 项目: trjate/Infantry
        /// <summary>
        /// Provides an easy means of routing chat messages between players
        /// </summary>
        static public void Player_RouteChat(Player p, Player from, SC_Whisper <Data.Database> chat)
        {
            //We ignoring them?
            if (from != null)
            {
                if (p._accountIgnore.ContainsKey(from._alias) || p._accountIgnore.ContainsValue(from._ipAddress))
                {
                    return;
                }
            }

            //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = Chat_Type.Whisper;

            schat.from    = chat.from;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            p._client.sendReliable(schat);
        }