mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Rewrite GetAverageItemLevel as a port of 4.3.4's CGCharacterInfo::CalculateAverageItemLevel: - count only items the player can use (CGPlayer_C::CanUseItem) - keep the best item level per inventory type, plus the second best ring, trinket and one-hand weapon - take the better of the one-hand loadout over 17 slots and the two-hand loadout over 16, using the engine's own dual-wield check (FUN_PLAYER_CAN_DUAL_WIELD) to pick the off hand - count what is inside containers, not the containers themselves While item records load, return the last complete answer, and fire PLAYER_AVG_ITEM_LEVEL_READY when they arrive. Item::Data gains a LoadSubscriber for load completions, and WarmCache reports whether it queued the item. Player::CanUseItem::Check is shared through a header.