コード例 #1
0
        public void Initialize(PoolObjHandle <ActorRoot> actorRoot, int campPos)
        {
            this.CampPos   = campPos;
            this.actorHero = actorRoot;
            this.HeroId    = this.actorHero.handle.TheActorMeta.ConfigId;
            ActorServerData        actorServerData   = default(ActorServerData);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider.GetActorServerData(ref actorRoot.handle.TheActorMeta, ref actorServerData))
            {
                this.SkinId = actorServerData.SkinId;
            }
            this.commonSkillID = 0u;
            actorDataProvider.GetActorServerCommonSkillData(ref this.actorHero.handle.TheActorMeta, out this.commonSkillID);
            for (int i = 0; i < 5; i++)
            {
                this.TalentArr[i] = new COMDT_SETTLE_TALENT_INFO();
            }
            this.m_numKill   = 0;
            this.m_numAssist = 0;
            this.m_numDead   = 0;
            this.m_stJudgeStat.Reset();
            this._totalCoin             = 0;
            this.m_iCoinFromKillMonster = 0;
            this.m_iCoinFromKillDragon  = 0;
            this.m_iCoinFromKillHero    = 0;
            this.m_iCoinFromKillSolider = 0;
            this.m_iCoinFromKillTower   = 0;
            this.m_iCoinFromSystem      = 0;
            this.m_iCoinFromSystemNoAI  = 0;
            this.scanEyeCnt             = 0u;
            this.m_JudgeRecords         = new ListValueView <JudgeStatc>(30);
        }
コード例 #2
0
        public void Initialize(PoolObjHandle <ActorRoot> actorRoot)
        {
            this.actorHero = actorRoot;
            this.HeroId    = this.actorHero.handle.TheActorMeta.ConfigId;
            ActorServerData        actorData         = new ActorServerData();
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider.GetActorServerData(ref actorRoot.handle.TheActorMeta, ref actorData))
            {
                this.SkinId = actorData.SkinId;
            }
            this.commonSkillID = 0;
            actorDataProvider.GetActorServerCommonSkillData(ref this.actorHero.handle.TheActorMeta, out this.commonSkillID);
            for (int i = 0; i < 5; i++)
            {
                this.TalentArr[i] = new COMDT_SETTLE_TALENT_INFO();
            }
            base.m_numKill   = 0;
            base.m_numAssist = 0;
            base.m_numDead   = 0;
            base._totalCoin  = 0;
        }
コード例 #3
0
        private static void ShowMultiLoading()
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CUILoadingSystem.PVP_PATH_LOADING, false, false);

            if (cUIFormScript == null)
            {
                return;
            }
            if (!Singleton <CUIEventManager> .GetInstance().HasUIEventListener(enUIEventID.IntimacyRela_LoadingClick))
            {
                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_LoadingClick, new CUIEventManager.OnUIEventHandler(CUILoadingSystem.On_IntimacyRela_LoadingClick));
            }
            SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorStaticData actorStaticData = default(ActorStaticData);
            ActorMeta       actorMeta       = default(ActorMeta);
            ActorMeta       actorMeta2      = default(ActorMeta);
            ActorServerData actorServerData = default(ActorServerData);

            actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
            for (int i = 1; i <= 2; i++)
            {
                List <Player> allCampPlayers = Singleton <GamePlayerCenter> .GetInstance().GetAllCampPlayers((COM_PLAYERCAMP)i);

                if (allCampPlayers == null)
                {
                    DebugHelper.Assert(false, "Loading Players is Null");
                }
                else
                {
                    Transform transform = (i == 1) ? cUIFormScript.transform.FindChild("UpPanel") : cUIFormScript.transform.FindChild("DownPanel");
                    int       num       = 1;
                    while ((long)num <= 5L)
                    {
                        string     name       = (i == 1) ? string.Format("Up_Player{0}", num) : string.Format("Down_Player{0}", num);
                        GameObject gameObject = transform.FindChild(name).gameObject;
                        gameObject.CustomSetActive(false);
                        num++;
                    }
                    List <Player> .Enumerator enumerator = allCampPlayers.GetEnumerator();
                    Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                    COM_PLAYERCAMP playerCamp = hostPlayer.PlayerCamp;
                    while (enumerator.MoveNext())
                    {
                        Player current = enumerator.get_Current();
                        if (current != null)
                        {
                            bool       flag        = current.PlayerId == hostPlayer.PlayerId;
                            string     name2       = (i == 1) ? string.Format("Up_Player{0}", current.CampPos + 1) : string.Format("Down_Player{0}", current.CampPos + 1);
                            GameObject gameObject2 = transform.FindChild(name2).gameObject;
                            gameObject2.CustomSetActive(true);
                            GameObject gameObject3 = gameObject2.transform.Find("RankFrame").gameObject;
                            bool       flag2       = current.PlayerCamp == playerCamp && (!Singleton <WatchController> .GetInstance().IsWatching || !Singleton <WatchController> .GetInstance().IsReplaying);
                            if (gameObject3 != null)
                            {
                                if (flag2)
                                {
                                    string rankFrameIconPath = CLadderView.GetRankFrameIconPath((byte)current.GradeOfRank, current.ClassOfRank);
                                    if (string.IsNullOrEmpty(rankFrameIconPath))
                                    {
                                        gameObject3.CustomSetActive(false);
                                    }
                                    else
                                    {
                                        Image component = gameObject3.GetComponent <Image>();
                                        if (component != null)
                                        {
                                            component.SetSprite(rankFrameIconPath, cUIFormScript, true, false, false, false);
                                        }
                                        gameObject3.CustomSetActive(true);
                                    }
                                }
                                else
                                {
                                    gameObject3.CustomSetActive(false);
                                }
                            }
                            Transform transform2 = gameObject2.transform.Find("RankClassText");
                            if (transform2 != null)
                            {
                                GameObject gameObject4 = transform2.gameObject;
                                if (flag2 && CLadderView.IsSuperKing((byte)current.GradeOfRank, current.ClassOfRank))
                                {
                                    gameObject4.CustomSetActive(true);
                                    gameObject4.GetComponent <Text>().set_text(current.ClassOfRank.ToString());
                                }
                                else
                                {
                                    gameObject4.CustomSetActive(false);
                                }
                            }
                            Text component2 = gameObject2.transform.Find("Txt_PlayerName/Name").gameObject.GetComponent <Text>();
                            component2.set_text(current.Name);
                            Image component3 = gameObject2.transform.Find("Txt_PlayerName/NobeIcon").gameObject.GetComponent <Image>();
                            if (component3)
                            {
                                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component3, (int)current.VipLv, true, flag, current.privacyBits);
                            }
                            Text component4 = gameObject2.transform.Find("Txt_HeroName").gameObject.GetComponent <Text>();
                            actorMeta.ConfigId = (int)current.CaptainId;
                            component4.set_text(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData) ? actorStaticData.TheResInfo.Name : null);
                            GameObject gameObject5 = gameObject2.transform.Find("Txt_Qinmidu").gameObject;
                            if (gameObject5 != null)
                            {
                                if (current.IntimacyData != null)
                                {
                                    gameObject5.CustomSetActive(true);
                                    Text component5 = gameObject5.transform.Find("Text").gameObject.GetComponent <Text>();
                                    if (component5 != null)
                                    {
                                        component5.set_text(current.IntimacyData.title);
                                    }
                                    GameObject gameObject6 = gameObject5.transform.Find("BlueBg").gameObject;
                                    GameObject gameObject7 = gameObject5.transform.Find("RedBg").gameObject;
                                    if (current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_GAY || current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_SIDEKICK)
                                    {
                                        gameObject6.CustomSetActive(true);
                                        gameObject7.CustomSetActive(false);
                                    }
                                    else if (current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_LOVER || current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_BESTIE)
                                    {
                                        gameObject6.CustomSetActive(false);
                                        gameObject7.CustomSetActive(true);
                                    }
                                }
                                else
                                {
                                    gameObject5.CustomSetActive(false);
                                }
                            }
                            GameObject gameObject8 = gameObject2.transform.Find("btns").gameObject;
                            if (gameObject8 != null)
                            {
                                if (current.IntimacyData != null && IntimacyRelationViewUT.IsRelaState(current.IntimacyData.state))
                                {
                                    int    relaLevel           = IntimacyRelationViewUT.CalcRelaLevel(current.IntimacyData.intimacyValue);
                                    string relaIconByRelaLevel = IntimacyRelationViewUT.GetRelaIconByRelaLevel(relaLevel, current.IntimacyData.state);
                                    if (!string.IsNullOrEmpty(relaIconByRelaLevel))
                                    {
                                        Image componetInChild = Utility.GetComponetInChild <Image>(gameObject8, "btnRela");
                                        if (componetInChild != null)
                                        {
                                            componetInChild.gameObject.CustomSetActive(true);
                                            componetInChild.SetSprite(relaIconByRelaLevel, cUIFormScript, true, false, false, false);
                                        }
                                    }
                                }
                                else
                                {
                                    gameObject8.CustomSetActive(false);
                                }
                            }
                            component2.set_color(Color.white);
                            GameObject gameObject9 = gameObject2.transform.Find("Txt_PlayerName_Mine").gameObject;
                            if (flag)
                            {
                                gameObject9.CustomSetActive(true);
                            }
                            else
                            {
                                gameObject9.CustomSetActive(false);
                            }
                            GameObject gameObject10 = gameObject2.transform.Find("Txt_LoadingPct").gameObject;
                            if (gameObject10)
                            {
                                Text component6 = gameObject10.GetComponent <Text>();
                                if (current.Computer)
                                {
                                    component6.set_text(curLvelContext.m_isWarmBattle ? "1%" : "100%");
                                }
                                else
                                {
                                    component6.set_text((MonoSingleton <Reconnection> .instance.isProcessingRelayRecover || Singleton <WatchController> .GetInstance().IsWatching) ? "100%" : "1%");
                                }
                            }
                            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(current.CaptainId);
                            if (dataByKey != null)
                            {
                                actorMeta2.PlayerId  = current.PlayerId;
                                actorMeta2.ActorCamp = (COM_PLAYERCAMP)i;
                                actorMeta2.ConfigId  = (int)dataByKey.dwCfgID;
                                actorMeta2.ActorType = ActorTypeDef.Actor_Type_Hero;
                                Image component7 = gameObject2.transform.Find("Hero").gameObject.GetComponent <Image>();
                                if (actorDataProvider2.GetActorServerData(ref actorMeta2, ref actorServerData))
                                {
                                    ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin((uint)actorServerData.TheActorMeta.ConfigId, actorServerData.SkinId);
                                    if (heroSkin != null)
                                    {
                                        component7.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref heroSkin.szSkinPicID), cUIFormScript, true, false, false, true);
                                        if (heroSkin.dwSkinID > 0u)
                                        {
                                            component4.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("LoadingSkinNameTxt"), heroSkin.szSkinName, heroSkin.szHeroName));
                                        }
                                        if (flag)
                                        {
                                            component4.set_color(CUIUtility.s_Text_Color_MyHeroName);
                                            Outline component8 = component4.gameObject.GetComponent <Outline>();
                                            if (component8 != null)
                                            {
                                                component8.set_effectColor(CUIUtility.s_Text_OutLineColor_MyHeroName);
                                            }
                                        }
                                    }
                                    bool      flag3      = current.PlayerCamp == playerCamp && (!Singleton <WatchController> .GetInstance().IsWatching || !Singleton <WatchController> .GetInstance().IsReplaying) && (curLvelContext.m_isWarmBattle || !current.Computer);
                                    Transform transform3 = gameObject2.transform.Find("heroProficiencyBgImg");
                                    if (transform3 != null)
                                    {
                                        transform3.gameObject.CustomSetActive(flag3);
                                        if (flag3)
                                        {
                                            CUICommonSystem.SetHeroProficiencyBgImage(cUIFormScript, transform3.gameObject, (int)actorServerData.TheProficiencyInfo.Level, true);
                                        }
                                    }
                                    Transform transform4 = gameObject2.transform.Find("heroProficiencyImg");
                                    if (transform4 != null)
                                    {
                                        transform4.gameObject.CustomSetActive(flag3);
                                        if (flag3)
                                        {
                                            CUICommonSystem.SetHeroProficiencyIconImage(cUIFormScript, transform4.gameObject, (int)actorServerData.TheProficiencyInfo.Level);
                                        }
                                    }
                                }
                                else
                                {
                                    component7.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref dataByKey.szImagePath), cUIFormScript, true, false, false, true);
                                }
                                uint num2 = 0u;
                                if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta2, out num2) && num2 != 0u)
                                {
                                    ResSkillCfgInfo dataByKey2 = GameDataMgr.skillDatabin.GetDataByKey(num2);
                                    if (dataByKey2 != null)
                                    {
                                        gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(true);
                                        string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Skill_Dir, Utility.UTF8Convert(dataByKey2.szIconPath));
                                        Image  component9 = gameObject2.transform.Find("SelSkill/Icon").GetComponent <Image>();
                                        component9.SetSprite(prefabPath, cUIFormScript.GetComponent <CUIFormScript>(), true, false, false, false);
                                    }
                                    else
                                    {
                                        gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                    }
                                }
                                else
                                {
                                    gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                }
                                Transform transform5 = gameObject2.transform.Find("skinLabelImage");
                                if (transform5 != null)
                                {
                                    CUICommonSystem.SetHeroSkinLabelPic(cUIFormScript, transform5.gameObject, dataByKey.dwCfgID, actorServerData.SkinId);
                                }
                            }
                        }
                        else
                        {
                            DebugHelper.Assert(false, "Loading Player is Null");
                        }
                    }
                }
            }
            GameObject widget  = cUIFormScript.GetWidget(0);
            GameObject widget2 = cUIFormScript.GetWidget(1);
            GameObject widget3 = cUIFormScript.GetWidget(2);

            if (curLvelContext.IsGameTypeGuildMatch())
            {
                widget.CustomSetActive(false);
                widget2.CustomSetActive(false);
                widget3.CustomSetActive(true);
                CSDT_CAMP_EXT_GUILDMATCH[] campExtGuildMatchInfo = curLvelContext.GetCampExtGuildMatchInfo();
                if (campExtGuildMatchInfo != null && campExtGuildMatchInfo.Length == 2)
                {
                    Image component10 = cUIFormScript.GetWidget(3).GetComponent <Image>();
                    Text  component11 = cUIFormScript.GetWidget(4).GetComponent <Text>();
                    Image component12 = cUIFormScript.GetWidget(5).GetComponent <Image>();
                    Text  component13 = cUIFormScript.GetWidget(6).GetComponent <Text>();
                    component10.SetSprite(CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + campExtGuildMatchInfo[0].dwGuildHeadID, cUIFormScript, true, false, false, false);
                    component11.set_text(StringHelper.UTF8BytesToString(ref campExtGuildMatchInfo[0].szGuildName));
                    component12.SetSprite(CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + campExtGuildMatchInfo[1].dwGuildHeadID, cUIFormScript, true, false, false, false);
                    component13.set_text(StringHelper.UTF8BytesToString(ref campExtGuildMatchInfo[1].szGuildName));
                }
            }
            else
            {
                widget.CustomSetActive(true);
                widget2.CustomSetActive(true);
                widget3.CustomSetActive(false);
                Text component14 = cUIFormScript.GetWidget(7).GetComponent <Text>();
                component14.set_text(CUILoadingSystem.GenerateRandomPvpLoadingTips(CUILoadingSystem.GenerateMultiRandomNum()));
                widget2.CustomSetActive(MonoSingleton <Reconnection> .instance.isProcessingRelayRecover);
            }
        }
