Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Stack Split/Merge #1912

Merged
merged 1 commit into from
May 20, 2019
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
14 changes: 14 additions & 0 deletions Source/ACE.Server/WorldObjects/Player_Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,13 @@ public void HandleActionStackableSplitToContainer(uint stackId, uint containerId

if ((stackRootOwner == this && containerRootOwner != this) || (stackRootOwner != this && containerRootOwner == this)) // Movement is between the player and the world
{
if (stackRootOwner is Vendor)
{
Session.Network.EnqueueSend(new GameEventCommunicationTransientString(Session, "You cannot merge from vendor")); // Custom error message
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, stackId));
return;
}

WorldObject moveToObject;

if (stackRootOwner == this)
Expand Down Expand Up @@ -1588,6 +1595,13 @@ public void HandleActionStackableMerge(uint mergeFromGuid, uint mergeToGuid, uin

if ((sourceStackRootOwner == this && targetStackRootOwner != this) || (sourceStackRootOwner != this && targetStackRootOwner == this)) // Movement is between the player and the world
{
if (sourceStackRootOwner is Vendor)
{
Session.Network.EnqueueSend(new GameEventCommunicationTransientString(Session, "You cannot merge from vendor")); // Custom error message
Session.Network.EnqueueSend(new GameEventInventoryServerSaveFailed(Session, sourceStack.Guid.Full));
return;
}

WorldObject moveToObject;

if (sourceStackRootOwner == this)
Expand Down