예제 #1
0
        /// <summary>
        /// Handler for the TALK_OPEN packet (sent in response to party messages)
        /// </summary>
        public static void TalkOpen(Packet pkt)
        {
            short  from    = pkt.GetShort();
            string message = EOChatRenderer.Filter(pkt.GetBreakString(), false);

            if (message != null)
            {
                World.Instance.ActiveMapRenderer.RenderChatMessage(TalkType.Party, from, message);                 //TODO: check that the icons/color don't need to be changed
            }
        }
예제 #2
0
        /// <summary>
        /// Handler for the TALK_MESSAGE packet (sent in response to global messages)
        /// </summary>
        public static void TalkMessage(Packet pkt)
        {
            string from = pkt.GetBreakString();

            from = from.Substring(0, 1).ToUpper() + from.Substring(1).ToLower();
            string message = EOChatRenderer.Filter(pkt.GetBreakString(), false);

            if (message != null)
            {
                EOGame.Instance.Hud.AddChat(ChatTabs.Global, from, message, ChatType.GlobalAnnounce);
            }
        }
예제 #3
0
        /// <summary>
        /// Handler for the TALK_REQUEST packet (sent in response to guild messages)
        /// </summary>
        public static void TalkRequest(Packet pkt)
        {
            string from = pkt.GetBreakString();

            from = from.Substring(0, 1).ToUpper() + from.Substring(1).ToLower();
            string message = EOChatRenderer.Filter(pkt.GetBreakString(), false);

            if (message != null)
            {
                EOGame.Instance.Hud.AddChat(ChatTabs.Group, from, message);                 //TODO: check that the icons/color don't need to be changed
            }
        }
예제 #4
0
        /// <summary>
        /// Handler for the TALK_TELL packet (sent in response to PM messages)
        /// </summary>
        public static void TalkTell(Packet pkt)
        {
            string from = pkt.GetBreakString();

            from = from.Substring(0, 1).ToUpper() + from.Substring(1).ToLower();
            string message = EOChatRenderer.Filter(pkt.GetBreakString(), false);

            if (message != null)
            {
                EOGame.Instance.Hud.AddChat(ChatTabs.Local, from, message, ChatType.Note, ChatColor.PM);
                ChatTabs tab = EOGame.Instance.Hud.GetPrivateChatTab(from);
                if (tab != ChatTabs.None)
                {
                    EOGame.Instance.Hud.AddChat(tab, from, message, ChatType.Note);
                }
            }
        }