public void ResetMailList(CliProto.SC_MAIL_LIST_NTF msg) { m_MailList.Clear(); CliProto.SC_MAIL_LIST_NTF refMSG = msg; int iCount = refMSG.m_List.m_Count; for (int i = 0; i < iCount; i++) { UInt64 uuDBID = refMSG.m_List.m_Mails[i].m_UniqueID; if (uuDBID != UInt64.MaxValue) { HeaderProto.SMailDetail info = new HeaderProto.SMailDetail(); info.m_Type = refMSG.m_List.m_Mails[i].m_Type; /// 邮件类型.. info.m_UniqueID = refMSG.m_List.m_Mails[i].m_UniqueID; /// 邮件唯一id.. info.m_Money = refMSG.m_List.m_Mails[i].m_Money; /// 金钱.. info.m_SendTime = refMSG.m_List.m_Mails[i].m_SendTime; /// 发送时间.. info.m_ReadTime = refMSG.m_List.m_Mails[i].m_ReadTime; /// 阅读时间.. info.m_Sender = refMSG.m_List.m_Mails[i].m_Sender; /// 发件人姓名.. info.m_Receiver = refMSG.m_List.m_Mails[i].m_Receiver; /// 收件人姓名.. info.m_Title = refMSG.m_List.m_Mails[i].m_Title; /// 标题.. info.m_Content = refMSG.m_List.m_Mails[i].m_Content; /// 内容.. info.m_ItemCount = refMSG.m_List.m_Mails[i].m_ItemCount; /// 物品数量.. for (int j = 0; j < info.m_ItemCount; j++) { HeaderProto.SXITEM item = new HeaderProto.SXITEM(); info.m_Items[j] = item; info.m_Items[j].m_UID = refMSG.m_List.m_Mails[i].m_Items[j].m_UID; info.m_Items[j].m_TID = refMSG.m_List.m_Mails[i].m_Items[j].m_TID; info.m_Items[j].m_UP = refMSG.m_List.m_Mails[i].m_Items[j].m_UP; info.m_Items[j].m_CT = refMSG.m_List.m_Mails[i].m_Items[j].m_CT; info.m_Items[j].m_EXP = refMSG.m_List.m_Mails[i].m_Items[j].m_EXP; info.m_Items[j].m_LK = refMSG.m_List.m_Mails[i].m_Items[j].m_LK; info.m_Items[j].m_GEMCount = refMSG.m_List.m_Mails[i].m_Items[j].m_GEMCount; for (int k = 0; k < info.m_Items[j].m_GEMCount; k++) { HeaderProto.SXGEM gem = new HeaderProto.SXGEM(); info.m_Items[j].m_GEM[k] = gem; info.m_Items[j].m_GEM[k].m_TID = refMSG.m_List.m_Mails[i].m_Items[j].m_GEM[k].m_TID; } } m_MailList[uuDBID] = info; } } }
//邮件列表.. private static void msg_SC_MAIL_LIST_NTF(int iMsgID, ref CMessage msg) { CliProto.SC_MAIL_LIST_NTF refMsg = (CliProto.SC_MAIL_LIST_NTF)msg; sdMailMgr.Instance.ResetMailList(refMsg); sdMailMgr.Instance.ResetMailNeedFlash(); GameObject wnd = sdGameLevel.instance.NGUIRoot; if (wnd) { sdUIMailWnd uiWnd = wnd.GetComponentInChildren <sdUIMailWnd>(); if (uiWnd) { uiWnd.RefreshMailList(); } } }