Add Shift+Right Click Hand Over to NPCs (quest/dialogue)
Release / build-release (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 00:57:09 -05:00
parent a9bec8daed
commit a567c3293f
5 changed files with 26 additions and 5 deletions
+19 -2
View File
@@ -33,6 +33,7 @@ internal static unsafe class ContextMenuHandler
Sort, Sort,
Trade, Trade,
Sell, Sell,
HandOver,
} }
public static bool ContextLabelMatches(AutoContextAction desiredAction, string menuText) public static bool ContextLabelMatches(AutoContextAction desiredAction, string menuText)
@@ -92,6 +93,11 @@ internal static unsafe class ContextMenuHandler
t.StartsWith("Sell", StringComparison.OrdinalIgnoreCase) || t.StartsWith("Sell", StringComparison.OrdinalIgnoreCase) ||
(Has(t, "Sell") && Has(t, "Item")), (Has(t, "Sell") && Has(t, "Item")),
AutoContextAction.HandOver =>
t.Equals("Hand Over", StringComparison.OrdinalIgnoreCase) ||
(Has(t, "Hand") && Has(t, "Over")) ||
(Has(t, "Hand Over") && Has(t, "Item")),
_ => false, _ => false,
}; };
} }
@@ -117,8 +123,8 @@ internal static unsafe class ContextMenuHandler
// Single-pass: decode each label once, record first match per action. // Single-pass: decode each label once, record first match per action.
var foundAny = false; var foundAny = false;
int removeIdx = -1, addIdx = -1, placeIdx = -1, returnIdx = -1, entrustIdx = -1, retrieveIdx = -1, companyRemoveIdx = -1, splitIdx = -1, tradeIdx = -1, sellIdx = -1; int removeIdx = -1, addIdx = -1, placeIdx = -1, returnIdx = -1, entrustIdx = -1, retrieveIdx = -1, companyRemoveIdx = -1, splitIdx = -1, tradeIdx = -1, sellIdx = -1, handOverIdx = -1;
string? removeTxt = null, addTxt = null, placeTxt = null, returnTxt = null, entrustTxt = null, retrieveTxt = null, companyRemoveTxt = null, splitTxt = null, tradeTxt = null, sellTxt = null; string? removeTxt = null, addTxt = null, placeTxt = null, returnTxt = null, entrustTxt = null, retrieveTxt = null, companyRemoveTxt = null, splitTxt = null, tradeTxt = null, sellTxt = null, handOverTxt = null;
var max = Math.Min(agent->ContextItemCount, 64); var max = Math.Min(agent->ContextItemCount, 64);
for (var i = 0; i < max; i++) for (var i = 0; i < max; i++)
@@ -201,6 +207,12 @@ internal static unsafe class ContextMenuHandler
sellIdx = i; sellIdx = i;
sellTxt = text; sellTxt = text;
} }
if (handOverIdx < 0 && ContextLabelMatches(AutoContextAction.HandOver, text))
{
handOverIdx = i;
handOverTxt = text;
}
} }
if (!foundAny) if (!foundAny)
@@ -232,6 +244,11 @@ internal static unsafe class ContextMenuHandler
{ {
chosen = companyRemoveIdx >= 0 ? (companyRemoveIdx, companyRemoveTxt) : (-1, (string?)null); chosen = companyRemoveIdx >= 0 ? (companyRemoveIdx, companyRemoveTxt) : (-1, (string?)null);
} }
else if (mode == ModifierMode.Shift && handOverIdx >= 0)
{
// Quest/dialogue: hand over item to NPC
chosen = (handOverIdx, handOverTxt);
}
else if (mode == ModifierMode.Ctrl) else if (mode == ModifierMode.Ctrl)
{ {
chosen = returnIdx >= 0 ? (returnIdx, returnTxt) : chosen = returnIdx >= 0 ? (returnIdx, returnTxt) :
+1 -1
View File
@@ -3,7 +3,7 @@
"Name": "QuickTransfer", "Name": "QuickTransfer",
"InternalName": "QuickTransfer", "InternalName": "QuickTransfer",
"AssemblyVersion": "1.0.5.0", "AssemblyVersion": "1.0.5.0",
"Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest.", "Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest, Hand Over to NPCs.",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"RepoUrl": "https://github.com/Knack117/QuickTransfer", "RepoUrl": "https://github.com/Knack117/QuickTransfer",
"Tags": [ "Tags": [
+1
View File
@@ -138,6 +138,7 @@ public class QuickTransferWindow : Window, IDisposable
ImGui.BulletText("Inventory + Armoury (no special container): (Gear) Inventory → \"Place in Armoury Chest\", Armoury → \"Return to Inventory\""); ImGui.BulletText("Inventory + Armoury (no special container): (Gear) Inventory → \"Place in Armoury Chest\", Armoury → \"Return to Inventory\"");
ImGui.BulletText("Company Chest (FreeCompanyChest) open: Shift+RClick Inventory/Armoury deposits, Shift+RClick Company Chest withdraws (\"Remove\")"); ImGui.BulletText("Company Chest (FreeCompanyChest) open: Shift+RClick Inventory/Armoury deposits, Shift+RClick Company Chest withdraws (\"Remove\")");
ImGui.BulletText("Vendor Shop open: Shift+RClick to auto-select \"Sell\"; enable \"Auto-confirm vendor sell\" to auto-fill quantity and confirm."); ImGui.BulletText("Vendor Shop open: Shift+RClick to auto-select \"Sell\"; enable \"Auto-confirm vendor sell\" to auto-fill quantity and confirm.");
ImGui.BulletText("Quest/dialogue: Shift+RClick on an item to auto-select \"Hand Over\" when handing items to an NPC.");
ImGui.BulletText("Middle-Click: Sort the clicked container when a \"Sort\" menu entry exists. In Company Chest, MMB runs an organize pass (stack + compact)."); ImGui.BulletText("Middle-Click: Sort the clicked container when a \"Sort\" menu entry exists. In Company Chest, MMB runs an organize pass (stack + compact).");
ImGui.BulletText("Use /qt or click 'Open Config' in plugin list to reopen this window"); ImGui.BulletText("Use /qt or click 'Open Config' in plugin list to reopen this window");
+4 -1
View File
@@ -2,7 +2,7 @@
A Dalamud plugin for Final Fantasy XIV that adds quick inventory actions via the game's existing context menus: A Dalamud plugin for Final Fantasy XIV that adds quick inventory actions via the game's existing context menus:
- **Shift + Right Click**: quick transfers (including vendor sell when shop is open) - **Shift + Right Click**: quick transfers (including vendor sell when shop is open, and Hand Over to NPCs in quest/dialogue)
- **Ctrl + Right Click**: armoury-mode transfers (when a special container is open) - **Ctrl + Right Click**: armoury-mode transfers (when a special container is open)
- **Alt + Right Click**: split a stack in half - **Alt + Right Click**: split a stack in half
@@ -12,6 +12,7 @@ A Dalamud plugin for Final Fantasy XIV that adds quick inventory actions via the
- **Vendor Quick Sell**: With a vendor shop open, Shift + Right Click auto-selects **Sell**. With **Auto-confirm vendor sell** enabled, quantity dialogs and "Are you certain?" confirmations are auto-filled and confirmed - **Vendor Quick Sell**: With a vendor shop open, Shift + Right Click auto-selects **Sell**. With **Auto-confirm vendor sell** enabled, quantity dialogs and "Are you certain?" confirmations are auto-filled and confirmed
- **Trade Window Support**: Shift + Right Click items from inventory into Trade window with auto-fill max quantity - **Trade Window Support**: Shift + Right Click items from inventory into Trade window with auto-fill max quantity
- **Company Chest**: Shift + Right Click to deposit/withdraw when Free Company Chest is open; middle-click runs organize (stack + compact) - **Company Chest**: Shift + Right Click to deposit/withdraw when Free Company Chest is open; middle-click runs organize (stack + compact)
- **Hand Over to NPCs**: During quest or dialogue that requires handing over items, Shift + Right Click on the item to auto-select **Hand Over**
- **Armoury Mode**: Hold Ctrl and right-click to prioritize armoury actions while a special container is open - **Armoury Mode**: Hold Ctrl and right-click to prioritize armoury actions while a special container is open
- **Split Half**: Hold Alt and right-click to split a stack and auto-fill half - **Split Half**: Hold Alt and right-click to split a stack and auto-fill half
- **Middle-Click Sort**: Middle-click an item to auto-select **Sort** (or organize in FC chest) - **Middle-Click Sort**: Middle-click an item to auto-select **Sort** (or organize in FC chest)
@@ -65,6 +66,8 @@ The plugin only clicks **existing** context menu options when they are available
- With a vendor shop open, Shift + Right Click → **Sell**. Enable **Auto-confirm vendor sell** to auto-fill quantity and click OK on "Are you certain?" dialogs. - With a vendor shop open, Shift + Right Click → **Sell**. Enable **Auto-confirm vendor sell** to auto-fill quantity and click OK on "Are you certain?" dialogs.
- **Company Chest (Free Company Chest)** - **Company Chest (Free Company Chest)**
- Shift + Right Click Inventory/Armoury → deposit; Shift + Right Click Company Chest → **Remove** (withdraw) - Shift + Right Click Inventory/Armoury → deposit; Shift + Right Click Company Chest → **Remove** (withdraw)
- **Hand Over to NPCs (quest/dialogue)**
- When an NPC is asking for items (e.g. quest turn-in), Shift + Right Click the item → **Hand Over**
If an option is not present for the clicked item, **nothing happens**. If an option is not present for the clicked item, **nothing happens**.
+1 -1
View File
@@ -4,7 +4,7 @@
"Name": "QuickTransfer", "Name": "QuickTransfer",
"InternalName": "QuickTransfer", "InternalName": "QuickTransfer",
"AssemblyVersion": "1.0.5.0", "AssemblyVersion": "1.0.5.0",
"Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest.", "Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest, Hand Over to NPCs.",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"RepoUrl": "https://github.com/Knack117/QuickTransfer", "RepoUrl": "https://github.com/Knack117/QuickTransfer",
"DalamudApiLevel": 14, "DalamudApiLevel": 14,