Пример #1
0
        private string GetMeshName(ref PoolObjHandle <ActorRoot> actor)
        {
            ActorMeta actorMeta  = default(ActorMeta);
            ActorMeta actorMeta2 = actorMeta;

            actorMeta2.ConfigId  = actor.handle.TheActorMeta.ConfigId;
            actorMeta2.ActorCamp = actor.handle.TheActorMeta.ActorCamp;
            actorMeta2.PlayerId  = actor.handle.TheActorMeta.PlayerId;
            actorMeta            = actorMeta2;
            ActorStaticData        actorStaticData   = default(ActorStaticData);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData);
            if (!string.IsNullOrEmpty(actorStaticData.TheResInfo.ResPath))
            {
                CActorInfo actorInfo = CActorInfo.GetActorInfo(actorStaticData.TheResInfo.ResPath, enResourceType.BattleScene);
                if (actorInfo != null)
                {
                    string artPrefabName = actorInfo.GetArtPrefabName((int)actorMeta.SkinID, -1);
                    if (!string.IsNullOrEmpty(artPrefabName))
                    {
                        return(artPrefabName);
                    }
                }
            }
            return(string.Empty);
        }
Пример #2
0
        public void Init(ref ActorMeta actorMeta)
        {
            this.InitValueDataArr(ref actorMeta, false);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorServerData = default(ActorServerData);

            if (actorDataProvider.GetActorServerData(ref actorMeta, ref actorServerData))
            {
                this.actorLvl        = (int)actorServerData.Level;
                this.actorExp        = (int)actorServerData.Exp;
                this.actorStar       = (int)actorServerData.Star;
                this.actorQuality    = (int)actorServerData.TheQualityInfo.Quality;
                this.actorSubQuality = (int)actorServerData.TheQualityInfo.SubQuality;
            }
            else
            {
                if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                    ActorStaticData actorStaticData = default(ActorStaticData);
                    this.actorLvl = ((!actorDataProvider2.GetActorStaticData(ref actorMeta, ref actorStaticData)) ? 1 : actorStaticData.TheMonsterOnlyInfo.MonsterBaseLevel);
                }
                else
                {
                    this.actorLvl = 1;
                }
                this.actorExp        = 0;
                this.actorStar       = 1;
                this.actorQuality    = 1;
                this.actorSubQuality = 0;
            }
        }
Пример #3
0
        private void Calc9SlotHeroStandingPosition(CSDT_BATTLE_PLAYER_BRIEF stBattlePlayer)
        {
            Calc9SlotHeroData[]    heroes            = new Calc9SlotHeroData[3];
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            ActorStaticData actorData = new ActorStaticData();
            ActorMeta       actorMeta = new ActorMeta();

            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() != null)
            {
                for (int i = 0; (i < stBattlePlayer.astFighter[0].astChoiceHero.Length) && (i < 3); i++)
                {
                    uint dwHeroID = stBattlePlayer.astFighter[0].astChoiceHero[i].stBaseInfo.stCommonInfo.dwHeroID;
                    if (dwHeroID != 0)
                    {
                        actorMeta.ConfigId = (int)dwHeroID;
                        actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData);
                        heroes[i].Level        = 1;
                        heroes[i].Quality      = 1;
                        heroes[i].RecommendPos = actorData.TheHeroOnlyInfo.RecommendStandPos;
                        heroes[i].Ability      = (uint)CHeroDataFactory.CreateHeroData(dwHeroID).combatEft;
                        heroes[i].ConfigId     = dwHeroID;
                        heroes[i].selected     = false;
                        heroes[i].BornIndex    = -1;
                    }
                }
                this.ImpCalc9SlotHeroStandingPosition(ref heroes);
                for (int j = 0; (j < stBattlePlayer.astFighter[0].astChoiceHero.Length) && (j < 3); j++)
                {
                    stBattlePlayer.astFighter[0].astChoiceHero[j].stHeroExtral.iHeroPos = heroes[j].BornIndex;
                }
                for (int k = 0; (k < stBattlePlayer.astFighter[1].astChoiceHero.Length) && (k < 3); k++)
                {
                    uint id = stBattlePlayer.astFighter[1].astChoiceHero[k].stBaseInfo.stCommonInfo.dwHeroID;
                    if (id != 0)
                    {
                        actorMeta.ConfigId = (int)id;
                        actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData);
                        heroes[k].Level        = stBattlePlayer.astFighter[1].astChoiceHero[k].stBaseInfo.stCommonInfo.wLevel;
                        heroes[k].Quality      = stBattlePlayer.astFighter[1].astChoiceHero[k].stBaseInfo.stCommonInfo.stQuality.wQuality;
                        heroes[k].RecommendPos = actorData.TheHeroOnlyInfo.RecommendStandPos;
                        heroes[k].Ability      = (uint)CHeroDataFactory.CreateHeroData(id).combatEft;
                        heroes[k].ConfigId     = id;
                        heroes[k].selected     = false;
                        heroes[k].BornIndex    = -1;
                    }
                }
                this.ImpCalc9SlotHeroStandingPosition(ref heroes);
                for (int m = 0; (m < stBattlePlayer.astFighter[1].astChoiceHero.Length) && (m < 3); m++)
                {
                    stBattlePlayer.astFighter[1].astChoiceHero[m].stHeroExtral.iHeroPos = heroes[m].BornIndex;
                }
            }
        }
Пример #4
0
 public override void OnUse()
 {
     base.OnUse();
     this.name               = string.Empty;
     this.isMovable          = true;
     this.isRotatable        = true;
     this.myTransform        = null;
     this.ActorMesh          = null;
     this.ActorMeshAnimation = null;
     this._bVisible          = true;
     this._bInitVisibleDelay = 0;
     this._bInCamera         = false;
     this.ObjID              = 0u;
     this.TheActorMeta       = default(ActorMeta);
     this.TheStaticData      = default(ActorStaticData);
     this.SelfPtr.Release();
     this.ObjLinker                   = null;
     this.ActorControl                = null;
     this.ActorAgent                  = null;
     this.MovementComponent           = null;
     this.SkillControl                = null;
     this.ValueComponent              = null;
     this.HurtControl                 = null;
     this.HudControl                  = null;
     this.AnimControl                 = null;
     this.BuffHolderComp              = null;
     this.MatHurtEffect               = null;
     this.ShadowEffect                = null;
     this.EquipComponent              = null;
     this.DefaultAttackModeControl    = null;
     this.LockTargetAttackModeControl = null;
     this.PetControl                  = null;
     this.OriginalActorMesh           = null;
     this.OriginalMeshAnim            = null;
     this.shape = null;
     this.slotList.Clear();
     this.bChildUpdate             = false;
     this.SMNode                   = null;
     this._location                = VInt3.zero;
     this._forward                 = VInt3.forward;
     this._rotation                = Quaternion.identity;
     this.groundY                  = 0;
     this.hasReachedNavEdge        = false;
     this.pickFlyY                 = 0;
     this.AttackOrderReady         = true;
     this.bOneKiller               = false;
     this.CharInfo                 = null;
     this.HorizonMarker            = null;
     this.BornPos                  = VInt3.zero;
     this.isRecycled               = false;
     this.BornPos                  = VInt3.zero;
     this.PositionRecords          = null;
     this.PositionRecordsLastStamp = 0f;
 }
Пример #5
0
        public void AddHero(uint heroCfgId)
        {
            if (heroCfgId == 0u || this._heroIds.Contains(heroCfgId))
            {
                return;
            }
            if (this._heroIds.get_Count() >= 3)
            {
                DebugHelper.Assert(false, "已经给player添加了三个英雄但是还在尝试继续添加");
                return;
            }
            this._heroIds.Add(heroCfgId);
            if (!this.Computer)
            {
                if (Singleton <GamePlayerCenter> .get_instance().HostPlayerId == this.PlayerId)
                {
                    DebugHelper.CustomLog("Player {0} adds Hero {1}", new object[]
                    {
                        this.PlayerId,
                        heroCfgId
                    });
                }
            }
            else if (string.IsNullOrEmpty(this.Name))
            {
                ActorStaticData        actorStaticData   = default(ActorStaticData);
                ActorMeta              actorMeta         = default(ActorMeta);
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                actorMeta.PlayerId  = this.PlayerId;
                actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
                actorMeta.ConfigId  = (int)heroCfgId;
                string text = (!actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData)) ? null : actorStaticData.TheResInfo.Name;
                this.Name = string.Format("{0}[{1}]", text, Singleton <CTextManager> .GetInstance().GetText("PVP_NPC"));
            }
            if (this._heroIds.get_Count() != 1)
            {
                return;
            }
            this.CaptainId = heroCfgId;
            if (Singleton <GamePlayerCenter> .get_instance().HostPlayerId == this.PlayerId)
            {
                DebugHelper.CustomLog("Set Captain ID {0}", new object[]
                {
                    this.CaptainId
                });
            }
        }
Пример #6
0
        public void AddHero(uint heroCfgId)
        {
            if ((heroCfgId != 0) && !this._heroIds.Contains(heroCfgId))
            {
                if (this._heroIds.Count >= 3)
                {
                    DebugHelper.Assert(false, "已经给player添加了三个英雄但是还在尝试继续添加");
                }
                else
                {
                    this._heroIds.Add(heroCfgId);
                    if (!this.Computer)
                    {
                        if (Singleton <GamePlayerCenter> .instance.HostPlayerId == this.PlayerId)
                        {
                            object[] inParameters = new object[] { this.PlayerId, heroCfgId };
                            DebugHelper.CustomLog("Player {0} adds Hero {1}", inParameters);
                        }
                    }
                    else if (string.IsNullOrEmpty(this.Name))
                    {
                        ActorStaticData        actorData         = new ActorStaticData();
                        ActorMeta              actorMeta         = new ActorMeta();
                        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                        actorMeta.PlayerId  = this.PlayerId;
                        actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
                        actorMeta.ConfigId  = (int)heroCfgId;
                        string str = !actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData) ? null : actorData.TheResInfo.Name;
                        this.Name = string.Format("{0}[{1}]", str, Singleton <CTextManager> .GetInstance().GetText("PVP_NPC"));
                    }
                    if (this._heroIds.Count == 1)
                    {
                        this.CaptainId = heroCfgId;
                        if (Singleton <GamePlayerCenter> .instance.HostPlayerId == this.PlayerId)
                        {
                            object[] objArray2 = new object[] { this.CaptainId };
                            DebugHelper.CustomLog("Set Captain ID {0}", objArray2);
                        }
                    }
                }
            }
        }
Пример #7
0
        public void Init(ref ActorMeta actorMeta)
        {
            this.InitValueDataArr(ref actorMeta, false);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorData = new ActorServerData();

            if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                ResHeroCfgInfo    dataByKey = GameDataMgr.heroDatabin.GetDataByKey((long)actorMeta.ConfigId);
                ResHeroEnergyInfo info2     = GameDataMgr.heroEnergyDatabin.GetDataByKey(dataByKey.dwEnergyType);
                this.EpRecFrequency = info2.iRecFrequency;
            }
            if (actorDataProvider.GetActorServerData(ref actorMeta, ref actorData))
            {
                this.actorLvl        = (int)actorData.Level;
                this.actorExp        = (int)actorData.Exp;
                this.actorStar       = (int)actorData.Star;
                this.actorQuality    = (int)actorData.TheQualityInfo.Quality;
                this.actorSubQuality = (int)actorData.TheQualityInfo.SubQuality;
            }
            else
            {
                if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    IGameActorDataProvider provider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                    ActorStaticData data2 = new ActorStaticData();
                    this.actorLvl = !provider2.GetActorStaticData(ref actorMeta, ref data2) ? 1 : data2.TheMonsterOnlyInfo.MonsterBaseLevel;
                }
                else
                {
                    this.actorLvl = 1;
                }
                this.actorExp        = 0;
                this.actorStar       = 1;
                this.actorQuality    = 1;
                this.actorSubQuality = 0;
            }
        }
Пример #8
0
        public void AddHero(uint heroCfgId)
        {
            if (((heroCfgId != 0) && !this._heroIds.Contains(heroCfgId)) && (this._heroIds.Count < 3))
            {
                this._heroIds.Add(heroCfgId);
                if (this.Computer && string.IsNullOrEmpty(this.Name))
                {
                    ActorStaticData        actorData         = new ActorStaticData();
                    ActorMeta              actorMeta         = new ActorMeta();
                    IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                    actorMeta.PlayerId  = this.PlayerId;
                    actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
                    actorMeta.ConfigId  = (int)heroCfgId;
                    string str = !actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData) ? null : actorData.TheResInfo.Name;
                    this.Name = string.Format("{0}[{1}]", str, Singleton <CTextManager> .GetInstance().GetText("PVP_NPC"));
                }
                if (this._heroIds.Count == 1)
                {
                    this.CaptainId = heroCfgId;
                }
            }
        }
Пример #9
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());
            }
        }
Пример #10
0
    public void AddPreloadActor(ref List <ActorPreloadTab> list, ref ActorMeta actorMeta, float spawnCnt, int ownerSkinID = 0)
    {
        for (int i = 0; i < list.Count; i++)
        {
            ActorPreloadTab tab = list[i];
            if (tab.theActor.ConfigId != actorMeta.ConfigId)
            {
                continue;
            }
            if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                if (this.GetActorMarkID(actorMeta) == tab.MarkID)
                {
                    goto Label_0085;
                }
                continue;
            }
            if ((actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) && (spawnCnt > 0f))
            {
                tab.spawnCnt += spawnCnt;
                list[i]       = tab;
            }
Label_0085:
            retCnt++;
            return;
        }
        ActorStaticData        actorData         = new ActorStaticData();
        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

        actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData);
        ActorServerData data2 = new ActorServerData();

        Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider).GetActorServerData(ref actorMeta, ref data2);

        CActorInfo actorInfo = CActorInfo.GetActorInfo(actorData.TheResInfo.ResPath, enResourceType.BattleScene);

        if (actorInfo != null)
        {
            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>();
            loadInfo.spritePrefabs = new List <AssetLoadBase>();
            loadInfo.soundBanks    = new List <AssetLoadBase>();
            loadInfo.behaviorXml   = new List <AssetLoadBase>();
            ActorStaticSkillData skillData = new ActorStaticSkillData();
            for (int j = 0; j < 7; j++)
            {
                actorDataProvider.GetActorStaticSkillData(ref actorMeta, (ActorSkillSlot)j, ref skillData);
                if (skillData.SkillId != 0)
                {
                    this.AnalyseSkill(ref loadInfo, skillData.SkillId);
                    this.AnalysePassiveSkill(ref loadInfo, skillData.PassiveSkillId);
                }
            }
            if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                ResTalentHero dataByKey = GameDataMgr.talentHero.GetDataByKey((uint)actorMeta.ConfigId);
                if (dataByKey != null)
                {
                    this.AnalyseHeroTalent(ref loadInfo, dataByKey);
                }
            }
            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(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);
            }
        }
    }
Пример #11
0
 private void CheckOrganSoldierWave(ref List <ActorPreloadTab> InPreloadListRef, ref ActorMeta InOrganActorMetaRef, ActorStaticData InStaticData)
 {
     if (InOrganActorMetaRef.ActorType == ActorTypeDef.Actor_Type_Organ && InStaticData.TheOrganOnlyInfo.DeadEnemySoldier > 0)
     {
         ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)InStaticData.TheOrganOnlyInfo.DeadEnemySoldier);
         int num = 0;
         while (dataByKey != null && ++num < 100)
         {
             for (int i = 0; i < dataByKey.astNormalSoldierInfo.Length; i++)
             {
                 ResSoldierTypeInfo resSoldierTypeInfo = dataByKey.astNormalSoldierInfo[i];
                 if (resSoldierTypeInfo.dwSoldierID == 0u)
                 {
                     break;
                 }
                 ActorMeta actorMeta  = default(ActorMeta);
                 ActorMeta actorMeta2 = actorMeta;
                 actorMeta2.ActorType = ActorTypeDef.Actor_Type_Monster;
                 actorMeta2.ConfigId  = (int)resSoldierTypeInfo.dwSoldierID;
                 actorMeta            = actorMeta2;
                 this.AddPreloadActor(ref InPreloadListRef, ref actorMeta, 2f, 0);
             }
             dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
         }
     }
 }
Пример #12
0
        private void EnterSpawnEye(AGE.Action _action, Track _track)
        {
            string prefabName;

            if (this.bUseSkin)
            {
                prefabName = SkinResourceHelper.GetResourceName(_action, this.prefabName, this.bUseSkinAdvance);
            }
            else
            {
                prefabName = this.prefabName;
            }
            VInt3                     zero           = VInt3.zero;
            VInt3                     forward        = VInt3.forward;
            SkillUseContext           refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            COM_PLAYERCAMP            com_playercamp = ((refParamObject == null) || (refParamObject.Originator == 0)) ? COM_PLAYERCAMP.COM_PLAYERCAMP_MID : refParamObject.Originator.handle.TheActorMeta.ActorCamp;
            GameObject                gameObject     = _action.GetGameObject(this.parentId);
            PoolObjHandle <ActorRoot> actorHandle    = _action.GetActorHandle(this.parentId);
            PoolObjHandle <ActorRoot> handle2        = _action.GetActorHandle(this.objectSpaceId);

            if (handle2 != 0)
            {
                ActorRoot handle = handle2.handle;
                if (this.superTranslation)
                {
                    VInt3 num3 = VInt3.zero;
                    _action.refParams.GetRefParam("_BulletPos", ref num3);
                    zero = IntMath.Transform(num3, handle.forward, handle.location);
                }
                else if (this.modifyTranslation)
                {
                    zero = IntMath.Transform(this.translation, handle.forward, handle.location);
                }
                if (this.modifyDirection)
                {
                    forward = handle2.handle.forward;
                }
            }
            else if (this.bTargetPosition)
            {
                zero = this.translation + this.targetPosition;
                if ((this.modifyDirection && (refParamObject != null)) && (refParamObject.Originator != 0))
                {
                    forward = refParamObject.Originator.handle.forward;
                }
            }
            else
            {
                if (this.modifyTranslation)
                {
                    zero = this.translation;
                }
                if ((this.modifyDirection && (this.direction.x != 0)) && (this.direction.y != 0))
                {
                    forward = this.direction;
                    forward.NormalizeTo(0x3e8);
                }
            }
            if (this.targetId >= 0)
            {
                _action.ExpandGameObject(this.targetId);
                GameObject obj3 = _action.GetGameObject(this.targetId);
                if (this.recreateExisting && (obj3 != null))
                {
                    if (this.applyActionSpeedToAnimation)
                    {
                        _action.RemoveTempObject(AGE.Action.PlaySpeedAffectedType.ePSAT_Anim, obj3);
                    }
                    if (this.applyActionSpeedToParticle)
                    {
                        _action.RemoveTempObject(AGE.Action.PlaySpeedAffectedType.ePSAT_Fx, obj3);
                    }
                    ActorHelper.DetachActorRoot(obj3);
                    ActionManager.DestroyGameObject(obj3);
                    _action.SetGameObject(this.targetId, null);
                }
                GameObject obj4 = null;
                if (obj3 == null)
                {
                    ActorStaticData        actorData         = new ActorStaticData();
                    IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                    ActorMeta actorMeta = new ActorMeta {
                        ActorType = ActorTypeDef.Actor_Type_EYE,
                        ActorCamp = com_playercamp,
                        ConfigId  = this.EyeCfgIdByMonster,
                        EnCId     = this.EyeCfgIdByMonster
                    };
                    actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData);
                    CActorInfo info = null;
                    if (!string.IsNullOrEmpty(actorData.TheResInfo.ResPath))
                    {
                        CActorInfo actorInfo = CActorInfo.GetActorInfo(actorData.TheResInfo.ResPath, enResourceType.BattleScene);
                        if (actorInfo != null)
                        {
                            info = (CActorInfo)UnityEngine.Object.Instantiate(actorInfo);
                        }
                    }
                    PoolObjHandle <ActorRoot> handle3 = new PoolObjHandle <ActorRoot>();
                    if (info != null)
                    {
                        if ((refParamObject.Originator != 0) && !PathfindingUtility.IsValidTarget(refParamObject.Originator.handle, zero))
                        {
                            zero = refParamObject.Originator.handle.location;
                        }
                        handle3 = Singleton <GameObjMgr> .instance.SpawnActorEx(null, ref actorMeta, zero, forward, false, true);

                        if (handle3 != 0)
                        {
                            this.actorRoot = handle3;
                            obj4           = handle3.handle.gameObject;
                            handle3.handle.InitActor();
                            this.CreateEye();
                            handle3.handle.PrepareFight();
                            handle3.handle.StartFight();
                        }
                    }
                    if (handle3 != 0)
                    {
                        if (obj4 == null)
                        {
                            throw new Exception("Age:SpawnObjectDuration Spawn Exception");
                        }
                        obj4.transform.localScale = Vector3.one;
                        if (GameSettings.DynamicParticleLOD)
                        {
                            bool flag        = true;
                            int  particleLOD = GameSettings.ParticleLOD;
                            if (((refParamObject != null) && (refParamObject.Originator != 0)) && (refParamObject.Originator.handle.TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId))
                            {
                                flag = false;
                            }
                            if (!flag && (particleLOD > 1))
                            {
                                GameSettings.ParticleLOD = 1;
                            }
                            MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag;
                        }
                        this.actorRoot.handle.location = zero;
                        this.actorRoot.handle.forward  = forward;
                        if (this.actorRoot.handle.shape != null)
                        {
                            this.actorRoot.handle.shape.ConditionalUpdateShape();
                        }
                        if (this.actorRoot.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
                        {
                            this.actorRoot.handle.TheActorMeta.ConfigId = this.EyeCfgIdByMonster;
                        }
                        if (refParamObject != null)
                        {
                            refParamObject.EffectPos = this.actorRoot.handle.location;
                            if (this.actorRoot.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
                            {
                                DebugHelper.Assert(this.actorRoot.handle.TheActorMeta.ActorCamp == com_playercamp);
                                this.actorRoot.handle.TheActorMeta.ActorCamp = com_playercamp;
                            }
                        }
                    }
                }
            }
        }
Пример #13
0
        public PoolObjHandle <ActorRoot> SpawnActorEx(GameObject rootObj, ref ActorMeta actorMeta, VInt3 pos, VInt3 dir, bool useLobbyModel, bool addComponent)
        {
            if (actorMeta.Difficuty == 0)
            {
                actorMeta.Difficuty = (byte)Singleton <BattleLogic> .get_instance().GetCurLvelContext().m_levelDifficulty;
            }
            ActorStaticData        theStaticData     = default(ActorStaticData);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

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

            actorDataProvider2.GetActorServerData(ref actorMeta, ref actorServerData);
            if (actorMeta.SkinID == 0u)
            {
                actorMeta.SkinID = actorServerData.SkinId;
            }
            GameObject  gameObject = null;
            ActorConfig component;

            if (rootObj == null)
            {
                rootObj = MonoSingleton <SceneMgr> .GetInstance().Spawn(typeof(ActorRoot).get_Name(), (SceneObjType)theStaticData.TheActorMeta.ActorType, pos, dir);

                component = rootObj.GetComponent <ActorConfig>();
            }
            else
            {
                component = rootObj.GetComponent <ActorConfig>();
                Animation componentInChildren = rootObj.GetComponentInChildren <Animation>();
                if (componentInChildren != null)
                {
                    gameObject = componentInChildren.gameObject;
                }
                rootObj.transform.parent = MonoSingleton <SceneMgr> .GetInstance().GetRoot((SceneObjType)theStaticData.TheActorMeta.ActorType).transform;
            }
            component.ConfigID = actorMeta.ConfigId;
            CActorInfo cActorInfo = null;

            if (!string.IsNullOrEmpty(theStaticData.TheResInfo.ResPath))
            {
                CActorInfo actorInfo = CActorInfo.GetActorInfo(theStaticData.TheResInfo.ResPath, 0);
                if (actorInfo != null)
                {
                    cActorInfo = (CActorInfo)Object.Instantiate(actorInfo);
                    string text = (!useLobbyModel) ? cActorInfo.GetArtPrefabName((int)actorMeta.SkinID, -1) : cActorInfo.GetArtPrefabNameLobby((int)actorMeta.SkinID);
                    if (gameObject == null && !string.IsNullOrEmpty(text))
                    {
                        bool flag = false;
                        gameObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(text, false, SceneObjType.ActionRes, Vector3.zero, Quaternion.identity, out flag);

                        if (gameObject != null)
                        {
                            Transform component2 = gameObject.GetComponent <Transform>();
                            component2.SetParent(rootObj.transform);
                            component2.localPosition = Vector3.zero;
                            component2.localRotation = Quaternion.identity;
                            TransformConfig transformConfigIfHaveOne = cActorInfo.GetTransformConfigIfHaveOne(ETransformConfigUsage.CharacterInGame);
                            if (transformConfigIfHaveOne != null)
                            {
                                component2.localPosition += transformConfigIfHaveOne.Offset;
                                component2.localScale    *= transformConfigIfHaveOne.Scale;
                            }
                        }
                    }
                }
            }
            PoolObjHandle <ActorRoot> result = component.AttachActorRoot(rootObj, ref actorMeta, cActorInfo);

            result.get_handle().TheStaticData = theStaticData;
            if (addComponent)
            {
                result.get_handle().Spawned();
            }
            return(result);
        }
Пример #14
0
        public void InitValueDataArr(ref ActorMeta theActorMeta, bool bLobby)
        {
            IGameActorDataProvider actorDataProvider = null;

            if (bLobby)
            {
                actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);
            }
            else
            {
                actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);
            }
            ActorStaticData actorData = new ActorStaticData();

            actorDataProvider.GetActorStaticData(ref theActorMeta, ref actorData);
            this.m_theActorMeta = theActorMeta;
            this.EnergyType     = (ENERGY_TYPE)actorData.TheBaseAttribute.EpType;
            ResHeroEnergyInfo dataByKey  = GameDataMgr.heroEnergyDatabin.GetDataByKey(actorData.TheBaseAttribute.EpType);
            int           nMaxLimitValue = (dataByKey == null) ? 0 : dataByKey.iEnergyMax;
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            bool bPvpMode = true;

            if (curLvelContext != null)
            {
                bPvpMode = !bLobby?curLvelContext.IsMobaMode() : true;
            }
            this.mActorValue[5] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP, actorData.TheBaseAttribute.BaseHp, actorData.TheBaseAttribute.PerLvHp, new ValueCalculator(this.DynamicAdjustorForMgcEffect), (int)actorData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP, bPvpMode));
            DebugHelper.Assert(this.mActorValue[5].totalValue > 0, "Initialize maxhp <= 0");
            this.mActorValue[1]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT, actorData.TheBaseAttribute.BaseAd, actorData.TheBaseAttribute.PerLvAd, new ValueCalculator(this.DynamicAdjustorForMgcEffect), (int)actorData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT, bPvpMode));
            this.mActorValue[2]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT, actorData.TheBaseAttribute.BaseAp, actorData.TheBaseAttribute.PerLvAp, new ValueCalculator(this.DynamicAdjustor), (int)actorData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT, bPvpMode));
            this.mActorValue[3]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYDEFPT, actorData.TheBaseAttribute.BaseDef, actorData.TheBaseAttribute.PerLvDef, new ValueCalculator(this.DynamicAdjustor), (int)actorData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYDEFPT, bPvpMode));
            this.mActorValue[4]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCDEFPT, actorData.TheBaseAttribute.BaseRes, actorData.TheBaseAttribute.PerLvRes, new ValueCalculator(this.DynamicAdjustor), (int)actorData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCDEFPT, bPvpMode));
            this.mActorValue[0x20] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_MAXEP, actorData.TheBaseAttribute.BaseEp, actorData.TheBaseAttribute.EpGrowth, new ValueCalculator(this.EpGrowCalculator), 0, nMaxLimitValue);
            this.mActorValue[0x21] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_EPRECOVER, actorData.TheBaseAttribute.BaseEpRecover, actorData.TheBaseAttribute.PerLvEpRecover, new ValueCalculator(this.EpRecCalculator), 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_EPRECOVER, bPvpMode));
            this.mActorValue[0x22] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_PHYARMORHURT_RATE, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_PHYARMORHURT_RATE, bPvpMode));
            this.mActorValue[0x23] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_MGCARMORHURT_RATE, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_MGCARMORHURT_RATE, bPvpMode));
            this.mActorValue[0x15] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_SightArea, actorData.TheBaseAttribute.Sight, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_SightArea, bPvpMode));
            this.mActorValue[15]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MOVESPD, actorData.TheBaseAttribute.MoveSpeed, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MOVESPD, bPvpMode));
            this.mActorValue[0x10] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_HPRECOVER, actorData.TheBaseAttribute.BaseHpRecover, actorData.TheBaseAttribute.PerLvHpRecover, new ValueCalculator(this.GrowCalculator), 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_HPRECOVER, bPvpMode));
            this.mActorValue[0x12] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_ATKSPDADD, actorData.TheBaseAttribute.BaseAtkSpeed, actorData.TheBaseAttribute.PerLvAtkSpeed, new ValueCalculator(this.GrowCalculator), 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_ATKSPDADD, bPvpMode));
            this.mActorValue[6]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_CRITRATE, actorData.TheBaseAttribute.CriticalChance, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_CRITRATE, bPvpMode));
            this.mActorValue[12]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_CRITEFT, actorData.TheBaseAttribute.CriticalDamage, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_CRITEFT, bPvpMode));
            this.mActorValue[11]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_ANTICRIT, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_ANTICRIT, bPvpMode));
            this.mActorValue[0x16] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_HitRate, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_HitRate, bPvpMode));
            this.mActorValue[0x17] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_HitRateAvoid, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_HitRateAvoid, bPvpMode));
            this.mActorValue[13]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_REALHURT, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_REALHURT, bPvpMode));
            this.mActorValue[14]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_REALHURTLESS, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_REALHURTLESS, bPvpMode));
            this.mActorValue[7]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYARMORHURT, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYARMORHURT, bPvpMode));
            this.mActorValue[8]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCARMORHURT, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCARMORHURT, bPvpMode));
            this.mActorValue[0x13] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_BASEHURTADD, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_BASEHURTADD, bPvpMode));
            this.mActorValue[9]    = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP, bPvpMode));
            this.mActorValue[10]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCVAMP, bPvpMode));
            this.mActorValue[0x11] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_CTRLREDUCE, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_FUNCEFT_CTRLREDUCE, bPvpMode));
            this.mActorValue[20]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_FUNCEFT_CDREDUCE, 0, 0, null, 0, this.GetPropMaxValueLimitCdReduce(bPvpMode));
            this.mActorValue[0x18] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_CRITICAL, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_CRITICAL, bPvpMode));
            this.mActorValue[0x19] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_REDUCECRITICAL, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_REDUCECRITICAL, bPvpMode));
            this.mActorValue[0x1a] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_PHYSICSHEM, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_PHYSICSHEM, bPvpMode));
            this.mActorValue[0x1b] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_MAGICHEM, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_MAGICHEM, bPvpMode));
            this.mActorValue[0x1c] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_ATTACKSPEED, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_ATTACKSPEED, bPvpMode));
            this.mActorValue[0x1d] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_TENACITY, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_TENACITY, bPvpMode));
            this.mActorValue[30]   = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_HURTREDUCERATE, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_HURTREDUCERATE, bPvpMode));
            this.mActorValue[0x1f] = new ValueDataInfo(RES_FUNCEFT_TYPE.RES_PROPERTY_HURTOUTPUTRATE, 0, 0, null, 0, this.GetPropMaxValueLimit(RES_FUNCEFT_TYPE.RES_PROPERTY_HURTOUTPUTRATE, bPvpMode));
        }
Пример #15
0
        private void Calc9SlotHeroStandingPosition(CSDT_BATTLE_PLAYER_BRIEF stBattlePlayer)
        {
            PlayerBuilder.Calc9SlotHeroData[] array             = new PlayerBuilder.Calc9SlotHeroData[3];
            IGameActorDataProvider            actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            ActorStaticData actorStaticData = default(ActorStaticData);
            ActorMeta       actorMeta       = default(ActorMeta);

            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() == null)
            {
                return;
            }
            int num = 0;

            while (num < stBattlePlayer.astFighter[0].astChoiceHero.Length && num < 3)
            {
                uint dwHeroID = stBattlePlayer.astFighter[0].astChoiceHero[num].stBaseInfo.stCommonInfo.dwHeroID;
                if (dwHeroID != 0u)
                {
                    actorMeta.ConfigId = (int)dwHeroID;
                    actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData);
                    array[num].Level        = 1u;
                    array[num].Quality      = 1;
                    array[num].RecommendPos = actorStaticData.TheHeroOnlyInfo.RecommendStandPos;
                    array[num].Ability      = (uint)CHeroDataFactory.CreateHeroData(dwHeroID).combatEft;
                    array[num].ConfigId     = dwHeroID;
                    array[num].selected     = false;
                    array[num].BornIndex    = -1;
                }
                num++;
            }
            this.ImpCalc9SlotHeroStandingPosition(ref array);
            int num2 = 0;

            while (num2 < stBattlePlayer.astFighter[0].astChoiceHero.Length && num2 < 3)
            {
                stBattlePlayer.astFighter[0].astChoiceHero[num2].stHeroExtral.iHeroPos = array[num2].BornIndex;
                num2++;
            }
            int num3 = 0;

            while (num3 < stBattlePlayer.astFighter[1].astChoiceHero.Length && num3 < 3)
            {
                uint dwHeroID2 = stBattlePlayer.astFighter[1].astChoiceHero[num3].stBaseInfo.stCommonInfo.dwHeroID;
                if (dwHeroID2 != 0u)
                {
                    actorMeta.ConfigId = (int)dwHeroID2;
                    actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData);
                    array[num3].Level        = (uint)stBattlePlayer.astFighter[1].astChoiceHero[num3].stBaseInfo.stCommonInfo.wLevel;
                    array[num3].Quality      = (int)stBattlePlayer.astFighter[1].astChoiceHero[num3].stBaseInfo.stCommonInfo.stQuality.wQuality;
                    array[num3].RecommendPos = actorStaticData.TheHeroOnlyInfo.RecommendStandPos;
                    array[num3].Ability      = (uint)CHeroDataFactory.CreateHeroData(dwHeroID2).combatEft;
                    array[num3].ConfigId     = dwHeroID2;
                    array[num3].selected     = false;
                    array[num3].BornIndex    = -1;
                }
                num3++;
            }
            this.ImpCalc9SlotHeroStandingPosition(ref array);
            int num4 = 0;

            while (num4 < stBattlePlayer.astFighter[1].astChoiceHero.Length && num4 < 3)
            {
                stBattlePlayer.astFighter[1].astChoiceHero[num4].stHeroExtral.iHeroPos = array[num4].BornIndex;
                num4++;
            }
        }
