mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add gameplay systems: combat, spells, groups, loot, vendors, and UI
Implement ~70 new protocol opcodes across 5 phases while maintaining full 3.3.5a private server compatibility: - Phase 1: Server-aware targeting (CMSG_SET_SELECTION), player/creature name queries, CMSG_SET_ACTIVE_MOVER after login - Phase 2: Auto-attack, melee/spell damage parsing, health/mana/power tracking from UPDATE_OBJECT fields, floating combat text - Phase 3: Spell casting, action bar (12 slots, keys 1-=), cast bar, cooldown tracking, aura/buff system with cancellation - Phase 4: Group invite/accept/decline/leave, party frames UI, /invite chat command - Phase 5: Loot window, NPC gossip dialog, vendor buy/sell interface Also: disable debug HUD/panels by default, gate 3D rendering to IN_GAME state only, fix window resize not updating UI positions.
This commit is contained in:
parent
6bf3fa4ed4
commit
c49bb58e47
14 changed files with 3039 additions and 84 deletions
|
|
@ -189,6 +189,7 @@ void Application::run() {
|
|||
if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
|
||||
int newWidth = event.window.data1;
|
||||
int newHeight = event.window.data2;
|
||||
window->setSize(newWidth, newHeight);
|
||||
glViewport(0, 0, newWidth, newHeight);
|
||||
if (renderer && renderer->getCamera()) {
|
||||
renderer->getCamera()->setAspectRatio(static_cast<float>(newWidth) / newHeight);
|
||||
|
|
@ -629,8 +630,8 @@ void Application::update(float deltaTime) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Update renderer (camera, etc.)
|
||||
if (renderer) {
|
||||
// Update renderer (camera, etc.) only when in-game
|
||||
if (renderer && state == AppState::IN_GAME) {
|
||||
renderer->update(deltaTime);
|
||||
}
|
||||
|
||||
|
|
@ -647,25 +648,13 @@ void Application::render() {
|
|||
|
||||
renderer->beginFrame();
|
||||
|
||||
// Always render atmospheric background (sky, stars, clouds, etc.)
|
||||
// This provides a nice animated background for login/UI screens
|
||||
// Terrain/characters only render if loaded (in-game)
|
||||
switch (state) {
|
||||
case AppState::IN_GAME:
|
||||
// Render full world with terrain and entities
|
||||
if (world) {
|
||||
renderer->renderWorld(world.get());
|
||||
} else {
|
||||
// Fallback: render just atmosphere if world not loaded
|
||||
renderer->renderWorld(nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Login/UI screens: render atmospheric background only
|
||||
// (terrain/water/characters won't render as they're not loaded)
|
||||
// Only render 3D world when in-game (after server connect or single-player)
|
||||
if (state == AppState::IN_GAME) {
|
||||
if (world) {
|
||||
renderer->renderWorld(world.get());
|
||||
} else {
|
||||
renderer->renderWorld(nullptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Render performance HUD (within ImGui frame, before UI ends the frame)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue