Closed SafeteeWoW closed 6 years ago
A fine idea. How extensively have you tested it? I'm especially nervous about the implications of adding a new response type.
I'll probably want to change some of text, no biggie though.
I don't think it's worth checking the bank or void.
I did some basic test when I pushed this PR, but I am not available to do any extensively test or make any major changes right now. You can add your reviewed stuff if you want to merge this PR. However, this aren't many changes, so it should be easy to find bugs if sth is wrong
I miss a comment for IsEqualOrBetterItem
that it also compares item by ilvl
Roger that. I'm thinking it'll go in v2.8 with the other new stuff.
Another "tiny" problem:
patterns and replacment in GetItemLinkWithoutEnchant
should probably excludes "|H" in case input is item string instead of item link
Another small feature suggestion:
Autopass owned mount/toy.
My current idea is to do a tooltip parsing ITEM_SPELL_KNOWN
=="Already known"
Above suggestion is done.
I have made another improvement that I have loose the item comparison requirement that it does not always require the two items to have the same id.
If both items are not restricted (uniqueness/tournament gear, etc) and are similar (Same type/subtype/equipLoc) and the item being compared to is a stat stick (equippable item that not set piece, no on-use effect, no on-equip effect), then we compare the stats of two items.
This change has potential to give false autopass. Many tests are needed and more consideration needed. This is an aggressive optimization that still has some problems.
TODO: Fix dual-wield weapon. Items that can be double equipped if two or more better items are found.
This PR won't be ready for v2.8. After more consideration, I have found that this feature is more complicated than I imagined before. Many stuffs needs to be considered to avoid false autopass. Meanwhile, I really dislike the current code structure to handle the item information. Current implementation makes the code very redundant, slow and easy to make mistake.
Let me summarize when the item will be autopassed by this PR. I haven't implement the entire definition yet. I am not explaining the reason behind this definition, but you should be able to understand it. IMPORTANT: All following ignores the item gems, enchants of both item being rolled and item being checks.
equipLoc ~= ""
)The definition of equal or better item:
GetItemStats
of the item being rolled is not greater than the item being checked.The definition of similar items.
equipLoc
as returned by GetItemInfo
. Special case: INVTYPE_ROBE
and INVTYPE_CHEST
are similar.GetItemUniqueness
does not work for item both unique-equipped and family restricted, for example, legendary trinkets) and both items are not tournament gear (Special item that can be purchased by gold and can only be used in PvP War Games).GetItemInfo
, no ITEM_SPELL_EFFECT, ITEM_SPELL_TRIGGER_ONEQUIP, ITEM_SPELL_TRIGGER_ONPROC, ITEM_SPELL_TRIGGER_ONUSE (Effect: %s, Equip:, Chance On hit:, Use:)
in the item tooltip, ITEM_SPELL_TRIGGER_ONUSE
can be replaced by GetItemSpell()
)Do you have any case that my definition will cause false autopass? Btw, while I want to 100% avoid false autopass, I do want to autopass as aggressively as possible. TODO: Not implemented. Also check item in bank/void storage.
This PR adds a new autopass option which autopasses owned items. (Enabled by default) This feature autopasses item when all following conditions are met:
TODO: