mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Auto-detect coinage and inventory fields
This commit is contained in:
parent
24d780e669
commit
bf39c0b900
3 changed files with 80 additions and 2 deletions
|
|
@ -1140,6 +1140,10 @@ private:
|
|||
};
|
||||
std::unordered_map<uint64_t, LocalLootState> localLootState_;
|
||||
uint64_t playerMoneyCopper_ = 0;
|
||||
// Some servers/custom clients shift update field indices. We can auto-detect coinage by correlating
|
||||
// money-notify deltas with update-field diffs and then overriding UF::PLAYER_FIELD_COINAGE at runtime.
|
||||
uint32_t pendingMoneyDelta_ = 0;
|
||||
float pendingMoneyDeltaTimer_ = 0.0f;
|
||||
|
||||
// Gossip
|
||||
bool gossipWindowOpen = false;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ public:
|
|||
/** Get the wire index for a logical field. Returns 0xFFFF if unknown. */
|
||||
uint16_t index(UF field) const;
|
||||
|
||||
/** Override a wire index at runtime (used for auto-detecting custom field layouts). */
|
||||
void setIndex(UF field, uint16_t idx) { fieldMap_[static_cast<uint16_t>(field)] = idx; }
|
||||
|
||||
/** Check if a field is mapped. */
|
||||
bool hasField(UF field) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue