示例#1
0
        public void StartSettle(COMDT_SETTLE_RESULT_DETAIL settleData = null, bool bFirstPass = true)
        {
            if (settleData == null || settleData.stGameInfo.bGameResult == 2)
            {
                this.openFormLose();
            }
            else if (settleData.stGameInfo.bGameResult == 1)
            {
                this.m_SettleData = settleData;
                CUIFormScript form = Singleton <CUIManager> .GetInstance().OpenForm(PVESettleSys.PATH_STAR, false, true);

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

                this.calcStarConditions();
                PVESettleView.SetStarFormData(form, settleData, ref this.m_WinConditions);
            }
        }
示例#2
0
        public static void SetExpFormData(CUIFormScript form, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            GameObject    gameObject    = form.transform.Find("Root/Panel_Exp/Exp_Player").gameObject;
            PVEPlayerItem pVEPlayerItem = new PVEPlayerItem(gameObject);

            pVEPlayerItem.addExp(settleData.stAcntInfo.dwSettleExp);
            CUI3DImageScript component = form.transform.Find("Root/3DImage").gameObject.GetComponent <CUI3DImageScript>();

            DebugHelper.Assert(component != null);
            int num = 1;

            for (int i = 0; i < (int)settleData.stHeroList.bNum; i++)
            {
                uint dwHeroConfID = settleData.stHeroList.astHeroList[i].dwHeroConfID;
                gameObject = form.transform.Find(string.Format("Root/Panel_Exp/Exp_Hero{0}", num)).gameObject;
                CHeroInfo cHeroInfo;
                if (masterRoleInfo.GetHeroInfoDic().TryGetValue(dwHeroConfID, ref cHeroInfo))
                {
                    ResHeroCfgInfo cfgInfo     = cHeroInfo.cfgInfo;
                    PVEHeroItem    pVEHeroItem = new PVEHeroItem(gameObject, cfgInfo.dwCfgID);
                    if (num <= (int)settleData.stHeroList.bNum)
                    {
                        gameObject.CustomSetActive(true);
                        pVEHeroItem.addExp(settleData.stHeroList.astHeroList[num - 1].dwSettleExp);
                        int              heroWearSkinId = (int)masterRoleInfo.GetHeroWearSkinId(cfgInfo.dwCfgID);
                        string           objectName     = CUICommonSystem.GetHeroPrefabPath(cfgInfo.dwCfgID, heroWearSkinId, true).ObjectName;
                        GameObject       model          = component.AddGameObjectToPath(objectName, false, string.Format("_root/Hero{0}", num));
                        CHeroAnimaSystem instance       = Singleton <CHeroAnimaSystem> .GetInstance();

                        instance.Set3DModel(model);
                        instance.InitAnimatList();
                        instance.InitAnimatSoundList(cfgInfo.dwCfgID, (uint)heroWearSkinId);
                        instance.OnModePlayAnima("idleshow2");
                    }
                }
                num++;
            }
        }
示例#3
0
        public static void SetStarFormData(CUIFormScript form, COMDT_SETTLE_RESULT_DETAIL settleData, ref StarCondition[] starArr)
        {
            GameObject gameObject = form.transform.Find("Root").gameObject;
            int        num        = 0;

            for (int i = 1; i < 4; i++)
            {
                GameObject gameObject2 = form.transform.Find(string.Format("Root/Condition{0}", i)).gameObject;
                Text       component   = gameObject2.transform.Find("Condition_text").gameObject.GetComponent <Text>();
                component.text = starArr[i - 1].ConditionName;
                if (!starArr[i - 1].bCompelete)
                {
                    string name = string.Empty;
                    if (i == 2)
                    {
                        name = "Condition_Star1";
                    }
                    else
                    {
                        name = "Condition_Star";
                    }
                    gameObject2.transform.Find(name).gameObject.CustomSetActive(false);
                    component.color = CUIUtility.s_Color_Grey;
                }
                else
                {
                    num++;
                }
            }
            for (int j = 1; j < 4; j++)
            {
                if (num < j)
                {
                    form.transform.Find(string.Format("Root/Panel_Star/Star{0}", j)).gameObject.CustomSetActive(false);
                }
            }
            CUICommonSystem.PlayAnimator(gameObject, "Win_Show");
        }
示例#4
0
        public static void SetBurnSettleData(CUIFormScript form, ref COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat;

            SetWin(form.gameObject, settleData.stGameInfo.bGameResult == 1);
            int            num             = 1;
            int            num2            = 1;
            int            num3            = 0;
            int            num4            = 0;
            string         playerName      = string.Empty;
            int            playerLv        = 1;
            COM_PLAYERCAMP playerCamp      = COM_PLAYERCAMP.COM_PLAYERCAMP_1;
            string         str2            = string.Empty;
            int            num6            = 1;
            COM_PLAYERCAMP com_playercamp2 = COM_PLAYERCAMP.COM_PLAYERCAMP_1;

            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator();
            while (enumerator.MoveNext())
            {
                bool flag = true;
                if (settleData.stGameInfo.bGameResult == 1)
                {
                    KeyValuePair <uint, PlayerKDA> current = enumerator.Current;
                    if (current.Value.IsHost)
                    {
                        flag = true;
                    }
                    else
                    {
                        flag = false;
                    }
                }
                else
                {
                    KeyValuePair <uint, PlayerKDA> pair2 = enumerator.Current;
                    if (pair2.Value.IsHost)
                    {
                        flag = false;
                    }
                    else
                    {
                        flag = true;
                    }
                }
                if (flag)
                {
                    KeyValuePair <uint, PlayerKDA> pair3       = enumerator.Current;
                    ListView <HeroKDA> .Enumerator enumerator2 = pair3.Value.GetEnumerator();
                    while (enumerator2.MoveNext() && (num <= 3))
                    {
                        GameObject gameObject = form.gameObject.transform.Find("Panel/Left_Player" + num).gameObject;
                        KeyValuePair <uint, PlayerKDA> pair4 = enumerator.Current;
                        SetPlayerStat(form, gameObject, pair4.Value, enumerator2.Current);
                        num++;
                    }
                    KeyValuePair <uint, PlayerKDA> pair5 = enumerator.Current;
                    num3 += pair5.Value.numKill;
                    KeyValuePair <uint, PlayerKDA> pair6 = enumerator.Current;
                    playerName = pair6.Value.PlayerName;
                    KeyValuePair <uint, PlayerKDA> pair7 = enumerator.Current;
                    playerCamp = pair7.Value.PlayerCamp;
                    KeyValuePair <uint, PlayerKDA> pair8 = enumerator.Current;
                    playerLv = pair8.Value.PlayerLv;
                }
                else
                {
                    KeyValuePair <uint, PlayerKDA> pair9       = enumerator.Current;
                    ListView <HeroKDA> .Enumerator enumerator3 = pair9.Value.GetEnumerator();
                    while (enumerator3.MoveNext() && (num2 <= 3))
                    {
                        GameObject item = form.gameObject.transform.Find("Panel/Right_Player" + num2).gameObject;
                        KeyValuePair <uint, PlayerKDA> pair10 = enumerator.Current;
                        SetPlayerStat(form, item, pair10.Value, enumerator3.Current);
                        num2++;
                    }
                    KeyValuePair <uint, PlayerKDA> pair11 = enumerator.Current;
                    num4 += pair11.Value.numKill;
                    KeyValuePair <uint, PlayerKDA> pair12 = enumerator.Current;
                    str2 = pair12.Value.PlayerName;
                    KeyValuePair <uint, PlayerKDA> pair13 = enumerator.Current;
                    com_playercamp2 = pair13.Value.PlayerCamp;
                    KeyValuePair <uint, PlayerKDA> pair14 = enumerator.Current;
                    num6 = pair14.Value.PlayerLv;
                }
            }
            for (int i = num; i <= 3; i++)
            {
                form.gameObject.transform.Find("Panel/Left_Player" + i).gameObject.CustomSetActive(false);
            }
            for (int j = num2; j <= 3; j++)
            {
                form.gameObject.transform.Find("Panel/Right_Player" + j).gameObject.CustomSetActive(false);
            }
            Text component = form.gameObject.transform.Find("Panel/PanelABg/Image/ImageLeft/Txt_LeftPlayerName").gameObject.GetComponent <Text>();

            component.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().text = string.Format("Lv.{0}", playerLv);
            component.text  = playerName;
            component.color = (playerCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? new Color(0.545f, 0f, 0f, 1f) : new Color(0.031f, 0.961f, 0f, 1f);
            component       = form.gameObject.transform.Find("Panel/PanelABg/Image/ImageRight/Txt_RightPlayerName").gameObject.GetComponent <Text>();
            component.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().text = string.Format("Lv.{0}", num6);
            component.text  = str2;
            component.color = (com_playercamp2 != COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? new Color(0.545f, 0f, 0f, 1f) : new Color(0.031f, 0.961f, 0f, 1f);
        }
示例#5
0
        public static void SetBurnSettleData(CUIFormScript form, ref COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat;

            CSingleGameSettleView.SetWin(form.gameObject, settleData.stGameInfo.bGameResult == 1);
            int            num             = 1;
            int            num2            = 1;
            int            num3            = 0;
            int            num4            = 0;
            string         text            = string.Empty;
            int            num5            = 1;
            COM_PLAYERCAMP cOM_PLAYERCAMP  = COM_PLAYERCAMP.COM_PLAYERCAMP_1;
            string         text2           = string.Empty;
            int            num6            = 1;
            COM_PLAYERCAMP cOM_PLAYERCAMP2 = COM_PLAYERCAMP.COM_PLAYERCAMP_1;

            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator();
            while (enumerator.MoveNext())
            {
                bool flag;
                if (settleData.stGameInfo.bGameResult == 1)
                {
                    KeyValuePair <uint, PlayerKDA> current = enumerator.Current;
                    flag = current.get_Value().IsHost;
                }
                else
                {
                    KeyValuePair <uint, PlayerKDA> current2 = enumerator.Current;
                    flag = !current2.get_Value().IsHost;
                }
                if (flag)
                {
                    KeyValuePair <uint, PlayerKDA> current3    = enumerator.Current;
                    ListView <HeroKDA> .Enumerator enumerator2 = current3.get_Value().GetEnumerator();
                    while (enumerator2.MoveNext() && num <= 3)
                    {
                        GameObject gameObject = form.gameObject.transform.Find("Panel/Left_Player" + num).gameObject;
                        GameObject item       = gameObject;
                        KeyValuePair <uint, PlayerKDA> current4 = enumerator.Current;
                        CSingleGameSettleView.SetPlayerStat(form, item, current4.get_Value(), enumerator2.Current);
                        num++;
                    }
                    int num7 = num3;
                    KeyValuePair <uint, PlayerKDA> current5 = enumerator.Current;
                    num3 = num7 + current5.get_Value().numKill;
                    KeyValuePair <uint, PlayerKDA> current6 = enumerator.Current;
                    text = current6.get_Value().PlayerName;
                    KeyValuePair <uint, PlayerKDA> current7 = enumerator.Current;
                    cOM_PLAYERCAMP = current7.get_Value().PlayerCamp;
                    KeyValuePair <uint, PlayerKDA> current8 = enumerator.Current;
                    num5 = current8.get_Value().PlayerLv;
                }
                else
                {
                    KeyValuePair <uint, PlayerKDA> current9    = enumerator.Current;
                    ListView <HeroKDA> .Enumerator enumerator3 = current9.get_Value().GetEnumerator();
                    while (enumerator3.MoveNext() && num2 <= 3)
                    {
                        GameObject gameObject2 = form.gameObject.transform.Find("Panel/Right_Player" + num2).gameObject;
                        GameObject item2       = gameObject2;
                        KeyValuePair <uint, PlayerKDA> current10 = enumerator.Current;
                        CSingleGameSettleView.SetPlayerStat(form, item2, current10.get_Value(), enumerator3.Current);
                        num2++;
                    }
                    int num8 = num4;
                    KeyValuePair <uint, PlayerKDA> current11 = enumerator.Current;
                    num4 = num8 + current11.get_Value().numKill;
                    KeyValuePair <uint, PlayerKDA> current12 = enumerator.Current;
                    text2 = current12.get_Value().PlayerName;
                    KeyValuePair <uint, PlayerKDA> current13 = enumerator.Current;
                    cOM_PLAYERCAMP2 = current13.get_Value().PlayerCamp;
                    KeyValuePair <uint, PlayerKDA> current14 = enumerator.Current;
                    num6 = current14.get_Value().PlayerLv;
                }
            }
            for (int i = num; i <= 3; i++)
            {
                GameObject gameObject3 = form.gameObject.transform.Find("Panel/Left_Player" + i).gameObject;
                gameObject3.CustomSetActive(false);
            }
            for (int j = num2; j <= 3; j++)
            {
                GameObject gameObject4 = form.gameObject.transform.Find("Panel/Right_Player" + j).gameObject;
                gameObject4.CustomSetActive(false);
            }
            Text component = form.gameObject.transform.Find("Panel/PanelABg/Image/ImageLeft/Txt_LeftPlayerName").gameObject.GetComponent <Text>();

            component.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().set_text(string.Format("Lv.{0}", num5));
            component.set_text(text);
            component.set_color((cOM_PLAYERCAMP == COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? new Color(0.031f, 0.961f, 0f, 1f) : new Color(0.545f, 0f, 0f, 1f));
            component = form.gameObject.transform.Find("Panel/PanelABg/Image/ImageRight/Txt_RightPlayerName").gameObject.GetComponent <Text>();
            component.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().set_text(string.Format("Lv.{0}", num6));
            component.set_text(text2);
            component.set_color((cOM_PLAYERCAMP2 == COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? new Color(0.031f, 0.961f, 0f, 1f) : new Color(0.545f, 0f, 0f, 1f));
        }
示例#6
0
        public static void SetItemEtcCell(CUIFormScript form, GameObject item, Text name, COMDT_REWARD_INFO rewardInfo, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            byte bType = rewardInfo.bType;

            switch (bType)
            {
            case 1:
            {
                CUseable cUseable = CUseableManager.CreateUseable(2, 0uL, rewardInfo.stRewardInfo.get_stItem().dwItemID, (int)rewardInfo.stRewardInfo.get_stItem().dwCnt, 0);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                ResPropInfo dataByKey = GameDataMgr.itemDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stItem().dwItemID);
                if (dataByKey != null)
                {
                    name.text = StringHelper.UTF8BytesToString(ref dataByKey.szName);
                }
                break;
            }

            case 2:
                break;

            case 3:
            {
                CUseable cUseable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDianQuan, (int)rewardInfo.stRewardInfo.dwCoupons);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                name.text = cUseable.m_name;
                break;
            }

            case 4:
            {
                CUseable cUseable = CUseableManager.CreateUseable(3, 0uL, rewardInfo.stRewardInfo.get_stEquip().dwEquipID, (int)rewardInfo.stRewardInfo.get_stEquip().dwCnt, 0);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                ResEquipInfo dataByKey2 = GameDataMgr.equipInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stEquip().dwEquipID);
                if (dataByKey2 != null)
                {
                    name.text = StringHelper.UTF8BytesToString(ref dataByKey2.szName);
                }
                break;
            }

            case 5:
            {
                CUseable cUseable = CUseableManager.CreateUseable(4, 0uL, rewardInfo.stRewardInfo.get_stHero().dwHeroID, (int)rewardInfo.stRewardInfo.get_stHero().dwCnt, 0);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stHero().dwHeroID);
                if (dataByKey3 != null)
                {
                    name.text = StringHelper.UTF8BytesToString(ref dataByKey3.szName);
                }
                break;
            }

            case 6:
            {
                CUseable cUseable = CUseableManager.CreateUseable(5, 0uL, rewardInfo.stRewardInfo.get_stSymbol().dwSymbolID, (int)rewardInfo.stRewardInfo.get_stSymbol().dwCnt, 0);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                ResSymbolInfo dataByKey4 = GameDataMgr.symbolInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stSymbol().dwSymbolID);
                if (dataByKey4 != null)
                {
                    name.text = StringHelper.UTF8BytesToString(ref dataByKey4.szName);
                }
                break;
            }

            default:
                if (bType == 16)
                {
                    CUseable cUseable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDiamond, (int)rewardInfo.stRewardInfo.dwDiamond);
                    cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                    CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                    name.text = cUseable.m_name;
                }
                break;
            }
        }
示例#7
0
        public static void SetRewardFormData(CUIFormScript form, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            Singleton <CUIManager> .GetInstance().LoadUIScenePrefab(CUIUtility.s_heroSceneBgPath, form);

            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext == null)
            {
                return;
            }
            GameObject gameObject = form.transform.Find("Root/Panel_Interactable/Button_Next").gameObject;

            if (curLvelContext.IsGameTypeActivity())
            {
                gameObject.CustomSetActive(false);
            }
            else
            {
                int nextLevelId = CAdventureSys.GetNextLevelId(curLvelContext.m_chapterNo, (int)curLvelContext.m_levelNo, curLvelContext.m_levelDifficulty);
                if (nextLevelId != 0)
                {
                    if (Singleton <CAdventureSys> .GetInstance().IsLevelOpen(nextLevelId))
                    {
                        gameObject.CustomSetActive(true);
                    }
                    else
                    {
                        gameObject.CustomSetActive(false);
                    }
                }
                else
                {
                    gameObject.CustomSetActive(false);
                }
            }
            gameObject.CustomSetActive(false);
            PVESettleView.Show3DModel(form);
            GameObject gameObject2 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty1").gameObject;
            GameObject gameObject3 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty2").gameObject;
            GameObject gameObject4 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty3").gameObject;
            Text       component   = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaName").gameObject.GetComponent <Text>();

            if (curLvelContext.m_levelDifficulty == 1)
            {
                gameObject3.CustomSetActive(false);
                gameObject4.CustomSetActive(false);
            }
            else if (curLvelContext.m_levelDifficulty == 2)
            {
                gameObject2.CustomSetActive(false);
                gameObject4.CustomSetActive(false);
            }
            else if (curLvelContext.m_levelDifficulty == 3)
            {
                gameObject3.CustomSetActive(false);
                gameObject2.CustomSetActive(false);
            }
            component.text = string.Format(curLvelContext.m_levelName, new object[0]);
            PVESettleView._continueBtn1 = form.transform.Find("Root/Panel_Interactable/Button_Once").gameObject;
            PVESettleView._continueBtn2 = form.transform.Find("Root/Panel_Interactable/Button_ReturnLobby").gameObject;
            PVESettleView._continueBtn1.CustomSetActive(true);
            PVESettleView._continueBtn2.CustomSetActive(true);
            PVESettleView.ShowReward(form, settleData);
            CUICommonSystem.PlayAnimator(form.gameObject, "Box_Show_2");
        }
