コード例 #1
0
        public override void Fight()
        {
            base.Fight();
            this.nHpRecoveryTick = 0;
            this.nEpRecoveryTick = 0;
            DebugHelper.Assert(this.mActorValue != null, "mActorValue = null data is error");
            if (this.mActorValue != null)
            {
                VFactor hpRate = this.GetHpRate();
                DebugHelper.Assert(this.actor != null, "actor is null ? impossible...");
                if (this.actor != null)
                {
                    bool          bPVPLevel      = true;
                    SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                    if (curLvelContext != null)
                    {
                        bPVPLevel = curLvelContext.IsMobaMode();
                    }
                    this.mActorValue.AddSymbolPageAttToProp(ref this.actor.TheActorMeta, bPVPLevel);
                    IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                    ActorServerData actorServerData = default(ActorServerData);
                    if (actorDataProvider != null && actorDataProvider.GetActorServerData(ref this.actor.TheActorMeta, ref actorServerData))
                    {
                        this.mActorValue.SetSkinProp((uint)this.actor.TheActorMeta.ConfigId, actorServerData.SkinId, true);
                    }
                }
                this.SetHpByRate(hpRate);
            }
        }
コード例 #2
0
        public IGameActorDataProvider GetActorDataProvider(GameActorDataProviderType providerType)
        {
            IGameActorDataProvider result = null;

            this._providers.TryGetValue((uint)providerType, out result);
            return(result);
        }
コード例 #3
0
        private static int GetHeroCombatEft(PoolObjHandle <ActorRoot> actor)
        {
            if (actor == 0)
            {
                return(0);
            }
            int num = 0;
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorData = new ActorServerData();

            if (actorDataProvider.GetActorServerData(ref actor.handle.TheActorMeta, ref actorData))
            {
                num += CHeroInfo.GetCombatEftByStarLevel((int)actorData.Level, (int)actorData.Star);
                num += CSkinInfo.GetCombatEft((uint)actorData.TheActorMeta.ConfigId, actorData.SkinId);
                ActorServerRuneData runeData = new ActorServerRuneData();
                for (int i = 0; i < 30; i++)
                {
                    if (actorDataProvider.GetActorServerRuneData(ref actor.handle.TheActorMeta, (ActorRunelSlot)i, ref runeData))
                    {
                        ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(runeData.RuneId);
                        if (dataByKey != null)
                        {
                            num += dataByKey.iCombatEft;
                        }
                    }
                }
            }
            return(num);
        }
コード例 #4
0
        public void Initialize(PoolObjHandle <ActorRoot> actorRoot, int campPos)
        {
            this.CampPos   = campPos;
            this.actorHero = actorRoot;
            this.HeroId    = this.actorHero.handle.TheActorMeta.ConfigId;
            ActorServerData        actorServerData   = default(ActorServerData);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider.GetActorServerData(ref actorRoot.handle.TheActorMeta, ref actorServerData))
            {
                this.SkinId = actorServerData.SkinId;
            }
            this.commonSkillID = 0u;
            actorDataProvider.GetActorServerCommonSkillData(ref this.actorHero.handle.TheActorMeta, out this.commonSkillID);
            for (int i = 0; i < 5; i++)
            {
                this.TalentArr[i] = new COMDT_SETTLE_TALENT_INFO();
            }
            this.m_numKill   = 0;
            this.m_numAssist = 0;
            this.m_numDead   = 0;
            this.m_stJudgeStat.Reset();
            this._totalCoin             = 0;
            this.m_iCoinFromKillMonster = 0;
            this.m_iCoinFromKillDragon  = 0;
            this.m_iCoinFromKillHero    = 0;
            this.m_iCoinFromKillSolider = 0;
            this.m_iCoinFromKillTower   = 0;
            this.m_iCoinFromSystem      = 0;
            this.m_iCoinFromSystemNoAI  = 0;
            this.scanEyeCnt             = 0u;
            this.m_JudgeRecords         = new ListValueView <JudgeStatc>(30);
        }
コード例 #5
0
        protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            actorData.ProviderType = GameActorDataProviderType.StaticBattleDataProvider;
            return(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData));
        }
コード例 #6
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);
        }
コード例 #7
0
ファイル: HeroWrapper.cs プロジェクト: wujiangu/wanshiwu0.1
        public override void Fight()
        {
            base.Fight();
            if (ActorHelper.IsCaptainActor(ref this.actorPtr))
            {
                base.m_isControledByMan = true;
                base.m_isAutoAI         = false;
            }
            else
            {
                base.m_isControledByMan = false;
                base.m_isAutoAI         = true;
            }
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorData = new ActorServerData();

            if ((actorDataProvider != null) && actorDataProvider.GetActorServerData(ref base.actor.TheActorMeta, ref actorData))
            {
                this.m_skinId    = actorData.SkinId;
                this.m_skinCfgId = CSkinInfo.GetSkinCfgId((uint)base.actor.TheActorMeta.ConfigId, this.m_skinId);
                if (this.m_skinId != 0)
                {
                    ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin((uint)base.actor.TheActorMeta.ConfigId, this.m_skinId);
                    if ((heroSkin != null) && !string.IsNullOrEmpty(heroSkin.szSoundSwitchEvent))
                    {
                        Singleton <CSoundManager> .instance.PostEvent(heroSkin.szSoundSwitchEvent, base.actor.gameObject);
                    }
                }
            }
            base.EnableRVO(false);
        }
コード例 #8
0
        public bool GetRevivePosDir(ref ActorMeta actorMeta, bool bGiveBirth, out VInt3 outPosWorld, out VInt3 outDirWorld)
        {
            outPosWorld = VInt3.zero;
            outDirWorld = VInt3.forward;
            if (Singleton <GamePlayerCenter> .get_instance().GetPlayer(actorMeta.PlayerId) == null)
            {
                return(false);
            }
            ListView <ReviveRegion> .Enumerator enumerator = this.reviveAreas.GetEnumerator();
            while (enumerator.MoveNext())
            {
                if (!(enumerator.get_Current() == null) && actorMeta.ActorCamp == enumerator.get_Current().CampType)
                {
                    IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                    int       num       = actorDataProvider.Fast_GetActorServerDataBornIndex(ref actorMeta);
                    Transform transform = enumerator.get_Current().transform;
                    if (!bGiveBirth)
                    {
                        uint num2 = (uint)enumerator.get_Current().SubRevivePlaces.Length;
                        if (!enumerator.get_Current().OnlyBirth)
                        {
                            num2 += 1u;
                            int num3 = (int)FrameRandom.Random(num2);
                            if (0 < num3 && enumerator.get_Current().SubRevivePlaces[num3 - 1] != null)
                            {
                                transform = enumerator.get_Current().SubRevivePlaces[num3 - 1].transform;
                            }
                        }
                        else if (num2 >= 1u)
                        {
                            int num4 = (int)FrameRandom.Random(num2);
                            if (enumerator.get_Current().SubRevivePlaces[num4] != null)
                            {
                                transform = enumerator.get_Current().SubRevivePlaces[num4].transform;
                            }
                        }
                    }
                    Transform transform2 = null;
                    if (transform != null)
                    {
                        if (num < transform.childCount)
                        {
                            transform2 = transform.GetChild(num);
                        }
                        else
                        {
                            transform2 = transform;
                        }
                    }
                    if (transform2 != null)
                    {
                        outPosWorld = (VInt3)transform2.position;
                        outDirWorld = (VInt3)transform2.forward;
                        return(true);
                    }
                }
            }
            return(false);
        }
コード例 #9
0
ファイル: ActorDataCenter.cs プロジェクト: isoundy000/wzry-1
        public IGameActorDataProvider GetActorDataProvider(GameActorDataProviderType providerType)
        {
            IGameActorDataProvider provider = null;

            this._providers.TryGetValue((uint)providerType, out provider);
            return(provider);
        }
コード例 #10
0
ファイル: EquipComponent.cs プロジェクト: isoundy000/wzry-1
        private void InitializeRecommendEquips()
        {
            DebugHelper.Assert(base.actor != null, "InitializeRecommendEquips with actor==null");
            ActorServerData        actorData         = new ActorServerData();
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider != null)
            {
                actorDataProvider.GetActorServerData(ref base.actor.TheActorMeta, ref actorData);
            }
            else
            {
                DebugHelper.Assert(false, "Failed Get gameActorDataProvider");
            }
            DebugHelper.Assert(actorData.m_customRecommendEquips != null, "actorServerData.m_customRecommendEquips==null");
            for (int i = 0; i < actorData.m_customRecommendEquips.Length; i++)
            {
                if (actorData.m_customRecommendEquips[i] != 0)
                {
                    ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((uint)actorData.m_customRecommendEquips[i]);
                    if ((dataByKey != null) && (dataByKey.bInvalid <= 0))
                    {
                        this.m_recommendEquipInfos.Add(new CRecommendEquipInfo(actorData.m_customRecommendEquips[i], dataByKey));
                    }
                }
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent <uint>("HeroRecommendEquipInit", base.actor.ObjID);
        }
コード例 #11
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;
            }
        }
コード例 #12
0
        protected override bool BuildHeroData(ref ActorMeta actorMeta, ref ActorStaticData actorData)
        {
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticLobbyDataProvider);

            actorData.ProviderType = GameActorDataProviderType.StaticBattleDataProvider;
            actorData.TheBaseAttribute.RandomPassiveSkillRule = 0;
            return(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData));
        }
コード例 #13
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;
                }
            }
        }
コード例 #14
0
ファイル: KillNotifyUT.cs プロジェクト: TonyDongGuaPi/joework
        public static string GetHero_Icon(ref ActorMeta actorMeta, bool bSmall = false)
        {
            string result = string.Empty;
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorServerData = default(ActorServerData);

            if (actorDataProvider != null && actorDataProvider.GetActorServerData(ref actorMeta, ref actorServerData))
            {
                result = KillNotifyUT.GetHero_Icon((uint)actorServerData.TheActorMeta.ConfigId, 0u, bSmall);
            }
            return(result);
        }
コード例 #15
0
        public void ShowProficiencyEffect()
        {
            ActorServerData        actorServerData   = default(ActorServerData);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider.GetActorServerData(ref this.m_wrapper.actor.TheActorMeta, ref actorServerData))
            {
                bool flag = this.m_wrapper.actor.HudControl.PlayProficiencyAni(actorServerData.TheProficiencyInfo.Level);
                if (flag)
                {
                    this.m_showTimes--;
                }
            }
        }
コード例 #16
0
ファイル: Player.cs プロジェクト: TonyDongGuaPi/joework
        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
                });
            }
        }
コード例 #17
0
ファイル: KillNotifyUT.cs プロジェクト: isoundy000/wzry-1
        public static string GetHero_Icon(ActorRoot actor, bool bSmall)
        {
            string str = string.Empty;

            if (actor != null)
            {
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorServerData actorData = new ActorServerData();
                if ((actorDataProvider != null) && actorDataProvider.GetActorServerData(ref actor.TheActorMeta, ref actorData))
                {
                    str = GetHero_Icon((uint)actorData.TheActorMeta.ConfigId, 0, bSmall);
                }
            }
            return(str);
        }
コード例 #18
0
ファイル: HeroWrapper.cs プロジェクト: wujiangu/wanshiwu0.1
        public override void CmdCommonLearnSkill(IFrameCommand cmd)
        {
            FrameCommand <LearnSkillCommand> command = (FrameCommand <LearnSkillCommand>)cmd;

            if (Singleton <CBattleSystem> .instance.IsMatchLearnSkillRule(base.actorPtr, (SkillSlotType)command.cmdData.bSlotType) && (base.actor.SkillControl.m_iSkillPoint > 0))
            {
                base.actor.SkillControl.m_iSkillPoint--;
            }
            else
            {
                return;
            }
            PoolObjHandle <ActorRoot> actorPtr = base.actorPtr;

            if (base.actor.SkillControl.m_iSkillPoint >= 0)
            {
                SkillSlot slot;
                if (command.cmdData.bSkillLevel == 0)
                {
                    int num;
                    if (base.actor.BuffHolderComp.changeSkillRule.GetChangeSkillSlot(command.cmdData.bSlotType, out num))
                    {
                        actorPtr.handle.SkillControl.InitSkillSlot(command.cmdData.bSlotType, num, 0);
                    }
                    else
                    {
                        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                        ActorStaticSkillData skillData = new ActorStaticSkillData();
                        if (actorDataProvider.GetActorStaticSkillData(ref base.actor.TheActorMeta, (ActorSkillSlot)command.cmdData.bSlotType, ref skillData))
                        {
                            actorPtr.handle.SkillControl.InitSkillSlot(command.cmdData.bSlotType, skillData.SkillId, skillData.PassiveSkillId);
                        }
                    }
                }
                actorPtr.handle.SkillControl.TryGetSkillSlot((SkillSlotType)command.cmdData.bSlotType, out slot);
                if (slot != null)
                {
                    int skillLevel = slot.GetSkillLevel();
                    if (skillLevel == command.cmdData.bSkillLevel)
                    {
                        slot.SetSkillLevel(skillLevel + 1);
                        Singleton <EventRouter> .GetInstance().BroadCastEvent <PoolObjHandle <ActorRoot>, byte, byte>("HeroSkillLevelUp", actorPtr, command.cmdData.bSlotType, (byte)(skillLevel + 1));
                    }
                }
            }
        }
コード例 #19
0
    public int GetActorMarkID(ActorMeta actorMeta)
    {
        int skinCfgId = 0;
        IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

        ActorServerData actorData = new ActorServerData();

        if ((actorDataProvider != null) && actorDataProvider.GetActorServerData(ref actorMeta, ref actorData))
        {
            int skinId = (int)actorData.SkinId;
            if (skinId != 0)
            {
                skinCfgId = (int)CSkinInfo.GetSkinCfgId((uint)actorMeta.ConfigId, (uint)skinId);
            }
        }
        return(skinCfgId);
    }
コード例 #20
0
        public static void ApplyHP2Game(List <PoolObjHandle <ActorRoot> > actorList)
        {
            List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = actorList.GetEnumerator();
            while (enumerator.MoveNext())
            {
                PoolObjHandle <ActorRoot> current = enumerator.Current;
                current.handle.ActorControl.bForceNotRevive = true;
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorServerData           actorData = new ActorServerData();
                PoolObjHandle <ActorRoot> handle2   = enumerator.Current;
                actorDataProvider.GetActorServerData(ref handle2.handle.TheActorMeta, ref actorData);
                PoolObjHandle <ActorRoot> handle3 = enumerator.Current;
                int actorHpTotal = handle3.handle.ValueComponent.actorHpTotal;
                int num2         = (int)Convert_FactHP(actorData.TheBurnInfo.HeroRemainingHp, (uint)actorHpTotal);
                PoolObjHandle <ActorRoot> handle4 = enumerator.Current;
                handle4.handle.ValueComponent.actorHp = num2;
            }
        }
コード例 #21
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);
                        }
                    }
                }
            }
        }
コード例 #22
0
        public static void ApplyHP2Game(List <PoolObjHandle <ActorRoot> > actorList)
        {
            List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = actorList.GetEnumerator();
            while (enumerator.MoveNext())
            {
                PoolObjHandle <ActorRoot> current = enumerator.get_Current();
                current.handle.ActorControl.bForceNotRevive = true;
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

                ActorServerData           actorServerData       = default(ActorServerData);
                IGameActorDataProvider    gameActorDataProvider = actorDataProvider;
                PoolObjHandle <ActorRoot> current2 = enumerator.get_Current();
                gameActorDataProvider.GetActorServerData(ref current2.handle.TheActorMeta, ref actorServerData);
                PoolObjHandle <ActorRoot> current3 = enumerator.get_Current();
                int actorHpTotal = current3.handle.ValueComponent.actorHpTotal;
                int actorHp      = (int)BurnExpeditionUT.Convert_FactHP(actorServerData.TheBurnInfo.HeroRemainingHp, (uint)actorHpTotal);
                PoolObjHandle <ActorRoot> current4 = enumerator.get_Current();
                current4.handle.ValueComponent.actorHp = actorHp;
            }
        }
コード例 #23
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;
            }
        }
コード例 #24
0
        public void Initialize(PoolObjHandle <ActorRoot> actorRoot)
        {
            this.actorHero = actorRoot;
            this.HeroId    = this.actorHero.handle.TheActorMeta.ConfigId;
            ActorServerData        actorData         = new ActorServerData();
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider.GetActorServerData(ref actorRoot.handle.TheActorMeta, ref actorData))
            {
                this.SkinId = actorData.SkinId;
            }
            this.commonSkillID = 0;
            actorDataProvider.GetActorServerCommonSkillData(ref this.actorHero.handle.TheActorMeta, out this.commonSkillID);
            for (int i = 0; i < 5; i++)
            {
                this.TalentArr[i] = new COMDT_SETTLE_TALENT_INFO();
            }
            base.m_numKill   = 0;
            base.m_numAssist = 0;
            base.m_numDead   = 0;
            base._totalCoin  = 0;
        }
コード例 #25
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;
                }
            }
        }
コード例 #26
0
        public override void Fight()
        {
            base.Fight();
            if (ActorHelper.IsCaptainActor(ref this.actorPtr))
            {
                this.m_isControledByMan = true;
                this.m_isAutoAI         = false;
            }
            else
            {
                this.m_isControledByMan = false;
                this.m_isAutoAI         = true;
            }
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerData actorServerData = default(ActorServerData);

            if (actorDataProvider != null && actorDataProvider.GetActorServerData(ref this.actor.TheActorMeta, ref actorServerData))
            {
                this.m_skinId    = actorServerData.SkinId;
                this.m_skinCfgId = CSkinInfo.GetSkinCfgId((uint)this.actor.TheActorMeta.ConfigId, this.m_skinId);
                if (this.m_skinId != 0u)
                {
                    ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin((uint)this.actor.TheActorMeta.ConfigId, this.m_skinId);
                    if (heroSkin != null && !string.IsNullOrEmpty(heroSkin.szSoundSwitchEvent))
                    {
                        Singleton <CSoundManager> .instance.PostEvent(heroSkin.szSoundSwitchEvent, this.actor.gameObject);
                    }
                }
            }
            this.SetSkillEffectPath();
            base.EnableRVO(false);
            if (this.actor.HorizonMarker != null && FogOfWar.enable)
            {
                this.actor.HorizonMarker.SightRadius = Horizon.QueryGlobalSight();
            }
        }
コード例 #27
0
    private void AddActionsFromActors(DictionaryView <string, AGE.Action> actions, List <PoolObjHandle <ActorRoot> > actors)
    {
        if (actors != null)
        {
            for (int i = 0; i < actors.Count; i++)
            {
                PoolObjHandle <ActorRoot> handle = actors[i];
                ActorRoot root = handle.handle;
                this.AddBehaviorTree(root.CharInfo);
                IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

                ActorStaticSkillData skillData = new ActorStaticSkillData();
                for (int j = 0; j < 8; j++)
                {
                    actorDataProvider.GetActorStaticSkillData(ref root.TheActorMeta, (ActorSkillSlot)j, ref skillData);
                    if (skillData.SkillId != 0)
                    {
                        this.AddActionsFromSkill(actions, skillData.SkillId);
                        this.AddActionsFromPassiveSkill(actions, skillData.PassiveSkillId);
                    }
                }
            }
        }
    }
コード例 #28
0
    private void AddActionsFromActors(DictionaryView <string, Action> actions, List <PoolObjHandle <ActorRoot> > actors)
    {
        if (actors == null)
        {
            return;
        }
        for (int i = 0; i < actors.get_Count(); i++)
        {
            ActorRoot handle = actors.get_Item(i).handle;
            this.AddBehaviorTree(handle.CharInfo);
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            ActorStaticSkillData actorStaticSkillData = default(ActorStaticSkillData);
            for (int j = 0; j < 8; j++)
            {
                actorDataProvider.GetActorStaticSkillData(ref handle.TheActorMeta, (ActorSkillSlot)j, ref actorStaticSkillData);
                if (actorStaticSkillData.SkillId != 0)
                {
                    this.AddActionsFromSkill(actions, actorStaticSkillData.SkillId);
                    this.AddActionsFromPassiveSkill(actions, actorStaticSkillData.PassiveSkillId);
                }
            }
        }
    }
コード例 #29
0
        public void AddSymbolPageAttToProp(ref ActorMeta meta, bool bPVPLevel)
        {
            for (int i = 0; i < 37; i++)
            {
                PropertyHelper.s_symbolPropValAddArr[i] = 0;
            }
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorServerRuneData actorServerRuneData = default(ActorServerRuneData);

            for (int j = 0; j < 30; j++)
            {
                if (actorDataProvider.GetActorServerRuneData(ref meta, (ActorRunelSlot)j, ref actorServerRuneData))
                {
                    ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(actorServerRuneData.RuneId);
                    if (dataByKey != null)
                    {
                        if (bPVPLevel)
                        {
                            for (int k = 0; k < dataByKey.astFuncEftList.Length; k++)
                            {
                                int wType    = (int)dataByKey.astFuncEftList[k].wType;
                                int bValType = (int)dataByKey.astFuncEftList[k].bValType;
                                int iValue   = dataByKey.astFuncEftList[k].iValue;
                                if (wType != 0 && wType < 37 && iValue != 0)
                                {
                                    if (bValType == 0)
                                    {
                                        PropertyHelper.s_symbolPropValAddArr[wType] += iValue;
                                    }
                                    else if (bValType == 1)
                                    {
                                        this.ChangeFuncEft(wType, bValType, iValue, true);
                                    }
                                }
                            }
                        }
                        else
                        {
                            for (int l = 0; l < dataByKey.astPveEftList.Length; l++)
                            {
                                int wType    = (int)dataByKey.astPveEftList[l].wType;
                                int bValType = (int)dataByKey.astPveEftList[l].bValType;
                                int iValue   = dataByKey.astPveEftList[l].iValue;
                                if (wType != 0 && wType < 37 && iValue != 0)
                                {
                                    if (bValType == 0)
                                    {
                                        PropertyHelper.s_symbolPropValAddArr[wType] += iValue;
                                    }
                                    else if (bValType == 1)
                                    {
                                        this.ChangeFuncEft(wType, bValType, iValue, true);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            for (int m = 0; m < 37; m++)
            {
                int num = PropertyHelper.s_symbolPropValAddArr[m] / 100;
                if (num > 0)
                {
                    this.ChangeFuncEft(m, 0, num, true);
                }
            }
        }
コード例 #30
0
        private static void ShowMultiLoading()
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CUILoadingSystem.PVP_PATH_LOADING, false, false);

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

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

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

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

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

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

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

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