// 处理领取附件成功 public void OnCollectAttachment(uint mailId) { if (mailId == 0) { Engine.Utility.Log.Error("OnCollectAttachment----邮件ID=0非法!"); return; } int index = 0; for (int i = 0; i < MailList.Count; i++) { if (MailList[i].mailid == mailId) { index = i; MailList[i].state = 2; MailList[i].item.Clear(); MailList[i].sendMoney.Clear(); } } //所有到这一步的邮件都可以视为已经提取 Client.stMailStateChange msc = new Client.stMailStateChange(); msc.mailid = mailId; msc.index = index; Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.MAIL_STATECHANGE, msc); if (m_bCollectAll) { CollectNextMailAttachment(); } }
void EventCallBack(int nEventID, object param) { if (nEventID == (int)Client.GameEventID.MAIL_ADDNEWMAIL) { UpdateApplyRedPoint(FriendPanelPageEnum.Page_邮箱); } else if (nEventID == (int)Client.GameEventID.MAIL_STATECHANGENOATTACH) { Client.stMailStateChangeNoAttach mscna = (Client.stMailStateChangeNoAttach)param; if (mscna.mailid != 0) { ResReadMail((uint)MailType.NoteMail, mscna.mailid, mscna.index); UpdateApplyRedPoint(FriendPanelPageEnum.Page_邮箱); } } else if (nEventID == (int)Client.GameEventID.MAIL_STATECHANGE) { Client.stMailStateChange msc = (Client.stMailStateChange)param; if (msc.mailid != 0) { ResReadMail((uint)MailType.ItemMail, msc.mailid, msc.index); GetItemFinish(); UpdateApplyRedPoint(FriendPanelPageEnum.Page_邮箱); } } else if (nEventID == (int)Client.GameEventID.FRIEND_ADDNEWMSG) { UpdateApplyRedPoint(FriendPanelPageEnum.Page_最近); } }