mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
refactor: replace magic bag slot offset 19 with FIRST_BAG_EQUIP_SLOT
- Add Inventory::FIRST_BAG_EQUIP_SLOT = 19 constant with why-comment explaining WoW equip slot layout (bags occupy slots 19-22) - Replace all 19 occurrences of magic number 19 in bag slot calculations across inventory_handler, spell_handler, inventory, and game_handler - Add UNIT_FIELD_FLAGS / UNIT_FLAG_PVP comment in combat_handler - Add why-comment on network packet budget constants (prevent server data bursts from starving the render loop)
This commit is contained in:
parent
4574d203b5
commit
28e5cd9281
7 changed files with 25 additions and 18 deletions
|
|
@ -245,7 +245,7 @@ std::vector<Inventory::SwapOp> Inventory::computeSortSwaps() const {
|
|||
}
|
||||
for (int b = 0; b < NUM_BAG_SLOTS; ++b) {
|
||||
for (int s = 0; s < bags[b].size; ++s) {
|
||||
entries.push_back({static_cast<uint8_t>(19 + b), static_cast<uint8_t>(s),
|
||||
entries.push_back({static_cast<uint8_t>(FIRST_BAG_EQUIP_SLOT + b), static_cast<uint8_t>(s),
|
||||
bags[b].slots[s].item.itemId, bags[b].slots[s].item.quality,
|
||||
bags[b].slots[s].item.stackCount});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue