Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Source/ACE.Server/WorldObjects/Player_Commerce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public void HandleActionBuyItem(uint vendorGuid, List<ItemProfile> items)
{
if (IsBusy)
{
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));
SendUseDoneEvent(WeenieError.YoureTooBusy);
return;
}

if (IsTrading)
{
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));
SendUseDoneEvent(WeenieError.CantDoThatTradeInProgress);
return;
}
Expand All @@ -37,12 +39,14 @@ public void HandleActionBuyItem(uint vendorGuid, List<ItemProfile> items)

if (vendor == null)
{
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));
SendUseDoneEvent(WeenieError.NoObject);
return;
}

// if this succeeds, it automatically calls player.FinalizeBuyTransaction()
vendor.BuyItems_ValidateTransaction(items, this);
if (!vendor.BuyItems_ValidateTransaction(items, this))
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));

SendUseDoneEvent();
}
Expand Down Expand Up @@ -123,6 +127,7 @@ public void HandleActionSellItem(uint vendorGuid, List<ItemProfile> itemProfiles
{
if (IsBusy)
{
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));
SendUseDoneEvent(WeenieError.YoureTooBusy);
return;
}
Expand All @@ -131,6 +136,7 @@ public void HandleActionSellItem(uint vendorGuid, List<ItemProfile> itemProfiles

if (vendor == null)
{
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, Guid.Full));
SendUseDoneEvent(WeenieError.NoObject);
return;
}
Expand Down