예제 #1
0
        // Token: 0x06006DD0 RID: 28112 RVA: 0x001EA2B0 File Offset: 0x001E84B0
        public bool IsHeroSetupHasFlag(int playerIndex, int heroId, SetupBattleHeroFlag flag)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsHeroSetupHasFlagInt32Int32SetupBattleHeroFlag_hotfix != null)
            {
                return(Convert.ToBoolean(this.m_IsHeroSetupHasFlagInt32Int32SetupBattleHeroFlag_hotfix.call(new object[]
                {
                    this,
                    playerIndex,
                    heroId,
                    flag
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int heroPos = this.BattleRoomPlayerHeroSetup.FindHeroPosition(playerIndex, heroId);
            BattleHeroSetupInfo battleHeroSetupInfo = this.BattleRoomPlayerHeroSetup.GetBattleHeroSetupInfo(heroPos);

            return(battleHeroSetupInfo != null && battleHeroSetupInfo.HasFlag(flag));
        }
예제 #2
0
    public static int HasFlag(IntPtr l)
    {
        int result;

        try
        {
            BattleHeroSetupInfo battleHeroSetupInfo = (BattleHeroSetupInfo)LuaObject.checkSelf(l);
            SetupBattleHeroFlag flag;
            LuaObject.checkEnum <SetupBattleHeroFlag>(l, 2, out flag);
            bool b = battleHeroSetupInfo.HasFlag(flag);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }