feat: add /cancelqueuedspell command to clear spell queue

Add cancelQueuedSpell() method that clears queuedSpellId_ and
queuedSpellTarget_. Wire /cancelqueuedspell and /stopspellqueue
slash commands. Useful for combat macros that need to prevent
queued spells from firing after a current cast.
This commit is contained in:
Kelsi 2026-03-20 17:24:16 -07:00
parent 8761ad9301
commit 14007c81df
2 changed files with 7 additions and 0 deletions

View file

@ -868,6 +868,7 @@ public:
// 400ms spell-queue window: next spell to cast when current finishes
uint32_t getQueuedSpellId() const { return queuedSpellId_; }
void cancelQueuedSpell() { queuedSpellId_ = 0; queuedSpellTarget_ = 0; }
// Unit cast state (tracked per GUID for target frame + boss frames)
struct UnitCastState {

View file

@ -7140,6 +7140,12 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) {
return;
}
if (cmdLower == "cancelqueuedspell" || cmdLower == "stopspellqueue") {
gameHandler.cancelQueuedSpell();
chatInputBuffer[0] = '\0';
return;
}
// /equipset [name] — equip a saved equipment set by name (partial match, case-insensitive)
// /equipset — list available sets in chat
if (cmdLower == "equipset") {