public void OnBackDominateRouteEnd(GameEvent ge, EventParameter param) { MsgData_sBackDominateRouteEnd data = param.msgParameter as MsgData_sBackDominateRouteEnd; Stagevo stage = GetStagevo(EnterId); if (stage != null) { stage.Evaluate = data.level; } }
public void OnDominateRouteUpDate(GameEvent ge, EventParameter param) { MsgData_sDominateRouteUpDate data = param.msgParameter as MsgData_sDominateRouteUpDate; Stagevo v = GetStagevo(data.id); if (v != null) { v.Num = data.num; v.State = data.state; v.TimeNum = data.time; v.RewardType = data.rewardType; //计算总次数 int total = 0; foreach (KeyValuePair <int, Stagevo> item in mStage) { total = total + item.Value.Num; } enterNum = total; } }
//副本信息 public void UpdateStagevo(MsgData_sStagevo item) { Stagevo v = new Stagevo(); v.Num = item.Num; v.ID = item.ID; v.State = item.State; v.TimeNum = item.TimeNum; v.MaxNum = item.MaxNum; v.Evaluate = item.Evaluate; v.RewardType = item.RewardType; if (mStage.ContainsKey(v.ID)) { mStage[v.ID] = v; } else { mStage.Add(v.ID, v); } }
public Stagevo GetStagevo(int id) { Stagevo v = null; if (mStage.ContainsKey(id)) { v = mStage[id]; } else { v = new Stagevo(); v.Num = 0; v.ID = id; v.State = 0; v.TimeNum = 0; v.MaxNum = 0; v.Evaluate = 0; v.RewardType = 0; mStage[id] = v; } return(v); }