mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
Add 3D level-up effect using LevelUp.m2 spell model
Replace 2D screen-space ding rings with real WoW LevelUp.m2 particle/geometry effect. Fix FBlock particle color parsing (C3Vector floats, not CImVector bytes) which was producing blue/red instead of golden yellow. Spell effect models bypass particle dampeners, glow sprite conversion, Mod→Additive blend override, and all collision (floor/wall/camera) to prevent camera zoom-in. Other players' level-ups trigger the 3D effect at their position with group chat notification. F7 hotkey for testing.
This commit is contained in:
parent
1fb1daea7f
commit
da49593268
13 changed files with 321 additions and 128 deletions
51
include/rendering/levelup_effect.hpp
Normal file
51
include/rendering/levelup_effect.hpp
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace rendering {
|
||||
|
||||
class M2Renderer;
|
||||
|
||||
/// Manages spawning the real LevelUp.m2 spell effect at world positions.
|
||||
/// The M2 model contains particle emitters that produce the golden pillar/ring effect.
|
||||
class LevelUpEffect {
|
||||
public:
|
||||
LevelUpEffect();
|
||||
~LevelUpEffect();
|
||||
|
||||
/// Load the LevelUp.m2 model (call once after M2Renderer is ready)
|
||||
/// @param m2Renderer The M2 renderer to register the model with
|
||||
/// @param m2FileData Raw bytes of Spell/LevelUp/LevelUp.m2
|
||||
/// @param skinFileData Raw bytes of Spell/LevelUp/LevelUp00.skin
|
||||
/// @return true if model loaded successfully
|
||||
bool loadModel(M2Renderer* m2Renderer,
|
||||
const std::vector<uint8_t>& m2FileData,
|
||||
const std::vector<uint8_t>& skinFileData);
|
||||
|
||||
/// Trigger the level-up effect at a world position (render coords)
|
||||
void trigger(const glm::vec3& position);
|
||||
|
||||
/// Remove expired effect instances
|
||||
void update(float deltaTime);
|
||||
|
||||
bool isModelLoaded() const { return modelLoaded_; }
|
||||
|
||||
private:
|
||||
static constexpr float EFFECT_DURATION = 3.5f;
|
||||
static constexpr uint32_t MODEL_ID = 999900; // Unique model ID for level-up effect
|
||||
|
||||
struct ActiveEffect {
|
||||
uint32_t instanceId;
|
||||
float elapsed;
|
||||
};
|
||||
|
||||
M2Renderer* m2Renderer_ = nullptr;
|
||||
bool modelLoaded_ = false;
|
||||
std::vector<ActiveEffect> activeEffects_;
|
||||
};
|
||||
|
||||
} // namespace rendering
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue