Add auto loot setting to gameplay settings

Checkbox in Settings > Gameplay > Loot section. When enabled, all items
are automatically sent CMSG_AUTOSTORE_LOOT_ITEM on loot response (same
as right-click looting each item). Gold always auto-loots regardless.
Setting persists in settings.cfg as auto_loot=0/1.
This commit is contained in:
Kelsi 2026-02-17 16:31:00 -08:00
parent a55399fad6
commit 0e18c8871d
4 changed files with 29 additions and 0 deletions

View file

@ -660,6 +660,8 @@ public:
void activateSpiritHealer(uint64_t npcGuid);
bool isLootWindowOpen() const { return lootWindowOpen; }
const LootResponseData& getCurrentLoot() const { return currentLoot; }
void setAutoLoot(bool enabled) { autoLoot_ = enabled; }
bool isAutoLoot() const { return autoLoot_; }
// NPC Gossip
void interactWithNpc(uint64_t guid);
@ -1354,6 +1356,7 @@ private:
// ---- Phase 5: Loot ----
bool lootWindowOpen = false;
bool autoLoot_ = false;
LootResponseData currentLoot;
struct LocalLootState {
LootResponseData data;