Пример #16
0
        private void EnterSpawnEye(Action _action, Track _track)
        {
            if (this.bUseSkin)
            {
                string resourceName = SkinResourceHelper.GetResourceName(_action, this.prefabName, this.bUseSkinAdvance);
            }
            else
            {
                string resourceName = this.prefabName;
            }
            VInt3                     vInt           = VInt3.zero;
            VInt3                     forward        = VInt3.forward;
            SkillUseContext           refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            COM_PLAYERCAMP            cOM_PLAYERCAMP = (refParamObject == null || !refParamObject.Originator) ? 0 : refParamObject.Originator.get_handle().TheActorMeta.ActorCamp;
            GameObject                gameObject     = _action.GetGameObject(this.parentId);
            PoolObjHandle <ActorRoot> actorHandle    = _action.GetActorHandle(this.parentId);
            PoolObjHandle <ActorRoot> actorHandle2   = _action.GetActorHandle(this.objectSpaceId);

            if (actorHandle2)
            {
                ActorRoot handle = actorHandle2.get_handle();
                if (this.superTranslation)
                {
                    VInt3 zero = VInt3.zero;
                    _action.refParams.GetRefParam("_BulletPos", ref zero);
                    vInt = IntMath.Transform(zero, handle.forward, handle.location);
                }
                else if (this.modifyTranslation)
                {
                    vInt = IntMath.Transform(this.translation, handle.forward, handle.location);
                }
                if (this.modifyDirection)
                {
                    forward = actorHandle2.get_handle().forward;
                }
            }
            else if (this.bTargetPosition)
            {
                vInt = this.translation + this.targetPosition;
                if (this.modifyDirection && refParamObject != null && refParamObject.Originator)
                {
                    forward = refParamObject.Originator.get_handle().forward;
                }
            }
            else
            {
                if (this.modifyTranslation)
                {
                    vInt = this.translation;
                }
                if (this.modifyDirection && this.direction.x != 0 && this.direction.y != 0)
                {
                    forward = this.direction;
                    forward.NormalizeTo(1000);
                }
            }
            if (this.targetId >= 0)
            {
                _action.ExpandGameObject(this.targetId);
                GameObject gameObject2 = _action.GetGameObject(this.targetId);
                if (this.recreateExisting && gameObject2 != null)
                {
                    if (this.applyActionSpeedToAnimation)
                    {
                        _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject2);
                    }
                    if (this.applyActionSpeedToParticle)
                    {
                        _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject2);
                    }
                    ActorHelper.DetachActorRoot(gameObject2);
                    ActionManager.DestroyGameObject(gameObject2);
                    _action.SetGameObject(this.targetId, null);
                }
                GameObject gameObject3 = null;
                if (!(gameObject2 == null))
                {
                    return;
                }
                ActorStaticData        actorStaticData   = default(ActorStaticData);
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                ActorMeta actorMeta  = default(ActorMeta);
                ActorMeta actorMeta2 = actorMeta;
                actorMeta2.ActorType = ActorTypeDef.Actor_Type_EYE;
                actorMeta2.ActorCamp = cOM_PLAYERCAMP;
                actorMeta2.ConfigId  = this.EyeCfgIdByMonster;
                actorMeta2.EnCId     = this.EyeCfgIdByMonster;
                actorMeta            = actorMeta2;
                actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData);
                CActorInfo exists = null;
                if (!string.IsNullOrEmpty(actorStaticData.TheResInfo.ResPath))
                {
                    CActorInfo actorInfo = CActorInfo.GetActorInfo(actorStaticData.TheResInfo.ResPath, 0);
                    if (actorInfo != null)
                    {
                        exists = (CActorInfo)Object.Instantiate(actorInfo);
                    }
                }
                PoolObjHandle <ActorRoot> poolObjHandle = default(PoolObjHandle <ActorRoot>);
                if (exists)
                {
                    if (refParamObject.Originator && !PathfindingUtility.IsValidTarget(refParamObject.Originator.get_handle(), vInt) && !Singleton <GameFowManager> .get_instance().m_pFieldObj.FindNearestNotBrickFromWorldLocNonFow(ref vInt, refParamObject.Originator.get_handle()))
                    {
                        vInt = refParamObject.Originator.get_handle().location;
                    }
                    poolObjHandle = Singleton <GameObjMgr> .get_instance().SpawnActorEx(null, ref actorMeta, vInt, forward, false, true);

                    if (poolObjHandle)
                    {
                        this.actorRoot = poolObjHandle;
                        gameObject3    = poolObjHandle.get_handle().gameObject;
                        poolObjHandle.get_handle().InitActor();
                        this.CreateEye();
                        poolObjHandle.get_handle().PrepareFight();
                        poolObjHandle.get_handle().StartFight();
                    }
                }
                if (!poolObjHandle)
                {
                    return;
                }
                if (!gameObject3)
                {
                    throw new Exception("Age:SpawnObjectDuration Spawn Exception");
                }
                gameObject3.transform.localScale = Vector3.one;
                if (GameSettings.DynamicParticleLOD)
                {
                    bool flag        = true;
                    int  particleLOD = GameSettings.ParticleLOD;
                    if (refParamObject != null && refParamObject.Originator && refParamObject.Originator.get_handle().TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId)
                    {
                        flag = false;
                    }
                    if (!flag && particleLOD > 1)
                    {
                        GameSettings.ParticleLOD = 1;
                    }
                    MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag;
                }
                this.actorRoot.get_handle().location = vInt;
                this.actorRoot.get_handle().forward  = forward;
                if (this.actorRoot.get_handle().shape != null)
                {
                    this.actorRoot.get_handle().shape.ConditionalUpdateShape();
                }
                if (this.actorRoot.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
                {
                    this.actorRoot.get_handle().TheActorMeta.ConfigId = this.EyeCfgIdByMonster;
                }
                if (refParamObject != null)
                {
                    refParamObject.EffectPos = this.actorRoot.get_handle().location;
                    if (this.actorRoot.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
                    {
                        DebugHelper.Assert(this.actorRoot.get_handle().TheActorMeta.ActorCamp == cOM_PLAYERCAMP);
                        this.actorRoot.get_handle().TheActorMeta.ActorCamp = cOM_PLAYERCAMP;
                    }
                }
                SpawnEyeEventParam spawnEyeEventParam = new SpawnEyeEventParam(refParamObject.Originator, vInt);
                Singleton <GameSkillEventSys> .GetInstance().SendEvent <SpawnEyeEventParam>(GameSkillEventDef.Event_SpawnEye, refParamObject.Originator, ref spawnEyeEventParam, GameSkillEventChannel.Channel_HostCtrlActor);
            }
        }
        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);
            }
        }
