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

Fix for using recipe items located in Packs #867

Merged
merged 2 commits into from
Jul 11, 2018
Merged

Fix for using recipe items located in Packs #867

merged 2 commits into from
Jul 11, 2018

Conversation

OptimShi
Copy link
Collaborator

This addresses Issue #779

To test:

  • /ci 8327 (Gold Pea)
  • /ci 8283 (Splitting Tool)
  • /ci 136 (Pack)
  • Place these items in the Pack.
  • Use the Splitting Tool on the Gold Pea in Pack.

Gold Pea should be removed and Gold Scarabs placed in main backpack.

@@ -112,7 +113,8 @@ public static void UseObjectOnTarget(Player player, WorldObject source, WorldObj

if (destroySource)
{
if (source.OwnerId == player.Guid.Full)
// TODO - Check if the source is wielded and handle appropriately
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new function was recently added for this: TryRemoveItemWithNetworking
It checks if the item is currently wielded first, and if so, tries to unwield it before calling TryRemoveFromInventoryWithNetworking

Copy link
Collaborator Author

@OptimShi OptimShi Jul 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not remove enchantments applied by the item. Is that intentional, or oversight? I'm going to guess oversight, since I see nothing in the functions that use it that would handle this, either.

I also see in the case of Mana Stones and Dropping Items on death, that it incorrectly tries to place the item into inventory before destroying it. If I am following correctly, this should not work if the player has no available inventory slots.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not removing enchantments - oversight, although this should be handled in the UnwieldItemWithNetworking function

Placing in backpack first - this is known, and was a limitation of the current TryRemoveFromInventoryWithNetworking system

@Warloxx01
Copy link

Works but doesn't work. Splits fine. but when i try to move the splits items ( in this case the Gold Scarabs) from the Main pack to the secondary pack/bag/pouch were i keep the comps it pulls the gold scarabs from the secondary pack to the main pack and stacks them there. then I can move the Stack( in this case the Gold Scarabs) to the secondary pack.

@OptimShi
Copy link
Collaborator Author

Test Recipe on Wielded Items
/ci 6127 (Stone Tool)
/ci 6128 (Peerless Shivering Atlan Staff)
Equip Peerless Shivering Atlan Staff
Use Stone Tool on Peerless Shivering Atlan Staff
(Note that enchantments applied by the staff will not be removed)

@gmriggs
Copy link
Collaborator

gmriggs commented Jul 11, 2018

Tested both scenarios in-game, looks good

@gmriggs
Copy link
Collaborator

gmriggs commented Jul 11, 2018

@Warloxx01 - thanks for the info!

When trying to merge stacks, this is a bug with the existing inventory system. @Mag-nus will be taking a look at these inventory bugs and fixing that system up very soon!

@gmriggs gmriggs merged commit 683e358 into ACEmulator:master Jul 11, 2018
@OptimShi OptimShi deleted the SmallIssues branch June 15, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants