feat(core): D.5.3/B.2 — ShortcutStore + AddShortcut/RemoveShortcut wire + senders
ShortcutStore lands in AcDream.Core.Net.Items (not AcDream.Core.Items) because it depends on PlayerDescriptionParser.ShortcutEntry; placing it in AcDream.Core would create a circular dependency (Core.Net already references Core). The test lives in AcDream.Core.Tests which gets Core.Net transitively via App. BuildAddShortcut signature corrected from the old (seq, slotIndex, objectType, targetId) 4×u32 layout to the retail ShortCutData wire format confirmed in the action-bar deep-dive: Index(u32), ObjectId(u32), SpellId(u16), Layer(u16). The old BuildAddShortcut_ThreeFields test is replaced by two new tests that verify both item and spell shortcut packing. WorldSession gains SendAddShortcut / SendRemoveShortcut following the SendChangeCombatMode sender pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7193bed309
commit
745a92bbae
5 changed files with 115 additions and 15 deletions
|
|
@ -1140,6 +1140,22 @@ public sealed class WorldSession : IDisposable
|
|||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>Send AddShortcut (0x019C) — pin an item to toolbar slot <paramref name="index"/>.
|
||||
/// Retail: CM_Character::Event_AddShortCut. Mirrors the SendChangeCombatMode pattern.</summary>
|
||||
public void SendAddShortcut(uint index, uint objectGuid, ushort spellId = 0, ushort layer = 0)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
SendGameAction(InventoryActions.BuildAddShortcut(seq, index, objectGuid, spellId, layer));
|
||||
}
|
||||
|
||||
/// <summary>Send RemoveShortcut (0x019D) — clear toolbar slot <paramref name="index"/>.
|
||||
/// Retail: CM_Character::Event_RemoveShortCut.</summary>
|
||||
public void SendRemoveShortcut(uint index)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
SendGameAction(InventoryActions.BuildRemoveShortcut(seq, index));
|
||||
}
|
||||
|
||||
/// <summary>Send retail QueryHealth (0x01BF). Server replies UpdateHealth (0x01C0).</summary>
|
||||
/// <remarks>
|
||||
/// Retail anchor: <c>CM_Combat::Event_QueryHealth</c> / <c>gmToolbarUI::HandleSelectionChanged:198635</c>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue