feat: add auto-sell grey items on vendor open

When 'Auto Sell Greys' is enabled in Settings > Gameplay, all grey
(ItemQuality::POOR) items in the backpack and extra bags are sold
automatically when opening a vendor window. Items with no sell price
are skipped. A system chat message reports the number of items sold
and total gold received. The setting persists to ~/.wowee/settings.cfg
under the key auto_sell_grey.
This commit is contained in:
Kelsi 2026-03-17 20:21:06 -07:00
parent e62ae8b03e
commit 072f256af6
4 changed files with 75 additions and 1 deletions

View file

@ -1394,6 +1394,8 @@ public:
const LootResponseData& getCurrentLoot() const { return currentLoot; }
void setAutoLoot(bool enabled) { autoLoot_ = enabled; }
bool isAutoLoot() const { return autoLoot_; }
void setAutoSellGrey(bool enabled) { autoSellGrey_ = enabled; }
bool isAutoSellGrey() const { return autoSellGrey_; }
// Master loot candidates (from SMSG_LOOT_MASTER_LIST)
const std::vector<uint64_t>& getMasterLootCandidates() const { return masterLootCandidates_; }
@ -2879,6 +2881,7 @@ private:
// ---- Phase 5: Loot ----
bool lootWindowOpen = false;
bool autoLoot_ = false;
bool autoSellGrey_ = false;
LootResponseData currentLoot;
std::vector<uint64_t> masterLootCandidates_; // from SMSG_LOOT_MASTER_LIST