typicalzergling / vendor

Vendor WoW Addon
MIT License
4 stars 3 forks source link

Added TooltipHasRedText #44

Closed stornquist closed 3 years ago

stornquist commented 3 years ago

Check if an items tooltip has red text (indicating that it is not usable or otherwise criteria that are unmet)

typicalzergling commented 3 years ago

First, this work should be done in another branch, not on the master branch. That's reserved for some concise fixes. We do development work off the "working" branch that's usually quite unstable but it is the next version. Unless you're submitting a very targeted fix it should not be in master.

Second, I like the idea of this. Conceptually you want to capture whether the item is usable or has some sort of restriction, and currently the only meaningful way to do that is to find out if there is red text in the tooltip. We already have a concept of "IsUsable" which refers to whether the item itself has a 'use' property, like consumables or some trinkets. I'd like to capture this, and but I'm not sure if RedText is correct. It might be, because I'm not sure if there is a definitive way to know if there's some restriction on the item for the player other than that, but we may not want to expose something more definitive so users know exactly what it means - it means there's red text, and we're not prescribing any meaning beyond that. So I'm leaning towards yes, this is a good way to capture the concept. However, I'd want it to be a very specific property. "HasRedTextInTooltip" which I believe is your other PR (see comment above about putting them together).

I'm not going to approve these piecemeal - please move these commits to a separate branch where we can get all the changes together in a PR.