Commit graph

3213 commits

Author SHA1 Message Date
Kelsi Rae Davis
b41b3d2c71
Merge pull request #58 from ldmonster/feat/add-spells-animation
[feat] rendering: spell visual effects system
2026-04-07 02:19:00 -07:00
Pavel Okhlopkov
b79d9b8fea feat(rendering): implement spell visual effects with bone-tracked ribbons and particles
Add complete spell visual pipeline resolving the DBC chain
(Spell → SpellVisual → SpellVisualKit → SpellVisualEffectName → M2)
with precast/cast/impact phases, bone-attached positioning, and
automatic dual-hand mirroring.

Ribbon rendering fixes:
- Parse visibility track as uint8 (was read as float, suppressing
  all ribbon edges due to ~1.4e-45 failing the >0.5 check)
- Filter garbage emitters with bone=UINT_MAX unconditionally
- Guard against NaN spine positions from corrupt bone data
- Resolve ribbon textures via direct index, not textureLookup table
- Fall back to bone 0 when ribbon bone index is out of range

Particle rendering fixes:
- Reduce spell particle scale from 5x to 1.5x (was oversized)
- Exempt spell effect instances from position-based deduplication

Spell handler integration:
- Trigger precast visuals on SMSG_SPELL_START with server castTimeMs
- Trigger cast/impact visuals on SMSG_SPELL_GO
- Cancel precast visuals on cast interrupt/failure/movement

M2 classifier expansion:
- Add AmbientEmitterType enum for sound system integration
- Add 20+ foliage tokens, 4 spell effect tokens, isSmallFoliage flag
- Add markModelAsSpellEffect() to override disableAnimation

DBC layouts:
- Add SpellVisualID field to Spell.dbc for all expansion configs

Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-07 11:27:59 +03:00
Kelsi
0a33e3081c fix(rendering): disable HiZ pyramid, fix WMO interior shadow clamping
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
HiZ occlusion culling built ~11 mip levels with per-level barriers
behind a blocking vkWaitForFences every frame — the main frame-rate
bottleneck.  Disable the pyramid build and fall back to GPU frustum-
only culling which is nearly free behind the fence.

WMO interiors now receive full-strength directional shadows but clamp
minimum brightness at 0.45 with a 0.35 ambient floor, so interiors
get real shadow contrast without going too dark.
2026-04-06 19:36:30 -07:00
Kelsi
4dcea08b90 Revert "fix(rendering): enable backface culling for one-sided M2 materials (#57)"
This reverts commit 7b746a3045.
2026-04-06 18:27:52 -07:00
Kelsi
70a0be9e79 fix(ci): bundle FFmpeg dylibs in macOS app artifact (#53)
dylibbundler misses Homebrew's FFmpeg libraries, causing a launch crash:
  Library not loaded: libavformat.62.12.100.dylib

Add a manual copy block for libavformat, libavcodec, libavutil,
libswscale, and libswresample — same pattern already used for Vulkan
and OpenSSL.  Applied to both build.yml and release.yml.
2026-04-06 18:18:19 -07:00
Kelsi
faf1d70c34 fix(rendering): reduce terrain chunk edge seams (#56)
Two sources of visible chunk-boundary squares:

1. Derivative-based bump mapping (bumpStrength=9) used dFdx/dFdy which
   are invalid across draw-call boundaries, producing strong normal
   discontinuities at every chunk edge.  Fade bump to zero near chunk
   edges using LayerUV as the chunk-space distance metric.

2. sampleAlpha used an abrupt step() to switch between point-sampled
   and 4-tap-blurred alpha, creating a visible ring 2 texels from each
   chunk edge.  Replace with smoothstep transition and a 5-tap average
   that includes the center sample.
2026-04-06 18:18:14 -07:00
Kelsi
7b746a3045 fix(rendering): enable backface culling for one-sided M2 materials (#57)
All M2 pipelines used VK_CULL_MODE_NONE, so back-facing polygons always
rendered.  On NPCs whose torso meshes are single-layer geometry this
made the interior cavity visible through the back.

Create backface-culled pipeline variants (VK_CULL_MODE_BACK_BIT) and
select them at draw time unless the material has the TwoSided flag
(0x04).  Foliage/ground-detail forceCutout batches and the shadow
pipeline keep VK_CULL_MODE_NONE since those cards are inherently
two-sided.
2026-04-06 18:18:05 -07:00
Kelsi
f79110cb14 fix(rendering): clear M2 texture cache on character switch
M2Renderer::clear() reset descriptor pools but left the texture cache
and failed-texture tracking intact.  On re-login the stale cache filled
the budget, failedTextureRetryAt_ blocked reloads, and the client
entered an infinite model-load loop.  Match the cleanup already done in
shutdown() and CharacterRenderer::clear().
2026-04-06 18:06:03 -07:00
Kelsi Rae Davis
996dc56691
Merge pull request #55 from ldmonster/chore/code-quality-cleaup
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
[chore] Code Quality & DRY/KISS Cleanup
2026-04-06 13:46:35 -07:00
Kelsi Rae Davis
20e016798f
Merge pull request #54 from ldmonster/fix/memory-pressure-and-hardening
[fix] Memory, Threading & Network Hardening
2026-04-06 13:45:31 -07:00
Kelsi Rae Davis
5d0d140c61
Merge pull request #52 from ldmonster/feat/hiz-occlusion-culling
[feat] rendering: Hierarchical-Z occlusion culling
2026-04-06 13:44:44 -07:00
Pavel Okhlopkov
744ad6d113 Merge commit 'a7df19232a' into chore/code-quality-cleaup 2026-04-06 22:53:21 +03:00
Pavel Okhlopkov
a7df19232a add doc
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 22:52:07 +03:00
Pavel Okhlopkov
97106bd6ae fix(render): code quality cleanup
Magic number elimination:
- Create protocol_constants.hpp, warden_constants.hpp,
  render_constants.hpp, ui_constants.hpp
- Replace ~55 magic numbers across game_handler, warden_handler,
  m2_renderer_render

Reduce nesting depth:
- Extract 5 parseEffect* methods from handleSpellLogExecute
  (max indent 52 → 16 cols)
- Extract resolveSpellSchool/playSpellCastSound/playSpellImpactSound
  from 3× duplicate audio blocks in handleSpellGo
- Flatten SMSG_INVENTORY_CHANGE_FAILURE with early-return guards
- Extract drawScreenEdgeVignette() for 3 duplicate vignette blocks

DRY extract patterns:
- Replace 12 compound expansion checks with isPreWotlk() across
  movement_handler (9), chat_handler (1), social_handler (1)

const to constexpr:
- Promote 23+ static const arrays/scalars to static constexpr across
  12 source files

Error handling:
- Convert PIN auth from exceptions to std::optional<PinProof>
- Add [[nodiscard]] to 15+ initialize/parse methods
- Wrap ~20 unchecked initialize() calls with LOG_WARNING/LOG_ERROR

Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 22:43:13 +03:00
Pavel Okhlopkov
2e8856bacd memory, threading, network hardening
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 21:19:37 +03:00
Pavel Okhlopkov
312994be83 world loading memory pressure detector
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 21:05:20 +03:00
Pavel Okhlopkov
4b9b3026f4 feat(rendering): add HiZ occlusion culling & fix WMO interior shadows
Implement GPU-driven Hierarchical-Z occlusion culling for M2 doodads
using a depth pyramid built from the previous frame's depth buffer.
The cull shader projects bounding spheres via prevViewProj (temporal
reprojection) and samples the HiZ pyramid to reject hidden objects
before the main render pass.

Key implementation details:
- Separate early compute submission (beginSingleTimeCommands + fence
  wait) eliminates 2-frame visibility staleness
- Conservative safeguards prevent false culls: screen-edge guard,
  full VP row-vector AABB projection (Cauchy-Schwarz), 50% sphere
  inflation, depth bias, mip+1, min screen size threshold, camera
  motion dampening (auto-disable on fast rotations), and per-instance
  previouslyVisible flag tracking
- Graceful fallback to frustum-only culling if HiZ init fails

Fix dark WMO interiors by gating shadow map sampling on isInterior==0
in the WMO fragment shader. Interior groups (flag 0x2000) now rely
solely on pre-baked MOCV vertex-color lighting + MOHD ambient color.
Disable interiorDarken globally (was incorrectly darkening outdoor M2s
when camera was inside a WMO). Use isInsideInteriorWMO() instead of
isInsideWMO() for correct indoor detection.

New files:
- hiz_system.hpp/cpp: pyramid image management, compute pipeline,
  descriptors, mip-chain build dispatch, resize handling
- hiz_build.comp.glsl: MAX-depth 2x2 reduction compute shader
- m2_cull_hiz.comp.glsl: frustum + HiZ occlusion cull compute shader
- test_indoor_shadows.cpp: 14 unit tests for shadow/interior contracts

Modified:
- CullUniformsGPU expanded 128->272 bytes (HiZ params, viewProj,
  prevViewProj)
- Depth buffer images gain VK_IMAGE_USAGE_SAMPLED_BIT for HiZ reads
- wmo.frag.glsl: interior branch before unlit, shadow skip for 0x2000
- Render graph: hiz_build + compute_cull disabled (run in early compute)
- .gitignore: ignore compiled .spv binaries
- MEGA_BONE_MAX_INSTANCES: 2048 -> 4096

Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 16:40:59 +03:00
Kelsi
758f7b27b9 fix(logging): downgrade remaining emote registry diagnostics to DEBUG
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Remove temporary NPC death diagnostic from entity_controller and
downgrade emote override/load-count messages from WARNING to DEBUG.
2026-04-05 20:58:11 -07:00
Kelsi
17c1e3ea3b fix(entities): add diagnostic for NPC death callback chain 2026-04-05 20:41:27 -07:00
Kelsi
7f9eed0de9 fix(parsing): add spline header dump to diagnose FINAL_POINT parse failures 2026-04-05 20:24:28 -07:00
Kelsi
c2681eead1 refactor: downgrade shutdown, warden, and misc diagnostics to DEBUG
Demote 44 more LOG_WARNING messages to LOG_DEBUG: warden module chunk
progress, entire shutdown/teardown sequence, transport manager connect,
inventory right-click slot, and warden handshake diagnostics. Keeps real
warnings (texture not found, slow handlers, stalls, integrity hash)
visible in the log.
2026-04-05 20:18:39 -07:00
Kelsi
069dd36698 fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks
When spline parsing consumes the wrong number of bytes, the subsequent
blockCount read lands on garbage data (e.g. 71 instead of ~5 for UNIT).
Previously the parser logged a warning but continued, reading garbage
mask/field data until hitting truncation. Now it returns false for
CREATE_OBJECT blocks with suspicious counts, letting the block loop
skip cleanly to the next entity.

Also downgrade ~44 diagnostic LOG_WARNING messages to LOG_DEBUG across
17 files (equipment, transport, DBC, heartbeat, chat, GO raypick, etc.)
to reduce log noise and make real warnings visible.
2026-04-05 20:12:17 -07:00
Kelsi
e32f4fbff9 Merge master into chore/god-object-decomposition-2nd
Resolve conflicts:
- audio_callback_handler.cpp: keep PR's animation_controller include
- movement_handler.cpp: use PR accessors with master's transportResolved logic
- world_packets.cpp: keep PR's decomposed version (functions moved to split files)

Apply overkill field fix to world_packets_entity.cpp (WotLK
SMSG_ATTACKERSTATEUPDATE missing uint32 overkill between damage and
subDamageCount).
2026-04-05 19:42:25 -07:00
Kelsi
0a22b0d41a refactor: remove debug diagnostics from combat and animation code 2026-04-05 19:10:42 -07:00
Kelsi
0e74e0f951 fix(combat): read WotLK overkill field in SMSG_ATTACKERSTATEUPDATE
AzerothCore sends a uint32 overkill field between totalDamage and
subDamageCount. The parser was missing this, causing subDamageCount to
read the first byte of overkill (0 for non-kills) and fail immediately.
This broke all melee swing animations except the killing blow.
2026-04-05 19:02:07 -07:00
Kelsi
e26ed39da8 fix(combat): add diagnostic logging to handleAttackerStateUpdate
Log parse failures with remaining packet size and successful parses with
attacker/target/player GUIDs, damage, and callback status to diagnose
why meleeSwingCallback is never invoked during auto-attack.
2026-04-05 18:54:01 -07:00
Kelsi
53639f9592 fix(animation): re-probe capabilities on melee swing, add combat diagnostics
If the capability probe ran before the model was fully loaded, all melee
animation IDs would be 0 and auto-attack swings would silently fall back
to STAND (no visible animation). Now re-probes when a melee swing fires
but hasMelee is false.

Added WARNING-level logging to triggerMeleeSwing and CombatFSM to
diagnose the night elf stationary combat animation issue.
2026-04-05 17:52:18 -07:00
Kelsi
696baffdf7 fix(movement): upgrade teleport and heartbeat diagnostics to WARNING
MSG_MOVE_TELEPORT_ACK now logs server-sent coordinates AND current
position at WARNING level (was LOG_INFO, invisible in log file).
Heartbeat position audit now logs every ~60 heartbeats (~30s) at
WARNING level to trace position drift before rogue teleports.
2026-04-05 17:39:56 -07:00
Kelsi
722c065089 fix(emotes): use EMOTE_TALK for /fart and /stink (no dedicated anim in DBC) 2026-04-05 17:33:42 -07:00
Kelsi
aff545edef fix(rendering): emote animations, WMO portal culling, transport teleport
Emote animations: fix DBC chain for /laugh, /flirt, /sleep, /fart, /stink.
Previously all emotes with AnimID=0 used emoteRef as animId (wrong DBC
record IDs). Now resolves through Emotes.dbc properly, with per-emote
overrides for emotes whose DBC chain yields 0. Adds Emotes.dbc load
failure warning and diagnostic logging.

WMO culling: skip portal culling when camera is outside all groups (fixes
vanishing Stormwind ground tiles). Also handle indoor/outdoor AABB overlap
by showing all groups when position is in both indoor and outdoor AABBs.

Transport: clear ONTRANSPORT flag and transport state when transport not
found, preventing stale transport data from teleporting player to map
origin. Add area trigger safety net near (0,0,0) on Eastern Kingdoms.
2026-04-05 17:25:25 -07:00
Kelsi
fe29ccad3f fix(transport): guard against untracked transport placing player at map origin
When on-transport flag is set but the transport isn't tracked by
TransportManager, getPlayerWorldPosition() returns localOffset (a small
relative value) as a world position. This overwrites movementInfo with
near-zero coordinates, teleporting the player to map origin on Eastern
Kingdoms (Alterac/Hillsbrad area). Add transport existence checks in
sendMovement() and getComposedWorldPosition() before composing position.
2026-04-05 16:01:14 -07:00
Kelsi Rae Davis
910ba50c26
Merge pull request #49 from ldmonster/chore/ui-callbacks-refactor
[chore] refactor(core): decompose Application::setupUICallbacks() into 7 domain handlers
2026-04-05 15:25:20 -07:00
Paul
52098cc704 ARM64 fix 2026-04-05 20:41:33 +03:00
Paul
41cd059f84 fix 2026-04-05 20:30:15 +03:00
Paul
65839287b4 feat(game): introduce GameHandler domain interfaces and eliminate friend declarations
Add game_interfaces.hpp with five narrow domain contracts that GameHandler now
publishes to its domain handlers, replacing the previous friend-class anti-pattern.

Changes:
- include/game/game_interfaces.hpp (new): IConnectionState, ITargetingState,
  IEntityAccess, ISocialState, IPvpState — each interface exposes only the state
  its consumer legitimately needs
- include/game/game_handler.hpp: GameHandler inherits all five interfaces;
  include of game_interfaces.hpp added
- include/game/movement_handler.hpp: remove `friend class GameHandler`; add
  public named accessors for previously-private fields (monsterMovePacketsThisTickRef,
  timeSinceLastMoveHeartbeatRef, resetMovementClock, setFalling, setFallStartMs)
- include/game/spell_handler.hpp: remove `friend class GameHandler/InventoryHandler/
  CombatHandler/EntityController`; promote private packet handlers (handlePetSpells,
  handleListStabledPets, pet stable commands, DBC loaders) to public; add accessor
  methods for aura cache, known spells, and player aura slot mutation
- src/game/game_handler.cpp, game_handler_callbacks.cpp, game_handler_packets.cpp:
  replace direct private field access with the new accessor API
  (e.g. casting_ → isCasting(), monsterMovePacketsThisTick_ → ...ThisTickRef())
- src/game/inventory_handler.cpp, combat_handler.cpp, entity_controller.cpp:
  replace friend-class private access with public accessor calls

No behaviour change. All 13 test suites pass. Zero build warnings.
2026-04-05 20:25:02 +03:00
Paul
34c0e3ca28 chore(refactor): god-object decomposition and mega-file splits
Split all mega-files by single-responsibility concern and
partially extracting AudioCoordinator and
OverlaySystem from the Renderer facade. No behavioral changes.

Splits:
- game_handler.cpp (5,247 LOC) → core + callbacks + packets (3 files)
- world_packets.cpp (4,453 LOC) → economy/entity/social/world (4 files)
- game_screen.cpp  (5,786 LOC) → core + frames + hud + minimap (4 files)
- m2_renderer.cpp  (3,343 LOC) → core + instance + particles + render (4 files)
- chat_panel.cpp   (3,140 LOC) → core + commands + utils (3 files)
- entity_spawner.cpp (2,750 LOC) → core + player + processing (3 files)

Extractions:
- AudioCoordinator: include/audio/ + src/audio/ (owned by Renderer)
- OverlaySystem: include/rendering/ + src/rendering/overlay_system.*

CMakeLists.txt: registered all 17 new translation units.
Related handler/callback files: minor include fixups post-split.
2026-04-05 19:30:44 +03:00
Paul
6dcc06697b refactor(core): decompose Application::setupUICallbacks() into 7 domain handlers
Extract ~1,700 lines / 60+ inline [this]-capturing lambdas from the monolithic
Application::setupUICallbacks() into 7 focused callback handler classes following
the ToastManager/ChatPanel::setupCallbacks() pattern already in the codebase.

New handlers (include/core/ + src/core/):
  - NPCInteractionCallbackHandler  NPC greeting/farewell/vendor/aggro voice
  - AudioCallbackHandler           Music, positional sound, level-up, achievement, LFG
  - EntitySpawnCallbackHandler     Creature/player/GO spawn, despawn, move, state
  - AnimationCallbackHandler       Death, respawn, combat, emotes, charge, sprint, vehicle
  - TransportCallbackHandler       Mount, taxi, transport spawn/move
  - WorldEntryCallbackHandler      World entry, unstuck, hearthstone, bind point
  - UIScreenCallbackHandler        Auth, realm selection, char selection/creation/deletion

application.cpp:  4,462 → 2,791 lines  (−1,671)
setupUICallbacks: ~1,700 → ~50 lines (thin orchestrator)

Deduplication:
  resolveSoundEntryPath()   — was 3× copy-paste of SoundEntries.dbc lookup
  resolveNpcVoiceType()     — was 4× copy-paste of display-ID→voice detection
  precacheNearbyTiles()     — was 3× copy-paste of 17×17 tile loop
  4 helper lambdas          — promoted to private methods on WorldEntryCallbackHandler

State migration out of Application:
  charge* (6 vars)          → AnimationCallbackHandler
  hearth*/worldEntry*/taxi* → WorldEntryCallbackHandler
  pendingCreatedCharacterName_ → UIScreenCallbackHandler

Bug fixes:
  - Duplicate `namespace core {` in application.hpp caused wowee::std pollution
  - AppState forward decl in ui_screen_callback_handler.hpp was at wrong scope
  - world_loader.cpp accessed moved member vars directly via friend; now uses handler API
2026-04-05 16:48:17 +03:00
Kelsi
a23c2172a8 fix(chat): handle SMSG_GM_MESSAGECHAT format, add chat diagnostics
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
SMSG_GM_MESSAGECHAT has an extra gmNameLen+gmName field after the
standard header that was causing misaligned parsing for non-whisper GM
messages. Strip the GM name before forwarding to the regular parser.

Also improve party state notifications (show member names on join) and
add INFO-level logging for all incoming/outgoing chat messages and
WARNING-level logging for group invite/accept packets to diagnose
recurring phantom party state issues.
2026-04-05 05:16:57 -07:00
Kelsi
e4bd380c0d fix(chat): prevent AFK/DND auto-reply whisper spam loop
Auto-reply was sent on every incoming whisper with no dedup, causing
infinite loops when both players had auto-reply enabled. Now tracks
which senders have been replied to and only sends one auto-reply per
sender per AFK/DND session.
2026-04-05 04:50:40 -07:00
Kelsi
19bfaaef97 fix(movement): stop spoofing player position for area triggers
The area trigger system was temporarily moving the player to the trigger
center and sending a heartbeat before firing CMSG_AREATRIGGER. This told
the server the player was at a different location, causing unexpected
teleports (e.g. Stormwind to Hillsbrad). Just send the area trigger
packet directly — the player is already inside the trigger radius.
2026-04-05 04:40:46 -07:00
Kelsi
09c1469956 fix(ui): show only zone name on character select, drop map/continent 2026-04-05 04:34:39 -07:00
Kelsi
e4c4b6f429 fix(ui): use display name from Map.dbc field 4 instead of internal name
Was reading field 2 (InstanceType) which fell back to field 1 (internal
name like "Azeroth"). Field 4 has the localized display name ("Eastern
Kingdoms").
2026-04-05 04:32:10 -07:00
Kelsi
535ae8aa89 fix(ui): resolve map 0 name and allow guild queries at character screen
getMapName() returned empty for mapId 0 (Eastern Kingdoms) due to an
early return guard. Remove it since 0 is a valid map ID.

queryGuildInfo() required IN_WORLD state but the character screen is at
CHAR_LIST_RECEIVED. The server accepts CMSG_GUILD_QUERY before login,
so just check for a connected socket.
2026-04-05 04:30:32 -07:00
Kelsi
2e30490fc5 fix(ui): show guild name and zone name on character select screen
Load area names from AreaTable.dbc (canonical zone names) in addition
to WorldMapArea.dbc so zone IDs from SMSG_CHAR_ENUM resolve to names.
Use lookupGuildName() to query and display guild names instead of raw
guild IDs.
2026-04-05 04:28:36 -07:00
Kelsi
35be19e74c fix(mail): route GO mailbox open through InventoryHandler
The decomposition PRs moved mail state to InventoryHandler but the GO
interaction code still set stale GameHandler fields. Add openMailbox()
on InventoryHandler and forward from GameHandler so the correct
mailboxGuid_/mailboxOpen_ are set and refreshMailList() works.
2026-04-05 04:22:48 -07:00
Kelsi
62f3f515e2 fix(mail): let SMSG_SHOW_MAILBOX open mailbox instead of stale GameHandler fields
GO interaction was setting the old GameHandler mailbox state instead of
InventoryHandler's, so refreshMailList saw mailboxGuid_=0 and bailed.
2026-04-05 04:17:55 -07:00
Kelsi
53244d025c feat(repair): DBC-based repair cost estimation and UI display
Calculate repair costs client-side using DurabilityCosts.dbc and
DurabilityQuality.dbc. Block repair when player can't afford it and
only apply optimistic durability/gold updates when cost is verified.
Show repair cost next to the Repair All button in the vendor window.
2026-04-05 04:15:48 -07:00
Kelsi Davis
3dec33ecf1 perf(rendering): reduce GPU cull buffer to 24k instances 2026-04-05 03:39:10 -07:00
Kelsi Davis
8bb3702af4 perf(rendering): reduce GPU cull buffer and add CPU fallback for overflow
Halve MAX_CULL_INSTANCES to 32768 and iterate all instances in render,
falling back to CPU frustum culling for any beyond the GPU buffer.
2026-04-05 03:25:27 -07:00
Kelsi Davis
b62df70d09 fix(rendering): game objects invisible due to GPU cull instance limit
MAX_CULL_INSTANCES was 16384 but game object instances were allocated
at indices 20000+, beyond the cull buffer. Increased to 65536.
Also compute fallback boundRadius from vertex extents when M2 header
reports 0, and seed bones for global-sequence-only animated models.
2026-04-05 03:18:52 -07:00