コード例 #1
0
        private void OnOBVideoTabClick(CUIEvent cuiEvent)
        {
            COBSystem.enOBTab curTab = this.CurTab;
            this.m_watchEntryData = null;
            switch (curTab)
            {
            case COBSystem.enOBTab.Expert:
                COBSystem.GetGreatMatch(false);
                break;

            case COBSystem.enOBTab.Friend:
                COBSystem.GetFriendsState();
                break;

            case COBSystem.enOBTab.Guild:
                this.OBGuildList = Singleton <CGuildMatchSystem> .GetInstance().GetGuidMatchObInfo();

                Singleton <CGuildMatchSystem> .GetInstance().RequestGuildOBCount();

                break;

            case COBSystem.enOBTab.Local:
                this.OBLocalList = Singleton <GameReplayModule> .instance.ListReplayFiles(false);

                break;
            }
            this.curStatus = COBSystem.enStatus.Normal;
            this.UpdateView();
        }
コード例 #2
0
 public void Clear()
 {
     this.OBFriendList.Clear();
     this.OBExpertList.Clear();
     this.OBLocalList.Clear();
     this.OBGuildList.Clear();
     COBSystem.m_lastGetExpertListTime  = 0;
     COBSystem.m_lastGetFriendStateTime = 0;
     this.m_watchEntryData = null;
 }
コード例 #3
0
        private void OnVideoEnterConfirm(CUIEvent cuiEvent)
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(COBSystem.OB_FORM_PATH);

            if (form == null)
            {
                return;
            }
            CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "ContentList");

            if (componetInChild == null)
            {
                return;
            }
            int selectedIndex = componetInChild.GetSelectedIndex();

            COBSystem.enOBTab curTab = this.CurTab;
            if (curTab == COBSystem.enOBTab.Expert)
            {
                if (selectedIndex >= 0 && selectedIndex < this.OBExpertList.get_Count())
                {
                    Singleton <WatchController> .GetInstance().TargetUID = this.OBExpertList.get_Item(selectedIndex).heroLabel.ullUid;

                    COBSystem.SendOBServeGreat(this.OBExpertList.get_Item(selectedIndex).desk);
                    this.m_watchEntryData            = new WatchEntryData();
                    this.m_watchEntryData.headUrl    = StringHelper.UTF8BytesToString(ref this.OBExpertList.get_Item(selectedIndex).heroLabel.szHealUrl);
                    this.m_watchEntryData.name       = StringHelper.UTF8BytesToString(ref this.OBExpertList.get_Item(selectedIndex).heroLabel.szRoleName);
                    this.m_watchEntryData.rankClass  = this.OBExpertList.get_Item(selectedIndex).heroLabel.dwClass;
                    this.m_watchEntryData.rankGrade  = (byte)this.OBExpertList.get_Item(selectedIndex).heroLabel.dwGrade;
                    this.m_watchEntryData.time       = (long)CRoleInfo.GetCurrentUTCTime();
                    this.m_watchEntryData.usedHeroId = this.OBExpertList.get_Item(selectedIndex).heroLabel.dwHeroID;
                    this.m_watchEntryData.userUid    = this.OBExpertList.get_Item(selectedIndex).heroLabel.ullUid;
                }
                int count = this.OBExpertList.get_Count();
            }
            else if (curTab == COBSystem.enOBTab.Friend)
            {
                if (selectedIndex >= 0 && selectedIndex < this.OBFriendList.get_Count())
                {
                    Singleton <WatchController> .GetInstance().TargetUID = this.OBFriendList.get_Item(selectedIndex).uin.ullUid;

                    COBSystem.SendOBServeFriend(this.OBFriendList.get_Item(selectedIndex).uin, -1);
                    this.m_watchEntryData            = new WatchEntryData();
                    this.m_watchEntryData.headUrl    = this.OBFriendList.get_Item(selectedIndex).headUrl;
                    this.m_watchEntryData.name       = this.OBFriendList.get_Item(selectedIndex).friendName;
                    this.m_watchEntryData.rankClass  = this.OBFriendList.get_Item(selectedIndex).gameDetail.dwClass;
                    this.m_watchEntryData.rankGrade  = this.OBFriendList.get_Item(selectedIndex).gameDetail.bShowRankGrade;
                    this.m_watchEntryData.time       = (long)CRoleInfo.GetCurrentUTCTime();
                    this.m_watchEntryData.usedHeroId = this.OBFriendList.get_Item(selectedIndex).gameDetail.dwHeroID;
                    this.m_watchEntryData.userUid    = this.OBFriendList.get_Item(selectedIndex).uin.ullUid;
                }
                int count2 = this.OBFriendList.get_Count();
            }
            else if (curTab == COBSystem.enOBTab.Guild)
            {
                if (selectedIndex >= 0 && selectedIndex < this.OBGuildList.get_Count())
                {
                    Singleton <WatchController> .GetInstance().TargetUID = this.OBGuildList.get_Item(selectedIndex).playerUid;

                    Singleton <CGuildMatchSystem> .GetInstance().RequestObGuildMatch(this.OBGuildList.get_Item(selectedIndex).obUid);

                    this.m_watchEntryData            = new WatchEntryData();
                    this.m_watchEntryData.headUrl    = this.OBGuildList.get_Item(selectedIndex).headUrl;
                    this.m_watchEntryData.name       = this.OBGuildList.get_Item(selectedIndex).playerName;
                    this.m_watchEntryData.rankClass  = this.OBGuildList.get_Item(selectedIndex).dwClass;
                    this.m_watchEntryData.rankGrade  = this.OBGuildList.get_Item(selectedIndex).bGrade;
                    this.m_watchEntryData.time       = (long)CRoleInfo.GetCurrentUTCTime();
                    this.m_watchEntryData.usedHeroId = this.OBGuildList.get_Item(selectedIndex).dwHeroID;
                    this.m_watchEntryData.userUid    = this.OBGuildList.get_Item(selectedIndex).playerUid;
                }
                int count3 = this.OBGuildList.get_Count();
            }
            else if (curTab == COBSystem.enOBTab.Local)
            {
                Singleton <WatchController> .GetInstance().TargetUID = Singleton <CRoleInfoManager> .instance.masterUUID;

                if (selectedIndex >= 0 && selectedIndex < this.OBLocalList.Count)
                {
                    Singleton <WatchController> .GetInstance().StartReplay(this.OBLocalList[selectedIndex].path);
                }
                int count4 = this.OBLocalList.Count;
            }
        }
コード例 #4
0
        private void OnOBFormClose(CUIEvent cuiEvent)
        {
            Singleton <GameJoy> .instance.CloseVideoListDialog();

            this.m_watchEntryData = null;
        }