Esempio n. 1
0
        private void OnAchievementOpenAwardForm(CUIEvent uiEvent)
        {
            uint           tagUInt   = uiEvent.m_eventParams.tagUInt;
            ResAchievement dataByKey = GameDataMgr.achieveDatabin.GetDataByKey(tagUInt);

            if (dataByKey != null)
            {
                ListView <CUseable> inList = new ListView <CUseable>();
                CUseable            item   = CUseableManager.CreateVirtualUseable(enVirtualItemType.enAchievementPoint, (int)dataByKey.dwPoint);
                inList.Add(item);
                for (int i = 0; i < dataByKey.astReward.Length; i++)
                {
                    if ((dataByKey.astReward[i].bRewardType != 0) && (dataByKey.astReward[i].dwRewardNum > 0))
                    {
                        CUseable useable2 = CUseableManager.CreateUsableByServerType((RES_REWARDS_TYPE)dataByKey.astReward[i].bRewardType, (int)dataByKey.astReward[i].dwRewardNum, dataByKey.astReward[i].dwRewardID);
                        if (useable2 != null)
                        {
                            inList.Add(useable2);
                        }
                    }
                }
                if (inList.Count > 0)
                {
                    Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(inList), Singleton <CTextManager> .GetInstance().GetText("Achievement_Get_Award_Success"), false, enUIEventID.None, false, false, "Form_Award");
                }
            }
        }
Esempio n. 2
0
        public static T[] AddElement <T>(T[] elements, T element)
        {
            ListView <T> listView = new ListView <T>(elements);

            listView.Add(element);
            return(LinqS.ToArray <T>(listView));
        }
 public static T[] AddElement <T>(T[] elements, T element)
 {
     return(LinqS.ToArray <T>(new ListView <T>(elements)
     {
         element
     }));
 }
 private void OnClickGetNewHeroPanel(CUIEvent uiEvent)
 {
     if (this.rewardItems != null && this.rewardItems.Count > 0)
     {
         Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(this.rewardItems), null, false, enUIEventID.None, false, false, "Form_Award");
     }
 }
Esempio n. 5
0
        public static T[] AddElement <T>(T[] elements, T element)
        {
            ListView <T> inList = new ListView <T>(elements);

            inList.Add(element);
            return(LinqS.ToArray <T>(inList));
        }
Esempio n. 6
0
    private static Texture[] PreloadTexture(GameObject tarObj, List <GameObject> parentPrefabList)
    {
        if (!IsSafe())
        {
            return(null);
        }
        Renderer[]         componentsInChildren = tarObj.GetComponentsInChildren <Renderer>(true);
        ListView <Texture> inList = new ListView <Texture>();

        foreach (Renderer renderer in componentsInChildren)
        {
            if ((renderer.sharedMaterials != null) && (renderer.sharedMaterials.Length > 0))
            {
                foreach (Material material in renderer.sharedMaterials)
                {
                    if ((material != null) && (material.mainTexture != null))
                    {
                        inList.Add(material.mainTexture);
                    }
                }
            }
        }
        foreach (NcSpriteTexture texture in tarObj.GetComponentsInChildren <NcSpriteTexture>(true))
        {
            if (texture.m_NcSpriteFactoryPrefab != null)
            {
                Texture[] collection = PreloadPrefab(texture.m_NcSpriteFactoryPrefab, parentPrefabList, false);
                if (collection != null)
                {
                    inList.AddRange(collection);
                }
            }
        }
        foreach (NcSpriteFactory factory in tarObj.GetComponentsInChildren <NcSpriteFactory>(true))
        {
            if (factory.m_SpriteList != null)
            {
                for (int i = 0; i < factory.m_SpriteList.Count; i++)
                {
                    if (factory.m_SpriteList[i].m_EffectPrefab != null)
                    {
                        Texture[] textureArray4 = PreloadPrefab(factory.m_SpriteList[i].m_EffectPrefab, parentPrefabList, true);
                        if (textureArray4 == null)
                        {
                            factory.m_SpriteList[i].m_EffectPrefab = null;
                        }
                        else
                        {
                            inList.AddRange(textureArray4);
                        }
                        if (factory.m_SpriteList[i].m_AudioClip != null)
                        {
                        }
                    }
                }
            }
        }
        return(LinqS.ToArray <Texture>(inList));
    }
Esempio n. 7
0
        public static void OnReceiveDianQuanReward(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_COUPONS_REWARDINFO stCouponsRewardRsp = msg.stPkgData.stCouponsRewardRsp;
            bool       flag     = true;
            CPaySystem instance = Singleton <CPaySystem> .GetInstance();

            instance.rewardItems.Clear();
            int num = Mathf.Min(stCouponsRewardRsp.stRewardInfo.bNum, stCouponsRewardRsp.stRewardInfo.astRewardDetail.Length);

            for (int i = 0; i < num; i++)
            {
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 5)
                {
                    CUICommonSystem.ShowNewHeroOrSkin(stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stRewardInfo.stHero.dwHeroID, 0, enUIEventID.Pay_ClickGetNewHeroPanel, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO, false, null, enFormPriority.Priority1, 0, 0);
                    flag = false;
                    break;
                }
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 10)
                {
                    uint num3;
                    uint num4;
                    CSkinInfo.ResolveHeroSkin(stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stRewardInfo.stSkin.dwSkinID, out num3, out num4);
                    CUICommonSystem.ShowNewHeroOrSkin(num3, num4, enUIEventID.Pay_ClickGetNewHeroPanel, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_SKIN, false, null, enFormPriority.Priority1, 0, 0);
                    flag = false;
                    break;
                }
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 1)
                {
                    if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bFromType == 1)
                    {
                        uint           dwHeroID  = stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stFromInfo.stHeroInfo.dwHeroID;
                        ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(dwHeroID);
                        if (dataByKey != null)
                        {
                            CUICommonSystem.ShowNewHeroOrSkin(dwHeroID, 0, enUIEventID.Pay_ClickGetNewHeroPanel, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO, true, null, enFormPriority.Priority1, dataByKey.dwChgItemCnt, 0);
                        }
                    }
                    else if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bFromType == 2)
                    {
                        uint dwSkinID = stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stFromInfo.stSkinInfo.dwSkinID;
                        uint heroId   = 0;
                        uint skinId   = 0;
                        CSkinInfo.ResolveHeroSkin(dwSkinID, out heroId, out skinId);
                        ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(heroId, skinId);
                        if (heroSkin != null)
                        {
                            CUICommonSystem.ShowNewHeroOrSkin(heroId, skinId, enUIEventID.Pay_ClickGetNewHeroPanel, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO, true, null, enFormPriority.Priority1, heroSkin.dwChgItemCnt, 0);
                        }
                    }
                }
            }
            instance.rewardItems = CUseableManager.GetUseableListFromReward(stCouponsRewardRsp.stRewardInfo);
            if (flag)
            {
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(instance.rewardItems), null, false, enUIEventID.None, false, false, "Form_Award");
            }
        }
Esempio n. 8
0
 public static T[] AppendElements<T>(T[] elements, T[] appendElements)
 {
     ListView<T> inList = new ListView<T>(elements);
     if (appendElements != null)
     {
         inList.AddRange(appendElements);
     }
     return LinqS.ToArray<T>(inList);
 }
        public static T[] AppendElements <T>(T[] elements, T[] appendElements)
        {
            ListView <T> listView = new ListView <T>(elements);

            if (appendElements != null)
            {
                listView.AddRange(appendElements);
            }
            return(LinqS.ToArray <T>(listView));
        }
Esempio n. 10
0
        public static void SendItemSaleMsg(ListView <CSDT_ITEM_DELINFO> itemList)
        {
            CSPkg             msg = NetworkModule.CreateDefaultCSPKG(0x44d);
            CSDT_ITEM_DELLIST csdt_item_dellist = new CSDT_ITEM_DELLIST {
                wItemCnt    = (ushort)itemList.Count,
                astItemList = LinqS.ToArray <CSDT_ITEM_DELINFO>(itemList)
            };

            msg.stPkgData.stItemSale.stSaleList = csdt_item_dellist;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
Esempio n. 11
0
        public void OnHuoyue_Reward_RES(ref CSPkg pkg)
        {
            SCPKG_GETHUOYUEDUREWARD_RSP stHuoYueDuRewardRsp = pkg.stPkgData.stHuoYueDuRewardRsp;

            this.model.huoyue_data.Get_Reward((RES_HUOYUEDU_TYPE)stHuoYueDuRewardRsp.bRewardType, stHuoYueDuRewardRsp.wHuoYueDuId);
            if (stHuoYueDuRewardRsp.stRewardInfo.bNum > 0)
            {
                ListView <CUseable> useableListFromReward = CUseableManager.GetUseableListFromReward(stHuoYueDuRewardRsp.stRewardInfo);
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(useableListFromReward), null, false, enUIEventID.None, false, false, "Form_Award");
            }
            if (this.m_taskView != null)
            {
                this.m_taskView.Refresh_Huoyue();
            }
        }
Esempio n. 12
0
        public static void OnSCID_GETPVPLEVELREWARD_RSP(CSPkg pkg)
        {
            SCPKG_GETPVPLEVELREWARD_RSP stLevelRewardRsp = pkg.stPkgData.get_stLevelRewardRsp();

            if (stLevelRewardRsp.iErrorCode == 0)
            {
                Singleton <CTaskSys> .get_instance().model.SyncServerLevelRewardFlagData(stLevelRewardRsp.ullLevelRewardFlag);

                ListView <CUseable> useableListFromReward = CUseableManager.GetUseableListFromReward(stLevelRewardRsp.stRewardInfo);
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(useableListFromReward), null, false, enUIEventID.None, false, false, "Form_Award");

                Singleton <CTaskSys> .get_instance().m_taskView.Refresh();
            }
            else
            {
                Debug.LogError("---领取等级奖励 response error, errorcode:" + stLevelRewardRsp.iErrorCode);
            }
        }
Esempio n. 13
0
        public static void ShowSeasonEndGetRewardForm(byte grade)
        {
            ResRankRewardConf dataByKey = GameDataMgr.rankRewardDatabin.GetDataByKey((uint)grade);

            if (dataByKey != null)
            {
                ListView <CUseable> listView = new ListView <CUseable>();
                for (int i = 0; i < dataByKey.astRewardDetail.Length; i++)
                {
                    ResDT_ChapterRewardInfo resDT_ChapterRewardInfo = dataByKey.astRewardDetail[i];
                    if (resDT_ChapterRewardInfo.bType != 0)
                    {
                        CUseable cUseable = CUseableManager.CreateUsableByServerType((RES_REWARDS_TYPE)resDT_ChapterRewardInfo.bType, (int)resDT_ChapterRewardInfo.dwNum, resDT_ChapterRewardInfo.dwID);
                        if (cUseable != null)
                        {
                            listView.Add(cUseable);
                        }
                    }
                }
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(listView), Singleton <CTextManager> .GetInstance().GetText("Ladder_Season_Reward"), false, enUIEventID.Ladder_ReqGetSeasonReward, false, false, "Form_Award");
            }
        }
Esempio n. 14
0
        private void On_GET_BURNING_REWARD_RSP(CSPkg msg)
        {
            SCPKG_GET_BURNING_REWARD_RSP stGetBurningRewardRsp = msg.stPkgData.get_stGetBurningRewardRsp();

            if (stGetBurningRewardRsp.iErrCode == 0)
            {
                if (stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().bNextLevelNo != 0)
                {
                    this.model.Set_ENEMY_TEAM_INFO(this.model.curDifficultyType, (int)(stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().bNextLevelNo - 1), stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stNextEnemyInfo);
                }
                ListView <CUseable> useableListFromReward = CUseableManager.GetUseableListFromReward(stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stReward);
                for (int i = 0; i < useableListFromReward.get_Count(); i++)
                {
                    useableListFromReward.get_Item(i).SetMultiple(ref stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stMultipleDetail, true);
                }
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(useableListFromReward), null, false, enUIEventID.None, false, false, "Form_Award");

                this.model.FinishBox(this.model.curSelect_BoxIndex);
                if (this.model.curSelect_BoxIndex <= BurnExpeditionController.Max_Level_Index - 1)
                {
                    this.model.UnLockLevel(this.model.curSelect_BoxIndex + 1);
                    if (this.view != null)
                    {
                        this.view.Show_Line(this.model.curSelect_BoxIndex + 1);
                    }
                }
                this.model.CalcProgress();
                if (this.view != null)
                {
                    this.view.Show_Map();
                }
            }
            else if (stGetBurningRewardRsp.iErrCode != 12)
            {
                Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_GetAward"), stGetBurningRewardRsp.iErrCode), false);
            }
        }
Esempio n. 15
0
    private static Texture[] PreloadTexture(GameObject tarObj, List <GameObject> parentPrefabList)
    {
        if (!NcEffectBehaviour.IsSafe())
        {
            return(null);
        }
        Renderer[]         componentsInChildren = tarObj.GetComponentsInChildren <Renderer>(true);
        ListView <Texture> listView             = new ListView <Texture>();

        Renderer[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            Renderer renderer = array[i];
            if (renderer.sharedMaterials != null && renderer.sharedMaterials.Length > 0)
            {
                Material[] sharedMaterials = renderer.sharedMaterials;
                for (int j = 0; j < sharedMaterials.Length; j++)
                {
                    Material material = sharedMaterials[j];
                    if (material != null && material.mainTexture != null)
                    {
                        listView.Add(material.mainTexture);
                    }
                }
            }
        }
        NcSpriteTexture[] componentsInChildren2 = tarObj.GetComponentsInChildren <NcSpriteTexture>(true);
        NcSpriteTexture[] array2 = componentsInChildren2;
        for (int k = 0; k < array2.Length; k++)
        {
            NcSpriteTexture ncSpriteTexture = array2[k];
            if (ncSpriteTexture.m_NcSpriteFactoryPrefab != null)
            {
                Texture[] array3 = NcEffectBehaviour.PreloadPrefab(ncSpriteTexture.m_NcSpriteFactoryPrefab, parentPrefabList, false);
                if (array3 != null)
                {
                    listView.AddRange(array3);
                }
            }
        }
        NcSpriteFactory[] componentsInChildren3 = tarObj.GetComponentsInChildren <NcSpriteFactory>(true);
        NcSpriteFactory[] array4 = componentsInChildren3;
        for (int l = 0; l < array4.Length; l++)
        {
            NcSpriteFactory ncSpriteFactory = array4[l];
            if (ncSpriteFactory.m_SpriteList != null)
            {
                for (int m = 0; m < ncSpriteFactory.m_SpriteList.get_Count(); m++)
                {
                    if (ncSpriteFactory.m_SpriteList.get_Item(m).m_EffectPrefab != null)
                    {
                        Texture[] array5 = NcEffectBehaviour.PreloadPrefab(ncSpriteFactory.m_SpriteList.get_Item(m).m_EffectPrefab, parentPrefabList, true);
                        if (array5 == null)
                        {
                            ncSpriteFactory.m_SpriteList.get_Item(m).m_EffectPrefab = null;
                        }
                        else
                        {
                            listView.AddRange(array5);
                        }
                        if (ncSpriteFactory.m_SpriteList.get_Item(m).m_AudioClip != null)
                        {
                        }
                    }
                }
            }
        }
        return(LinqS.ToArray <Texture>(listView));
    }
Esempio n. 16
0
        public static void OnReceiveDianQuanReward(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_COUPONS_REWARDINFO stCouponsRewardRsp = msg.stPkgData.get_stCouponsRewardRsp();
            bool       flag     = true;
            CPaySystem instance = Singleton <CPaySystem> .GetInstance();

            instance.rewardItems.Clear();
            int num = Mathf.Min((int)stCouponsRewardRsp.stRewardInfo.bNum, stCouponsRewardRsp.stRewardInfo.astRewardDetail.Length);

            for (int i = 0; i < num; i++)
            {
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 5)
                {
                    CUICommonSystem.ShowNewHeroOrSkin(stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stRewardInfo.get_stHero().dwHeroID, 0u, enUIEventID.Pay_ClickGetNewHeroPanel, true, 5, false, null, enFormPriority.Priority1, 0u, 0);
                    flag = false;
                    break;
                }
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 10)
                {
                    uint heroId;
                    uint skinId;
                    CSkinInfo.ResolveHeroSkin(stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stRewardInfo.get_stSkin().dwSkinID, out heroId, out skinId);
                    CUICommonSystem.ShowNewHeroOrSkin(heroId, skinId, enUIEventID.Pay_ClickGetNewHeroPanel, true, 10, false, null, enFormPriority.Priority1, 0u, 0);
                    flag = false;
                    break;
                }
                if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bType == 1)
                {
                    if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bFromType == 1)
                    {
                        uint           dwHeroID  = stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stFromInfo.get_stHeroInfo().dwHeroID;
                        ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(dwHeroID);
                        if (dataByKey != null)
                        {
                            ResHeroShop resHeroShop = null;
                            GameDataMgr.heroShopInfoDict.TryGetValue(dataByKey.dwCfgID, ref resHeroShop);
                            CUICommonSystem.ShowNewHeroOrSkin(dwHeroID, 0u, enUIEventID.Pay_ClickGetNewHeroPanel, true, 5, true, null, enFormPriority.Priority1, (resHeroShop == null) ? 1u : resHeroShop.dwChgItemCnt, 0);
                        }
                    }
                    else if (stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].bFromType == 2)
                    {
                        uint dwSkinID = stCouponsRewardRsp.stRewardInfo.astRewardDetail[i].stFromInfo.get_stSkinInfo().dwSkinID;
                        uint heroId2  = 0u;
                        uint skinId2  = 0u;
                        CSkinInfo.ResolveHeroSkin(dwSkinID, out heroId2, out skinId2);
                        ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(heroId2, skinId2);
                        if (heroSkin != null)
                        {
                            ResHeroSkinShop resHeroSkinShop = null;
                            GameDataMgr.skinShopInfoDict.TryGetValue(heroSkin.dwID, ref resHeroSkinShop);
                            CUICommonSystem.ShowNewHeroOrSkin(heroId2, skinId2, enUIEventID.Pay_ClickGetNewHeroPanel, true, 5, true, null, enFormPriority.Priority1, (resHeroSkinShop == null) ? 1u : resHeroSkinShop.dwChgItemCnt, 0);
                        }
                    }
                }
            }
            instance.rewardItems = CUseableManager.GetUseableListFromReward(stCouponsRewardRsp.stRewardInfo);
            if (flag)
            {
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(instance.rewardItems), null, false, enUIEventID.None, false, false, "Form_Award");
            }
        }
