/// <summary> /// 根据服务器信息 初始化设置面板 /// </summary> /// <param name="cmd"></param> public void OnInitLocation(stGetSkillSettingArenaUserCmd_S cmd) { List <SkillUsePos> posList = cmd.status_pos; //if (CurState == SkillSettingState.None) //{ // CurState = cmd.cur_status == 0 ? SkillSettingState.StateOne : SkillSettingState.StateTwo; //} CurState = (SkillSettingState)cmd.status; foreach (var userpos in posList) { uint status = userpos.status; if (userpos.status == (uint)SkillSettingState.StateOne) { stateOneDic.Clear(); foreach (var skillpos in userpos.skill_pos) { uint totalid = skillpos.skillid >> 16; uint level = skillpos.skillid & 0xffff; //ushort skillID = (ushort)( totalid >> 16 ); //ushort level = (ushort)totalid; if (!stateOneDic.ContainsKey((int)skillpos.index)) { stateOneDic.Add((int)skillpos.index, totalid); } else { stateOneDic[(int)skillpos.index] = totalid; } } } else if (userpos.status == (uint)SkillSettingState.StateTwo) { stateTwoDic.Clear(); foreach (var skillpos in userpos.skill_pos) { uint totalid = skillpos.skillid >> 16; //ushort skillID = (ushort)( totalid >> 16 ); //ushort level = (ushort)totalid; if (!stateTwoDic.ContainsKey((int)skillpos.index)) { stateTwoDic.Add((int)skillpos.index, totalid); } else { stateTwoDic[(int)skillpos.index] = totalid; } } } } // SetCurStateSkillList(); DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.ArenaSetSkillPanel); SetAllSettingItem(); // DataManager.Manager<UIPanelManager>().SendMsg(PanelID.SkillPanel, UIMsgID.eSkillBtnRefresh, null); }
public void OnGetArenaSetSkill(stGetSkillSettingArenaUserCmd_S cmd) { DataManager.Manager <ArenaSetSkillManager>().OnInitLocation(cmd); }