mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add Tier 2 utility commands: helm/cloak toggles, follow, and assist
Display Toggle Commands: - Add /helm, /helmet, /showhelm to toggle helm visibility - Add /cloak, /showcloak to toggle cloak visibility - Track visibility state with helmVisible_ and cloakVisible_ flags - Show confirmation messages: "Helm/Cloak is now visible/hidden" - Use CMSG_SHOWING_HELM (0x2B9) and CMSG_SHOWING_CLOAK (0x2BA) Follow Command: - Add /follow and /f to follow current target - Works with both players and NPCs - Show "Now following [Name]" confirmation message - Track follow target with followTargetGuid_ for future movement logic Assist Command: - Add /assist to target what your current target is targeting - Read target's target from UNIT_FIELD_TARGET update fields (offset 6-7) - Reconstruct 64-bit target GUID from two 32-bit field values - Automatically switch your target to assist target - Show helpful messages: "[Name] has no target" when appropriate - Essential for combat coordination in groups Implementation: - Add ShowingHelmPacket and ShowingCloakPacket builders - Add toggleHelm() and toggleCloak() methods with state management - Add followTarget() for setting follow target - Add assistTarget() with smart target field reading - Use Entity::getFields() to access protected update fields - Handle missing targets and invalid states gracefully - All commands provide chat feedback - Support multiple aliases for user convenience
This commit is contained in:
parent
ec32286b0d
commit
acef7ccbec
6 changed files with 198 additions and 0 deletions
|
|
@ -1150,6 +1150,34 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) {
|
|||
return;
|
||||
}
|
||||
|
||||
// /helm command
|
||||
if (cmdLower == "helm" || cmdLower == "helmet" || cmdLower == "showhelm") {
|
||||
gameHandler.toggleHelm();
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
// /cloak command
|
||||
if (cmdLower == "cloak" || cmdLower == "showcloak") {
|
||||
gameHandler.toggleCloak();
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
// /follow command
|
||||
if (cmdLower == "follow" || cmdLower == "f") {
|
||||
gameHandler.followTarget();
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
// /assist command
|
||||
if (cmdLower == "assist") {
|
||||
gameHandler.assistTarget();
|
||||
chatInputBuffer[0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
// Chat channel slash commands
|
||||
bool isChannelCommand = false;
|
||||
if (cmdLower == "s" || cmdLower == "say") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue