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
|
|
@ -1316,6 +1316,24 @@ network::Packet StandStateChangePacket::build(uint8_t state) {
|
|||
return packet;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Display Toggles
|
||||
// ============================================================
|
||||
|
||||
network::Packet ShowingHelmPacket::build(bool show) {
|
||||
network::Packet packet(static_cast<uint16_t>(Opcode::CMSG_SHOWING_HELM));
|
||||
packet.writeUInt8(show ? 1 : 0);
|
||||
LOG_DEBUG("Built CMSG_SHOWING_HELM: show=", show);
|
||||
return packet;
|
||||
}
|
||||
|
||||
network::Packet ShowingCloakPacket::build(bool show) {
|
||||
network::Packet packet(static_cast<uint16_t>(Opcode::CMSG_SHOWING_CLOAK));
|
||||
packet.writeUInt8(show ? 1 : 0);
|
||||
LOG_DEBUG("Built CMSG_SHOWING_CLOAK: show=", show);
|
||||
return packet;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Random Roll
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue