From 027e695481127e6a15ffa73e8fb934046671cd1d Mon Sep 17 00:00:00 2001 From: nikolos89 <39451364+nikolos89@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:23:57 +0300 Subject: [PATCH] fix(gm-commands): refresh cached stash inventories after item_tab --- mods.json | 2 +- mods/gm-commands/GmCommands.cs | 6 +++--- mods/gm-commands/README.md | 4 +++- mods/gm-commands/mod.json | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mods.json b/mods.json index 4b07959..77b83d5 100644 --- a/mods.json +++ b/mods.json @@ -4,7 +4,7 @@ { "id": "backpack", "name": "Extra Backpack", "description": "An optional native 20-slot extra backpack for every character class.", "author": "zj1022", "version": "1.0.3", "compatibleClientVersions": ["0.5.1-beta"], "kind": "feature", "type": "script", "path": "mods/backpack", "depends": [], "settings": false }, { "id": "fastcampaign", "name": "Fast Campaign", "description": "A faster campaign: 5x kill experience, +50% movement speed, and /fast lists the commands that skip ahead.", "author": "LocalExile", "version": "1.1.3", "compatibleClientVersions": ["0.4.3-beta", "0.5.0-beta", "0.5.1-beta"], "kind": "feature", "type": "project", "path": "mods/fastcampaign", "depends": [], "settings": true }, { "id": "globalchat", "name": "Global Chat", "description": "Talk to other LocalExile players: global, trade and whisper chat go through the LocalExile global chat server.", "author": "JetStream", "version": "1.1.3", "compatibleClientVersions": ["0.4.3-beta", "0.5.0-beta", "0.5.1-beta"], "kind": "feature", "type": "project", "path": "mods/globalchat", "depends": [], "settings": true }, - { "id": "gm-commands", "name": "GM Commands", "description": "The development and testing chat commands: teleport, items, monsters, experience, quest flags, test hits and protocol probes.", "author": "LocalExile", "version": "1.4.0", "compatibleClientVersions": ["0.5.2-beta"], "kind": "feature", "type": "project", "path": "mods/gm-commands", "depends": ["Game"], "settings": false }, + { "id": "gm-commands", "name": "GM Commands", "description": "The development and testing chat commands: teleport, items, monsters, experience, quest flags, test hits and protocol probes.", "author": "LocalExile", "version": "1.4.1", "compatibleClientVersions": ["0.5.2-beta"], "kind": "feature", "type": "project", "path": "mods/gm-commands", "depends": ["Game"], "settings": false }, { "id": "itemquantity", "name": "Item Quantity", "description": "10 times as many item drops from every kill.", "author": "LocalExile", "version": "1.1.3", "compatibleClientVersions": ["0.4.3-beta", "0.5.0-beta", "0.5.1-beta"], "kind": "feature", "type": "project", "path": "mods/itemquantity", "depends": [], "settings": true }, { "id": "itemrarity", "name": "Item Rarity", "description": "10 times the chance of magic, rare and unique equipment.", "author": "LocalExile", "version": "1.1.3", "compatibleClientVersions": ["0.4.3-beta", "0.5.0-beta", "0.5.1-beta"], "kind": "feature", "type": "project", "path": "mods/itemrarity", "depends": [], "settings": true }, { "id": "liveeconomy", "name": "Live Economy", "description": "Faustus's Currency Exchange as a live market: the official Path of Exile leagues' prices, a spread, depth, and orders that fill with time.", "author": "JetStream", "version": "1.1.3", "compatibleClientVersions": ["0.4.3-beta", "0.5.0-beta", "0.5.1-beta"], "kind": "feature", "type": "project", "path": "mods/liveeconomy", "depends": [], "settings": true }, diff --git a/mods/gm-commands/GmCommands.cs b/mods/gm-commands/GmCommands.cs index cdc5bde..493d052 100644 --- a/mods/gm-commands/GmCommands.cs +++ b/mods/gm-commands/GmCommands.cs @@ -488,9 +488,9 @@ await Send(remote, stream, ciphers, InstanceItems.InventoryChange(stash.Inventor return; } var now = fill.Changed.Concat(fill.Added).ToList(); - if (now.Count > 0 && TabsSentOf(conn, stash).Contains(tab)) - await Send(remote, stream, ciphers, InstanceItems.InventoryChange(stash.InventoryOf(tab), stash.NextRevision(tab), - [.. fill.Changed.Select(i => i.Id)], now), $"0x00bf stash tab {tab}: /item_tab {stash.NameOf(tab)} {amount}, {now.Count} slot(s)"); + if (now.Count > 0) + await SendTabChange(remote, stream, ciphers, conn, stash, tab, + [.. fill.Changed.Select(i => i.Id)], now, $"0x00bf stash tab {tab}: /item_tab {stash.NameOf(tab)} {amount}, {now.Count} slot(s)"); await conn.Commands!.Reply($"Tab \"{stash.NameOf(tab)}\" ({stash.TypeOf(tab)}): up to {amount} more of {now.Count} item type(s)" + (requested > amount ? $" (at most {ItemTabMax} at a time)" : "") + (fill.Full > 0 ? $"; {fill.Full} slot(s) already full" : "") + diff --git a/mods/gm-commands/README.md b/mods/gm-commands/README.md index 31e8323..8f736df 100644 --- a/mods/gm-commands/README.md +++ b/mods/gm-commands/README.md @@ -40,7 +40,9 @@ as "Nothingness". Each `mod` is the Mods Id of an affix: a notable, or an "also LocalExile's own dev scripts (the campaign driver, the level generator's tour loop, `client_control.py`) and Waypoint's item crafter send these commands: install this mod for them. -Works with: 1.4.0 needs LocalExile v0.5.2-beta (`/cluster_jewel` uses its `ClusterJewels`, LocalExile/LocalExile#948). 1.3.0 needs LocalExile v0.5.1-beta (`/stash_add` uses LocalExile/LocalExile#891, and the server's monster calls +Slotted-tab `/item_tab` fills refresh unloaded inventories before publishing their changes, including tabs kept in the client cache. Existing items are preserved; quantities are added only once. + +Works with: 1.4.1 and 1.4.0 need LocalExile v0.5.2-beta (`/cluster_jewel` uses its `ClusterJewels`, LocalExile/LocalExile#948). 1.3.0 needs LocalExile v0.5.1-beta (`/stash_add` uses LocalExile/LocalExile#891, and the server's monster calls changed). 1.1.3 works with v0.4.3-beta and v0.5.0-beta, not v0.5.1-beta: there its `/spawn_mob` fails and ends the connection. 1.1.2 works with v0.4.3-beta, the first with the client-table API it reads (LocalExile/LocalExile#862). Mods reach what modules reach from v0.4.0-beta (LocalExile/LocalExile#815); not v0.3.0-beta or earlier. diff --git a/mods/gm-commands/mod.json b/mods/gm-commands/mod.json index 585ea38..2bf8b27 100644 --- a/mods/gm-commands/mod.json +++ b/mods/gm-commands/mod.json @@ -3,7 +3,7 @@ "name": "GM Commands", "description": "The development and testing chat commands: teleport, items, monsters, experience, quest flags, test hits and protocol probes.", "author": "LocalExile", - "version": "1.4.0", + "version": "1.4.1", "compatibleClientVersions": ["0.5.2-beta"], "kind": "feature", "depends": ["Game"]