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

[BUG] Uncertainty about GetContainerItemInfo() change to return number of charges #3

Open
veechs opened this issue Apr 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@veechs
Copy link

veechs commented Apr 13, 2024

Describe the bug
When I call GetContainerItemInfo on an item that has charges, such as Manual Crowd Pummeler or Taming Rod, I receive 1 as the itemCount, even though the SuperWoW docs seem to indicate it should be the number of charges instead. Please let me know if I'm misunderstanding the expected behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Add Taming Rod to your inventory
  2. Call GetContainerItemInfo(<bagNum>, <slotNum>)
  3. Observe that the return values are: Interface\Icons\Ability_Hunter_BestTaming, 1, nil, -1, nil

Expected behavior
I think it's supposed to return Interface\Icons\Ability_Hunter_BestTaming, 3, nil, -1, nil with SuperWoW loaded.

Additional context
I've verified that SuperWoW is active, since the CombatLogAdd function exists. This is on a vanilla 1.12 client (not Turtle WoW) with VanillaFixes and nampower loaded, connecting to a private vmangos server.

@balakethelock balakethelock added the enhancement New feature or request label Apr 13, 2024
@balakethelock
Copy link
Owner

Indeed, items with charges fall into two categories, there are items that on running out of charges, the item with disappear (like tea with sugar or wizard oil) which are the ones working with this lua function at the moment. In the future I will make it also work with the 2nd category (item stays in inventory unusable after it runs out of charges)

@veechs
Copy link
Author

veechs commented Apr 13, 2024

Thanks for the explanation! I just tested with Wizard Oil and Tea With Sugar and they are indeed returning charge counts. It might be good to update the documentation to note that charges are returned as negative numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants