Add Tier 7 commands: combat and trade

Combat Commands:
- /duel - Challenge target to a duel (CMSG_DUEL_PROPOSED 0x166)
- /trade - Open trade window with target (CMSG_INITIATE_TRADE 0x116)
- /startattack - Begin auto-attacking target
- /stopattack - Stop auto-attacking
- /stopcasting - Cancel current spell cast

New opcodes:
- CMSG_DUEL_PROPOSED (0x166) for initiating duels
- CMSG_INITIATE_TRADE (0x116) for starting trades

Packet builders:
- DuelProposedPacket - sends duel challenge to target GUID
- InitiateTradePacket - sends trade request to target GUID
- AttackSwingPacket, AttackStopPacket, CancelCastPacket reused from existing

Game handler methods:
- proposeDuel(targetGuid) - challenge target to duel
- initiateTrade(targetGuid) - open trade with target
- stopCasting() - cancel current spell cast (uses existing casting state)

All commands include validation for target selection and world state.
Removed duplicate packet class definitions from previous phases.
This commit is contained in:
kelsi davis 2026-02-07 13:36:50 -08:00
parent d5b734a591
commit bca3f64af6
6 changed files with 201 additions and 38 deletions

View file

@ -106,10 +106,14 @@ enum class Opcode : uint16_t {
MSG_RAID_READY_CHECK_CONFIRM = 0x3AE,
// ---- Duel ----
CMSG_DUEL_PROPOSED = 0x166,
CMSG_DUEL_ACCEPTED = 0x16C,
CMSG_DUEL_CANCELLED = 0x16D,
SMSG_DUEL_REQUESTED = 0x167,
// ---- Trade ----
CMSG_INITIATE_TRADE = 0x116,
// ---- Random Roll ----
MSG_RANDOM_ROLL = 0x1FB,