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: use the correct algorithm to request item information #936

Merged
merged 3 commits into from
Jul 23, 2021

Conversation

johnnylam88
Copy link
Contributor

@johnnylam88 johnnylam88 commented Jul 22, 2021

This fixes some occasional bugs in the values returned by the Equipment
module, caused by item information not being available when the module
requests it.

This pullup requires an update to the wow-mock dependency:
wowts/wow-mock#15

It turns out that you do need to use callbacks to fetch all item
information from the server.  Modify the update code to listen for
ITEM_DATA_LOAD_RESULT events to execute a callback to properly
update an equipped item.

Change the way that `Ovale_EquipmentChanged` is fired by always
including the slot name that has been changed.  The event now fires
whenever ITEM_DATA_LOAD_RESULT returns success and the slot that
had a pending data load has been changed.

This avoids needing the 3-second delay kludge to wait for server
data.
Make all Ovale modules consistently use `ammoslot`, etc., instead
of `AMMOSLOT`, etc., to refer to the names of the equipment slots.
Make the conversion between the `SlotName` and `InventorySlotName`
types internal to the `Equipment` module.
@johnnylam88
Copy link
Contributor Author

Merging the latest master commits to bump the wow-mock dependency to 1.31.1 makes the checks pass :-)

@Sidoine Sidoine merged commit b2a5315 into Sidoine:master Jul 23, 2021
@johnnylam88 johnnylam88 deleted the fix/equipment branch July 23, 2021 12:27
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.

2 participants