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

Vendor Interface and Code Cleanup #166

Merged
merged 3 commits into from
Aug 25, 2024

Conversation

Ceikry
Copy link
Contributor

@Ceikry Ceikry commented Aug 18, 2024

Changes Proposed:

Fixes/Improvements:

  • Refactored several bits of transmog interface handling
  • Unified gossip menu logic for old bag-based system and new collection-based system (means the old bag-based system now has access to search features, etc and the code is overall simpler.)
  • Fixed several bugs that arose from the old bag-based system not being actively maintained
  • Fixed a bug with the gossip menu system where clicking into slots with no available items or no item equipped would hang the gossip menu
  • General code cleanup in transmog_scripts.cpp

New Features:

  • (Transmogrification.UseVendorInterface - Disabled by default) Adds the ability to use a mock vendor interface instead of the gossip menu so that item previews can be used.
    Comes with its own limitations, namely:
    • Placeholder items had to be used to fill the role of the hide gear/remove transmog buttons in the gossip menu
    • I did not want to add a third item to simulate a back button (and you can't reopen a gossip menu from player scripts anyways)
    • As a result of the above, you must close the vendor interface and talk to the NPC again to get back into the menu.
  • A new entirely optional .sql file for VendorItems that adds 2 new custom items to server as prettier buttons for Remove Transmog and Hide Item in the Vendor menu. If this .sql has not been imported, the code falls back to vanilla items.
  • (Transmogrification.HiddenTransmogIsFree - Enabled by default) This adds the ability to charge to hide items. It simply charges the default transmogrification price for the targeted item.

Issues Addressed:

Tests Performed:

  • Tested default config - works as expected
  • Tested default config with vendor interface - works as expected
  • Tested default config with bag system and gossip interface - works as expected
  • Tested default config with bag system and vendor interface - works as expected

How to Test the Changes:

  • Compile the module as normal
  • Test the default settings - gossip menu should function like it always has (with the exception of the bag-based system now having access to all the additional gossip features the collection-based system had)
  • Test UseVendorInterface 1 - Both with the old bag-based system and the new collection-based system, it should function as expected.

@Ceikry
Copy link
Contributor Author

Ceikry commented Aug 18, 2024

For the record: this is currently being tested with a live deployment to my and my friends' server.

image

@Helias Helias requested a review from Nyeriah August 20, 2024 15:29
@ZhengPeiRu21
Copy link
Contributor

These are fantastic improvements. Great work!

@Nyeriah Nyeriah merged commit 1281c9b into azerothcore:master Aug 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants