示例#1
0
 private void OnChatMessage(object sender, ChatMessageEventArgs e)
 {
     if (!PlayerHId.Contains(e.Username) && e.Username != Client.Avatar.Username)
     {
         Client.SendChatMessage(string.Format("{0}, {1}.", MessagePrefix, e.Username));
         PlayerHId.Add(e.Username);
     }
 }
示例#2
0
        private static void OnChatMessage(object sender, ChatMessageEventArgs e)
        {
            //TODO: Give flexibilty for plugin dev to remove this.
            if (e.ClanName == null) Console.WriteLine("<[Lvl:{0}]{1}>: {2}", e.Packet.Level, e.Username, e.Message);
            else
            {
                Console.Write("<[");
                Console.ForegroundColor = ConsoleColor.DarkMagenta;
                Console.Write(e.ClanName);
                Console.ResetColor();
                Console.Write("][Lvl:{0}]", e.Packet.Level);
                Console.WriteLine("{0}>: {1}", e.Username, e.Message);

            }
        }
示例#3
0
 protected internal virtual void OnChatMessage(ChatMessageEventArgs e)
 {
     if (ChatMessage != null)
         ChatMessage(this, e);
 }