feat: add Shaman totem bar in player frame

Store active totem state (slot, spellId, duration, placedAt) from
SMSG_TOTEM_CREATED. Render 4 element slots (Earth/Fire/Water/Air) as
color-coded duration bars in the player frame for Shamans (class 7).
Shows countdown seconds, element letter when inactive, and tooltip
with spell name + remaining time on hover.
This commit is contained in:
Kelsi 2026-03-12 05:16:43 -07:00
parent 8efdaed7e4
commit 5827a8fcdd
3 changed files with 107 additions and 0 deletions

View file

@ -3061,6 +3061,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
uint32_t spellId = packet.readUInt32();
LOG_DEBUG("SMSG_TOTEM_CREATED: slot=", (int)slot,
" spellId=", spellId, " duration=", duration, "ms");
if (slot < NUM_TOTEM_SLOTS) {
activeTotemSlots_[slot].spellId = spellId;
activeTotemSlots_[slot].durationMs = duration;
activeTotemSlots_[slot].placedAt = std::chrono::steady_clock::now();
}
break;
}
case Opcode::SMSG_AREA_SPIRIT_HEALER_TIME: {