public uint Execute(PacketDistributed ipacket) { GC_MASTER_RET_INFO packet = (GC_MASTER_RET_INFO)ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } // bool bReShowTab = false; // bool bReserveMember = false; // if (GameManager.gameManager.PlayerDataPool.MasterInfo.IsValid() == false) // { // bReShowTab = true; // } // else // { // if (GameManager.gameManager.PlayerDataPool.IsMasterReserveMember()) // { // bReserveMember = true; // } // } // // if (GameManager.gameManager.PlayerDataPool.MasterInfo != null) // { // GameManager.gameManager.PlayerDataPool.MasterInfo.UpdateData(packet); // } // // //之前是待审批成员 这次更新之后不是了 刷新界面 // if (bReserveMember && GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == false) // { // bReShowTab = true; // } // // if (bReShowTab) // { // if (MasterWindow.Instance()) // { // MasterWindow.Instance().ShowTab(); // } // } // // if (GUIData.delMasterDataUpdate != null) // { // GUIData.delMasterDataUpdate(); // } // // if (MenuBarLogic.Instance()) // { // MenuBarLogic.Instance().UpdateGuildAndMasterReserveMember(); // } // if (SkillRootLogic.Instance()) // { // SkillRootLogic.Instance().UpdateSkillInfo(); // } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void UpdateData(GC_MASTER_RET_INFO info) { //清空之前的数据 CleanUp(); //判断消息包数据合法性 if (info == null || info.MasterGuid == GlobeVar.INVALID_GUID) { return; } //填充数据 MasterGuid = info.MasterGuid; MasterName = info.MasterName; MasterChiefGuid = info.MasterChiefGuid; MasterTorch = info.MasterTorch; MasterNotice = info.MasterNotice; MasterOnlineNum = info.MemberNum; m_MasterCreateTime = info.CreateTime; //技能 if (info.Masterskill1 >= 0) { m_MasterSkillList.Add(info.Masterskill1, info.Masterskillname1); } if (info.Masterskill2 >= 0) { m_MasterSkillList.Add(info.Masterskill2, info.Masterskillname2); } if (info.Masterskill3 >= 0) { m_MasterSkillList.Add(info.Masterskill3, info.Masterskillname3); } if (info.Masterskill4 >= 0) { m_MasterSkillList.Add(info.Masterskill4, info.Masterskillname4); } if (info.Masterskill5 >= 0) { m_MasterSkillList.Add(info.Masterskill5, info.Masterskillname5); } if (info.Masterskill6 >= 0) { m_MasterSkillList.Add(info.Masterskill6, info.Masterskillname6); } //成员 for (int i = 0; i < info.memberGuidCount; ++i) { MasterMember member = new MasterMember(); member.CleanUp(); member.Guid = info.GetMemberGuid(i); if (info.memberNameCount > i) { member.MemberName = info.GetMemberName(i); } if (info.memberVIPCount > i) { member.VIP = info.GetMemberVIP(i); } if (info.memberGuildNameCount > i) { member.GuildName = info.GetMemberGuildName(i); } if (info.memberLevelCount > i) { member.Level = info.GetMemberLevel(i); } if (info.memberCombatValueCount > i) { member.CombatValue = info.GetMemberCombatValue(i); } if (info.memberTorchCount > i) { member.Torch = info.GetMemberTorch(i); } if (info.memberLastLoginCount > i) { member.LastLogin = info.GetMemberLastLogin(i); } if (info.memberProfCount > i) { member.Profession = info.GetMemberProf(i); } if (info.memberStateCount > i) { member.State = info.GetMemberState(i); } if (info.memberIsReserveCount > i) { member.IsReserve = info.GetMemberIsReserve(i); } if (member.Guid == m_MasterChiefGuid) { //掌门姓名 m_MasterChiefName = member.MemberName; } if (member.IsValid()) { if (member.IsReserveMember()) { MasterReserveMemberList.Add(member.Guid, member); } else { MasterMemberList.Add(member.Guid, member); } } } m_MasterMemberNum = MasterMemberList.Count; //按照薪火排序 SortMemberListByTorch(m_MasterMemberList); if (ChatInfoLogic.Instance() != null) { ChatInfoLogic.Instance().UpdateMasterChannel(); ChatInfoLogic.Instance().UpdateSpeakerList_Master(); } }