feat(net): D.2b-B B-Wire — DropItem/GetAndWieldItem/NoLongerViewingContents builders + Send wrappers
Task 9 of the B-Wire inventory-wire plan. Adds three outbound C→S GameAction builders to InventoryActions.cs (DropItem 0x001B, GetAndWieldItem 0x001A, NoLongerViewingContents 0x0195) plus matching opcode constants after TeleToPoiOpcode. Adds SendDropItem/SendGetAndWieldItem/SendNoLongerViewingContents wrappers to WorldSession.cs (after SendRemoveShortcut, ~line 1157), following the exact same NextGameActionSequence() + SendGameAction() pattern as the existing Send* family. Three byte-layout tests added to InventoryActionsTests.cs (12 total, all green). Core.Net build clean. Unblocks B-Drag (drop) and container-open (NoLongerViewingContents on close) call sites in the inventory controller. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7013651a90
commit
de8baa1aa1
3 changed files with 93 additions and 0 deletions
|
|
@ -1156,6 +1156,27 @@ public sealed class WorldSession : IDisposable
|
|||
SendGameAction(InventoryActions.BuildRemoveShortcut(seq, index));
|
||||
}
|
||||
|
||||
/// <summary>Send DropItem (0x001B) — drop an item on the ground.</summary>
|
||||
public void SendDropItem(uint itemGuid)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
SendGameAction(InventoryActions.BuildDropItem(seq, itemGuid));
|
||||
}
|
||||
|
||||
/// <summary>Send GetAndWieldItem (0x001A) — equip an item to an equip slot.</summary>
|
||||
public void SendGetAndWieldItem(uint itemGuid, uint equipMask)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
SendGameAction(InventoryActions.BuildGetAndWieldItem(seq, itemGuid, equipMask));
|
||||
}
|
||||
|
||||
/// <summary>Send NoLongerViewingContents (0x0195) — close a container view.</summary>
|
||||
public void SendNoLongerViewingContents(uint containerGuid)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
SendGameAction(InventoryActions.BuildNoLongerViewingContents(seq, containerGuid));
|
||||
}
|
||||
|
||||
/// <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