Exemplo n.º 1
0
        // Token: 0x06004E5C RID: 20060 RVA: 0x0017CE08 File Offset: 0x0017B008
        public override ProGoods ToPBGoods()
        {
            ProGoods proGoods = new ProGoods();

            proGoods.GoodsType  = (int)base.GoodsTypeId;
            proGoods.Id         = base.ContentId;
            proGoods.Nums       = base.Nums;
            proGoods.InstanceId = base.InstanceId;
            ProEquipment proEquipment = new ProEquipment();

            proGoods.Equipment       = proEquipment;
            proEquipment.Level       = this.Level;
            proEquipment.Exp         = this.Exp;
            proEquipment.StarLevel   = this.StarLevel;
            proEquipment.Locked      = this.Locked;
            proEquipment.ResonanceId = this.ResonanceId;
            foreach (CommonBattleProperty property in this.EnchantProperties)
            {
                proEquipment.EnchantProperties.Add(CommonBattleProperty.CommonBattlePropertyToPBCommonBattleProperty(property));
            }
            return(proGoods);
        }
Exemplo 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);
        }