mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
Implement Death Knight rune tracking and rune bar UI
Parse SMSG_RESYNC_RUNES, SMSG_ADD_RUNE_POWER, and SMSG_CONVERT_RUNE to track the state of all 6 DK runes (Blood/Unholy/Frost/Death type, ready flag, and cooldown fraction). Render a six-square rune bar below the Runic Power bar when the player is class 6, with per-type colors (Blood=red, Unholy=green, Frost=blue, Death=purple) and client-side fill animation so runes visibly refill over the 10s cooldown.
This commit is contained in:
parent
819a38a7ca
commit
c887a460ea
4 changed files with 112 additions and 5 deletions
|
|
@ -902,6 +902,15 @@ public:
|
|||
uint8_t getComboPoints() const { return comboPoints_; }
|
||||
uint64_t getComboTarget() const { return comboTarget_; }
|
||||
|
||||
// Death Knight rune state (6 runes: 0-1=Blood, 2-3=Unholy, 4-5=Frost; may become Death=3)
|
||||
enum class RuneType : uint8_t { Blood = 0, Unholy = 1, Frost = 2, Death = 3 };
|
||||
struct RuneSlot {
|
||||
RuneType type = RuneType::Blood;
|
||||
bool ready = true; // Server-confirmed ready state
|
||||
float readyFraction = 1.0f; // 0.0=depleted → 1.0=full (from server sync)
|
||||
};
|
||||
const std::array<RuneSlot, 6>& getPlayerRunes() const { return playerRunes_; }
|
||||
|
||||
struct FactionStandingInit {
|
||||
uint8_t flags = 0;
|
||||
int32_t standing = 0;
|
||||
|
|
@ -2081,6 +2090,14 @@ private:
|
|||
float serverPitchRate_ = 3.14159f;
|
||||
bool playerDead_ = false;
|
||||
bool releasedSpirit_ = false;
|
||||
// Death Knight runes (class 6): slots 0-1=Blood, 2-3=Unholy, 4-5=Frost initially
|
||||
std::array<RuneSlot, 6> playerRunes_ = [] {
|
||||
std::array<RuneSlot, 6> r{};
|
||||
r[0].type = r[1].type = RuneType::Blood;
|
||||
r[2].type = r[3].type = RuneType::Unholy;
|
||||
r[4].type = r[5].type = RuneType::Frost;
|
||||
return r;
|
||||
}();
|
||||
uint64_t pendingSpiritHealerGuid_ = 0;
|
||||
bool resurrectPending_ = false;
|
||||
bool resurrectRequestPending_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue