Beispiel #1
0
        // Token: 0x0600FFF9 RID: 65529 RVA: 0x00431F8C File Offset: 0x0043018C
        private void SetBreakHeroInfo()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetBreakHeroInfo_hotfix != null)
            {
                this.m_SetBreakHeroInfo_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (this.m_heroCharUIController.GetCharImageInfo() != this.m_hero.HeroInfo.GetCharImageInfo(this.m_hero.StarLevel))
            {
                this.m_heroCharUIController.CreateGraphic(this.m_hero, HeroCharUIController.PerformanceState.Break, false, null);
                this.m_heroCharUIController.PlayAnimation("idle_Normal", false);
            }
            HeroPropertyComputer heroPropertyComputer = new HeroPropertyComputer();

            heroPropertyComputer.Init(this.m_configDataLoader);
            HeroPropertyComputer heroPropertyComputer2 = heroPropertyComputer;
            Hero hero         = this.m_hero;
            int  jobRelatedId = this.m_hero.GetActiveJob().JobRelatedId;
            int  starLevel    = this.m_hero.StarLevel - 1;
            int  starLevel2   = this.m_hero.StarLevel;

            heroPropertyComputer2.ComputeHeroProperties(hero, jobRelatedId, -1, -1, starLevel, starLevel2, -1, -1);
            this.m_heroBreakSuccessInfoHpText.text         = heroPropertyComputer.Property0.HealthPointMax.ToString();
            this.m_heroBreakSuccessInfoHpAddText.text      = (heroPropertyComputer.Property1.HealthPointMax - heroPropertyComputer.Property0.HealthPointMax).ToString();
            this.m_heroBreakSuccessInfoATText.text         = heroPropertyComputer.Property0.Attack.ToString();
            this.m_heroBreakSuccessInfoATAddText.text      = (heroPropertyComputer.Property1.Attack - heroPropertyComputer.Property0.Attack).ToString();
            this.m_heroBreakSuccessInfoMagicText.text      = heroPropertyComputer.Property0.Magic.ToString();
            this.m_heroBreakSuccessInfoMagicAddText.text   = (heroPropertyComputer.Property1.Magic - heroPropertyComputer.Property0.Magic).ToString();
            this.m_heroBreakSuccessInfoDFText.text         = heroPropertyComputer.Property0.Defense.ToString();
            this.m_heroBreakSuccessInfoDFAddText.text      = (heroPropertyComputer.Property1.Defense - heroPropertyComputer.Property0.Defense).ToString();
            this.m_heroBreakSuccessInfoMagicDFText.text    = heroPropertyComputer.Property0.MagicDefense.ToString();
            this.m_heroBreakSuccessInfoMagicDFAddText.text = (heroPropertyComputer.Property1.MagicDefense - heroPropertyComputer.Property0.MagicDefense).ToString();
            this.m_heroBreakSuccessInfoDexText.text        = heroPropertyComputer.Property0.Dexterity.ToString();
            this.m_heroBreakSuccessInfoDexAddText.text     = (heroPropertyComputer.Property1.Dexterity - heroPropertyComputer.Property0.Dexterity).ToString();
            UIUtility.ReverseShowGameObjectChildrenByActive(this.m_heroStarGroup, this.m_hero.StarLevel - 1);
            ConfigDataSkillInfo talentSkillInfo = this.m_hero.GetActiveJob().JobConnectionInfo.GetTalentSkillInfo(this.m_hero.StarLevel - 1);

            if (talentSkillInfo != null)
            {
                this.m_talent1Icon.sprite   = AssetUtility.Instance.GetSprite(talentSkillInfo.Icon);
                this.m_talent1NameText.text = talentSkillInfo.Name;
                this.m_talent1DescText.text = talentSkillInfo.Desc;
            }
            ConfigDataSkillInfo talentSkillInfo2 = this.m_hero.GetActiveJob().JobConnectionInfo.GetTalentSkillInfo(this.m_hero.StarLevel);

            if (talentSkillInfo2 != null)
            {
                this.m_talent2Icon.sprite   = AssetUtility.Instance.GetSprite(talentSkillInfo2.Icon);
                this.m_talent2NameText.text = talentSkillInfo2.Name;
                this.m_talent2DescText.text = talentSkillInfo2.Desc;
            }
        }
    public static int ComputeHeroProperties(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 2)
            {
                HeroPropertyComputer heroPropertyComputer = (HeroPropertyComputer)LuaObject.checkSelf(l);
                BattleHero           hero;
                LuaObject.checkType <BattleHero>(l, 2, out hero);
                heroPropertyComputer.ComputeHeroProperties(hero);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 9)
            {
                HeroPropertyComputer heroPropertyComputer2 = (HeroPropertyComputer)LuaObject.checkSelf(l);
                Hero hero2;
                LuaObject.checkType <Hero>(l, 2, out hero2);
                int jobConnectionId;
                LuaObject.checkType(l, 3, out jobConnectionId);
                int heroLevel;
                LuaObject.checkType(l, 4, out heroLevel);
                int heroLevel2;
                LuaObject.checkType(l, 5, out heroLevel2);
                int starLevel;
                LuaObject.checkType(l, 6, out starLevel);
                int starLevel2;
                LuaObject.checkType(l, 7, out starLevel2);
                int jobLevel;
                LuaObject.checkType(l, 8, out jobLevel);
                int jobLevel2;
                LuaObject.checkType(l, 9, out jobLevel2);
                heroPropertyComputer2.ComputeHeroProperties(hero2, jobConnectionId, heroLevel, heroLevel2, starLevel, starLevel2, jobLevel, jobLevel2);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function ComputeHeroProperties to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }