mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
Introduce `GameServices` struct — an explicit dependency bundle that `Application` populates and passes to `GameHandler` at construction time. Eliminates all 47 hidden `Application::getInstance()` calls in `src/game/*.cpp`, completing SOLID-D (dependency-inversion) cleanup. Changes: - New `include/game/game_services.hpp` — `struct GameServices` carrying pointers to `Renderer`, `AssetManager`, `ExpansionRegistry`, and two taxi-mount display IDs - `GameHandler(GameServices&)` replaces default constructor; exposes `services() const` accessor for domain handlers - `Application` holds `game::GameServices gameServices_`; populates it after all subsystems are created, then constructs `GameHandler` (fixes latent init-order bug: `GameHandler` was previously created before `AssetManager` / `ExpansionRegistry`) - `game_handler.cpp`: duplicate `isActiveExpansion` / `isClassicLikeExpansion` / `isPreWotlk` anonymous-namespace helpers removed; `game_utils.hpp` included instead - All domain handlers (`InventoryHandler`, `SpellHandler`, `MovementHandler`, `CombatHandler`, `QuestHandler`, `SocialHandler`, `WardenHandler`) replace `Application::getInstance().getXxx()` with `owner_.services().xxx` |
||
|---|---|---|
| .. | ||
| character.hpp | ||
| chat_handler.hpp | ||
| combat_handler.hpp | ||
| entity.hpp | ||
| entity_controller.hpp | ||
| expansion_profile.hpp | ||
| game_handler.hpp | ||
| game_services.hpp | ||
| game_utils.hpp | ||
| group_defines.hpp | ||
| handler_types.hpp | ||
| inventory.hpp | ||
| inventory_handler.hpp | ||
| movement_handler.hpp | ||
| opcode_aliases_generated.inc | ||
| opcode_enum_generated.inc | ||
| opcode_names_generated.inc | ||
| opcode_table.hpp | ||
| opcodes.hpp | ||
| packet_parsers.hpp | ||
| player.hpp | ||
| quest_handler.hpp | ||
| social_handler.hpp | ||
| spell_defines.hpp | ||
| spell_handler.hpp | ||
| transport_manager.hpp | ||
| update_field_table.hpp | ||
| warden_crypto.hpp | ||
| warden_emulator.hpp | ||
| warden_handler.hpp | ||
| warden_memory.hpp | ||
| warden_module.hpp | ||
| world.hpp | ||
| world_packets.hpp | ||
| zone_manager.hpp | ||