// Token: 0x060031CA RID: 12746 RVA: 0x000C3FFC File Offset: 0x000C21FC
 public bool MarkSetupHeroFlag(int playerIdx, int heroPos, SetupBattleHeroFlag Flag)
 {
     if (heroPos < 0 || heroPos >= this.m_battleHeroSetupInfos.Count)
     {
         return(false);
     }
     if (this.m_battleHeroSetupInfos[heroPos].PlayerIndex != playerIdx)
     {
         return(false);
     }
     if (this.m_battleHeroSetupInfos[heroPos].Hero == null)
     {
         return(false);
     }
     this.m_battleHeroSetupInfos[heroPos].Flag = Flag;
     return(true);
 }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
0
        // Token: 0x06006DCF RID: 28111 RVA: 0x001EA1C4 File Offset: 0x001E83C4
        public int GetHeroSetupFlagCount(int playerIndex, SetupBattleHeroFlag flag)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetHeroSetupFlagCountInt32SetupBattleHeroFlag_hotfix != null)
            {
                return(Convert.ToInt32(this.m_GetHeroSetupFlagCountInt32SetupBattleHeroFlag_hotfix.call(new object[]
                {
                    this,
                    playerIndex,
                    flag
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int num = 0;

            foreach (BattleHeroSetupInfo battleHeroSetupInfo in this.BattleRoomPlayerHeroSetup.GetBattleHeroSetupInfos())
            {
                if (battleHeroSetupInfo.HasFlag(flag))
                {
                    num++;
                }
            }
            return(num);
        }
Ejemplo n.º 4
0
 // Token: 0x060031D4 RID: 12756 RVA: 0x000C42B4 File Offset: 0x000C24B4
 public bool HasFlag(SetupBattleHeroFlag flag)
 {
     return((this.Flag & flag) != SetupBattleHeroFlag.None);
 }