mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
a55399fad6
commit
0e18c8871d
4 changed files with 29 additions and 0 deletions
|
|
@ -8190,6 +8190,14 @@ void GameHandler::handleLootResponse(network::Packet& packet) {
|
|||
currentLoot.gold = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-loot items when enabled
|
||||
if (autoLoot_ && state == WorldState::IN_WORLD && socket) {
|
||||
for (const auto& item : currentLoot.items) {
|
||||
auto pkt = AutostoreLootItemPacket::build(item.slotIndex);
|
||||
socket->send(pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GameHandler::handleLootReleaseResponse(network::Packet& packet) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue