Kelsidavis-WoWee/src/core
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
..
animation_callback_handler.cpp chore(refactor): god-object decomposition and mega-file splits 2026-04-05 19:30:44 +03:00
appearance_composer.cpp fix(rendering): filter player hair geosets via CharHairGeosets.dbc 2026-04-03 22:43:37 -07:00
application.cpp fix(render): code quality cleanup 2026-04-06 22:43:13 +03:00
audio_callback_handler.cpp chore(refactor): god-object decomposition and mega-file splits 2026-04-05 19:30:44 +03:00
entity_spawn_callback_handler.cpp fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks 2026-04-05 20:12:17 -07:00
entity_spawner.cpp fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks 2026-04-05 20:12:17 -07:00
entity_spawner_player.cpp fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks 2026-04-05 20:12:17 -07:00
entity_spawner_processing.cpp fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks 2026-04-05 20:12:17 -07:00
input.cpp fix: UB in mouse button polling, null deref in BigNum formatting 2026-03-30 15:37:38 -07:00
logger.cpp perf: eliminate ~70 unnecessary sqrt ops per frame, optimize caches and threading 2026-03-27 16:33:16 -07:00
memory_monitor.cpp world loading memory pressure detector 2026-04-06 21:05:20 +03:00
npc_interaction_callback_handler.cpp refactor(core): decompose Application::setupUICallbacks() into 7 domain handlers 2026-04-05 16:48:17 +03:00
transport_callback_handler.cpp chore(refactor): god-object decomposition and mega-file splits 2026-04-05 19:30:44 +03:00
ui_screen_callback_handler.cpp refactor(core): decompose Application::setupUICallbacks() into 7 domain handlers 2026-04-05 16:48:17 +03:00
window.cpp refactor: downgrade shutdown, warden, and misc diagnostics to DEBUG 2026-04-05 20:18:39 -07:00
world_entry_callback_handler.cpp fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks 2026-04-05 20:12:17 -07:00
world_loader.cpp refactor: downgrade shutdown, warden, and misc diagnostics to DEBUG 2026-04-05 20:18:39 -07:00