| | |
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AncientRobotName, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AuctionBidding, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.RandomChat, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.TaskFeedback, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.MyFightPoint, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.MyReikiRoot, this);
|
| | | }
|
| | |
|
| | | public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case RichTextEventEnum.TaskFeedback:
|
| | | {
|
| | | if (href.mSplits.ContainsKey("taskfeedback"))
|
| | | {
|
| | | var taskId = 0;
|
| | | int.TryParse(href.mSplits["taskfeedback"], out taskId);
|
| | |
|
| | | TaskFeedback feedback;
|
| | | var feedbackModel = ModelCenter.Instance.GetModel<TaskFeedbackModel>();
|
| | | if (feedbackModel.TryGetTaskFeedback(taskId, out feedback))
|
| | | {
|
| | | feedbackModel.ExecuteTaskFeedback(taskId);
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case RichTextEventEnum.MyFightPoint:
|
| | | {
|
| | | var colorType = 0;
|
| | | if (RichTextMgr.Inst.presentRichText != null)
|
| | | {
|
| | | colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
|
| | | }
|
| | | var fightPoint = PlayerDatas.Instance.baseData.FightPoint;
|
| | | var targetValue = int.Parse(dic["myfightpoint"]);
|
| | | if (fightPoint < targetValue)
|
| | | {
|
| | | var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
|
| | | return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(label, fightPoint, "/", targetValue), colorType == 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | var label = dic.ContainsKey("replacelabel2") ? dic["replacelabel2"] : string.Empty;
|
| | | return UIHelper.AppendColor(TextColType.Green, label, colorType == 1);
|
| | | }
|
| | | }
|
| | | case RichTextEventEnum.MyReikiRoot:
|
| | | {
|
| | | var colorType = 0;
|
| | | if (RichTextMgr.Inst.presentRichText != null)
|
| | | {
|
| | | colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
|
| | | }
|
| | | var reikiRootModel = ModelCenter.Instance.GetModel<ReikiRootModel>();
|
| | | var point = reikiRootModel.GetReikiRootTotalPoint();
|
| | | var targetValue = int.Parse(dic["myreikiroot"]);
|
| | | if (point < targetValue)
|
| | | {
|
| | | var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
|
| | | return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(label, point, "/", targetValue), colorType == 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | var label = dic.ContainsKey("replacelabel2") ? dic["replacelabel2"] : string.Empty;
|
| | | return UIHelper.AppendColor(TextColType.Green, label, colorType == 1);
|
| | | }
|
| | | }
|
| | | }
|
| | | return string.Empty;
|
| | | }
|