mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Fix respawned corpse movement, faction hostility, and add WoW-canonical mob level colors
Reset NPC animation to idle when health goes from 0 to >0 (respawn), prevent dead NPCs from being moved by server movement packets. Fix faction hostility to check factionGroup Monster bit and individual enemy arrays, not just enemyGroup. Add level-based mob coloring: grey (no XP), green (easy), yellow (even), orange (hard), red (very hard) for target frame and selection circle.
This commit is contained in:
parent
2aa8187562
commit
81166346ef
7 changed files with 127 additions and 9 deletions
|
|
@ -252,6 +252,10 @@ public:
|
|||
using NpcDeathCallback = std::function<void(uint64_t guid)>;
|
||||
void setNpcDeathCallback(NpcDeathCallback cb) { npcDeathCallback_ = std::move(cb); }
|
||||
|
||||
// NPC respawn callback (health 0 → >0, resets animation to idle)
|
||||
using NpcRespawnCallback = std::function<void(uint64_t guid)>;
|
||||
void setNpcRespawnCallback(NpcRespawnCallback cb) { npcRespawnCallback_ = std::move(cb); }
|
||||
|
||||
// Melee swing callback (for driving animation/SFX)
|
||||
using MeleeSwingCallback = std::function<void()>;
|
||||
void setMeleeSwingCallback(MeleeSwingCallback cb) { meleeSwingCallback_ = std::move(cb); }
|
||||
|
|
@ -683,6 +687,7 @@ private:
|
|||
float swingTimer_ = 0.0f;
|
||||
static constexpr float SWING_SPEED = 2.0f;
|
||||
NpcDeathCallback npcDeathCallback_;
|
||||
NpcRespawnCallback npcRespawnCallback_;
|
||||
MeleeSwingCallback meleeSwingCallback_;
|
||||
NpcSwingCallback npcSwingCallback_;
|
||||
uint32_t localPlayerHealth_ = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue