Пример #1
0
 public LicenseReward(LicenseRewardDto dto, ShopResources shopResources)
 {
     ItemLicense  = (ItemLicense)dto.Id;
     ItemNumber   = dto.ShopItemInfo.ShopItem.Id;
     ShopItemInfo = shopResources.Items[ItemNumber].GetItemInfo(dto.ShopItemInfo.Id);
     ShopPrice    = ShopItemInfo.PriceGroup.GetPrice(dto.ShopPrice.Id);
     Color        = dto.Color;
 }
Пример #2
0
 public LicenseReward(LicenseRewardDto dto, ShopResources shopResources)
 {
     ItemLicense  = (ItemLicense)dto.Id;
     ItemNumber   = shopResources.Items.Values.First(item => item.GetItemInfo(dto.ShopItemInfoId) != null).ItemNumber;
     ShopItemInfo = shopResources.Items[ItemNumber].GetItemInfo(dto.ShopItemInfoId);
     ShopPrice    = ShopItemInfo.PriceGroup.GetPrice(dto.ShopPriceId);
     Color        = dto.Color;
 }