feat: parse SMSG_GMTICKET_GETTICKET/SYSTEMSTATUS and SMSG_SPELLINSTAKILLLOG

Previously SMSG_GMTICKET_GETTICKET and SMSG_GMTICKET_SYSTEMSTATUS were
silently consumed. Now both are fully parsed:
- SMSG_GMTICKET_GETTICKET decodes all four status codes (no ticket,
  open ticket, closed, suspended), extracts ticket text, age and
  server-estimated wait time, and stores them on GameHandler.
- SMSG_GMTICKET_SYSTEMSTATUS shows a chat message when GM support
  goes offline/online.
- Added requestGmTicket() (sends CMSG_GMTICKET_GETTICKET) called
  automatically when the GM Ticket UI window is opened, so the player
  sees their existing open ticket text and wait time on first open.
- GM Ticket UI window now shows current-ticket status bar, estimated
  wait time, and hides the Delete button when no ticket is active.

Also implements SMSG_SPELLINSTAKILLLOG (previously silently consumed):
parses caster/victim/spellId for all expansions and emits combat text
when the local player is involved in an instant-kill spell event (e.g.
Execute, Obliterate).
This commit is contained in:
Kelsi 2026-03-12 22:14:46 -07:00
parent 9b60108fa6
commit dd38026b23
4 changed files with 150 additions and 8 deletions

View file

@ -494,6 +494,13 @@ public:
// GM Ticket
void submitGmTicket(const std::string& text);
void deleteGmTicket();
void requestGmTicket(); ///< Send CMSG_GMTICKET_GETTICKET to query open ticket
// GM ticket status accessors
bool hasActiveGmTicket() const { return gmTicketActive_; }
const std::string& getGmTicketText() const { return gmTicketText_; }
bool isGmSupportAvailable() const { return gmSupportAvailable_; }
float getGmTicketWaitHours() const { return gmTicketWaitHours_; }
void queryGuildInfo(uint32_t guildId);
void createGuild(const std::string& guildName);
void addGuildRank(const std::string& rankName);
@ -3021,6 +3028,12 @@ private:
// ---- Quest completion callback ----
QuestCompleteCallback questCompleteCallback_;
// ---- GM Ticket state (SMSG_GMTICKET_GETTICKET / SMSG_GMTICKET_SYSTEMSTATUS) ----
bool gmTicketActive_ = false; ///< True when an open ticket exists on the server
std::string gmTicketText_; ///< Text of the open ticket (from SMSG_GMTICKET_GETTICKET)
float gmTicketWaitHours_ = 0.0f; ///< Server-estimated wait time in hours
bool gmSupportAvailable_ = true; ///< GM support system online (SMSG_GMTICKET_SYSTEMSTATUS)
};
} // namespace game

View file

@ -438,7 +438,8 @@ private:
void renderEquipSetWindow(game::GameHandler& gameHandler);
// GM Ticket window
bool showGmTicketWindow_ = false;
bool showGmTicketWindow_ = false;
bool gmTicketWindowWasOpen_ = false; ///< Previous frame state; used to fire one-shot query
char gmTicketBuf_[2048] = {};
void renderGmTicketWindow(game::GameHandler& gameHandler);