Esempio n. 17
0
        public void CalculateKDA(COMDT_GAME_INFO gameInfo)
        {
            CRoleInfo masterRoleInfo = this.GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null");
            if (masterRoleInfo == null)
            {
                return;
            }
            PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA();

            if (hostKDA != null)
            {
                int num   = 0;
                int num2  = 0;
                int num3  = 0;
                int num4  = 0;
                int num5  = 0;
                int num6  = 0;
                int num7  = 0;
                int num8  = 0;
                int num9  = 0;
                int num10 = 0;
                int num11 = 0;
                int num12 = 0;
                ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    if (enumerator.get_Current() != null)
                    {
                        num   += enumerator.get_Current().LegendaryNum;
                        num2  += enumerator.get_Current().PentaKillNum;
                        num3  += enumerator.get_Current().QuataryKillNum;
                        num4  += enumerator.get_Current().TripleKillNum;
                        num5  += enumerator.get_Current().DoubleKillNum;
                        num8  += ((!enumerator.get_Current().bHurtMost) ? 0 : 1);
                        num9  += ((!enumerator.get_Current().bHurtTakenMost) ? 0 : 1);
                        num10 += ((!enumerator.get_Current().bGetCoinMost) ? 0 : 1);
                        num11 += ((!enumerator.get_Current().bAsssistMost) ? 0 : 1);
                        num12 += ((!enumerator.get_Current().bKillMost) ? 0 : 1);
                    }
                }
                if (gameInfo.bGameResult == 1)
                {
                    uint mvpPlayer = Singleton <BattleStatistic> .get_instance().GetMvpPlayer(hostKDA.PlayerCamp, true);

                    if (mvpPlayer != 0u)
                    {
                        num6 = ((mvpPlayer != hostKDA.PlayerId) ? 0 : 1);
                    }
                }
                else if (gameInfo.bGameResult == 2)
                {
                    uint mvpPlayer2 = Singleton <BattleStatistic> .get_instance().GetMvpPlayer(hostKDA.PlayerCamp, false);

                    if (mvpPlayer2 != 0u)
                    {
                        num7 = ((mvpPlayer2 != hostKDA.PlayerId) ? 0 : 1);
                    }
                }
                bool flag   = false;
                bool flag2  = false;
                bool flag3  = false;
                bool flag4  = false;
                bool flag5  = false;
                bool flag6  = false;
                bool flag7  = false;
                bool flag8  = false;
                bool flag9  = false;
                bool flag10 = false;
                bool flag11 = false;
                bool flag12 = false;
                int  num13  = 0;
                ListView <COMDT_STATISTIC_KEY_VALUE_INFO> listView = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>();
                while ((long)num13 < (long)((ulong)masterRoleInfo.pvpDetail.stKVDetail.dwNum))
                {
                    COMDT_STATISTIC_KEY_VALUE_INFO cOMDT_STATISTIC_KEY_VALUE_INFO = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[num13];
                    switch (cOMDT_STATISTIC_KEY_VALUE_INFO.dwKey)
                    {
                    case 13u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num6;
                        flag6 = true;
                        break;

                    case 14u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num7;
                        flag7 = true;
                        break;

                    case 15u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num;
                        flag5 = true;
                        break;

                    case 16u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num5;
                        flag = true;
                        break;

                    case 17u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num4;
                        flag2 = true;
                        break;

                    case 27u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num3;
                        flag3 = true;
                        break;

                    case 28u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num2;
                        flag4 = true;
                        break;

                    case 29u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num8;
                        flag8 = true;
                        break;

                    case 30u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num10;
                        flag10 = true;
                        break;

                    case 31u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num9;
                        flag9 = true;
                        break;

                    case 32u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num11;
                        flag11 = true;
                        break;

                    case 33u:
                        cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num12;
                        flag12 = true;
                        break;
                    }
                    num13++;
                }
                if (!flag)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 16u,
                        dwValue = (uint)num5
                    });
                }
                if (!flag2)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 17u,
                        dwValue = (uint)num4
                    });
                }
                if (!flag3)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 27u,
                        dwValue = (uint)num3
                    });
                }
                if (!flag4)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 28u,
                        dwValue = (uint)num2
                    });
                }
                if (!flag5)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 15u,
                        dwValue = (uint)num
                    });
                }
                if (!flag6)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 13u,
                        dwValue = (uint)num6
                    });
                }
                if (!flag7)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 14u,
                        dwValue = (uint)num7
                    });
                }
                if (!flag8)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 29u,
                        dwValue = (uint)num8
                    });
                }
                if (!flag9)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 31u,
                        dwValue = (uint)num9
                    });
                }
                if (!flag10)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 30u,
                        dwValue = (uint)num10
                    });
                }
                if (!flag11)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 32u,
                        dwValue = (uint)num11
                    });
                }
                if (!flag12)
                {
                    listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO
                    {
                        dwKey   = 33u,
                        dwValue = (uint)num12
                    });
                }
                if (listView.get_Count() > 0)
                {
                    masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)listView.get_Count();
                    listView.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail);
                    masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(listView);
                }
            }
        }
Esempio n. 18
0
        public void CalculateKDA(COMDT_GAME_INFO gameInfo)
        {
            CRoleInfo masterRoleInfo = this.GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null");
            if (masterRoleInfo != null)
            {
                PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA();

                if (hostKDA != null)
                {
                    int num   = 0;
                    int num2  = 0;
                    int num3  = 0;
                    int num4  = 0;
                    int num5  = 0;
                    int num6  = 0;
                    int num7  = 0;
                    int num8  = 0;
                    int num9  = 0;
                    int num10 = 0;
                    int num11 = 0;
                    int num12 = 0;
                    ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        if (enumerator.Current != null)
                        {
                            num   += enumerator.Current.LegendaryNum;
                            num2  += enumerator.Current.PentaKillNum;
                            num3  += enumerator.Current.QuataryKillNum;
                            num4  += enumerator.Current.TripleKillNum;
                            num5  += enumerator.Current.DoubleKillNum;
                            num8  += !enumerator.Current.bHurtMost ? 0 : 1;
                            num9  += !enumerator.Current.bHurtTakenMost ? 0 : 1;
                            num10 += !enumerator.Current.bGetCoinMost ? 0 : 1;
                            num11 += !enumerator.Current.bAsssistMost ? 0 : 1;
                            num12 += !enumerator.Current.bKillMost ? 0 : 1;
                        }
                    }
                    if (gameInfo.bGameResult == 1)
                    {
                        uint mvpPlayer = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, true);

                        if (mvpPlayer != 0)
                        {
                            num6 = (mvpPlayer != hostKDA.PlayerId) ? 0 : 1;
                        }
                    }
                    else if (gameInfo.bGameResult == 2)
                    {
                        uint num14 = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, false);

                        if (num14 != 0)
                        {
                            num7 = (num14 != hostKDA.PlayerId) ? 0 : 1;
                        }
                    }
                    bool flag   = false;
                    bool flag2  = false;
                    bool flag3  = false;
                    bool flag4  = false;
                    bool flag5  = false;
                    bool flag6  = false;
                    bool flag7  = false;
                    bool flag8  = false;
                    bool flag9  = false;
                    bool flag10 = false;
                    bool flag11 = false;
                    bool flag12 = false;
                    int  index  = 0;
                    ListView <COMDT_STATISTIC_KEY_VALUE_INFO> inList = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>();
                    while (index < masterRoleInfo.pvpDetail.stKVDetail.dwNum)
                    {
                        COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[index];
                        switch (comdt_statistic_key_value_info.dwKey)
                        {
                        case 13:
                            comdt_statistic_key_value_info.dwValue += (uint)num6;
                            flag6 = true;
                            break;

                        case 14:
                            comdt_statistic_key_value_info.dwValue += (uint)num7;
                            flag7 = true;
                            break;

                        case 15:
                            comdt_statistic_key_value_info.dwValue += (uint)num;
                            flag5 = true;
                            break;

                        case 0x10:
                            comdt_statistic_key_value_info.dwValue += (uint)num5;
                            flag = true;
                            break;

                        case 0x11:
                            comdt_statistic_key_value_info.dwValue += (uint)num4;
                            flag2 = true;
                            break;

                        case 0x1b:
                            comdt_statistic_key_value_info.dwValue += (uint)num3;
                            flag3 = true;
                            break;

                        case 0x1c:
                            comdt_statistic_key_value_info.dwValue += (uint)num2;
                            flag4 = true;
                            break;

                        case 0x1d:
                            comdt_statistic_key_value_info.dwValue += (uint)num8;
                            flag8 = true;
                            break;

                        case 30:
                            comdt_statistic_key_value_info.dwValue += (uint)num10;
                            flag10 = true;
                            break;

                        case 0x1f:
                            comdt_statistic_key_value_info.dwValue += (uint)num9;
                            flag9 = true;
                            break;

                        case 0x20:
                            comdt_statistic_key_value_info.dwValue += (uint)num11;
                            flag11 = true;
                            break;

                        case 0x21:
                            comdt_statistic_key_value_info.dwValue += (uint)num12;
                            flag12 = true;
                            break;
                        }
                        index++;
                    }
                    COMDT_STATISTIC_KEY_VALUE_INFO item = null;
                    if (!flag)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x10,
                            dwValue = (uint)num5
                        };
                        inList.Add(item);
                    }
                    if (!flag2)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x11,
                            dwValue = (uint)num4
                        };
                        inList.Add(item);
                    }
                    if (!flag3)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1b,
                            dwValue = (uint)num3
                        };
                        inList.Add(item);
                    }
                    if (!flag4)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1c,
                            dwValue = (uint)num2
                        };
                        inList.Add(item);
                    }
                    if (!flag5)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 15,
                            dwValue = (uint)num
                        };
                        inList.Add(item);
                    }
                    if (!flag6)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 13,
                            dwValue = (uint)num6
                        };
                        inList.Add(item);
                    }
                    if (!flag7)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 14,
                            dwValue = (uint)num7
                        };
                        inList.Add(item);
                    }
                    if (!flag8)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1d,
                            dwValue = (uint)num8
                        };
                        inList.Add(item);
                    }
                    if (!flag9)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1f,
                            dwValue = (uint)num9
                        };
                        inList.Add(item);
                    }
                    if (!flag10)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 30,
                            dwValue = (uint)num10
                        };
                        inList.Add(item);
                    }
                    if (!flag11)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x20,
                            dwValue = (uint)num11
                        };
                        inList.Add(item);
                    }
                    if (!flag12)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x21,
                            dwValue = (uint)num12
                        };
                        inList.Add(item);
                    }
                    if (inList.Count > 0)
                    {
                        masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)inList.Count;
                        inList.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail);
                        masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(inList);
                    }
                }
            }
        }
Esempio n. 19
0
        public void CalculateKDA(COMDT_GAME_INFO gameInfo)
        {
            CRoleInfo masterRoleInfo = this.GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null");
            if (masterRoleInfo != null)
            {
                PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA();

                if (hostKDA != null)
                {
                    int num  = 0;
                    int num2 = 0;
                    int num3 = 0;
                    int num4 = 0;
                    int num5 = 0;
                    int num6 = 0;
                    int num7 = 0;
                    IEnumerator <HeroKDA> enumerator = hostKDA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        if (enumerator.Current != null)
                        {
                            num  += enumerator.Current.LegendaryNum;
                            num2 += enumerator.Current.PentaKillNum;
                            num3 += enumerator.Current.QuataryKillNum;
                            num4 += enumerator.Current.TripleKillNum;
                            num5 += enumerator.Current.DoubleKillNum;
                        }
                    }
                    if (gameInfo.bGameResult == 1)
                    {
                        uint mvpPlayer = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, true);

                        if (mvpPlayer != 0)
                        {
                            num6 = (mvpPlayer != hostKDA.PlayerId) ? 0 : 1;
                        }
                    }
                    else if (gameInfo.bGameResult == 2)
                    {
                        uint num9 = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, false);

                        if (num9 != 0)
                        {
                            num7 = (num9 != hostKDA.PlayerId) ? 0 : 1;
                        }
                    }
                    bool flag  = false;
                    bool flag2 = false;
                    bool flag3 = false;
                    bool flag4 = false;
                    bool flag5 = false;
                    bool flag6 = false;
                    bool flag7 = false;
                    int  index = 0;
                    ListView <COMDT_STATISTIC_KEY_VALUE_INFO> inList = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>();
                    while (index < masterRoleInfo.pvpDetail.stKVDetail.dwNum)
                    {
                        COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[index];
                        switch (((RES_STATISTIC_SETTLE_DATA_TYPE)comdt_statistic_key_value_info.dwKey))
                        {
                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_MVP_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num6;
                            flag6 = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_LOSE_SOUL:
                            comdt_statistic_key_value_info.dwValue += (uint)num7;
                            flag7 = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_GODLIKE_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num;
                            flag5 = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_DOUBLE_KILL_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num5;
                            flag = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_TRIPLE_KILL_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num4;
                            flag2 = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_QUATARY_KILL_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num3;
                            flag3 = true;
                            break;

                        case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_PENTA_KILL_CNT:
                            comdt_statistic_key_value_info.dwValue += (uint)num2;
                            flag4 = true;
                            break;
                        }
                        index++;
                    }
                    COMDT_STATISTIC_KEY_VALUE_INFO item = null;
                    if (!flag)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x10,
                            dwValue = (uint)num5
                        };
                        inList.Add(item);
                    }
                    if (!flag2)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x11,
                            dwValue = (uint)num4
                        };
                        inList.Add(item);
                    }
                    if (!flag3)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1b,
                            dwValue = (uint)num3
                        };
                        inList.Add(item);
                    }
                    if (!flag4)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 0x1c,
                            dwValue = (uint)num2
                        };
                        inList.Add(item);
                    }
                    if (!flag5)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 15,
                            dwValue = (uint)num
                        };
                        inList.Add(item);
                    }
                    if (!flag6)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 13,
                            dwValue = (uint)num6
                        };
                        inList.Add(item);
                    }
                    if (!flag7)
                    {
                        item = new COMDT_STATISTIC_KEY_VALUE_INFO {
                            dwKey   = 14,
                            dwValue = (uint)num7
                        };
                        inList.Add(item);
                    }
                    if (inList.Count > 0)
                    {
                        masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)inList.Count;
                        inList.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail);
                        masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(inList);
                    }
                }
            }
        }
Esempio n. 20
0
        private void ShowNextReward(CUIEvent firstIfNull)
        {
            if ((firstIfNull != null) || ((this._rewardShowList == null) && (this._rewardQueueIndex <= -1)))
            {
                if (this._rewardShowList == null)
                {
                    this._rewardQueueIndex++;
                    if (this._rewardQueueIndex >= this._rewardListQueue.Count)
                    {
                        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Common_NewHeroOrSkinFormClose, new CUIEventManager.OnUIEventHandler(this.ShowNextReward));

                        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Mall_Get_AWARD_CLOSE_FORM, new CUIEventManager.OnUIEventHandler(this.ShowNextReward));

                        this._rewardListQueue.Clear();
                        this._rewardQueueIndex = -1;
                        this._rewardShowIndex  = -1;
                        return;
                    }
                    this._rewardShowList   = this._rewardListQueue[this._rewardQueueIndex];
                    this._rewardShowIndex  = -1;
                    this._rewardHasSpecial = false;
                }
                while ((((++this._rewardShowIndex < this._rewardShowList.usabList.Count) && (this._rewardShowList.usabList[this._rewardShowIndex].MapRewardType != COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO)) && (this._rewardShowList.usabList[this._rewardShowIndex].MapRewardType != COM_REWARDS_TYPE.COM_REWARDS_TYPE_SKIN)) && ((this._rewardShowList.usabList[this._rewardShowIndex].MapRewardType != COM_REWARDS_TYPE.COM_REWARDS_TYPE_ITEM) || ((this._rewardShowList.usabList[this._rewardShowIndex].ExtraFromType != 1) && (this._rewardShowList.usabList[this._rewardShowIndex].ExtraFromType != 2))))
                {
                }
                if (this._rewardShowIndex < this._rewardShowList.usabList.Count)
                {
                    CUseable useable = this._rewardShowList.usabList[this._rewardShowIndex];
                    if (useable.MapRewardType == COM_REWARDS_TYPE.COM_REWARDS_TYPE_ITEM)
                    {
                        if (useable.ExtraFromType == 1)
                        {
                            CUICommonSystem.ShowNewHeroOrSkin((uint)useable.ExtraFromData, 0, enUIEventID.None, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO, true, null, enFormPriority.Priority1, (uint)useable.m_stackCount, 0);
                        }
                        else if (useable.ExtraFromType == 2)
                        {
                            int extraFromData = useable.ExtraFromData;
                            CUICommonSystem.ShowNewHeroOrSkin(0, (uint)extraFromData, enUIEventID.None, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_SKIN, true, null, enFormPriority.Priority1, (uint)useable.m_stackCount, 0);
                        }
                    }
                    else if (useable is CHeroSkin)
                    {
                        CHeroSkin skin = useable as CHeroSkin;
                        CUICommonSystem.ShowNewHeroOrSkin(skin.m_heroId, skin.m_skinId, enUIEventID.None, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_SKIN, true, null, enFormPriority.Priority1, 0, 0);
                    }
                    else
                    {
                        CUICommonSystem.ShowNewHeroOrSkin(useable.m_baseID, 0, enUIEventID.None, true, COM_REWARDS_TYPE.COM_REWARDS_TYPE_HERO, true, null, enFormPriority.Priority1, 0, 0);
                    }
                    this._rewardHasSpecial = true;
                }
                else if ((this._rewardShowList.usabList.Count > 1) || !this._rewardHasSpecial)
                {
                    bool flag = (this._rewardShowList.flags & 2) > 0;
                    Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(this._rewardShowList.usabList), Singleton <CTextManager> .GetInstance().GetText(!flag ? "gotAward" : "gotExtraAward"), true, enUIEventID.None, false, false, "Form_Award");

                    this._rewardShowList = null;
                }
                else
                {
                    this._rewardShowList = null;
                    this.ShowNextReward(new CUIEvent());
                }
            }
        }
Esempio n. 21
0
        private void ShowNextReward(CUIEvent firstIfNull)
        {
            if (firstIfNull == null && (this._rewardShowList != null || this._rewardQueueIndex > -1))
            {
                return;
            }
            if (this._rewardShowList == null)
            {
                this._rewardQueueIndex++;
                if (this._rewardQueueIndex >= this._rewardListQueue.get_Count())
                {
                    Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Common_NewHeroOrSkinFormClose, new CUIEventManager.OnUIEventHandler(this.ShowNextReward));

                    Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Mall_Get_AWARD_CLOSE_FORM, new CUIEventManager.OnUIEventHandler(this.ShowNextReward));

                    this._rewardListQueue.Clear();
                    this._rewardQueueIndex = -1;
                    this._rewardShowIndex  = -1;
                    return;
                }
                this._rewardShowList   = this._rewardListQueue.get_Item(this._rewardQueueIndex);
                this._rewardShowIndex  = -1;
                this._rewardHasSpecial = false;
            }
            while (++this._rewardShowIndex < this._rewardShowList.usabList.get_Count() && this._rewardShowList.usabList.get_Item(this._rewardShowIndex).MapRewardType != 5 && this._rewardShowList.usabList.get_Item(this._rewardShowIndex).MapRewardType != 10 && (this._rewardShowList.usabList.get_Item(this._rewardShowIndex).MapRewardType != 1 || (this._rewardShowList.usabList.get_Item(this._rewardShowIndex).ExtraFromType != 1 && this._rewardShowList.usabList.get_Item(this._rewardShowIndex).ExtraFromType != 2)))
            {
            }
            if (this._rewardShowIndex < this._rewardShowList.usabList.get_Count())
            {
                CUseable cUseable = this._rewardShowList.usabList.get_Item(this._rewardShowIndex);
                if (cUseable.MapRewardType == 1)
                {
                    if (cUseable.ExtraFromType == 1)
                    {
                        int extraFromData = cUseable.ExtraFromData;
                        CUICommonSystem.ShowNewHeroOrSkin((uint)extraFromData, 0u, enUIEventID.None, true, 5, true, null, enFormPriority.Priority1, (uint)cUseable.m_stackCount, 0);
                    }
                    else if (cUseable.ExtraFromType == 2)
                    {
                        int extraFromData2 = cUseable.ExtraFromData;
                        CUICommonSystem.ShowNewHeroOrSkin(0u, (uint)extraFromData2, enUIEventID.None, true, 10, true, null, enFormPriority.Priority1, (uint)cUseable.m_stackCount, 0);
                    }
                }
                else if (cUseable is CHeroSkin)
                {
                    CHeroSkin cHeroSkin = cUseable as CHeroSkin;
                    CUICommonSystem.ShowNewHeroOrSkin(cHeroSkin.m_heroId, cHeroSkin.m_skinId, enUIEventID.None, true, 10, true, null, enFormPriority.Priority1, 0u, 0);
                }
                else
                {
                    CUICommonSystem.ShowNewHeroOrSkin(cUseable.m_baseID, 0u, enUIEventID.None, true, 5, true, null, enFormPriority.Priority1, 0u, 0);
                }
                this._rewardHasSpecial = true;
            }
            else if (this._rewardShowList.usabList.get_Count() > 1 || !this._rewardHasSpecial)
            {
                bool flag = (this._rewardShowList.flags & 2) > 0;
                Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(this._rewardShowList.usabList), Singleton <CTextManager> .GetInstance().GetText((!flag) ? "gotAward" : "gotExtraAward"), true, enUIEventID.None, false, false, "Form_Award");

                this._rewardShowList = null;
            }
            else
            {
                this._rewardShowList = null;
                this.ShowNextReward(new CUIEvent());
            }
        }