コード例 #4
0
        private static void ShowMultiLoading()
        {
            CUIFormScript formScript = Singleton <CUIManager> .GetInstance().OpenForm(PVP_PATH_LOADING, false, false);

            if (formScript != null)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

                GameObject widget = formScript.GetWidget(0);
                if (widget != null)
                {
                    if (MonoSingleton <Reconnection> .instance.isProcessingRelayRecover)
                    {
                        widget.CustomSetActive(true);
                    }
                    else
                    {
                        widget.CustomSetActive(false);
                    }
                }
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                IGameActorDataProvider provider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorStaticData actorData = new ActorStaticData();
                ActorMeta       actorMeta = new ActorMeta();
                ActorMeta       meta2     = new ActorMeta();
                ActorServerData data2     = new ActorServerData();
                actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
                string name = null;
                for (int i = 1; i <= 2; i++)
                {
                    List <Player> allCampPlayers = Singleton <GamePlayerCenter> .GetInstance().GetAllCampPlayers((COM_PLAYERCAMP)i);

                    if (allCampPlayers != null)
                    {
                        Transform transform = (i != 1) ? formScript.transform.FindChild("DownPanel") : formScript.transform.FindChild("UpPanel");
                        for (int j = 1; j <= 5L; j++)
                        {
                            name = (i != 1) ? string.Format("Down_Player{0}", j) : string.Format("Up_Player{0}", j);
                            transform.FindChild(name).gameObject.CustomSetActive(false);
                        }
                        List <Player> .Enumerator enumerator = allCampPlayers.GetEnumerator();
                        while (enumerator.MoveNext())
                        {
                            Player current = enumerator.Current;
                            if (current != null)
                            {
                                name = (i != 1) ? string.Format("Down_Player{0}", current.CampPos + 1) : string.Format("Up_Player{0}", current.CampPos + 1);
                                GameObject gameObject = transform.FindChild(name).gameObject;
                                gameObject.CustomSetActive(true);
                                GameObject obj5 = gameObject.transform.Find("RankFrame").gameObject;
                                if (obj5 != null)
                                {
                                    if ((curLvelContext != null) && (curLvelContext.GameType == COM_GAME_TYPE.COM_MULTI_GAME_OF_LADDER))
                                    {
                                        string rankFrameIconPath = CLadderView.GetRankFrameIconPath((byte)current.GradeOfRank);
                                        if (string.IsNullOrEmpty(rankFrameIconPath))
                                        {
                                            obj5.CustomSetActive(false);
                                        }
                                        else
                                        {
                                            Image image = obj5.GetComponent <Image>();
                                            if (image != null)
                                            {
                                                image.SetSprite(rankFrameIconPath, formScript, true, false, false);
                                            }
                                            obj5.CustomSetActive(true);
                                        }
                                    }
                                    else
                                    {
                                        obj5.CustomSetActive(false);
                                    }
                                }
                                Text component = gameObject.transform.Find("Txt_PlayerName/Name").gameObject.GetComponent <Text>();
                                component.text = current.Name;
                                Image image2 = gameObject.transform.Find("Txt_PlayerName/NobeIcon").gameObject.GetComponent <Image>();
                                if (image2 != null)
                                {
                                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(image2, (int)current.VipLv, true);
                                }
                                Text text2 = gameObject.transform.Find("Txt_HeroName").gameObject.GetComponent <Text>();
                                actorMeta.ConfigId = (int)current.CaptainId;
                                text2.text         = !actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData) ? null : actorData.TheResInfo.Name;
                                if (current.PlayerId == Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerId)
                                {
                                    component.color = CUIUtility.s_Text_Color_Self;
                                }
                                else
                                {
                                    component.color = CUIUtility.s_Text_Color_CommonGray;
                                }
                                GameObject obj6 = gameObject.transform.Find("Txt_LoadingPct").gameObject;
                                if (obj6 != null)
                                {
                                    Text text3 = obj6.GetComponent <Text>();
                                    if (current.Computer)
                                    {
                                        text3.text = !curLvelContext.isWarmBattle ? "100%" : "1%";
                                    }
                                    else
                                    {
                                        text3.text = !MonoSingleton <Reconnection> .instance.isProcessingRelayRecover ? "1%" : "100%";
                                    }
                                }
                                ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(current.CaptainId);
                                if (dataByKey != null)
                                {
                                    meta2.PlayerId  = current.PlayerId;
                                    meta2.ActorCamp = (COM_PLAYERCAMP)i;
                                    meta2.ConfigId  = (int)dataByKey.dwCfgID;
                                    meta2.ActorType = ActorTypeDef.Actor_Type_Hero;
                                    Image image3 = gameObject.transform.Find("Hero").gameObject.GetComponent <Image>();
                                    if (provider2.GetActorServerData(ref meta2, ref data2))
                                    {
                                        ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin((uint)data2.TheActorMeta.ConfigId, data2.SkinId);
                                        if (heroSkin != null)
                                        {
                                            image3.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref heroSkin.szSkinPicID), formScript, true, false, false);
                                        }
                                        bool      bActive    = curLvelContext.isWarmBattle || !current.Computer;
                                        Transform transform2 = gameObject.transform.Find("heroProficiencyBgImg");
                                        if (transform2 != null)
                                        {
                                            transform2.gameObject.CustomSetActive(bActive);
                                            if (bActive)
                                            {
                                                CUICommonSystem.SetHeroProficiencyBgImage(formScript, transform2.gameObject, (int)data2.TheProficiencyInfo.Level, true);
                                            }
                                        }
                                        Transform transform3 = gameObject.transform.Find("heroProficiencyImg");
                                        if (transform3 != null)
                                        {
                                            transform3.gameObject.CustomSetActive(bActive);
                                            if (bActive)
                                            {
                                                CUICommonSystem.SetHeroProficiencyIconImage(formScript, transform3.gameObject, (int)data2.TheProficiencyInfo.Level);
                                            }
                                        }
                                    }
                                    else
                                    {
                                        image3.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref dataByKey.szImagePath), formScript, true, false, false);
                                    }
                                    uint skillID = 0;
                                    if (provider2.GetActorServerCommonSkillData(ref meta2, out skillID) && (skillID != 0))
                                    {
                                        ResSkillCfgInfo info2 = GameDataMgr.skillDatabin.GetDataByKey(skillID);
                                        if (info2 != null)
                                        {
                                            gameObject.transform.Find("SelSkill").gameObject.CustomSetActive(true);
                                            string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Skill_Dir, Utility.UTF8Convert(info2.szIconPath));
                                            gameObject.transform.Find("SelSkill/Icon").GetComponent <Image>().SetSprite(prefabPath, formScript.GetComponent <CUIFormScript>(), true, false, false);
                                        }
                                        else
                                        {
                                            gameObject.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                        }
                                    }
                                    else
                                    {
                                        gameObject.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                    }
                                    Transform transform4 = gameObject.transform.Find("skinLabelImage");
                                    if (transform4 != null)
                                    {
                                        CUICommonSystem.SetHeroSkinLabelPic(formScript, transform4.gameObject, dataByKey.dwCfgID, data2.SkinId);
                                    }
                                }
                            }
                        }
                    }
                }
                formScript.gameObject.transform.FindChild("Img_Tiao").FindChild("Tips").gameObject.GetComponent <Text>().text = GenerateRandomPvpLoadingTips(GenerateMultiRandomNum());
            }
        }
コード例 #5
0
        public override void Init()
        {
            base.Init();
            this.talentSystem = new TalentSystem();
            this.talentSystem.Init(base.actorPtr);
            this.stSkillStat = new CSkillStat();
            if (this.stSkillStat != null)
            {
                this.stSkillStat.Initialize(base.actorPtr);
                this.InitRandomSkill();
                this.InitPassiveSkill();
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                IGameActorDataProvider provider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorStaticSkillData skillData = new ActorStaticSkillData();
                for (int i = 0; i < 8; i++)
                {
                    if (i == 6)
                    {
                        SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                        if (curLvelContext.IsGameTypeGuide())
                        {
                            if (curLvelContext.m_mapID == CBattleGuideManager.GuideLevelID5v5)
                            {
                                goto Label_00D8;
                            }
                            continue;
                        }
                        if (!curLvelContext.IsMobaModeWithOutGuide() || (curLvelContext.m_pvpPlayerNum != 10))
                        {
                            continue;
                        }
                    }
Label_00D8:
                    if (i == 7)
                    {
                        SLevelContext context2 = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                        if (!context2.m_bEnableOrnamentSlot || (context2.m_ornamentSkillId <= 0))
                        {
                            continue;
                        }
                    }
                    if ((((i == 4) || (i == 6)) || (i == 7)) && (base.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero))
                    {
                        SLevelContext context3 = Singleton <BattleLogic> .instance.GetCurLvelContext();

                        if ((context3 == null) || (context3.m_mapID <= 0))
                        {
                            continue;
                        }
                        int extraSkillId = context3.m_extraSkillId;
                        switch (i)
                        {
                        case 6:
                        {
                            extraSkillId = context3.m_extraSkill2Id;
                            if (extraSkillId > 0)
                            {
                                break;
                            }
                            continue;
                        }

                        case 7:
                            extraSkillId = context3.m_ornamentSkillId;
                            break;

                        default:
                            this.CreateTalent(context3.m_extraPassiveSkillId);
                            break;
                        }
                        this.InitSkillSlot(i, extraSkillId, 0);
                        SkillSlot slot = this.SkillSlotArray[i];
                        if (slot != null)
                        {
                            slot.SetSkillLevel(1);
                        }
                        continue;
                    }
                    if (actorDataProvider.GetActorStaticSkillData(ref base.actor.TheActorMeta, (ActorSkillSlot)i, ref skillData))
                    {
                        this.InitSkillSlot(i, skillData.SkillId, skillData.PassiveSkillId);
                        if (((i > 3) || (i < 1)) || (!Singleton <BattleLogic> .GetInstance().m_GameInfo.gameContext.levelContext.IsSoulGrow() || (base.actor.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)))
                        {
                            SkillSlot slot2 = this.SkillSlotArray[i];
                            if (slot2 != null)
                            {
                                slot2.SetSkillLevel(1);
                            }
                        }
                    }
                }
                uint skillID = 0;
                if (provider2.GetActorServerCommonSkillData(ref base.actor.TheActorMeta, out skillID))
                {
                    int num5 = 5;
                    if (skillID != 0)
                    {
                        this.InitSkillSlot(num5, (int)skillID, 0);
                        SkillSlot slot3 = this.SkillSlotArray[num5];
                        if (slot3 != null)
                        {
                            slot3.SetSkillLevel(1);
                        }
                    }
                }
                if (base.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    this.SkillUseCache = new SkillCache();
                }
            }
        }
コード例 #6
0
        public override void Init()
        {
            base.Init();
            this.talentSystem = new TalentSystem();
            this.talentSystem.Init(base.actorPtr);
            this.stSkillStat = new CSkillStat();
            if (this.stSkillStat != null)
            {
                this.stSkillStat.Initialize(base.actorPtr);
                this.InitRandomSkill();
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                IGameActorDataProvider provider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorStaticSkillData skillData = new ActorStaticSkillData();
                for (int i = 0; i < 7; i++)
                {
                    ResDT_LevelCommonInfo info4;
                    if (i == 6)
                    {
                        SLevelContext context = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                        if (context.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE)
                        {
                            if (context.iLevelID == CBattleGuideManager.GuideLevelID5v5)
                            {
                                goto Label_00DF;
                            }
                            continue;
                        }
                        ResDT_LevelCommonInfo info = null;
                        info = CLevelCfgLogicManager.FindLevelConfigMultiGame(context.iLevelID);
                        if ((info == null) || (info.bMaxAcntNum != 10))
                        {
                            continue;
                        }
                    }
Label_00DF:
                    if (((i != 4) && (i != 6)) || (base.actor.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero))
                    {
                        goto Label_0284;
                    }
                    SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

                    if (curLvelContext == null)
                    {
                        continue;
                    }
                    int iLevelID = curLvelContext.iLevelID;
                    if (iLevelID <= 0)
                    {
                        continue;
                    }
                    if (Singleton <LobbyLogic> .instance.inMultiGame)
                    {
                        goto Label_0214;
                    }
                    ResLevelCfgInfo       outLevelCfg     = null;
                    ResDT_LevelCommonInfo outLevelComInfo = null;
                    CLevelCfgLogicManager.FindLevelConfigSingleGame(iLevelID, out outLevelCfg, out outLevelComInfo);
                    if (outLevelComInfo == null)
                    {
                        goto Label_01AD;
                    }
                    int iExtraSkillId = outLevelComInfo.iExtraSkillId;
                    if (i == 6)
                    {
                        iExtraSkillId = outLevelComInfo.iExtraSkill2Id;
                        if (iExtraSkillId > 0)
                        {
                            goto Label_0185;
                        }
                        continue;
                    }
                    this.CreateTalent(outLevelComInfo.iExtraPassiveSkillId);
Label_0185:
                    this.InitSkillSlot(i, iExtraSkillId, 0);
                    SkillSlot slot = this.SkillSlotArray[i];
                    if (slot != null)
                    {
                        slot.SetSkillLevel(1);
                    }
                    continue;
Label_01AD:
                    if (outLevelCfg == null)
                    {
                        continue;
                    }
                    int num4 = outLevelCfg.iExtraSkillId;
                    if (i == 6)
                    {
                        num4 = outLevelCfg.iExtraSkill2Id;
                        if (num4 > 0)
                        {
                            goto Label_01EC;
                        }
                        continue;
                    }
                    this.CreateTalent(outLevelCfg.iExtraPassiveSkillId);
Label_01EC:
                    this.InitSkillSlot(i, num4, 0);
                    SkillSlot slot2 = this.SkillSlotArray[i];
                    if (slot2 != null)
                    {
                        slot2.SetSkillLevel(1);
                    }
                    continue;
Label_0214:
                    info4 = CLevelCfgLogicManager.FindLevelConfigMultiGame(iLevelID);
                    if (info4 == null)
                    {
                        continue;
                    }
                    int num5 = info4.iExtraSkillId;
                    if (i == 6)
                    {
                        num5 = info4.iExtraSkill2Id;
                        if (num5 > 0)
                        {
                            goto Label_025C;
                        }
                        continue;
                    }
                    this.CreateTalent(info4.iExtraPassiveSkillId);
Label_025C:
                    this.InitSkillSlot(i, num5, 0);
                    SkillSlot slot3 = this.SkillSlotArray[i];
                    if (slot3 != null)
                    {
                        slot3.SetSkillLevel(1);
                    }
                    continue;
Label_0284:
                    if (actorDataProvider.GetActorStaticSkillData(ref base.actor.TheActorMeta, (ActorSkillSlot)i, ref skillData))
                    {
                        this.InitSkillSlot(i, skillData.SkillId, skillData.PassiveSkillId);
                        if (((i > 3) || (i < 1)) || (!Singleton <BattleLogic> .GetInstance().m_GameInfo.gameContext.IsSoulGrow() || (base.actor.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)))
                        {
                            SkillSlot slot4 = this.SkillSlotArray[i];
                            if (slot4 != null)
                            {
                                slot4.SetSkillLevel(1);
                            }
                        }
                    }
                }
                uint skillID = 0;
                if (provider2.GetActorServerCommonSkillData(ref base.actor.TheActorMeta, out skillID))
                {
                    int num7 = 5;
                    if (skillID != 0)
                    {
                        this.InitSkillSlot(num7, (int)skillID, 0);
                        SkillSlot slot5 = this.SkillSlotArray[num7];
                        if (slot5 != null)
                        {
                            slot5.SetSkillLevel(1);
                        }
                    }
                }
                if (base.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    this.SkillUseCache = new SkillCache();
                }
            }
        }
コード例 #7
0
        public override void Init()
        {
            base.Init();
            this.talentSystem = new TalentSystem();
            this.talentSystem.Init(this.actorPtr);
            this.stSkillStat = new CSkillStat();
            if (this.stSkillStat == null)
            {
                return;
            }
            this.stSkillStat.Initialize(this.actorPtr);
            this.InitRandomSkill();
            this.InitPassiveSkill();
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorStaticSkillData actorStaticSkillData = default(ActorStaticSkillData);

            this.ornamentFirstSwitchCdEftTime = Singleton <BattleLogic> .GetInstance().GetCurLvelContext().m_ornamentFirstSwitchCdEftTime;

            this.RotateBodyBulletFindEnemyLogicFrameTick = 0uL;
            int i = 0;

            while (i < 8)
            {
                if (i != 6)
                {
                    goto IL_104;
                }
                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                if (curLvelContext.IsGameTypeGuide())
                {
                    if (CBattleGuideManager.Is5v5GuideLevel(curLvelContext.m_mapID))
                    {
                        goto IL_104;
                    }
                }
                else if (curLvelContext.IsMobaModeWithOutGuide() && curLvelContext.m_pvpPlayerNum == 10)
                {
                    goto IL_104;
                }
IL_FB:
                i++;
                continue;
IL_104:
                if ((i == 4 || i == 6 || i == 7) && this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    SLevelContext curLvelContext2 = Singleton <BattleLogic> .instance.GetCurLvelContext();

                    if (curLvelContext2 != null)
                    {
                        int mapID = curLvelContext2.m_mapID;
                        if (mapID > 0)
                        {
                            int num = curLvelContext2.m_extraSkillId;
                            if (i == 6)
                            {
                                num = curLvelContext2.m_extraSkill2Id;
                                if (num <= 0)
                                {
                                    goto IL_FB;
                                }
                            }
                            else if (i == 7)
                            {
                                if (!curLvelContext2.m_bEnableOrnamentSlot || curLvelContext2.m_ornamentSkillId <= 0)
                                {
                                    goto IL_FB;
                                }
                                num = curLvelContext2.m_ornamentSkillId;
                            }
                            else
                            {
                                this.CreateTalent(curLvelContext2.m_extraPassiveSkillId, SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL, 0u);
                            }
                            this.InitSkillSlot(i, num, 0);
                            SkillSlot skillSlot = this.SkillSlotArray[i];
                            if (skillSlot != null)
                            {
                                skillSlot.SetSkillLevel(1);
                            }
                        }
                    }
                    goto IL_FB;
                }
                if (!actorDataProvider.GetActorStaticSkillData(ref this.actor.TheActorMeta, (ActorSkillSlot)i, ref actorStaticSkillData))
                {
                    goto IL_FB;
                }
                this.InitSkillSlot(i, actorStaticSkillData.SkillId, actorStaticSkillData.PassiveSkillId);
                if (i <= 3 && i >= 1 && Singleton <BattleLogic> .GetInstance().m_LevelContext.IsSoulGrow() && (this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call))
                {
                    goto IL_FB;
                }
                SkillSlot skillSlot2 = this.SkillSlotArray[i];
                if (skillSlot2 == null)
                {
                    goto IL_FB;
                }
                skillSlot2.SetSkillLevel(1);
                goto IL_FB;
            }
            uint num2 = 0u;

            if (actorDataProvider2.GetActorServerCommonSkillData(ref this.actor.TheActorMeta, out num2))
            {
                int num3 = 5;
                if (num2 != 0u)
                {
                    this.InitSkillSlot(num3, (int)num2, 0);
                    SkillSlot skillSlot3 = this.SkillSlotArray[num3];
                    if (skillSlot3 != null)
                    {
                        skillSlot3.SetSkillLevel(1);
                    }
                }
            }
            if (this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
            {
                this.SkillUseCache = new SkillCache();
            }
        }
コード例 #8
0
    public void AddPreloadActor(ref List <ActorPreloadTab> list, ref ActorMeta actorMeta, float spawnCnt, int ownerSkinID = 0)
    {
        ActorStaticData        actorData         = new ActorStaticData();
        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

        actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData);
        ActorServerData        data2     = new ActorServerData();
        IGameActorDataProvider provider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

        provider2.GetActorServerData(ref actorMeta, ref data2);
        CActorInfo actorInfo = CActorInfo.GetActorInfo(actorData.TheResInfo.ResPath, enResourceType.BattleScene);

        if (actorInfo != null)
        {
            for (int i = 0; i < list.Count; i++)
            {
                ActorPreloadTab tab = list[i];
                if ((tab.theActor.ActorType == actorMeta.ActorType) && (tab.theActor.ConfigId == actorMeta.ConfigId))
                {
                    if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                    {
                        if (this.GetActorMarkID(actorMeta) != tab.MarkID)
                        {
                            continue;
                        }
                        uint skillID = 0;
                        if (provider2.GetActorServerCommonSkillData(ref actorMeta, out skillID))
                        {
                            this.AnalyseSkill(ref tab, (int)skillID);
                        }
                    }
                    else if ((actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) && (spawnCnt > 0f))
                    {
                        tab.spawnCnt += spawnCnt;
                        list[i]       = tab;
                    }
                    retCnt++;
                    return;
                }
            }
            ActorPreloadTab loadInfo = new ActorPreloadTab {
                theActor = actorMeta
            };
            loadInfo.modelPrefab.assetPath    = actorInfo.GetArtPrefabName((ownerSkinID == 0) ? ((int)data2.SkinId) : ownerSkinID, -1);
            loadInfo.modelPrefab.nInstantiate = 1;
            loadInfo.spawnCnt   = spawnCnt;
            loadInfo.MarkID     = this.GetActorMarkID(actorMeta);
            loadInfo.ageActions = new List <AssetLoadBase>();
            loadInfo.parPrefabs = new List <AssetLoadBase>();
            loadInfo.mesPrefabs = new List <AssetLoadBase>();
            if (data2.SkinId != 0)
            {
                actorInfo.PreLoadAdvanceSkin(loadInfo.mesPrefabs, data2.SkinId, -1);
            }
            loadInfo.spritePrefabs = new List <AssetLoadBase>();
            loadInfo.soundBanks    = new List <AssetLoadBase>();
            loadInfo.behaviorXml   = new List <AssetLoadBase>();
            ActorStaticSkillData skillData = new ActorStaticSkillData();
            for (int j = 0; j < 8; j++)
            {
                actorDataProvider.GetActorStaticSkillData(ref actorMeta, (ActorSkillSlot)j, ref skillData);
                this.AnalyseSkill(ref loadInfo, skillData.SkillId);
                this.AnalysePassiveSkill(ref loadInfo, skillData.PassiveSkillId);
            }
            if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                int num5;
                int num6;
                int num7;
                int num8;
                this.GetMapSkills(out num5, out num6, out num7, out num8);
                this.AnalyseSkill(ref loadInfo, num5);
                this.AnalyseSkill(ref loadInfo, num6);
                this.AnalyseSkill(ref loadInfo, num7);
                this.AnalysePassiveSkill(ref loadInfo, num8);
                uint num9 = 0;
                if (provider2.GetActorServerCommonSkillData(ref actorMeta, out num9))
                {
                    this.AnalyseSkill(ref loadInfo, (int)num9);
                }
                ResTalentHero dataByKey = GameDataMgr.talentHero.GetDataByKey((uint)actorMeta.ConfigId);
                if (dataByKey != null)
                {
                    this.AnalyseHeroTalent(ref loadInfo, dataByKey);
                }
                this.AnalyseHeroBornAndReviveAge(ref loadInfo, actorMeta.ConfigId);
                ResHeroCfgInfo info2 = GameDataMgr.heroDatabin.GetDataByKey((uint)actorMeta.ConfigId);
                if (info2 != null)
                {
                    this.AnalysePassiveSkill(ref loadInfo, info2.iPassiveID1);
                    this.AnalysePassiveSkill(ref loadInfo, info2.iPassiveID2);
                }
            }
            else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
            {
                ActorStaticData data4 = new ActorStaticData();
                Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider).GetActorStaticData(ref actorMeta, ref data4);

                int randomPassiveSkillRule = data4.TheBaseAttribute.RandomPassiveSkillRule;
                if ((randomPassiveSkillRule > 0) && !this.randomSkillCheckerSet.ContainsKey(randomPassiveSkillRule))
                {
                    this.randomSkillCheckerSet.Add(randomPassiveSkillRule, true);
                    ResRandomSkillPassiveRule rule = GameDataMgr.randomSkillPassiveDatabin.GetDataByKey((long)randomPassiveSkillRule);
                    if ((rule.astRandomSkillPassiveID1 != null) && (rule.astRandomSkillPassiveID1.Length > 0))
                    {
                        for (int k = 0; k < rule.astRandomSkillPassiveID1.Length; k++)
                        {
                            this.AnalysePassiveSkill(ref loadInfo, rule.astRandomSkillPassiveID1[k].iParam);
                        }
                    }
                    if ((rule.astRandomSkillPassiveID2 != null) && (rule.astRandomSkillPassiveID2.Length > 0))
                    {
                        for (int m = 0; m < rule.astRandomSkillPassiveID2.Length; m++)
                        {
                            this.AnalysePassiveSkill(ref loadInfo, rule.astRandomSkillPassiveID2[m].iParam);
                        }
                    }
                }
            }
            if (!string.IsNullOrEmpty(actorInfo.deadAgePath))
            {
                AssetLoadBase item = new AssetLoadBase {
                    assetPath = actorInfo.deadAgePath
                };
                loadInfo.ageActions.Add(item);
            }
            if (!string.IsNullOrEmpty(actorInfo.BtResourcePath) && !this.behaviorXmlSet.ContainsKey(actorInfo.BtResourcePath))
            {
                AssetLoadBase base3 = new AssetLoadBase {
                    assetPath = actorInfo.BtResourcePath
                };
                loadInfo.behaviorXml.Add(base3);
                this.behaviorXmlSet.Add(actorInfo.BtResourcePath, true);
            }
            loadInfo.soundBanks = new List <AssetLoadBase>();
            this.AnalyseSoundBanks(ref loadInfo, ref actorInfo, ref data2);
            list.Add(loadInfo);
            if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                this.CheckCallMonsterSkill(actorInfo, ref list, ref actorMeta, (int)data2.SkinId);
            }
            else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
            {
                this.CheckOrganSoldierWave(ref list, ref actorMeta, actorData);
            }
        }
    }
コード例 #9
0
    public void AddPreloadActor(ref List <ActorPreloadTab> list, ref ActorMeta actorMeta, float spawnCnt, int ownerSkinID = 0)
    {
        ActorStaticData        inStaticData      = default(ActorStaticData);
        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

        actorDataProvider.GetActorStaticData(ref actorMeta, ref inStaticData);
        ActorServerData        actorServerData    = default(ActorServerData);
        IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

        actorDataProvider2.GetActorServerData(ref actorMeta, ref actorServerData);
        CActorInfo actorInfo = CActorInfo.GetActorInfo(inStaticData.TheResInfo.ResPath, enResourceType.BattleScene);

        if (actorInfo == null)
        {
            return;
        }
        for (int i = 0; i < list.get_Count(); i++)
        {
            ActorPreloadTab actorPreloadTab = list.get_Item(i);
            if (actorPreloadTab.theActor.ActorType == actorMeta.ActorType && actorPreloadTab.theActor.ConfigId == actorMeta.ConfigId)
            {
                if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
                {
                    int actorMarkID = this.GetActorMarkID(actorMeta);
                    if (actorMarkID != actorPreloadTab.MarkID)
                    {
                        goto IL_13B;
                    }
                    uint skillID = 0u;
                    if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta, out skillID))
                    {
                        this.AnalyseSkill(ref actorPreloadTab, (int)skillID);
                    }
                }
                else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster && spawnCnt > 0f)
                {
                    actorPreloadTab.spawnCnt += spawnCnt;
                    list.set_Item(i, actorPreloadTab);
                }
                LoaderHelper.retCnt++;
                return;
            }
            IL_13B :;
        }
        ActorPreloadTab actorPreloadTab2 = new ActorPreloadTab();

        actorPreloadTab2.theActor = actorMeta;
        actorPreloadTab2.modelPrefab.assetPath    = actorInfo.GetArtPrefabName((ownerSkinID != 0) ? ownerSkinID : ((int)actorServerData.SkinId), -1);
        actorPreloadTab2.modelPrefab.nInstantiate = 1;
        actorPreloadTab2.spawnCnt   = spawnCnt;
        actorPreloadTab2.MarkID     = this.GetActorMarkID(actorMeta);
        actorPreloadTab2.ageActions = new List <AssetLoadBase>();
        actorPreloadTab2.parPrefabs = new List <AssetLoadBase>();
        actorPreloadTab2.mesPrefabs = new List <AssetLoadBase>();
        if (actorServerData.SkinId != 0u)
        {
            actorInfo.PreLoadAdvanceSkin(actorPreloadTab2.mesPrefabs, actorServerData.SkinId, -1);
        }
        actorPreloadTab2.spritePrefabs = new List <AssetLoadBase>();
        actorPreloadTab2.soundBanks    = new List <AssetLoadBase>();
        actorPreloadTab2.behaviorXml   = new List <AssetLoadBase>();
        ActorStaticSkillData actorStaticSkillData = default(ActorStaticSkillData);

        for (int j = 0; j < 8; j++)
        {
            actorDataProvider.GetActorStaticSkillData(ref actorMeta, (ActorSkillSlot)j, ref actorStaticSkillData);
            this.AnalyseSkill(ref actorPreloadTab2, actorStaticSkillData.SkillId);
            this.AnalysePassiveSkill(ref actorPreloadTab2, actorStaticSkillData.PassiveSkillId);
        }
        if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
        {
            int skillID2;
            int skillID3;
            int skillID4;
            int passiveSkillID;
            this.GetMapSkills(out skillID2, out skillID3, out skillID4, out passiveSkillID);
            this.AnalyseSkill(ref actorPreloadTab2, skillID2);
            this.AnalyseSkill(ref actorPreloadTab2, skillID3);
            this.AnalyseSkill(ref actorPreloadTab2, skillID4);
            this.AnalysePassiveSkill(ref actorPreloadTab2, passiveSkillID);
            uint skillID5 = 0u;
            if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta, out skillID5))
            {
                this.AnalyseSkill(ref actorPreloadTab2, (int)skillID5);
            }
            this.AnalyseHeroBornAndReviveAge(ref actorPreloadTab2, actorMeta.ConfigId);
            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)actorMeta.ConfigId);
            if (dataByKey != null)
            {
                this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey.iPassiveID1);
                this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey.iPassiveID2);
            }
        }
        else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
        {
            ActorStaticData        actorStaticData    = default(ActorStaticData);
            IGameActorDataProvider actorDataProvider3 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            actorDataProvider3.GetActorStaticData(ref actorMeta, ref actorStaticData);
            int randomPassiveSkillRule = actorStaticData.TheBaseAttribute.RandomPassiveSkillRule;
            if (randomPassiveSkillRule > 0 && !this.randomSkillCheckerSet.ContainsKey(randomPassiveSkillRule))
            {
                this.randomSkillCheckerSet.Add(randomPassiveSkillRule, true);
                ResRandomSkillPassiveRule dataByKey2 = GameDataMgr.randomSkillPassiveDatabin.GetDataByKey((long)randomPassiveSkillRule);
                if (dataByKey2.astRandomSkillPassiveID1 != null && dataByKey2.astRandomSkillPassiveID1.Length > 0)
                {
                    for (int k = 0; k < dataByKey2.astRandomSkillPassiveID1.Length; k++)
                    {
                        this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey2.astRandomSkillPassiveID1[k].iParam);
                    }
                }
                if (dataByKey2.astRandomSkillPassiveID2 != null && dataByKey2.astRandomSkillPassiveID2.Length > 0)
                {
                    for (int l = 0; l < dataByKey2.astRandomSkillPassiveID2.Length; l++)
                    {
                        this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey2.astRandomSkillPassiveID2[l].iParam);
                    }
                }
            }
            ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);
            if (dataCfgInfoByCurLevelDiff != null && dataCfgInfoByCurLevelDiff.iBufDropID != 0 && dataCfgInfoByCurLevelDiff.iBufDropRate > 0)
            {
                ShenFuSystem.PreLoadShenfuResource(dataCfgInfoByCurLevelDiff.iBufDropID, ref actorPreloadTab2, this);
            }
            if (actorStaticData.TheMonsterOnlyInfo.SoldierType == 8 && dataCfgInfoByCurLevelDiff != null)
            {
                ListView <Assets.Scripts.GameLogic.SoldierWave> listView = new ListView <Assets.Scripts.GameLogic.SoldierWave>();
                int iKillByCamp1ChangeSoldierWave = dataCfgInfoByCurLevelDiff.iKillByCamp1ChangeSoldierWave;
                int iKillByCamp2ChangeSoldierWave = dataCfgInfoByCurLevelDiff.iKillByCamp2ChangeSoldierWave;
                listView.AddRange(SoldierRegion.GetWavesForPreLoad(iKillByCamp1ChangeSoldierWave));
                listView.AddRange(SoldierRegion.GetWavesForPreLoad(iKillByCamp2ChangeSoldierWave));
                for (int m = 0; m < listView.Count; m++)
                {
                    Assets.Scripts.GameLogic.SoldierWave soldierWave = listView[m];
                    if (soldierWave != null && soldierWave.WaveInfo != null && soldierWave.WaveInfo.astNormalSoldierInfo != null && soldierWave.WaveInfo.astNormalSoldierInfo.Length > 0)
                    {
                        for (int n = 0; n < soldierWave.WaveInfo.astNormalSoldierInfo.Length; n++)
                        {
                            ResSoldierTypeInfo resSoldierTypeInfo = soldierWave.WaveInfo.astNormalSoldierInfo[n];
                            if (resSoldierTypeInfo.dwSoldierID == 0u)
                            {
                                break;
                            }
                            ActorMeta actorMeta2 = default(ActorMeta);
                            ActorMeta actorMeta3 = actorMeta2;
                            actorMeta3.ActorType = ActorTypeDef.Actor_Type_Monster;
                            actorMeta3.ConfigId  = (int)resSoldierTypeInfo.dwSoldierID;
                            actorMeta2           = actorMeta3;
                            this.AddPreloadActor(ref list, ref actorMeta2, resSoldierTypeInfo.dwSoldierNum * 2f, 0);
                        }
                    }
                }
            }
        }
        if (!string.IsNullOrEmpty(actorInfo.deadAgePath))
        {
            actorPreloadTab2.ageActions.Add(new AssetLoadBase
            {
                assetPath = actorInfo.deadAgePath
            });
        }
        if (!string.IsNullOrEmpty(actorInfo.BtResourcePath) && !this.behaviorXmlSet.ContainsKey(actorInfo.BtResourcePath))
        {
            actorPreloadTab2.behaviorXml.Add(new AssetLoadBase
            {
                assetPath = actorInfo.BtResourcePath
            });
            this.behaviorXmlSet.Add(actorInfo.BtResourcePath, true);
        }
        actorPreloadTab2.soundBanks = new List <AssetLoadBase>();
        this.AnalyseSoundBanks(ref actorPreloadTab2, ref actorInfo, ref actorServerData);
        list.Add(actorPreloadTab2);
        if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
        {
            this.CheckCallMonsterSkill(actorInfo, ref list, ref actorMeta, (int)actorServerData.SkinId);
        }
        else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
        {
            this.CheckOrganSoldierWave(ref list, ref actorMeta, inStaticData);
        }
    }