| | |
| | | get { return m_dailyModel ?? (m_dailyModel = ModelCenter.Instance.GetModel<DailyQuestModel>()); }
|
| | | }
|
| | |
|
| | | AwardExchangeModel exchangeModel { get { return ModelCenter.Instance.GetModel<AwardExchangeModel>(); } }
|
| | |
|
| | | public MailAllModel()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInit;
|
| | |
| | | if (mailModelDict.ContainsKey(mailModel.PackList[i].GUID))
|
| | | {
|
| | | MailInfo info = mailModelDict[mailModel.PackList[i].GUID];
|
| | | switch(GetMailType(info))
|
| | | string mailTitle = GetMailTitle(info);
|
| | | if(mailTitle.Contains("<gcode>"))
|
| | | {
|
| | | case "CodeRewardMail":
|
| | | WindowCenter.Instance.Open<ExchangeGetItemWin>();
|
| | | break;
|
| | | |
| | | exchangeModel.SetAwardExchangeModel(info.Items);
|
| | | }
|
| | | else if(GetMailType(info) == "CodeRewardMail")
|
| | | {
|
| | | exchangeModel.SetAwardExchangeModel(info.Items);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | mailTitleStr = mailTitleStr.Replace("<gcode>","");
|
| | | }
|
| | |
|
| | | public string GetMailType(MailInfo info)
|
| | |
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | public string GetMailTitle(MailInfo info)
|
| | | {
|
| | | if (smatch.IsMatch(info.Text))
|
| | | {
|
| | | Match match = smatch.Match(info.Text);
|
| | | MailConfig _mailModel = Config.Instance.Get<MailConfig>(match.Groups[1].Value);
|
| | | if (_mailModel != null)
|
| | | {
|
| | | return _mailModel.Title;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | string[] mailContentArray = info.Text.Split(new string[] { "<$_$>" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | if (mailContentArray.Length > 0)
|
| | | {
|
| | | return mailContentArray[1];
|
| | | }
|
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | StringBuilder todayDailySB = new StringBuilder();
|
| | | public string GetTodayDailyNotify(DateTime getTime)
|
| | | {
|