Пример #18
0
 private void CheckOrganSoldierWave(ref List <ActorPreloadTab> InPreloadListRef, ref ActorMeta InOrganActorMetaRef, ActorStaticData InStaticData)
 {
     if ((InOrganActorMetaRef.ActorType == ActorTypeDef.Actor_Type_Organ) && (InStaticData.TheOrganOnlyInfo.DeadEnemySoldier > 0))
     {
         ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)InStaticData.TheOrganOnlyInfo.DeadEnemySoldier);
         int num = 0;
         while ((dataByKey != null) && (++num < 100))
         {
             for (int i = 0; i < dataByKey.astNormalSoldierInfo.Length; i++)
             {
                 ResSoldierTypeInfo info2 = dataByKey.astNormalSoldierInfo[i];
                 if (info2.dwSoldierID == 0)
                 {
                     break;
                 }
                 ActorMeta actorMeta = new ActorMeta {
                     ActorType = ActorTypeDef.Actor_Type_Monster,
                     ConfigId  = (int)info2.dwSoldierID
                 };
                 this.AddPreloadActor(ref InPreloadListRef, ref actorMeta, 2f, 0);
             }
             dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
         }
     }
 }
Пример #19
0
        public void InitValueDataArr(ref ActorMeta theActorMeta, bool bLobby)
        {
            IGameActorDataProvider actorDataProvider;

            if (bLobby)
            {
                actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);
            }
            else
            {
                actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);
            }
            ActorStaticData actorStaticData = default(ActorStaticData);

            actorDataProvider.GetActorStaticData(ref theActorMeta, ref actorStaticData);
            this.m_theActorMeta = theActorMeta;
            this.EnergyType     = (EnergyType)actorStaticData.TheBaseAttribute.EpType;
            ResHeroEnergyInfo dataByKey  = GameDataMgr.heroEnergyDatabin.GetDataByKey(actorStaticData.TheBaseAttribute.EpType);
            int           nMaxLimitValue = (dataByKey == null) ? 0 : dataByKey.iEnergyMax;
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            bool bPvpMode = true;

            if (curLvelContext != null)
            {
                bPvpMode = (bLobby || curLvelContext.IsMobaMode());
            }
            this.mActorValue[5] = new ValueDataInfo(5, actorStaticData.TheBaseAttribute.BaseHp, actorStaticData.TheBaseAttribute.PerLvHp, new ValueCalculator(this.DynamicAdjustorForMgcEffect), (int)actorStaticData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(5, bPvpMode));
            DebugHelper.Assert(this.mActorValue[5].totalValue > 0, "Initialize maxhp <= 0");
            this.mActorValue[1]  = new ValueDataInfo(1, actorStaticData.TheBaseAttribute.BaseAd, actorStaticData.TheBaseAttribute.PerLvAd, new ValueCalculator(this.DynamicAdjustorForMgcEffect), (int)actorStaticData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(1, bPvpMode));
            this.mActorValue[2]  = new ValueDataInfo(2, actorStaticData.TheBaseAttribute.BaseAp, actorStaticData.TheBaseAttribute.PerLvAp, new ValueCalculator(this.DynamicAdjustor), (int)actorStaticData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(2, bPvpMode));
            this.mActorValue[3]  = new ValueDataInfo(3, actorStaticData.TheBaseAttribute.BaseDef, actorStaticData.TheBaseAttribute.PerLvDef, new ValueCalculator(this.DynamicAdjustor), (int)actorStaticData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(3, bPvpMode));
            this.mActorValue[4]  = new ValueDataInfo(4, actorStaticData.TheBaseAttribute.BaseRes, actorStaticData.TheBaseAttribute.PerLvRes, new ValueCalculator(this.DynamicAdjustor), (int)actorStaticData.TheBaseAttribute.DynamicProperty, this.GetPropMaxValueLimit(4, bPvpMode));
            this.mActorValue[32] = new ValueDataInfo(32, actorStaticData.TheBaseAttribute.BaseEp, actorStaticData.TheBaseAttribute.EpGrowth, new ValueCalculator(this.EpGrowCalculator), 0, nMaxLimitValue);
            this.mActorValue[33] = new ValueDataInfo(33, actorStaticData.TheBaseAttribute.BaseEpRecover, actorStaticData.TheBaseAttribute.PerLvEpRecover, new ValueCalculator(this.EpRecCalculator), 0, this.GetPropMaxValueLimit(33, bPvpMode));
            this.mActorValue[34] = new ValueDataInfo(34, 0, 0, null, 0, this.GetPropMaxValueLimit(34, bPvpMode));
            this.mActorValue[35] = new ValueDataInfo(35, 0, 0, null, 0, this.GetPropMaxValueLimit(35, bPvpMode));
            this.mActorValue[21] = new ValueDataInfo(21, actorStaticData.TheBaseAttribute.Sight, 0, null, 0, this.GetPropMaxValueLimit(21, bPvpMode));
            this.mActorValue[15] = new ValueDataInfo(15, actorStaticData.TheBaseAttribute.MoveSpeed, 0, null, 0, this.GetPropMaxValueLimit(15, bPvpMode));
            this.mActorValue[16] = new ValueDataInfo(16, actorStaticData.TheBaseAttribute.BaseHpRecover, actorStaticData.TheBaseAttribute.PerLvHpRecover, new ValueCalculator(this.GrowCalculator), 0, this.GetPropMaxValueLimit(16, bPvpMode));
            this.mActorValue[18] = new ValueDataInfo(18, actorStaticData.TheBaseAttribute.BaseAtkSpeed, actorStaticData.TheBaseAttribute.PerLvAtkSpeed, new ValueCalculator(this.GrowCalculator), 0, this.GetPropMaxValueLimit(18, bPvpMode));
            this.mActorValue[6]  = new ValueDataInfo(6, actorStaticData.TheBaseAttribute.CriticalChance, 0, null, 0, this.GetPropMaxValueLimit(6, bPvpMode));
            this.mActorValue[12] = new ValueDataInfo(12, actorStaticData.TheBaseAttribute.CriticalDamage, 0, null, 0, this.GetPropMaxValueLimit(12, bPvpMode));
            this.mActorValue[11] = new ValueDataInfo(11, 0, 0, null, 0, this.GetPropMaxValueLimit(11, bPvpMode));
            this.mActorValue[22] = new ValueDataInfo(22, 0, 0, null, 0, this.GetPropMaxValueLimit(22, bPvpMode));
            this.mActorValue[23] = new ValueDataInfo(23, 0, 0, null, 0, this.GetPropMaxValueLimit(23, bPvpMode));
            this.mActorValue[13] = new ValueDataInfo(13, 0, 0, null, 0, this.GetPropMaxValueLimit(13, bPvpMode));
            this.mActorValue[14] = new ValueDataInfo(14, 0, 0, null, 0, this.GetPropMaxValueLimit(14, bPvpMode));
            this.mActorValue[7]  = new ValueDataInfo(7, 0, 0, null, 0, this.GetPropMaxValueLimit(7, bPvpMode));
            this.mActorValue[8]  = new ValueDataInfo(8, 0, 0, null, 0, this.GetPropMaxValueLimit(8, bPvpMode));
            this.mActorValue[19] = new ValueDataInfo(19, 0, 0, null, 0, this.GetPropMaxValueLimit(19, bPvpMode));
            this.mActorValue[9]  = new ValueDataInfo(9, 0, 0, null, 0, this.GetPropMaxValueLimit(9, bPvpMode));
            this.mActorValue[10] = new ValueDataInfo(10, 0, 0, null, 0, this.GetPropMaxValueLimit(10, bPvpMode));
            this.mActorValue[17] = new ValueDataInfo(17, 0, 0, null, 0, this.GetPropMaxValueLimit(17, bPvpMode));
            this.mActorValue[20] = new ValueDataInfo(20, 0, 0, null, 0, this.GetPropMaxValueLimitCdReduce(bPvpMode));
            this.mActorValue[24] = new ValueDataInfo(24, 0, 0, null, 0, this.GetPropMaxValueLimit(24, bPvpMode));
            this.mActorValue[25] = new ValueDataInfo(25, 0, 0, null, 0, this.GetPropMaxValueLimit(25, bPvpMode));
            this.mActorValue[26] = new ValueDataInfo(26, 0, 0, null, 0, this.GetPropMaxValueLimit(26, bPvpMode));
            this.mActorValue[27] = new ValueDataInfo(27, 0, 0, null, 0, this.GetPropMaxValueLimit(27, bPvpMode));
            this.mActorValue[28] = new ValueDataInfo(28, 0, 0, null, 0, this.GetPropMaxValueLimit(28, bPvpMode));
            this.mActorValue[29] = new ValueDataInfo(29, 0, 0, null, 0, this.GetPropMaxValueLimit(29, bPvpMode));
            this.mActorValue[30] = new ValueDataInfo(30, 0, 0, null, 0, this.GetPropMaxValueLimit(30, bPvpMode));
            this.mActorValue[31] = new ValueDataInfo(31, 0, 0, null, 0, this.GetPropMaxValueLimit(31, bPvpMode));
            this.mActorValue[36] = new ValueDataInfo(36, 0, 0, null, 0, this.GetPropMaxValueLimit(36, bPvpMode));
        }
Пример #20
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);
        }
    }