예제 #1
0
        private static void SetTeamHeroList(GameObject list, List <uint> heroIds, out int teamPower)
        {
            CUIListScript        component = list.GetComponent <CUIListScript>();
            CUIListElementScript elemenet  = null;

            teamPower = 0;
            component.SetElementAmount(heroIds.Count);
            for (int i = 0; i < heroIds.Count; i++)
            {
                elemenet = component.GetElemenet(i);
                GameObject gameObject = elemenet.gameObject.transform.Find("heroItemCell").gameObject;
                if (heroIds[i] > 0)
                {
                    IHeroData data = CHeroDataFactory.CreateHeroData(heroIds[i]);
                    teamPower += data.combatEft;
                    CUICommonSystem.SetHeroItemData(elemenet.m_belongedFormScript, gameObject, data, enHeroHeadType.enIcon, false, enHeroInfoShowType.enPVE);
                    elemenet.gameObject.CustomSetActive(true);
                    gameObject.gameObject.CustomSetActive(true);
                }
                else
                {
                    elemenet.gameObject.CustomSetActive(false);
                    gameObject.gameObject.CustomSetActive(false);
                }
            }
        }
예제 #2
0
        private static void SetTeamHeroList(GameObject list, COMDT_BATTLELIST_LIST battleList, uint battleListID, out int teamPower)
        {
            CUIListScript component = list.GetComponent <CUIListScript>();

            teamPower = 0;
            component.SetElementAmount(0);
            if (battleList == null || battleList.dwListNum == 0u)
            {
                return;
            }
            int num = 0;

            while ((long)num < (long)((ulong)battleList.dwListNum))
            {
                if (battleList.astBattleList[num].dwBattleListID == battleListID)
                {
                    if (battleList.astBattleList[num].stBattleList.wHeroCnt == 0)
                    {
                        return;
                    }
                    component.SetElementAmount((int)battleList.astBattleList[num].stBattleList.wHeroCnt);
                    int num2 = 0;
                    for (int i = 0; i < (int)battleList.astBattleList[num].stBattleList.wHeroCnt; i++)
                    {
                        CUIListElementScript elemenet   = component.GetElemenet(i);
                        GameObject           gameObject = elemenet.gameObject.transform.Find("heroItemCell").gameObject;
                        if (battleList.astBattleList[num].stBattleList.BattleHeroList[i] > 0u)
                        {
                            IHeroData heroData = CHeroDataFactory.CreateHeroData(battleList.astBattleList[num].stBattleList.BattleHeroList[i]);
                            teamPower += heroData.combatEft;
                            CUICommonSystem.SetHeroItemData(elemenet.m_belongedFormScript, gameObject, heroData, enHeroHeadType.enIcon, false, true);
                            elemenet.gameObject.CustomSetActive(true);
                            gameObject.gameObject.CustomSetActive(true);
                            num2++;
                        }
                        else
                        {
                            elemenet.gameObject.CustomSetActive(false);
                            gameObject.gameObject.CustomSetActive(false);
                        }
                    }
                    break;
                }
                else
                {
                    num++;
                }
            }
        }
예제 #3
0
        private static void SetTeamHeroList(GameObject list, COMDT_BATTLELIST_LIST battleList, uint battleListID, out int teamPower)
        {
            CUIListScript        component = list.GetComponent <CUIListScript>();
            CUIListElementScript elemenet  = null;

            teamPower = 0;
            component.SetElementAmount(0);
            if ((battleList != null) && (battleList.dwListNum != 0))
            {
                for (int i = 0; i < battleList.dwListNum; i++)
                {
                    if (battleList.astBattleList[i].dwBattleListID == battleListID)
                    {
                        if (battleList.astBattleList[i].stBattleList.wHeroCnt == 0)
                        {
                            return;
                        }
                        component.SetElementAmount(battleList.astBattleList[i].stBattleList.wHeroCnt);
                        int num2 = 0;
                        for (int j = 0; j < battleList.astBattleList[i].stBattleList.wHeroCnt; j++)
                        {
                            elemenet = component.GetElemenet(j);
                            GameObject gameObject = elemenet.gameObject.transform.Find("heroItemCell").gameObject;
                            if (battleList.astBattleList[i].stBattleList.BattleHeroList[j] > 0)
                            {
                                IHeroData data = CHeroDataFactory.CreateHeroData(battleList.astBattleList[i].stBattleList.BattleHeroList[j]);
                                teamPower += data.combatEft;
                                CUICommonSystem.SetHeroItemData(elemenet.m_belongedFormScript, gameObject, data, enHeroHeadType.enIcon, false, enHeroInfoShowType.enPVE);
                                elemenet.gameObject.CustomSetActive(true);
                                gameObject.gameObject.CustomSetActive(true);
                                num2++;
                            }
                            else
                            {
                                elemenet.gameObject.CustomSetActive(false);
                                gameObject.gameObject.CustomSetActive(false);
                            }
                        }
                        break;
                    }
                }
            }
        }
예제 #4
0
        public static void UpdateArenaSelfInfo()
        {
            if (Singleton <CArenaSystem> .instance.m_fightHeroInfoList != null)
            {
                CUIFormScript form = Singleton <CUIManager> .instance.GetForm(RankingSystem.s_rankingForm);

                if (form != null)
                {
                    uint pvpLevel = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().PvpLevel;

                    List <uint> arenaDefHeroList = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_arenaDefHeroList;

                    GameObject        widget    = form.GetWidget(0x12);
                    RankingItemHelper component = widget.GetComponent <RankingItemHelper>();
                    SetGameObjChildText(widget, "NameGroup/PlayerName", Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().Name);
                    SetGameObjChildText(widget, "PlayerLv", string.Format("Lv.{0}", pvpLevel.ToString(CultureInfo.InvariantCulture)));
                    SetHostUrlHeadIcon(Utility.FindChild(widget, "HeadIcon"));
                    MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(Utility.GetComponetInChild <Image>(widget, "NameGroup/QQVipIcon"));

                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(Utility.GetComponetInChild <Image>(widget, "NobeIcon"), (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false);

                    MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(Utility.GetComponetInChild <Image>(widget, "HeadFrame"), (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId);

                    MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(Utility.FindChild(widget, "NameGroup/WXIcon"), Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.Wechat, true, false);

                    MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(Utility.FindChild(widget, "NameGroup/QQGameCenterIcon"), Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.QQ, true, false);

                    MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(Utility.FindChild(widget, "NameGroup/GuestGameCenterIcon"), Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.Guest, true, false);

                    RankingNumSet(Singleton <CArenaSystem> .instance.m_fightHeroInfoList.stArenaInfo.dwSelfRank, component);
                    for (int i = 0; i < 3; i++)
                    {
                        int        num5 = i + 1;
                        GameObject obj3 = Utility.FindChild(widget, string.Format("listHero/heroItemCell{0}", num5.ToString()));
                        if (arenaDefHeroList.Count > i)
                        {
                            obj3.CustomSetActive(true);
                            IHeroData data = CHeroDataFactory.CreateHeroData(arenaDefHeroList[i]);
                            CUICommonSystem.SetHeroItemData(form, obj3, data, enHeroHeadType.enIcon, false);
                        }
                        else
                        {
                            obj3.CustomSetActive(false);
                        }
                    }
                    ListView <COMDT_ARENA_FIGHT_RECORD> recordList = Singleton <CArenaSystem> .instance.m_recordList;
                    ulong playerUllUID = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID;

                    int num4 = 0;
                    if ((recordList != null) && (recordList.Count > 0))
                    {
                        if (recordList[0].ullAtkerUid == playerUllUID)
                        {
                            if (recordList[0].bResult == 1)
                            {
                                num4 = (int)(recordList[0].dwAtkerRank - recordList[0].dwTargetRank);
                            }
                        }
                        else if (recordList[0].bResult == 1)
                        {
                            num4 = (int)(recordList[0].dwAtkerRank - recordList[0].dwTargetRank);
                        }
                    }
                    GameObject obj4 = Utility.FindChild(widget, "ChangeIcon");
                    if (num4 == 0)
                    {
                        obj4.CustomSetActive(false);
                        SetGameObjChildText(widget, "ChangeNum", "--");
                    }
                    else if (num4 > 0)
                    {
                        obj4.CustomSetActive(true);
                        obj4.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
                        SetGameObjChildText(widget, "ChangeNum", num4.ToString(CultureInfo.InvariantCulture));
                    }
                    else if (num4 < 0)
                    {
                        obj4.CustomSetActive(true);
                        obj4.transform.localEulerAngles = new Vector3(0f, 0f, 180f);
                        SetGameObjChildText(widget, "ChangeNum", num4.ToString(CultureInfo.InvariantCulture));
                    }
                }
            }
        }