Fix the server not checking uplink purchase prices (#1917)

This commit is contained in:
DrSmugleaf
2020-08-25 18:13:19 +02:00
committed by GitHub
parent 4854a54ee1
commit dd3a697c12
5 changed files with 48 additions and 30 deletions

View File

@@ -102,7 +102,7 @@ namespace Content.Server.GameObjects.Components.PDA
case PDAUplinkBuyListingMessage buyMsg:
{
if (!_uplinkManager.TryPurchaseItem(_syndicateUplinkAccount, buyMsg.ListingToBuy))
if (!_uplinkManager.TryPurchaseItem(_syndicateUplinkAccount, buyMsg.ItemId))
{
SendNetworkMessage(new PDAUplinkInsufficientFundsMessage(), message.Session.ConnectedClient);
break;
@@ -128,7 +128,7 @@ namespace Content.Server.GameObjects.Components.PDA
{
var accData = new UplinkAccountData(_syndicateUplinkAccount.AccountHolder,
_syndicateUplinkAccount.Balance);
var listings = _uplinkManager.FetchListings.ToArray();
var listings = _uplinkManager.FetchListings.Values.ToArray();
UserInterface?.SetState(new PDAUpdateState(_lightOn, ownerInfo, accData, listings));
}
else