mod-transmog icon indicating copy to clipboard operation
mod-transmog copied to clipboard

Vendor Interface and Code Cleanup

Open Ceikry opened this issue 1 year ago • 2 comments

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:

  • Possibly Resolves #124 (I don't see a reason why you would want to charge a nonstandard tmog price)
  • Resolves #122
  • Resolves #111
  • Resolves #43
  • Resolves #12 (It was not a direct update/port - but the same concept has been achieved)

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 avatar Aug 18 '24 01:08 Ceikry

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

image

Ceikry avatar Aug 18 '24 17:08 Ceikry

These are fantastic improvements. Great work!

ZhengPeiRu21 avatar Aug 21 '24 02:08 ZhengPeiRu21