Example #1
0
        // Token: 0x0600767F RID: 30335 RVA: 0x002067FC File Offset: 0x002049FC
        public int GainChapterReward(int chapterId, int index)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GainChapterRewardInt32Int32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_GainChapterRewardInt32Int32_hotfix.call(new object[]
                {
                    this,
                    chapterId,
                    index
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = this.m_configDataLoader.GetConfigDataRiftChapterInfo(chapterId);

            if (configDataRiftChapterInfo == null)
            {
                return(-805);
            }
            if (base.GetChapterRewards(configDataRiftChapterInfo, index) == null)
            {
                return(-815);
            }
            this.m_riftDS.SetChapterStarReward(chapterId, index);
            return(0);
        }
Example #2
0
        // Token: 0x0600768A RID: 30346 RVA: 0x00207164 File Offset: 0x00205364
        public int CanGainChapterStarReward(int chapterId, int index)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanGainChapterStarRewardInt32Int32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CanGainChapterStarRewardInt32Int32_hotfix.call(new object[]
                {
                    this,
                    chapterId,
                    index
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = this.m_configDataLoader.GetConfigDataRiftChapterInfo(chapterId);

            if (configDataRiftChapterInfo == null)
            {
                return(-805);
            }
            int chapterTotalStars = base.GetChapterTotalStars(configDataRiftChapterInfo.ID);

            if (chapterTotalStars == 0)
            {
                return(-814);
            }
            if (this.m_riftDS.IsGainChapterStarReward(configDataRiftChapterInfo.ID, index))
            {
                return(-804);
            }
            int num = 0;

            if (index != 1)
            {
                if (index != 2)
                {
                    if (index == 3)
                    {
                        num = configDataRiftChapterInfo.Reward3Star;
                    }
                }
                else
                {
                    num = configDataRiftChapterInfo.Reward2Star;
                }
            }
            else
            {
                num = configDataRiftChapterInfo.Reward1Star;
            }
            return((chapterTotalStars < num) ? -814 : 0);
        }
Example #3
0
    public static int get_IsOpened(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, configDataRiftChapterInfo.IsOpened);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #4
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo o = new ConfigDataRiftChapterInfo();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #5
0
    public static int set_m_levelInfos(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            ConfigDataRiftLevelInfo[] levelInfos;
            LuaObject.checkArray <ConfigDataRiftLevelInfo>(l, 2, out levelInfos);
            configDataRiftChapterInfo.m_levelInfos = levelInfos;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #6
0
    public static int set_ChapterBGPrefabName(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            string chapterBGPrefabName;
            LuaObject.checkType(l, 2, out chapterBGPrefabName);
            configDataRiftChapterInfo.ChapterBGPrefabName = chapterBGPrefabName;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #7
0
    public static int set_Reward3Star(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            int reward3Star;
            LuaObject.checkType(l, 2, out reward3Star);
            configDataRiftChapterInfo.Reward3Star = reward3Star;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #8
0
    public static int set_m_hardChapterInfo(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            ConfigDataRiftChapterInfo hardChapterInfo;
            LuaObject.checkType <ConfigDataRiftChapterInfo>(l, 2, out hardChapterInfo);
            configDataRiftChapterInfo.m_hardChapterInfo = hardChapterInfo;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #9
0
    public static int set_PlaceStrKey(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            string placeStrKey;
            LuaObject.checkType(l, 2, out placeStrKey);
            configDataRiftChapterInfo.PlaceStrKey = placeStrKey;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #10
0
    public static int set_Desc(IntPtr l)
    {
        int result;

        try
        {
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = (ConfigDataRiftChapterInfo)LuaObject.checkSelf(l);
            string desc;
            LuaObject.checkType(l, 2, out desc);
            configDataRiftChapterInfo.Desc = desc;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #11
0
 // Token: 0x06012AB6 RID: 76470 RVA: 0x004C7E98 File Offset: 0x004C6098
 public void SetChapter(ConfigDataRiftChapterInfo chapterInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetChapterConfigDataRiftChapterInfo_hotfix != null)
     {
         this.m_SetChapterConfigDataRiftChapterInfo_hotfix.call(new object[]
         {
             this,
             chapterInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (chapterInfo == null)
     {
         return;
     }
     this.m_chapterInfo  = chapterInfo;
     this.m_image.sprite = AssetUtility.Instance.GetSprite(chapterInfo.Image);
 }
Example #12
0
 // Token: 0x060076A7 RID: 30375 RVA: 0x002075F0 File Offset: 0x002057F0
 private int __callBase_CanGainChapterReward(ConfigDataRiftChapterInfo chapterInfo, int index, List <Goods> rewards)
 {
     return(base.CanGainChapterReward(chapterInfo, index, rewards));
 }
Example #13
0
 // Token: 0x060076A6 RID: 30374 RVA: 0x002075E4 File Offset: 0x002057E4
 private List <Goods> __callBase_GetChapterRewards(ConfigDataRiftChapterInfo chapterInfo, int index)
 {
     return(base.GetChapterRewards(chapterInfo, index));
 }
Example #14
0
        // Token: 0x06007683 RID: 30339 RVA: 0x00206AA0 File Offset: 0x00204CA0
        public int CanUnlockChapter(int chapterId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanUnlockChapterInt32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CanUnlockChapterInt32_hotfix.call(new object[]
                {
                    this,
                    chapterId
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ConfigDataRiftChapterInfo configDataRiftChapterInfo = this.m_configDataLoader.GetConfigDataRiftChapterInfo(chapterId);

            if (configDataRiftChapterInfo == null)
            {
                return(-805);
            }
            if (!configDataRiftChapterInfo.IsOpened)
            {
                return(-826);
            }
            if (configDataRiftChapterInfo.UnlockConditions == null)
            {
                return(0);
            }
            foreach (RiftChapterInfoUnlockConditions riftChapterInfoUnlockConditions in configDataRiftChapterInfo.UnlockConditions)
            {
                RiftChapterUnlockConditionType conditionType = riftChapterInfoUnlockConditions.ConditionType;
                if (conditionType != RiftChapterUnlockConditionType.RiftChapterUnlockConditionType_PlayerLevel)
                {
                    if (conditionType != RiftChapterUnlockConditionType.RiftChapterUnlockConditionType_Scenario)
                    {
                        if (conditionType == RiftChapterUnlockConditionType.RiftChapterUnlockConditionType_ChapterStar)
                        {
                            if (riftChapterInfoUnlockConditions.Param != 0 && base.GetChapterTotalStars(configDataRiftChapterInfo.HardChapter) < riftChapterInfoUnlockConditions.Param)
                            {
                                return(-822);
                            }
                        }
                    }
                    else if (riftChapterInfoUnlockConditions.Param != 0)
                    {
                        ConfigDataScenarioInfo configDataScenarioInfo  = this.m_configDataLoader.GetConfigDataScenarioInfo(this.m_level.GetLastFinishedScenarioId());
                        ConfigDataScenarioInfo configDataScenarioInfo2 = this.m_configDataLoader.GetConfigDataScenarioInfo(riftChapterInfoUnlockConditions.Param);
                        if (configDataScenarioInfo2 == null)
                        {
                            return(-700);
                        }
                        if (configDataScenarioInfo == null || configDataScenarioInfo.m_scenarioDepth < configDataScenarioInfo2.m_scenarioDepth)
                        {
                            return(-807);
                        }
                    }
                }
                else if (riftChapterInfoUnlockConditions.Param != 0 && this.m_basicInfo.GetLevel() < riftChapterInfoUnlockConditions.Param)
                {
                    return(-806);
                }
            }
            return(0);
        }
Example #15
0
 // Token: 0x060076C8 RID: 30408 RVA: 0x00207AF4 File Offset: 0x00205CF4
 public int __callBase_CanGainChapterReward(ConfigDataRiftChapterInfo chapterInfo, int index, List <Goods> rewards)
 {
     return(this.m_owner.__callBase_CanGainChapterReward(chapterInfo, index, rewards));
 }
Example #16
0
 // Token: 0x060076C7 RID: 30407 RVA: 0x00207AE4 File Offset: 0x00205CE4
 public List <Goods> __callBase_GetChapterRewards(ConfigDataRiftChapterInfo chapterInfo, int index)
 {
     return(this.m_owner.__callBase_GetChapterRewards(chapterInfo, index));
 }