mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Fix vanilla spell casting and bag contents
Vanilla CMSG_CAST_SPELL target mask is uint16 (not uint32 like WotLK), the extra 2 bytes were corrupting packets. Also implement full bag content tracking: extract container slot GUIDs from CONTAINER update objects, set proper bag sizes, and populate bag items in inventory rebuild.
This commit is contained in:
parent
9f19b39451
commit
e168a7cdd1
12 changed files with 191 additions and 9 deletions
|
|
@ -859,6 +859,7 @@ private:
|
|||
void emitAllOtherPlayerEquipment();
|
||||
void detectInventorySlotBases(const std::map<uint16_t, uint32_t>& fields);
|
||||
bool applyInventoryFields(const std::map<uint16_t, uint32_t>& fields);
|
||||
void extractContainerFields(uint64_t containerGuid, const std::map<uint16_t, uint32_t>& fields);
|
||||
uint64_t resolveOnlineItemGuid(uint32_t itemId) const;
|
||||
|
||||
// ---- Phase 2 handlers ----
|
||||
|
|
@ -1094,6 +1095,12 @@ private:
|
|||
std::unordered_set<uint32_t> pendingItemQueries_;
|
||||
std::array<uint64_t, 23> equipSlotGuids_{};
|
||||
std::array<uint64_t, 16> backpackSlotGuids_{};
|
||||
// Container (bag) contents: containerGuid -> array of item GUIDs per slot
|
||||
struct ContainerInfo {
|
||||
uint32_t numSlots = 0;
|
||||
std::array<uint64_t, 36> slotGuids{}; // max 36 slots
|
||||
};
|
||||
std::unordered_map<uint64_t, ContainerInfo> containerContents_;
|
||||
int invSlotBase_ = -1;
|
||||
int packSlotBase_ = -1;
|
||||
std::map<uint16_t, uint32_t> lastPlayerFields_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue