mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: add /petattack, /petfollow, /petstay, /petpassive, /petaggressive macro commands
Adds the standard WoW pet control slash commands used in macros: - /petattack — attack current target - /petfollow — follow player - /petstay / /pethalt — stop and hold position - /petpassive — set passive react mode - /petdefensive — set defensive react mode - /petaggressive — set aggressive react mode - /petdismiss — dismiss the pet All commands also appear in Tab-autocomplete.
This commit is contained in:
parent
ae3e57ac3b
commit
c676d99fc2
1 changed files with 42 additions and 1 deletions
|
|
@ -2602,7 +2602,9 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) {
|
|||
"/gmticket", "/grouploot", "/i", "/instance",
|
||||
"/invite", "/j", "/join", "/kick",
|
||||
"/l", "/leave", "/local", "/me",
|
||||
"/p", "/party", "/r", "/raid",
|
||||
"/p", "/party", "/petaggressive", "/petattack", "/petdefensive",
|
||||
"/petdismiss", "/petfollow", "/pethalt", "/petpassive", "/petstay",
|
||||
"/r", "/raid",
|
||||
"/raidwarning", "/random", "/reply", "/roll",
|
||||
"/s", "/say", "/setloot", "/shout", "/sit", "/stand",
|
||||
"/startattack", "/stopattack", "/stopfollow", "/stopcasting",
|
||||
|
|
@ -5622,6 +5624,45 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Pet control commands (common macro use)
|
||||
// Action IDs: 1=passive, 2=follow, 3=stay, 4=defensive, 5=attack, 6=aggressive
|
||||
if (cmdLower == "petattack") {
|
||||
uint64_t target = gameHandler.hasTarget() ? gameHandler.getTargetGuid() : 0;
|
||||
gameHandler.sendPetAction(5, target);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petfollow") {
|
||||
gameHandler.sendPetAction(2, 0);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petstay" || cmdLower == "pethalt") {
|
||||
gameHandler.sendPetAction(3, 0);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petpassive") {
|
||||
gameHandler.sendPetAction(1, 0);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petdefensive") {
|
||||
gameHandler.sendPetAction(4, 0);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petaggressive") {
|
||||
gameHandler.sendPetAction(6, 0);
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
if (cmdLower == "petdismiss") {
|
||||
gameHandler.dismissPet();
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
// /cancelform / /cancelshapeshift — leave current shapeshift/stance
|
||||
if (cmdLower == "cancelform" || cmdLower == "cancelshapeshift") {
|
||||
// Cancel the first permanent shapeshift aura the player has
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue