1234567891011121314151617181920212223242526272829303132333435 |
- using FL.Data;
- using XGame.Framework.Network;
- namespace FL.Network
- {
- public class MailListPushCtrl : MsgController<MailListPush>
- {
- 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;
- }
- }
- }
|