Изменение отображения скидок в аплинке (#266)
* Better sales * Sale item restrictions
This commit is contained in:
@@ -183,6 +183,14 @@ public sealed partial class StoreSystem
|
||||
listing.PurchaseAmount++; //track how many times something has been purchased
|
||||
_audio.PlayEntity(component.BuySuccessSound, msg.Session, uid); //cha-ching!
|
||||
|
||||
//WD START
|
||||
if (listing.SaleLimit != 0 && listing.SaleAmount > 0 && listing.PurchaseAmount >= listing.SaleLimit)
|
||||
{
|
||||
listing.SaleAmount = 0;
|
||||
listing.Cost = listing.OldCost;
|
||||
}
|
||||
//WD END
|
||||
|
||||
UpdateUserInterface(buyer, uid, component);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user