Esempio n. 1
0
        // Token: 0x06003167 RID: 12647 RVA: 0x000C1304 File Offset: 0x000BF504
        public static BattleHeroEquipment PBBattleHeroEquipmentToBattleHeroEquipment(ProBattleHeroEquipment pbEquipment)
        {
            BattleHeroEquipment battleHeroEquipment = new BattleHeroEquipment
            {
                Id          = pbEquipment.Id,
                Level       = pbEquipment.Level,
                StarLevel   = pbEquipment.StarLevel,
                Exp         = pbEquipment.Exp,
                ResonanceId = pbEquipment.ResonanceId
            };

            foreach (ProCommonBattleProperty pbProperty in pbEquipment.EnchantProperties)
            {
                battleHeroEquipment.EnchantProperties.Add(CommonBattleProperty.PBCommonBattlePropertyToCommonBattleProperty(pbProperty));
            }
            return(battleHeroEquipment);
        }
Esempio n. 2
0
        // Token: 0x06004E4C RID: 20044 RVA: 0x0017CC04 File Offset: 0x0017AE04
        public BagItemBase CreateInstanceBagItemByClient(ProGoods pbGoods)
        {
            GoodsType goodsType = (GoodsType)pbGoods.GoodsType;

            if (goodsType != GoodsType.GoodsType_Equipment)
            {
                return(null);
            }
            ProEquipment     equipment        = pbGoods.Equipment;
            EquipmentBagItem equipmentBagItem = new EquipmentBagItem(goodsType, pbGoods.Id, pbGoods.Nums, pbGoods.InstanceId);

            equipmentBagItem.Level       = equipment.Level;
            equipmentBagItem.Exp         = equipment.Exp;
            equipmentBagItem.StarLevel   = equipment.StarLevel;
            equipmentBagItem.Locked      = equipment.Locked;
            equipmentBagItem.ResonanceId = equipment.ResonanceId;
            foreach (ProCommonBattleProperty pbProperty in equipment.EnchantProperties)
            {
                equipmentBagItem.EnchantProperties.Add(CommonBattleProperty.PBCommonBattlePropertyToCommonBattleProperty(pbProperty));
            }
            return(equipmentBagItem);
        }