mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +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
|
|
@ -73,6 +73,9 @@ public:
|
|||
// WoW slot layout: 0-22 are equipment (head, neck, ... tabard, mainhand, offhand, ranged, ammo).
|
||||
// Backpack inventory starts at slot 23 in bag 0xFF, so packet slot = NUM_EQUIP_SLOTS + backpackIndex.
|
||||
static constexpr int NUM_EQUIP_SLOTS = 23;
|
||||
// Bag containers occupy equipment slots 19-22 (bag1, bag2, bag3, bag4).
|
||||
// Packet bag byte = FIRST_BAG_EQUIP_SLOT + bagIndex.
|
||||
static constexpr int FIRST_BAG_EQUIP_SLOT = 19;
|
||||
static constexpr int NUM_BAG_SLOTS = 4;
|
||||
static constexpr int MAX_BAG_SIZE = 36;
|
||||
static constexpr int BANK_SLOTS = 28;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue