示例#1
0
 public PurchaserStoreItem(string buyID)
 {
     BuyID = buyID;
     if (IsBought)
     {
         AddStoreItemEventHandler?.Invoke(buyID, true);
     }
 }
示例#2
0
        public PurchaserStoreItem(PurchaserStoreItem si)
        {
            BuyID            = si.BuyID;
            Description      = si.Description;
            Name             = si.Name;
            Price            = si.Price;
            Icon             = si.Icon;
            AlternativeBuyID = si.AlternativeBuyID;
            AlternativePrice = si.AlternativePrice;

            if (!string.IsNullOrEmpty(si.RewardsStringFormat))
            {
                si.RewardsStringFormat.Split('|').ToList().ForEach(e => { var result = e.Split('-'); Rewards.Add(short.Parse(result[0]), ushort.Parse(result[1])); });
            }

            if (IsBought)
            {
                AddStoreItemEventHandler?.Invoke(BuyID, true);
            }
        }