Exemplo n.º 1
0
        private void HeroSelectReconectBanStep(CSDT_RECONN_BANINFO banInfo)
        {
            Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");

            Singleton <CRoomSystem> .instance.SetRoomType(1);

            CSDT_CAMPINFO[] array = new CSDT_CAMPINFO[banInfo.astCampInfo.Length];
            for (int i = 0; i < banInfo.astCampInfo.Length; i++)
            {
                array[i]                   = new CSDT_CAMPINFO();
                array[i].dwPlayerNum       = banInfo.astCampInfo[i].dwPlayerNum;
                array[i].astCampPlayerInfo = new CSDT_CAMPPLAYERINFO[banInfo.astCampInfo[i].astCampPlayerInfo.Length];
                for (int j = 0; j < banInfo.astCampInfo[i].astCampPlayerInfo.Length; j++)
                {
                    array[i].astCampPlayerInfo[j] = banInfo.astCampInfo[i].astCampPlayerInfo[j];
                }
            }
            CHeroSelectBaseSystem.StartPvpHeroSelectSystem(banInfo.stDeskInfo, array, banInfo.stFreeHero, banInfo.stFreeHeroSymbol);
            Singleton <CHeroSelectBaseSystem> .instance.m_banPickStep = enBanPickStep.enBan;
            if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enBanPick)
            {
                MemberInfo masterMemberInfo = Singleton <CRoomSystem> .instance.roomInfo.GetMasterMemberInfo();

                if (masterMemberInfo == null)
                {
                    return;
                }
                Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_1, banInfo.stStateInfo.Camp1BanList);

                Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_2, banInfo.stStateInfo.Camp2BanList);

                Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState  = banInfo.stStateInfo.stCurState;
                Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stNextState = banInfo.stStateInfo.stNextState;
                Singleton <CHeroSelectBaseSystem> .instance.m_banHeroTeamMaxCount        = (int)banInfo.stStateInfo.bBanPosNum;
                Singleton <CHeroSelectBanPickSystem> .instance.InitMenu(false);

                Singleton <CHeroSelectBanPickSystem> .instance.RefreshAll();

                Singleton <CHeroSelectBanPickSystem> .instance.PlayStepTitleAnimation();

                Singleton <CHeroSelectBanPickSystem> .instance.PlayCurrentBgAnimation();

                if (Singleton <CHeroSelectBaseSystem> .instance.IsCurBanOrPickMember(masterMemberInfo))
                {
                    Utility.VibrateHelper();
                    Singleton <CSoundManager> .GetInstance().PostEvent("UI_MyTurn", null);

                    Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_3", null);
                }
                else if (Singleton <CHeroSelectBaseSystem> .instance.IsCurOpByCamp(masterMemberInfo))
                {
                    Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_2", null);
                }
                else if (masterMemberInfo.camp != COM_PLAYERCAMP.COM_PLAYERCAMP_MID)
                {
                    Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_1", null);
                }
                Singleton <CSoundManager> .GetInstance().PostEvent("Play_Music_BanPick", null);
            }
        }
Exemplo n.º 2
0
 private void InitPerformanceTest()
 {
     for (int i = 0; i < this.MessageRef.astCampInfo.Length; i++)
     {
         CSDT_CAMPINFO          csdt_campinfo = this.MessageRef.astCampInfo[i];
         COMDT_HERO_COMMON_INFO stCommonInfo  = csdt_campinfo.astCampPlayerInfo[0].stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo;
         uint   dwHeroID = stCommonInfo.dwHeroID;
         ushort wSkinID  = stCommonInfo.wSkinID;
         for (int j = 0; j < csdt_campinfo.dwPlayerNum; j++)
         {
             CSDT_CAMPPLAYERINFO csdt_campplayerinfo = csdt_campinfo.astCampPlayerInfo[j];
             if (csdt_campplayerinfo != null)
             {
                 for (int k = 0; k < csdt_campplayerinfo.stPlayerInfo.astChoiceHero.Length; k++)
                 {
                     COMDT_CHOICEHERO comdt_choicehero = csdt_campplayerinfo.stPlayerInfo.astChoiceHero[k];
                     if (comdt_choicehero != null)
                     {
                         comdt_choicehero.stBaseInfo.stCommonInfo.dwHeroID = dwHeroID;
                         comdt_choicehero.stBaseInfo.stCommonInfo.wSkinID  = wSkinID;
                     }
                 }
             }
         }
     }
 }
 private void InitPerformanceTest()
 {
     for (int i = 0; i < this.MessageRef.astCampInfo.Length; i++)
     {
         CSDT_CAMPINFO          cSDT_CAMPINFO = this.MessageRef.astCampInfo[i];
         COMDT_HERO_COMMON_INFO stCommonInfo  = cSDT_CAMPINFO.astCampPlayerInfo[0].stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo;
         uint   dwHeroID = stCommonInfo.dwHeroID;
         ushort wSkinID  = stCommonInfo.wSkinID;
         int    num      = 0;
         while ((long)num < (long)((ulong)cSDT_CAMPINFO.dwPlayerNum))
         {
             CSDT_CAMPPLAYERINFO cSDT_CAMPPLAYERINFO = cSDT_CAMPINFO.astCampPlayerInfo[num];
             if (cSDT_CAMPPLAYERINFO != null)
             {
                 for (int j = 0; j < cSDT_CAMPPLAYERINFO.stPlayerInfo.astChoiceHero.Length; j++)
                 {
                     COMDT_CHOICEHERO cOMDT_CHOICEHERO = cSDT_CAMPPLAYERINFO.stPlayerInfo.astChoiceHero[j];
                     if (cOMDT_CHOICEHERO != null)
                     {
                         cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwHeroID = dwHeroID;
                         cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.wSkinID  = wSkinID;
                     }
                 }
             }
             num++;
         }
     }
 }
Exemplo n.º 4
0
        private void HeroSelectReconectBanStep(CSDT_RECONN_BANINFO banInfo)
        {
            DebugHelper.CustomLog("HeroSelectReconectBanStep");
            Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");

            Singleton <CRoomSystem> .instance.SetRoomType(1);

            CSDT_CAMPINFO[] campInfo = new CSDT_CAMPINFO[banInfo.astCampInfo.Length];
            for (int i = 0; i < banInfo.astCampInfo.Length; i++)
            {
                campInfo[i]                   = new CSDT_CAMPINFO();
                campInfo[i].dwPlayerNum       = banInfo.astCampInfo[i].dwPlayerNum;
                campInfo[i].astCampPlayerInfo = new CSDT_CAMPPLAYERINFO[banInfo.astCampInfo[i].astCampPlayerInfo.Length];
                for (int j = 0; j < banInfo.astCampInfo[i].astCampPlayerInfo.Length; j++)
                {
                    campInfo[i].astCampPlayerInfo[j] = banInfo.astCampInfo[i].astCampPlayerInfo[j];
                }
            }
            CHeroSelectBaseSystem.StartPvpHeroSelectSystem(banInfo.stDeskInfo, campInfo, banInfo.stFreeHero, banInfo.stFreeHeroSymbol);
            Singleton <CHeroSelectBaseSystem> .instance.m_banPickStep = enBanPickStep.enBan;
            if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enBanPick)
            {
                MemberInfo masterMemberInfo = Singleton <CRoomSystem> .instance.roomInfo.GetMasterMemberInfo();

                if (masterMemberInfo != null)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.ClearBanHero();

                    Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_1, banInfo.stStateInfo.Camp1BanList);

                    Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_2, banInfo.stStateInfo.Camp2BanList);

                    Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState  = banInfo.stStateInfo.stCurState;
                    Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stNextState = banInfo.stStateInfo.stNextState;
                    Singleton <CHeroSelectBaseSystem> .instance.m_banHeroTeamMaxCount        = banInfo.stStateInfo.bBanPosNum;
                    Singleton <CHeroSelectBanPickSystem> .instance.InitMenu(false);

                    Singleton <CHeroSelectBanPickSystem> .instance.RefreshAll();

                    Singleton <CHeroSelectBanPickSystem> .instance.PlayStepTitleAnimation();

                    Singleton <CHeroSelectBanPickSystem> .instance.PlayCurrentBgAnimation();

                    MemberInfo memberInfo = Singleton <CHeroSelectBaseSystem> .instance.roomInfo.GetMemberInfo((COM_PLAYERCAMP)Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState.bCamp, Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState.bPos);

                    if (memberInfo != null)
                    {
                        if (masterMemberInfo == memberInfo)
                        {
                            Utility.VibrateHelper();
                            Singleton <CSoundManager> .GetInstance().PostEvent("UI_MyTurn", null);
                        }
                        Singleton <CSoundManager> .GetInstance().PostEvent("Play_Music_BanPick", null);
                    }
                }
            }
        }
Exemplo n.º 5
0
        private void BeginRecord(SCPKG_MULTGAME_BEGINLOAD beginLoadPkg)
        {
            this.ClearRecord();
            if (beginLoadPkg == null)
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            if (accountInfo == null)
            {
                return;
            }
            uint num = 0u;

            for (int i = 0; i < beginLoadPkg.astCampInfo.Length; i++)
            {
                CSDT_CAMPINFO cSDT_CAMPINFO = beginLoadPkg.astCampInfo[i];
                for (uint num2 = 0u; num2 < cSDT_CAMPINFO.dwPlayerNum; num2 += 1u)
                {
                    CSDT_CAMPPLAYERINFO cSDT_CAMPPLAYERINFO = cSDT_CAMPINFO.astCampPlayerInfo[(int)((UIntPtr)num2)];
                    if (Utility.UTF8Convert(cSDT_CAMPPLAYERINFO.szOpenID) == accountInfo.get_OpenId())
                    {
                        num = cSDT_CAMPPLAYERINFO.stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;
                        break;
                    }
                }
                if (num > 0u)
                {
                    break;
                }
            }
            if (num > 0u)
            {
                this.recordStream = new MemoryStream(1048576);
                this.recordWriter = new BinaryWriter(this.recordStream);
                this.recordWriter.Write(CVersion.GetAppVersion());
                this.recordWriter.Write(CVersion.GetUsedResourceVersion());
                this.recordWriter.Write(CVersion.GetRevisonNumber());
                this.recordWriter.Write(num);
                this.recordWriter.Write(DateTime.get_Now().get_Ticks());
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.bMapType);
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.dwMapId);
                this.recordWriter.Write(masterRoleInfo.Name);
                this.recordWriter.Write(masterRoleInfo.HeadUrl);
                this.recordWriter.Write(masterRoleInfo.m_rankGrade);
                this.recordWriter.Write(masterRoleInfo.m_rankClass);
            }
        }
Exemplo n.º 6
0
        private void BeginRecord(SCPKG_MULTGAME_BEGINLOAD beginLoadPkg)
        {
            this.ClearRecord();
            if (beginLoadPkg != null)
            {
                CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

                if (masterRoleInfo != null)
                {
                    ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

                    if (accountInfo != null)
                    {
                        uint dwHeroID = 0;
                        for (int i = 0; i < beginLoadPkg.astCampInfo.Length; i++)
                        {
                            CSDT_CAMPINFO csdt_campinfo = beginLoadPkg.astCampInfo[i];
                            for (uint j = 0; j < csdt_campinfo.dwPlayerNum; j++)
                            {
                                CSDT_CAMPPLAYERINFO csdt_campplayerinfo = csdt_campinfo.astCampPlayerInfo[j];
                                if (Utility.UTF8Convert(csdt_campplayerinfo.szOpenID) == accountInfo.OpenId)
                                {
                                    dwHeroID = csdt_campplayerinfo.stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;
                                    break;
                                }
                            }
                            if (dwHeroID > 0)
                            {
                                break;
                            }
                        }
                        if (dwHeroID > 0)
                        {
                            this.recordStream = new MemoryStream(0x100000);
                            this.recordWriter = new BinaryWriter(this.recordStream);
                            this.recordWriter.Write(CVersion.GetAppVersion());
                            this.recordWriter.Write(CVersion.GetUsedResourceVersion());
                            this.recordWriter.Write(dwHeroID);
                            this.recordWriter.Write(DateTime.Now.Ticks);
                            this.recordWriter.Write(beginLoadPkg.stDeskInfo.bMapType);
                            this.recordWriter.Write(beginLoadPkg.stDeskInfo.dwMapId);
                            this.recordWriter.Write(masterRoleInfo.Name);
                            this.recordWriter.Write(masterRoleInfo.HeadUrl);
                            this.recordWriter.Write(masterRoleInfo.m_rankGrade);
                            this.recordWriter.Write(masterRoleInfo.m_rankClass);
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
        public void SaveServerData()
        {
            Singleton <ActorDataCenter> .instance.ClearHeroServerData();

            if (this.MessageRef != null)
            {
                for (int i = 0; i < this.MessageRef.astCampInfo.Length; i++)
                {
                    CSDT_CAMPINFO csdt_campinfo = this.MessageRef.astCampInfo[i];
                    int           num2          = Mathf.Min(csdt_campinfo.astCampPlayerInfo.Length, (int)csdt_campinfo.dwPlayerNum);
                    for (int j = 0; j < num2; j++)
                    {
                        COMDT_PLAYERINFO stPlayerInfo = csdt_campinfo.astCampPlayerInfo[j].stPlayerInfo;
                        Singleton <ActorDataCenter> .instance.AddHeroesServerData(stPlayerInfo.dwObjId, stPlayerInfo.astChoiceHero);
                    }
                }
            }
        }
Exemplo n.º 8
0
        public void SaveServerData()
        {
            Singleton <ActorDataCenter> .get_instance().ClearHeroServerData();

            if (this.MessageRef == null)
            {
                return;
            }
            for (int i = 0; i < this.MessageRef.astCampInfo.Length; i++)
            {
                CSDT_CAMPINFO cSDT_CAMPINFO = this.MessageRef.astCampInfo[i];
                int           num           = Mathf.Min(cSDT_CAMPINFO.astCampPlayerInfo.Length, (int)cSDT_CAMPINFO.dwPlayerNum);
                for (int j = 0; j < num; j++)
                {
                    COMDT_PLAYERINFO stPlayerInfo = cSDT_CAMPINFO.astCampPlayerInfo[j].stPlayerInfo;
                    Singleton <ActorDataCenter> .get_instance().AddHeroesServerData(stPlayerInfo.dwObjId, stPlayerInfo.astChoiceHero);
                }
            }
        }
Exemplo n.º 9
0
        public void BuildMultiGamePlayers(SCPKG_MULTGAME_BEGINLOAD svrGameInfo)
        {
            if (Singleton <GamePlayerCenter> .get_instance().GetAllPlayers().get_Count() > 0)
            {
            }
            Singleton <GamePlayerCenter> .get_instance().ClearAllPlayers();

            uint num = 0u;

            for (int i = 0; i < 2; i++)
            {
                int num2 = 0;
                while ((long)num2 < (long)((ulong)svrGameInfo.astCampInfo[i].dwPlayerNum))
                {
                    uint   dwObjId = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.dwObjId;
                    Player player  = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(dwObjId);

                    DebugHelper.Assert(player == null, "你tm肯定在逗我");
                    if (num == 0u && i + 1 == 1)
                    {
                        num = dwObjId;
                    }
                    bool flag = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.bObjType == 2;
                    if (player == null)
                    {
                        string openId     = string.Empty;
                        uint   vipLv      = 0u;
                        int    honorId    = 0;
                        int    honorLevel = 0;
                        ulong  uid;
                        uint   logicWrold;
                        uint   level;
                        if (flag)
                        {
                            if (Convert.ToBoolean(svrGameInfo.stDeskInfo.bIsWarmBattle))
                            {
                                uid        = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfNpc().ullFakeUid;
                                logicWrold = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfNpc().dwFakeLogicWorldID;
                                level      = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfNpc().dwFakePvpLevel;
                                openId     = string.Empty;
                            }
                            else
                            {
                                uid        = 0uL;
                                logicWrold = 0u;
                                level      = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.dwLevel;
                                openId     = string.Empty;
                            }
                        }
                        else
                        {
                            uid        = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfAcnt().ullUid;
                            logicWrold = (uint)svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfAcnt().iLogicWorldID;
                            level      = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.dwLevel;
                            openId     = Utility.UTF8Convert(svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].szOpenID);
                            vipLv      = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfAcnt().stGameVip.dwCurLevel;
                            honorId    = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfAcnt().iHonorID;
                            honorLevel = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.stDetail.get_stPlayerOfAcnt().iHonorLevel;
                        }
                        player = Singleton <GamePlayerCenter> .GetInstance().AddPlayer(dwObjId, i + 1, (int)svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.bPosOfCamp, level, flag, Utility.UTF8Convert(svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.szName), 0, (int)logicWrold, uid, vipLv, openId, svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].dwGradeOfRank, svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].dwClassOfRank, honorId, honorLevel, null);

                        if (player != null)
                        {
                            player.isGM = (svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].bIsGM > 0);
                        }
                    }
                    for (int j = 0; j < svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.astChoiceHero.Length; j++)
                    {
                        COMDT_CHOICEHERO cOMDT_CHOICEHERO = svrGameInfo.astCampInfo[i].astCampPlayerInfo[num2].stPlayerInfo.astChoiceHero[j];
                        int dwHeroID = (int)cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwHeroID;
                        if (dwHeroID != 0)
                        {
                            bool arg_38B_0 = (cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwMaskBits & 4u) > 0u && (cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwMaskBits & 1u) == 0u;
                            if (player != null)
                            {
                                player.AddHero((uint)dwHeroID);
                            }
                        }
                    }
                    num2++;
                }
            }
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                Singleton <GamePlayerCenter> .GetInstance().SetHostPlayer(num);
            }
            else if (Singleton <GameReplayModule> .HasInstance() && Singleton <GameReplayModule> .get_instance().isReplay)
            {
                Singleton <GamePlayerCenter> .GetInstance().SetHostPlayer(num);
            }
            else
            {
                Player playerByUid = Singleton <GamePlayerCenter> .GetInstance().GetPlayerByUid(Singleton <CRoleInfoManager> .get_instance().masterUUID);

                DebugHelper.Assert(playerByUid != null, "load multi game but hostPlayer is null");
                Singleton <GamePlayerCenter> .GetInstance().SetHostPlayer(playerByUid.PlayerId);
            }
            Singleton <ActorDataCenter> .get_instance().ClearHeroServerData();

            for (int k = 0; k < svrGameInfo.astCampInfo.Length; k++)
            {
                CSDT_CAMPINFO cSDT_CAMPINFO = svrGameInfo.astCampInfo[k];
                int           num3          = Mathf.Min(cSDT_CAMPINFO.astCampPlayerInfo.Length, (int)cSDT_CAMPINFO.dwPlayerNum);
                for (int l = 0; l < num3; l++)
                {
                    COMDT_PLAYERINFO stPlayerInfo = cSDT_CAMPINFO.astCampPlayerInfo[l].stPlayerInfo;
                    Singleton <ActorDataCenter> .get_instance().AddHeroesServerData(stPlayerInfo.dwObjId, stPlayerInfo.astChoiceHero);
                }
            }
        }
Exemplo n.º 10
0
        private void HeroSelectReconectSwapStep(CSDT_RECONN_ADJUSTINFO swapInfo)
        {
            DebugHelper.CustomLog("HeroSelectReconectSwapStep");
            Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");

            Singleton <CRoomSystem> .instance.SetRoomType(1);

            CSDT_CAMPINFO[] campInfo = new CSDT_CAMPINFO[swapInfo.astCampInfo.Length];
            for (int i = 0; i < swapInfo.astCampInfo.Length; i++)
            {
                campInfo[i]                   = new CSDT_CAMPINFO();
                campInfo[i].dwPlayerNum       = swapInfo.astCampInfo[i].dwPlayerNum;
                campInfo[i].astCampPlayerInfo = new CSDT_CAMPPLAYERINFO[swapInfo.astCampInfo[i].astPlayerInfo.Length];
                for (int k = 0; k < swapInfo.astCampInfo[i].astPlayerInfo.Length; k++)
                {
                    campInfo[i].astCampPlayerInfo[k] = swapInfo.astCampInfo[i].astPlayerInfo[k].stPickHeroInfo;
                }
            }
            CHeroSelectBaseSystem.StartPvpHeroSelectSystem(swapInfo.stDeskInfo, campInfo, swapInfo.stFreeHero, swapInfo.stFreeHeroSymbol);
            Singleton <CHeroSelectBaseSystem> .instance.m_banPickStep = enBanPickStep.enSwap;
            for (int j = 0; j < swapInfo.astCampInfo.Length; j++)
            {
                for (int m = 0; m < swapInfo.astCampInfo[j].astPlayerInfo.Length; m++)
                {
                    uint       dwObjId    = swapInfo.astCampInfo[j].astPlayerInfo[m].stPickHeroInfo.stPlayerInfo.dwObjId;
                    byte       bIsPickOK  = swapInfo.astCampInfo[j].astPlayerInfo[m].bIsPickOK;
                    MemberInfo memberInfo = Singleton <CHeroSelectBaseSystem> .instance.roomInfo.GetMemberInfo(dwObjId);

                    if (memberInfo != null)
                    {
                        memberInfo.isPrepare = bIsPickOK == 1;
                    }
                }
            }
            MemberInfo masterMemberInfo = Singleton <CRoomSystem> .instance.roomInfo.GetMasterMemberInfo();

            if (masterMemberInfo != null)
            {
                Singleton <CHeroSelectBaseSystem> .instance.SetPvpHeroSelect(masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID);

                if (masterMemberInfo.isPrepare)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.m_isSelectConfirm = true;
                }
            }
            else
            {
                return;
            }
            if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enNormal)
            {
                Singleton <CHeroSelectNormalSystem> .GetInstance().m_showHeroID = masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;

                if (Singleton <CHeroSelectBaseSystem> .instance.selectType == enSelectType.enRandom)
                {
                    Singleton <CHeroSelectNormalSystem> .instance.SwitchSkinMenuSelect();
                }
                Singleton <CHeroSelectNormalSystem> .instance.RefreshHeroPanel(false, true);

                Singleton <CHeroSelectNormalSystem> .instance.StartEndTimer((int)(swapInfo.dwLeftMs / 0x3e8));
            }
            else if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enBanPick)
            {
                Singleton <CHeroSelectBaseSystem> .instance.ClearBanHero();

                Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_1, swapInfo.stHeroSwapInfo.stPickDetail.stHeroSwapInfo.Camp1BanList);

                Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_2, swapInfo.stHeroSwapInfo.stPickDetail.stHeroSwapInfo.Camp2BanList);

                Singleton <CHeroSelectBaseSystem> .instance.m_swapInfo.dwActiveObjID  = swapInfo.stHeroSwapInfo.stPickDetail.stHeroSwapInfo.dwActiveObjID;
                Singleton <CHeroSelectBaseSystem> .instance.m_swapInfo.dwPassiveObjID = swapInfo.stHeroSwapInfo.stPickDetail.stHeroSwapInfo.dwPassiveObjID;
                Singleton <CHeroSelectBaseSystem> .instance.m_swapInfo.iErrCode       = 0;
                Singleton <CHeroSelectBaseSystem> .instance.m_banHeroTeamMaxCount     = swapInfo.stHeroSwapInfo.stPickDetail.stHeroSwapInfo.bBanPosNum;
                if (masterMemberInfo.dwObjId == Singleton <CHeroSelectBaseSystem> .instance.m_swapInfo.dwActiveObjID)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.m_swapState = enSwapHeroState.enReqing;
                }
                else if (masterMemberInfo.dwObjId == Singleton <CHeroSelectBaseSystem> .instance.m_swapInfo.dwPassiveObjID)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.m_swapState = enSwapHeroState.enSwapAllow;
                }
                Singleton <CHeroSelectBanPickSystem> .instance.InitMenu(false);

                Singleton <CHeroSelectBanPickSystem> .instance.RefreshAll();

                Singleton <CHeroSelectBanPickSystem> .instance.StartEndTimer((int)(swapInfo.dwLeftMs / 0x3e8));

                Singleton <CSoundManager> .GetInstance().PostEvent("Set_BanPickEnd", null);
            }
        }
Exemplo n.º 11
0
        private void HeroSelectReconectPickStep(CSDT_RECONN_PICKINFO pickInfo)
        {
            DebugHelper.CustomLog("HeroSelectReconectPickStep");
            Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");

            Singleton <CRoomSystem> .instance.SetRoomType(1);

            CSDT_CAMPINFO[] campInfo = new CSDT_CAMPINFO[pickInfo.astCampInfo.Length];
            for (int i = 0; i < pickInfo.astCampInfo.Length; i++)
            {
                campInfo[i]                   = new CSDT_CAMPINFO();
                campInfo[i].dwPlayerNum       = pickInfo.astCampInfo[i].dwPlayerNum;
                campInfo[i].astCampPlayerInfo = new CSDT_CAMPPLAYERINFO[pickInfo.astCampInfo[i].astPlayerInfo.Length];
                for (int k = 0; k < pickInfo.astCampInfo[i].astPlayerInfo.Length; k++)
                {
                    campInfo[i].astCampPlayerInfo[k] = pickInfo.astCampInfo[i].astPlayerInfo[k].stPickHeroInfo;
                }
            }
            CHeroSelectBaseSystem.StartPvpHeroSelectSystem(pickInfo.stDeskInfo, campInfo, pickInfo.stFreeHero, pickInfo.stFreeHeroSymbol);
            Singleton <CHeroSelectBaseSystem> .instance.m_banPickStep = enBanPickStep.enPick;
            for (int j = 0; j < pickInfo.astCampInfo.Length; j++)
            {
                for (int m = 0; m < pickInfo.astCampInfo[j].astPlayerInfo.Length; m++)
                {
                    uint       dwObjId    = pickInfo.astCampInfo[j].astPlayerInfo[m].stPickHeroInfo.stPlayerInfo.dwObjId;
                    byte       bIsPickOK  = pickInfo.astCampInfo[j].astPlayerInfo[m].bIsPickOK;
                    MemberInfo memberInfo = Singleton <CHeroSelectBaseSystem> .instance.roomInfo.GetMemberInfo(dwObjId);

                    if (memberInfo != null)
                    {
                        memberInfo.isPrepare = bIsPickOK == 1;
                    }
                }
            }
            MemberInfo masterMemberInfo = Singleton <CRoomSystem> .instance.roomInfo.GetMasterMemberInfo();

            if (masterMemberInfo != null)
            {
                Singleton <CHeroSelectBaseSystem> .instance.SetPvpHeroSelect(masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID);

                if (masterMemberInfo.isPrepare)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.m_isSelectConfirm = true;
                }
            }
            else
            {
                return;
            }
            if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enNormal)
            {
                Singleton <CHeroSelectNormalSystem> .GetInstance().m_showHeroID = masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;

                if (Singleton <CHeroSelectBaseSystem> .instance.selectType == enSelectType.enRandom)
                {
                    Singleton <CHeroSelectNormalSystem> .instance.SwitchSkinMenuSelect();
                }
                Singleton <CHeroSelectNormalSystem> .GetInstance().RefreshHeroPanel(false, true);
            }
            else if (Singleton <CHeroSelectBaseSystem> .instance.uiType == enUIType.enBanPick)
            {
                CSDT_RECONN_BAN_PICK_STATE_INFO stBanPickInfo = pickInfo.stPickStateExtra.stPickDetail.stBanPickInfo;
                Singleton <CHeroSelectBaseSystem> .instance.ClearBanHero();

                if (stBanPickInfo != null)
                {
                    Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_1, stBanPickInfo.Camp1BanList);

                    Singleton <CHeroSelectBaseSystem> .instance.AddBanHero(COM_PLAYERCAMP.COM_PLAYERCAMP_2, stBanPickInfo.Camp2BanList);

                    Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState  = stBanPickInfo.stCurState;
                    Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stNextState = stBanPickInfo.stNextState;
                    Singleton <CHeroSelectBaseSystem> .instance.m_banHeroTeamMaxCount        = stBanPickInfo.bBanPosNum;
                    Singleton <CHeroSelectBanPickSystem> .instance.InitMenu(false);

                    Singleton <CHeroSelectBanPickSystem> .instance.RefreshAll();

                    Singleton <CHeroSelectBanPickSystem> .instance.PlayStepTitleAnimation();

                    Singleton <CHeroSelectBanPickSystem> .instance.PlayCurrentBgAnimation();

                    MemberInfo info3 = Singleton <CHeroSelectBaseSystem> .instance.roomInfo.GetMemberInfo((COM_PLAYERCAMP)Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState.bCamp, Singleton <CHeroSelectBaseSystem> .instance.m_curBanPickInfo.stCurState.bPos);

                    if (info3 != null)
                    {
                        if (masterMemberInfo == info3)
                        {
                            Utility.VibrateHelper();
                            Singleton <CSoundManager> .GetInstance().PostEvent("UI_MyTurn", null);

                            Singleton <CSoundManager> .GetInstance().PostEvent("Set_Segment2", null);
                        }
                        else
                        {
                            Singleton <CSoundManager> .GetInstance().PostEvent("Set_Segment1", null);
                        }
                    }
                }
            }
        }
        private void BeginRecord(SCPKG_MULTGAME_BEGINLOAD beginLoadPkg, WatchEntryData watchEntry = null)
        {
            this.ClearRecord();
            if (beginLoadPkg == null)
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            if (accountInfo == null)
            {
                return;
            }
            uint   num     = 0u;
            string text    = masterRoleInfo.Name;
            string headUrl = masterRoleInfo.HeadUrl;
            byte   b       = masterRoleInfo.m_rankGrade;
            uint   num2    = masterRoleInfo.m_rankClass;

            if (watchEntry == null)
            {
                if (Singleton <WatchController> .GetInstance().IsWatching)
                {
                    CSDT_CAMPPLAYERINFO cSDT_CAMPPLAYERINFO = beginLoadPkg.astCampInfo[0].astCampPlayerInfo[0];
                    text = StringHelper.UTF8BytesToString(ref cSDT_CAMPPLAYERINFO.stPlayerInfo.szName);
                    b    = (byte)cSDT_CAMPPLAYERINFO.dwShowGradeOfRank;
                    num2 = cSDT_CAMPPLAYERINFO.dwClassOfRank;
                    num  = cSDT_CAMPPLAYERINFO.stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;
                }
                else
                {
                    for (int i = 0; i < beginLoadPkg.astCampInfo.Length; i++)
                    {
                        CSDT_CAMPINFO cSDT_CAMPINFO = beginLoadPkg.astCampInfo[i];
                        for (uint num3 = 0u; num3 < cSDT_CAMPINFO.dwPlayerNum; num3 += 1u)
                        {
                            CSDT_CAMPPLAYERINFO cSDT_CAMPPLAYERINFO2 = cSDT_CAMPINFO.astCampPlayerInfo[(int)((uint)((UIntPtr)num3))];
                            if (Utility.UTF8Convert(cSDT_CAMPPLAYERINFO2.szOpenID) == accountInfo.OpenId)
                            {
                                num = cSDT_CAMPPLAYERINFO2.stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;
                                break;
                            }
                        }
                        if (num > 0u)
                        {
                            break;
                        }
                    }
                }
            }
            else
            {
                num     = watchEntry.usedHeroId;
                text    = watchEntry.name;
                headUrl = watchEntry.headUrl;
                b       = watchEntry.rankGrade;
                num2    = watchEntry.rankClass;
            }
            if (num > 0u)
            {
                this.recordStream = new MemoryStream(1048576);
                this.recordWriter = new BinaryWriter(this.recordStream);
                this.recordWriter.Write(CVersion.GetAppVersion());
                this.recordWriter.Write(CVersion.GetUsedResourceVersion());
                this.recordWriter.Write(CVersion.GetRevisonNumber());
                this.recordWriter.Write(num);
                this.recordWriter.Write(DateTime.get_Now().get_Ticks());
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.bMapType);
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.dwMapId);
                this.recordWriter.Write(text);
                this.recordWriter.Write(headUrl);
                this.recordWriter.Write(b);
                this.recordWriter.Write(num2);
            }
        }
Exemplo n.º 13
0
        public void UpdateRoomInfo(COMDT_DESKINFO inDeskInfo, CSDT_CAMPINFO[] inCampInfo)
        {
            uint dwObjId = 0;

            if (this.roomInfo == null)
            {
                this.roomInfo = new Assets.Scripts.GameSystem.RoomInfo();
                this.roomInfo.roomAttrib.bGameMode   = inDeskInfo.bGameMode;
                this.roomInfo.roomAttrib.bPkAI       = 0;
                this.roomInfo.roomAttrib.bMapType    = inDeskInfo.bMapType;
                this.roomInfo.roomAttrib.dwMapId     = inDeskInfo.dwMapId;
                this.roomInfo.roomAttrib.bWarmBattle = Convert.ToBoolean(inDeskInfo.bIsWarmBattle);
                this.roomInfo.roomAttrib.npcAILevel  = inDeskInfo.bAILevel;
                for (int i = 0; i < inCampInfo.Length; i++)
                {
                    COM_PLAYERCAMP com_playercamp = (COM_PLAYERCAMP)(i + 1);
                    CSDT_CAMPINFO  csdt_campinfo  = inCampInfo[i];
                    this.roomInfo.CampMemberList[i].Clear();
                    for (int j = 0; j < csdt_campinfo.dwPlayerNum; j++)
                    {
                        MemberInfo       item         = new MemberInfo();
                        COMDT_PLAYERINFO stPlayerInfo = csdt_campinfo.astCampPlayerInfo[j].stPlayerInfo;
                        item.RoomMemberType = stPlayerInfo.bObjType;
                        item.dwPosOfCamp    = stPlayerInfo.bPosOfCamp;
                        item.camp           = com_playercamp;
                        item.dwMemberLevel  = stPlayerInfo.dwLevel;
                        if (item.RoomMemberType == 1)
                        {
                            item.dwMemberPvpLevel = stPlayerInfo.stDetail.stPlayerOfAcnt.dwPvpLevel;
                        }
                        item.dwObjId    = stPlayerInfo.dwObjId;
                        item.MemberName = StringHelper.UTF8BytesToString(ref stPlayerInfo.szName);
                        item.ChoiceHero = stPlayerInfo.astChoiceHero;
                        if (stPlayerInfo.bObjType == 1)
                        {
                            item.dwMemberHeadId = stPlayerInfo.stDetail.stPlayerOfAcnt.dwHeadId;
                            if (stPlayerInfo.stDetail.stPlayerOfAcnt.ullUid == Singleton <CRoleInfoManager> .instance.masterUUID)
                            {
                                dwObjId = stPlayerInfo.dwObjId;
                                Singleton <CHeroSelectSystem> .instance.ResetRandHeroLeftCount((int)csdt_campinfo.astCampPlayerInfo[j].dwRandomHeroCnt);
                            }
                        }
                        else if (stPlayerInfo.bObjType == 2)
                        {
                            item.dwMemberHeadId = 1;
                        }
                        this.roomInfo.CampMemberList[i].Add(item);
                    }
                    this.SortCampMemList(ref this.roomInfo.CampMemberList[i]);
                }
            }
            else
            {
                this.roomInfo.roomAttrib.bGameMode = inDeskInfo.bGameMode;
                this.roomInfo.roomAttrib.bPkAI     = 0;
                this.roomInfo.roomAttrib.bMapType  = inDeskInfo.bMapType;
                this.roomInfo.roomAttrib.dwMapId   = inDeskInfo.dwMapId;
                for (int k = 0; k < inCampInfo.Length; k++)
                {
                    COM_PLAYERCAMP camp           = (COM_PLAYERCAMP)(k + 1);
                    CSDT_CAMPINFO  csdt_campinfo2 = inCampInfo[k];
                    for (int m = 0; m < csdt_campinfo2.dwPlayerNum; m++)
                    {
                        COMDT_PLAYERINFO comdt_playerinfo2 = csdt_campinfo2.astCampPlayerInfo[m].stPlayerInfo;
                        MemberInfo       memberInfo        = this.roomInfo.GetMemberInfo(camp, comdt_playerinfo2.bPosOfCamp);
                        if (memberInfo != null)
                        {
                            memberInfo.dwObjId    = comdt_playerinfo2.dwObjId;
                            memberInfo.camp       = camp;
                            memberInfo.ChoiceHero = comdt_playerinfo2.astChoiceHero;
                            if ((comdt_playerinfo2.bObjType == 1) && (comdt_playerinfo2.stDetail.stPlayerOfAcnt.ullUid == Singleton <CRoleInfoManager> .instance.masterUUID))
                            {
                                dwObjId = comdt_playerinfo2.dwObjId;
                                Singleton <CHeroSelectSystem> .instance.ResetRandHeroLeftCount((int)csdt_campinfo2.astCampPlayerInfo[m].dwRandomHeroCnt);
                            }
                        }
                    }
                }
            }
            this.roomInfo.selfObjID = dwObjId;
        }
Exemplo n.º 14
0
        private void HeroSelectReconectPickStep(CSDT_RECONN_PICKINFO pickInfo)
        {
            Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");

            Singleton <CRoomSystem> .get_instance().SetRoomType(1);

            CSDT_CAMPINFO[] array = new CSDT_CAMPINFO[pickInfo.astCampInfo.Length];
            for (int i = 0; i < pickInfo.astCampInfo.Length; i++)
            {
                array[i]                   = new CSDT_CAMPINFO();
                array[i].dwPlayerNum       = pickInfo.astCampInfo[i].dwPlayerNum;
                array[i].astCampPlayerInfo = new CSDT_CAMPPLAYERINFO[pickInfo.astCampInfo[i].astPlayerInfo.Length];
                for (int j = 0; j < pickInfo.astCampInfo[i].astPlayerInfo.Length; j++)
                {
                    array[i].astCampPlayerInfo[j] = pickInfo.astCampInfo[i].astPlayerInfo[j].stPickHeroInfo;
                }
            }
            CHeroSelectBaseSystem.StartPvpHeroSelectSystem(pickInfo.stDeskInfo, array, pickInfo.stFreeHero, pickInfo.stFreeHeroSymbol);
            Singleton <CHeroSelectBaseSystem> .get_instance().m_banPickStep = enBanPickStep.enPick;

            for (int k = 0; k < pickInfo.astCampInfo.Length; k++)
            {
                for (int l = 0; l < pickInfo.astCampInfo[k].astPlayerInfo.Length; l++)
                {
                    uint       dwObjId    = pickInfo.astCampInfo[k].astPlayerInfo[l].stPickHeroInfo.stPlayerInfo.dwObjId;
                    byte       bIsPickOK  = pickInfo.astCampInfo[k].astPlayerInfo[l].bIsPickOK;
                    MemberInfo memberInfo = Singleton <CHeroSelectBaseSystem> .get_instance().roomInfo.GetMemberInfo(dwObjId);

                    if (memberInfo != null)
                    {
                        memberInfo.isPrepare = (bIsPickOK == 1);
                    }
                }
            }
            MemberInfo masterMemberInfo = Singleton <CRoomSystem> .get_instance().roomInfo.GetMasterMemberInfo();

            if (masterMemberInfo != null)
            {
                Singleton <CHeroSelectBaseSystem> .get_instance().SetPvpHeroSelect(masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID);

                if (masterMemberInfo.isPrepare)
                {
                    Singleton <CHeroSelectBaseSystem> .get_instance().m_isSelectConfirm = true;
                }
                if (Singleton <CHeroSelectBaseSystem> .get_instance().uiType == enUIType.enNormal)
                {
                    Singleton <CHeroSelectNormalSystem> .GetInstance().m_showHeroID = masterMemberInfo.ChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;

                    if (Singleton <CHeroSelectBaseSystem> .get_instance().selectType == enSelectType.enRandom)
                    {
                        Singleton <CHeroSelectNormalSystem> .get_instance().SwitchSkinMenuSelect();
                    }
                    Singleton <CHeroSelectNormalSystem> .GetInstance().RefreshHeroPanel(true, true);
                }
                else if (Singleton <CHeroSelectBaseSystem> .get_instance().uiType == enUIType.enBanPick)
                {
                    CSDT_RECONN_BAN_PICK_STATE_INFO stBanPickInfo = pickInfo.stPickStateExtra.stPickDetail.get_stBanPickInfo();
                    if (stBanPickInfo == null)
                    {
                        return;
                    }
                    Singleton <CHeroSelectBaseSystem> .get_instance().AddBanHero(1, stBanPickInfo.Camp1BanList);

                    Singleton <CHeroSelectBaseSystem> .get_instance().AddBanHero(2, stBanPickInfo.Camp2BanList);

                    Singleton <CHeroSelectBaseSystem> .get_instance().m_curBanPickInfo.stCurState = stBanPickInfo.stCurState;

                    Singleton <CHeroSelectBaseSystem> .get_instance().m_curBanPickInfo.stNextState = stBanPickInfo.stNextState;

                    Singleton <CHeroSelectBaseSystem> .get_instance().m_banHeroTeamMaxCount = (int)stBanPickInfo.bBanPosNum;

                    Singleton <CHeroSelectBanPickSystem> .get_instance().InitMenu(false);

                    Singleton <CHeroSelectBanPickSystem> .get_instance().RefreshAll();

                    Singleton <CHeroSelectBanPickSystem> .get_instance().PlayStepTitleAnimation();

                    Singleton <CHeroSelectBanPickSystem> .get_instance().PlayCurrentBgAnimation();

                    if (Singleton <CHeroSelectBaseSystem> .get_instance().IsCurBanOrPickMember(masterMemberInfo))
                    {
                        Utility.VibrateHelper();
                        Singleton <CSoundManager> .GetInstance().PostEvent("UI_MyTurn", null);

                        Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_4", null);

                        Singleton <CSoundManager> .GetInstance().PostEvent("Set_Segment2", null);
                    }
                    else
                    {
                        if (Singleton <CHeroSelectBaseSystem> .get_instance().IsCurOpByCamp(masterMemberInfo))
                        {
                            Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_7", null);
                        }
                        else if (masterMemberInfo.camp != null)
                        {
                            Singleton <CSoundManager> .GetInstance().PostEvent("Play_sys_ban_6", null);
                        }
                        Singleton <CSoundManager> .GetInstance().PostEvent("Set_Segment1", null);
                    }
                }
                return;
            }
        }