using FL.Data; using XGame.Framework.Network; namespace FL.Network { public class MailListPushCtrl : MsgController { protected override void OnProcess(MailListPush message, object context) { for (int i = 0; i < message.mail_list.Count; i++) { if (MailData.Instance.mailInfo == null) { MailData.Instance.mailInfo = message.mail_list; break; } bool hasMail = false; for (global::System.Int32 j = 0; j < MailData.Instance.mailInfo.Count; j++) { if (message.mail_list[i].id == MailData.Instance.mailInfo[j].id) { MailData.Instance.mailInfo[j] = message.mail_list[i]; hasMail = true; break; } } if (!hasMail) { MailData.Instance.mailInfo.Add(message.mail_list[i]); } } //MailData.Instance.mailInfo = message.mail_list; } } }