示例#8
0
        private static void ShowReward(CUIFormScript belongForm, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() == null)
            {
                return;
            }
            GameObject gameObject  = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/Panel_Gold").gameObject;
            Text       component   = gameObject.transform.Find("GoldNum").gameObject.GetComponent <Text>();
            GameObject gameObject2 = gameObject.transform.Find("GoldMax").gameObject;

            if (settleData.stAcntInfo.bReachDailyLimit > 0)
            {
                gameObject2.CustomSetActive(true);
            }
            else
            {
                gameObject2.CustomSetActive(false);
            }
            component.text = "0";
            COMDT_REWARD_DETAIL stReward   = settleData.stReward;
            COMDT_ACNT_INFO     stAcntInfo = settleData.stAcntInfo;

            if (stAcntInfo != null)
            {
                GameObject         gameObject3 = belongForm.transform.FindChild("Root/Panel_Award/Award/Panel_PlayerExp/PvpExpNode").gameObject;
                Text               component2  = gameObject3.transform.FindChild("PvpExpTxt").gameObject.GetComponent <Text>();
                Text               component3  = gameObject3.transform.FindChild("AddPvpExpTxt").gameObject.GetComponent <Text>();
                RectTransform      component4  = gameObject3.transform.FindChild("PvpExpSliderBg/BasePvpExpSlider").gameObject.GetComponent <RectTransform>();
                RectTransform      component5  = gameObject3.transform.FindChild("PvpExpSliderBg/AddPvpExpSlider").gameObject.GetComponent <RectTransform>();
                Text               component6  = gameObject3.transform.FindChild("PlayerName").gameObject.GetComponent <Text>();
                CUIHttpImageScript component7  = gameObject3.transform.FindChild("HeadImage").gameObject.GetComponent <CUIHttpImageScript>();
                Text               component8  = gameObject3.transform.FindChild("PvpLevelTxt").gameObject.GetComponent <Text>();
                Image              component9  = gameObject3.transform.FindChild("NobeIcon").gameObject.GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component9, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false);

                Image component10 = gameObject3.transform.FindChild("HeadFrame").gameObject.GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component10, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId);

                component8.text = string.Format("Lv.{0}", stAcntInfo.dwPvpLv.ToString());
                ResAcntPvpExpInfo dataByKey   = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)stAcntInfo.dwPvpLv));
                GameObject        gameObject4 = gameObject3.transform.FindChild("ExpMax").gameObject;
                if (stAcntInfo.bExpDailyLimit == 0)
                {
                    gameObject4.CustomSetActive(false);
                }
                component2.text = string.Format("{0}/{1}", stAcntInfo.dwPvpExp, dataByKey.dwNeedExp);
                component3.text = string.Format("+{0}", stAcntInfo.dwPvpSettleExp);
                CUICommonSystem.AppendMultipleText(component3, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseExp, ref settleData.stMultipleDetail, 15, -1));
                component6.text = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().Name;

                string headUrl = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().HeadUrl;

                if (!CSysDynamicBlock.bLobbyEntryBlocked)
                {
                    component7.SetImageUrl(headUrl);
                }
                if (stAcntInfo.dwPvpSettleExp > 0u)
                {
                    Singleton <CSoundManager> .GetInstance().PostEvent("UI_count_jingyan", null);
                }
                float num = 0f;
                if (stAcntInfo.dwPvpExp < stAcntInfo.dwPvpSettleExp)
                {
                    component4.sizeDelta     = new Vector2(num * 260f, component4.sizeDelta.y);
                    PVESettleView._lvUpGrade = stAcntInfo.dwPvpLv;
                }
                else
                {
                    num = (stAcntInfo.dwPvpExp - stAcntInfo.dwPvpSettleExp) / dataByKey.dwNeedExp;
                    component4.sizeDelta     = new Vector2(num * 260f, component4.sizeDelta.y);
                    PVESettleView._lvUpGrade = 0u;
                }
                float expTo = stAcntInfo.dwPvpExp / dataByKey.dwNeedExp;
                PVESettleView._expFrom      = num;
                PVESettleView._expTo        = expTo;
                component5.sizeDelta        = new Vector2(num * 260f, component5.sizeDelta.y);
                PVESettleView._expTweenRect = component5;
                PVESettleView._coinFrom     = 0f;
                PVESettleView._coinTo       = 0f;
                for (int i = 0; i < (int)stReward.bNum; i++)
                {
                    COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[i];
                    byte bType = cOMDT_REWARD_INFO.bType;
                    if (bType == 11)
                    {
                        PVESettleView._coinTo    = cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin;
                        PVESettleView._coinMulti = settleData.stMultipleDetail;
                    }
                }
                PVESettleView._coinTweenText = component;
                PVESettleView.DoCoinAndExpTween();
            }
            ListView <COMDT_REWARD_INFO> listView = new ListView <COMDT_REWARD_INFO>();
            GameObject gameObject5 = belongForm.transform.Find("Root/Panel_Award/Award/Panel_QQVIPGold").gameObject;

            if (gameObject5 != null)
            {
                gameObject5.CustomSetActive(false);
            }
            GameObject gameObject6 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/FirstGain").gameObject;

            if (gameObject6 != null)
            {
                gameObject6.CustomSetActive(false);
            }
            for (int j = 0; j < (int)stReward.bNum; j++)
            {
                COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[j];
                byte bType = cOMDT_REWARD_INFO.bType;
                if (bType != 6)
                {
                    if (bType == 11)
                    {
                        CUICommonSystem.AppendMultipleText(component, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseCoin, ref settleData.stMultipleDetail, 0, -1));
                        if (gameObject5 != null)
                        {
                            gameObject5.CustomSetActive(false);
                            Text       component11 = gameObject5.transform.FindChild("Text_Value").gameObject.GetComponent <Text>();
                            GameObject gameObject7 = gameObject5.transform.FindChild("Icon_QQVIP").gameObject;
                            GameObject gameObject8 = gameObject5.transform.FindChild("Icon_QQSVIP").gameObject;
                            gameObject7.CustomSetActive(false);
                            gameObject8.CustomSetActive(false);
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            uint qqVipExtraCoin = CUseable.GetQqVipExtraCoin(cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin, ref settleData.stMultipleDetail, 0);
                            if (masterRoleInfo != null && qqVipExtraCoin > 0u)
                            {
                                component11.text = string.Format("+{0}", qqVipExtraCoin);
                                if (masterRoleInfo.HasVip(16))
                                {
                                    gameObject5.CustomSetActive(true);
                                    gameObject8.CustomSetActive(true);
                                }
                                else if (masterRoleInfo.HasVip(1))
                                {
                                    gameObject5.CustomSetActive(true);
                                    gameObject7.CustomSetActive(true);
                                }
                            }
                            gameObject5.CustomSetActive(false);
                        }
                    }
                }
                else
                {
                    listView.Add(stReward.astRewardDetail[j]);
                    if (gameObject6 != null)
                    {
                        gameObject6.CustomSetActive(false);
                    }
                }
            }
            GameObject gameObject9 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/itemCell").gameObject;

            gameObject9.CustomSetActive(false);
            if (listView.get_Count() > 0)
            {
                Text component12 = gameObject9.transform.FindChild("ItemName").gameObject.GetComponent <Text>();
                gameObject9.CustomSetActive(true);
                COMDT_REWARD_INFO cOMDT_REWARD_INFO = listView.get_Item(0);
                PVESettleView.SetItemEtcCell(belongForm, gameObject9, component12, cOMDT_REWARD_INFO, settleData);
            }
        }
示例#9
0
        public static void SetItemEtcCell(CUIFormScript form, GameObject item, Text name, COMDT_REWARD_INFO rewardInfo, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            byte bType = rewardInfo.bType;

            switch (bType)
            {
            case 1:
            {
                CUseable cUseable = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, 0uL, rewardInfo.stRewardInfo.stItem.dwItemID, (int)rewardInfo.stRewardInfo.stItem.dwCnt, 0);
                cUseable.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false);
                ResPropInfo dataByKey = GameDataMgr.itemDatabin.GetDataByKey(rewardInfo.stRewardInfo.stItem.dwItemID);
                if (dataByKey != null)
                {
                    name.set_text(StringHelper.UTF8BytesToString(ref dataByKey.szName));
                }
                break;
            }

            case 2:
                break;

            case 3:
            {
                CUseable cUseable2 = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDianQuan, (int)rewardInfo.stRewardInfo.dwCoupons);
                cUseable2.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable2, true, false, false, false);
                name.set_text(cUseable2.m_name);
                break;
            }

            case 4:
            {
                CUseable cUseable3 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMEQUIP, 0uL, rewardInfo.stRewardInfo.stEquip.dwEquipID, (int)rewardInfo.stRewardInfo.stEquip.dwCnt, 0);
                cUseable3.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable3, true, false, false, false);
                ResEquipInfo dataByKey2 = GameDataMgr.equipInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.stEquip.dwEquipID);
                if (dataByKey2 != null)
                {
                    name.set_text(StringHelper.UTF8BytesToString(ref dataByKey2.szName));
                }
                break;
            }

            case 5:
            {
                CUseable cUseable4 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_HERO, 0uL, rewardInfo.stRewardInfo.stHero.dwHeroID, (int)rewardInfo.stRewardInfo.stHero.dwCnt, 0);
                cUseable4.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable4, true, false, false, false);
                ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(rewardInfo.stRewardInfo.stHero.dwHeroID);
                if (dataByKey3 != null)
                {
                    name.set_text(StringHelper.UTF8BytesToString(ref dataByKey3.szName));
                }
                break;
            }

            case 6:
            {
                CUseable cUseable5 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, 0uL, rewardInfo.stRewardInfo.stSymbol.dwSymbolID, (int)rewardInfo.stRewardInfo.stSymbol.dwCnt, 0);
                cUseable5.SetMultiple(ref settleData.stMultipleDetail, true);
                CUICommonSystem.SetItemCell(form, item, cUseable5, true, false, false, false);
                ResSymbolInfo dataByKey4 = GameDataMgr.symbolInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.stSymbol.dwSymbolID);
                if (dataByKey4 != null)
                {
                    name.set_text(StringHelper.UTF8BytesToString(ref dataByKey4.szName));
                }
                break;
            }

            default:
                if (bType == 16)
                {
                    CUseable cUseable6 = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDiamond, (int)rewardInfo.stRewardInfo.dwDiamond);
                    cUseable6.SetMultiple(ref settleData.stMultipleDetail, true);
                    CUICommonSystem.SetItemCell(form, item, cUseable6, true, false, false, false);
                    name.set_text(cUseable6.m_name);
                }
                break;
            }
        }