private void AddChatMsg(object sender, GameEventArgs e) { RefreshChatUIEventArgs ne = e as RefreshChatUIEventArgs; chatLst.Add(Constants.Color(ne.name + ":", TxtColor.Blue) + ne.chat); if (chatLst.Count > 12) { chatLst.RemoveAt(0); } if (GetWndState()) { RefreshUI(); } }
private void PshChat(object sender, GameEventArgs e) { OnReceiveSCPacketBaseEventArgs ne = e as OnReceiveSCPacketBaseEventArgs; if (ne.msgID != CMD.PshChat) { return; } PshChat pshChat = (PshChat)ne.scPacketBase; RefreshChatUIEventArgs eventArgs = ReferencePool.Acquire <RefreshChatUIEventArgs>(); eventArgs.Fill(pshChat.Name, pshChat.Chat); GameEntry.Event.Fire(this, eventArgs); }