24 lines
1.4 KiB
C#
24 lines
1.4 KiB
C#
namespace AcDream.App.UI;
|
|
|
|
/// <summary>
|
|
/// Where a dragged item came from — the retail <c>InqDropIconInfo</c> flag
|
|
/// distinction (<c>flags & 0xE == 0</c> fresh-from-inventory vs
|
|
/// <c>flags & 4</c> within-list reorder) expressed as a typed enum. The drop
|
|
/// handler maps SourceKind + target back to the fresh-vs-reorder decision.
|
|
/// Decomp anchors: gmToolbarUI 0x004bd162 / 0x004bd1af; InqDropIconInfo 230533.
|
|
/// </summary>
|
|
public enum ItemDragSource { Inventory, ShortcutBar, Equipment, Ground }
|
|
|
|
/// <summary>
|
|
/// Snapshot of a drag-in-progress, taken at drag-begin (so a server move arriving
|
|
/// mid-drag can't mutate it under us). Port of retail's <c>m_dragElement</c> +
|
|
/// <c>InqDropIconInfo</c> out-params (objId/container/flags, decomp 230533).
|
|
/// <para><c>SourceContainer</c> is intentionally NOT stored: the handler resolves the
|
|
/// LIVE container via <c>ClientObjectTable.Get(ObjId).ContainerId</c> at drop — the
|
|
/// same container id retail reads off the dragged element, single source of truth.</para>
|
|
/// </summary>
|
|
public sealed record ItemDragPayload(
|
|
uint ObjId, // dragged weenie guid (retail itemID, +0x5FC)
|
|
ItemDragSource SourceKind, // what kind of slot it left
|
|
int SourceSlot, // the source cell's SlotIndex (retail m_lastShortcutNumDragged)
|
|
UiItemSlot SourceCell); // back-ref: reorder-restore / clear source state / ghost
|