fix: use expansion context for spline parsing; preload DBC caches at world entry

Spline parsing: remove Classic format fallback from the WotLK parser. The
PacketParsers hierarchy already dispatches to expansion-specific parsers
(Classic/TBC/WotLK/Turtle), so the WotLK parseMovementBlock should only
attempt WotLK spline format. The Classic fallback could false-positive when
durationMod bytes resembled a valid point count, corrupting downstream parsing.

Preload DBC caches: call loadSpellNameCache() and 5 other lazy DBC caches
during handleLoginVerifyWorld() on initial world entry. This moves the ~170ms
Spell.csv load from the first SMSG_SPELL_GO handler to the loading screen,
eliminating the mid-gameplay stall.

WMO portal culling: move per-instance portalVisibleGroups vector and
portalVisibleGroupSet to reusable member variables, eliminating heap
allocations per WMO instance per frame.
This commit is contained in:
Kelsi 2026-03-27 16:58:39 -07:00
parent a795239e77
commit 6f2c8962e5
5 changed files with 54 additions and 48 deletions

View file

@ -737,6 +737,8 @@ private:
std::vector<std::future<void>> cullFutures_;
std::vector<size_t> visibleInstances_; // reused per frame
std::vector<InstanceDrawList> drawLists_; // reused per frame
std::vector<uint32_t> portalVisibleGroups_; // reused per frame (portal culling scratch)
std::unordered_set<uint32_t> portalVisibleGroupSet_; // reused per frame (portal culling scratch)
// Collision query profiling (per frame).
mutable double queryTimeMs = 0.0;