jpxthu / EPGP-Classic

EPGP for World of Warcraft Classic
MIT License
6 stars 12 forks source link

WIP: Adding 'Discount Item' option #40

Closed trumpetx closed 4 years ago

trumpetx commented 4 years ago

This is a work in progress, but fully functional.

  1. Replaces the "Cancel" button on the loot dialog with a new "Discount Item" button (note: LibDialog only allows 3 buttons - I could not work around this)
  2. The "Discount Item" button does automatic % math on the cost of the item - instead of full price it discounts the price by X%. 100 GP @ 75% discount = 25 GP. This is something that could be done by hand, but this is a convenience for those that want a set discount price (for offspec/sidegrade, whatever)
  3. If the "Discount Item" value in the config is set to 0% - the button is hidden
  4. If the "Discount Item" value in the config is set to 100% - the button is labeled "Free Item" to clearly denote that 0 GP will be applied.

Config: image

Dialog - Free Item = 100% discount: image

Dialog - 0% discount: image

Dialog - 50% discount: image

Why this?

Well, I don't want to do math while killing dragons for starters. Our guild has decided to institute a % based discount for "sidegrade" bid items. We didn't want to go directly to a bid system as we like the fixed price "round robin" style looting that EPGP affords; however some items were either being given away for free or rotting because we didn't have this option. We're doing it manually for now, but this adds the feature "first class" into the addon.

I'm not entirely happy with how the button shows/hides in its current form. Ideally it would add a 4th button if the feature was enabled (aka, set to > 0% discount) and show the existing 3 buttons otherwise, but LibDialog does not like me.

I'm open to other suggestions on how to implement this as well.

marknl commented 4 years ago

You might find everything you need in this addon: https://www.curseforge.com/wow/addons/rclootcouncil-classic which you can combine with https://www.curseforge.com/wow/addons/rclootcouncil-epgp-classic and have it all.

You can even create more then 3 buttons ;-)

Also, I'm not sure if you want to build this into this addon. The addon is currently pretty clean, it has a configuration and a few UI elements. a simple EPGP window and you have the option to enter EP or GP values when killing a boss. The amount and guild preferred implementations of this addon and it's calculations etc should (imho) be kept outside of this addon (like rclootcouncil-classic offers you). It's maintained and would be a waste of your time inventing the wheel all over again.

Don't want to discourage you, but I think it's best have a look at the mentioned addons, I think those will offer exactly what you want.

trumpetx commented 4 years ago

We've considered using it already. The majority of our raiders don't want to download another addon. I use RCLootCouncil (no EPGP) in my other raid and I don't mind, but I get it -- with EPGPClassic, there's just 1-2 people that need the addon, everything else is driven by existing mechanisms (chat, /ra, /o, etc)

RCLootCouncil has a habit of breaking every few weeks and it can be buggy with the "loot sessions". I've found that it actually slows down loot somewhat (when it should conceptually speed it up).

marknl commented 4 years ago

We've considered using it already. The majority of our raiders don't want to download another add on.

Your current implementation is tailored to your guild's need. I'd stick with a fork for your guild and continue from there. Again, it's already available via the RCLootCouncil - EPGP Classic with many many options. If that's buggy, then that needs to be addressed.

Again, not trying to discourage you. Just trying to keep this add on clean and simple.

trumpetx commented 4 years ago

In this case it's not specific -- it's just providing another generic option for a second GP cost (variable via slider). I'm experimenting with code on my end before pushing the final version up - I just wanted to have a WIP in place for generic feedback.

The goal will be that the add-on 100% functions like it does today without making any configuration changes.

jpxthu commented 4 years ago

Sorry, I got an urgent project and had a business trip in the past several weeks.

Actually there are up to 3 GP scale you can setup. Each slot has 1-2 default scales. 1-3 GP values will be calculated according to the scales and shown on the popup frame, like this:

无标题

You can use this feature. For example - head slot - default scale 1 is 1.0. You can set scale 2 to 0.5 if you want a 50% discount.

If you still want the discount feature, my suggestion is:

  1. Make it disabled by default, and no effect to current function and UI.
  2. If enabled, show a discounted GP value after each GP. For example:
    • GP1: 130 (65) (2H weapon)
    • GP2: 32 (16) (2H weapon for Hunter)
  3. Keep the second button CANCEL. Let the ML type in the number. There is no enough buttons.
trumpetx commented 4 years ago

@jpxthu - sounds like a good plan, gets around all the weird stuff, I have a new branch in progress testing it tonight.

trumpetx commented 4 years ago

We've ended up sort of working around the issuing using the customized prices within the addon (we just precalc the discounted items as another option.) I'd prefer to have an automatic setup, but it works well enough (and is really close to the suggestion you provided). It got messy with 3 prices and 3 alternate prices. As we do it today, if it has 1 price, we now have 2 (full and discounted), if it had 2, it has 3, if it had 3, I get a calculator.