public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo o = new ConfigDataHeroPhantomInfo();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_ID(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, configDataHeroPhantomInfo.ID);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Ejemplo n.º 3
0
        // Token: 0x0601467D RID: 83581 RVA: 0x0052FE5C File Offset: 0x0052E05C
        public void SetHeroPhantomInfo(ConfigDataHeroPhantomInfo heroPhantomInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroPhantomInfoConfigDataHeroPhantomInfo_hotfix != null)
            {
                this.m_SetHeroPhantomInfoConfigDataHeroPhantomInfo_hotfix.call(new object[]
                {
                    this,
                    heroPhantomInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_heroPhantomInfo         = heroPhantomInfo;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            bool flag = projectLPlayerContext.IsHeroPhantomOpened(heroPhantomInfo.ID);

            this.m_uiStateController.SetToUIState((!flag) ? "Grey" : "Normal", false, true);
            this.m_image.sprite = AssetUtility.Instance.GetSprite(heroPhantomInfo.Image);
            DateTime dateTime  = Convert.ToDateTime(heroPhantomInfo.OpenDateTime);
            DateTime dateTime2 = Convert.ToDateTime(heroPhantomInfo.CloseDateTime);

            this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Uncharted_LimitTime), new object[]
            {
                dateTime.Month,
                dateTime.Day,
                dateTime.Hour,
                dateTime.Minute,
                dateTime2.Month,
                dateTime2.Day,
                dateTime2.Hour,
                dateTime2.Minute
            });
            int num = 0;

            foreach (ConfigDataHeroPhantomLevelInfo configDataHeroPhantomLevelInfo in heroPhantomInfo.m_levels)
            {
                if (configDataHeroPhantomLevelInfo.m_achievements != null)
                {
                    num += configDataHeroPhantomLevelInfo.m_achievements.Length;
                }
            }
            int heroPhantomCompleteAchievementCount = projectLPlayerContext.GetHeroPhantomCompleteAchievementCount(heroPhantomInfo.ID);

            this.m_achievementCountText.text = heroPhantomCompleteAchievementCount + "/" + num;
        }
    public static int GetHeroPhantomInfo(IntPtr l)
    {
        int result;

        try
        {
            HeroPhantomButton         heroPhantomButton = (HeroPhantomButton)LuaObject.checkSelf(l);
            ConfigDataHeroPhantomInfo heroPhantomInfo   = heroPhantomButton.GetHeroPhantomInfo();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, heroPhantomInfo);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_UI_ModelOffsetY(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            int ui_ModelOffsetY;
            LuaObject.checkType(l, 2, out ui_ModelOffsetY);
            configDataHeroPhantomInfo.UI_ModelOffsetY = ui_ModelOffsetY;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_levels(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo             configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            List <ConfigDataHeroPhantomLevelInfo> levels;
            LuaObject.checkType <List <ConfigDataHeroPhantomLevelInfo> >(l, 2, out levels);
            configDataHeroPhantomInfo.m_levels = levels;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_Model(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            string model;
            LuaObject.checkType(l, 2, out model);
            configDataHeroPhantomInfo.Model = model;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_HideDateTime(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            string hideDateTime;
            LuaObject.checkType(l, 2, out hideDateTime);
            configDataHeroPhantomInfo.HideDateTime = hideDateTime;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_ID(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataHeroPhantomInfo configDataHeroPhantomInfo = (ConfigDataHeroPhantomInfo)LuaObject.checkSelf(l);
            int id;
            LuaObject.checkType(l, 2, out id);
            configDataHeroPhantomInfo.ID = id;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Ejemplo n.º 10
0
 // Token: 0x0601178C RID: 71564 RVA: 0x00486378 File Offset: 0x00484578
 public void UpdateHeroPhantomLevels(ConfigDataHeroPhantomInfo heroPhantomInfo)
 {
     this.m_owner.UpdateHeroPhantomLevels(heroPhantomInfo);
 }