示例#1
0
        // Token: 0x06006F9F RID: 28575 RVA: 0x001F38C4 File Offset: 0x001F1AC4
        public List <BattleHero> GetBusinessCardHeroes()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetBusinessCardHeroes_hotfix != null)
            {
                return((List <BattleHero>) this.m_GetBusinessCardHeroes_hotfix.call(new object[]
                {
                    this
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            List <BattleHero> list = new List <BattleHero>();

            if (this.m_friendDS.BusinessCardSetInfo != null)
            {
                List <BusinessCardHeroSet> heroes = this.m_friendDS.BusinessCardSetInfo.Heroes;
                foreach (BusinessCardHeroSet businessCardHeroSet in heroes)
                {
                    Hero       hero       = this.m_hero.FindHero(businessCardHeroSet.HeroId);
                    BattleHero battleHero = BattleHero.HeroToBattleHero(hero);
                    foreach (ulong num in hero.EquipmentIds)
                    {
                        if (num != 0UL)
                        {
                            EquipmentBagItem equipmentBagItem = this.m_bag.FindBagItemByInstanceId(num) as EquipmentBagItem;
                            battleHero.Equipments.Add(equipmentBagItem.ToBattleHeroEquipment());
                        }
                    }
                    list.Add(battleHero);
                }
            }
            return(list);
        }
    public static int ToBattleHeroEquipment(IntPtr l)
    {
        int result;

        try
        {
            EquipmentBagItem    equipmentBagItem = (EquipmentBagItem)LuaObject.checkSelf(l);
            BattleHeroEquipment o = equipmentBagItem.ToBattleHeroEquipment();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }