protected override void OnRequest(request_player_plan_report request, object userdata) { planParam param = userdata as planParam; request.planid = param.planid; }
private void OnBtnClick(GameObject gameObj) { if (PlayerPlanModule.MIN_PLAN_NUM > int.Parse(gameObj.name) || PlayerPlanModule.MAX_PLAN_NUM < int.Parse(gameObj.name)) { return; } PlanUnitUI plan = null; foreach (var item in Pdm.mItemDic) { if (item.Key == int.Parse(gameObj.name)) { plan = item.Value; break; } } if (null == plan) { return; } PlayerPlanModule.BUTTON_STATE state = PlayerPlanModule.BUTTON_STATE.Invalid; foreach (var item in Pdata.mPlanData.mDataDic) { if (item.Key == int.Parse(gameObj.name)) { state = item.Value.state; break; } } switch (state) { case PlayerPlanModule.BUTTON_STATE.Have_noliqu: { int num = Pdm.getWeek(); if (0 == num) { num = 7; } int objnum = int.Parse(gameObj.name) % 7; if (0 == objnum) { objnum = 7; } if (num < objnum) //不发送消息 { PopTipManager.Instance.AddNewTip(StringHelper.GetString("time_enough", FontColor.Red)); return; } planParam param = new planParam(); param.planid = int.Parse(gameObj.name); Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_PLAYER_PLAN_STAGE, param); } break; default: break; } }