internal void SetHeaderWithGuid(ulong guid) { NodeMessageWithGuid header = m_NodeHeader as NodeMessageWithGuid; if (null == header) { header = new NodeMessageWithGuid(); m_NodeHeader = header; } header.m_Guid = guid; }
internal void SendWholeMail(MailInfo wholeMail, int validityPeriod) { wholeMail.m_MailGuid = GenMailGuid(); wholeMail.m_SendTime = DateTime.Now; wholeMail.m_ExpiryDate = wholeMail.m_SendTime.AddDays(validityPeriod); m_WholeMails.Add(wholeMail); NodeMessage newMailMsg = new NodeMessage(LobbyMessageDefine.Msg_LC_NotifyNewMail); NodeMessageWithGuid headerData = new NodeMessageWithGuid(); newMailMsg.m_NodeHeader = headerData; UserProcessScheduler dataProcess = UserServer.Instance.UserProcessScheduler; dataProcess.VisitUsers((UserInfo userInfo) => { headerData.m_Guid = userInfo.Guid; NodeMessageDispatcher.SendNodeMessage(userInfo.NodeName, newMailMsg); }); }