feat(learner): zone-scoped export; 200k entry cap; SmoothReset after import
QuestieLearnerExport: - Extract _Encode helper to consolidate serialize+deflate+encode - Add ExportZone(serverKey, zoneId) to export only the learned data for a specific zone (NPCs/objects with spawns in that zone, plus their dropped items and related quests) for smaller, faster exports - Cap ValidateImport at 200k entries to guard against pathological payloads that could stall the client during merge - Call SmoothReset after MergeImport so newly imported spawns appear on the map without requiring /reload QuestieOptionsDatabase: - Refresh AceConfigRegistry after import so Database tab stats update immediately (previously required /reload or opening Options) - Add Export Current Zone button tied to ExportZone()
This commit is contained in:
@@ -197,6 +197,12 @@ _OpenImportDialog = function()
|
||||
if ok then
|
||||
statusLabel:SetText("|cFF00FF00" .. msg .. "|r")
|
||||
importBtn:SetDisabled(true)
|
||||
-- Refresh the Database tab so the live stats counts update immediately
|
||||
-- (the map/minimap is already redrawn inside MergeImport via SmoothReset).
|
||||
local AceConfigRegistry = LibStub("AceConfigRegistry-3.0", true)
|
||||
if AceConfigRegistry and AceConfigRegistry.NotifyChange then
|
||||
AceConfigRegistry:NotifyChange("Questie")
|
||||
end
|
||||
else
|
||||
statusLabel:SetText("|cFFFF0000" .. msg .. "|r")
|
||||
end
|
||||
@@ -411,6 +417,26 @@ function QuestieOptions.tabs.database:Initialize()
|
||||
end,
|
||||
},
|
||||
|
||||
export_zone_btn = {
|
||||
type = "execute",
|
||||
order = 3.25,
|
||||
name = function() return l10n("Export Current Zone") end,
|
||||
desc = function() return "Export only the learned data for the zone you are standing in (NPCs/objects in the zone, plus the items they drop and quests they give)." end,
|
||||
func = function()
|
||||
local Exp = GetExportModule()
|
||||
if not Exp then
|
||||
Questie:Print("|cFFFF0000QuestieLearnerExport module not loaded.|r")
|
||||
return
|
||||
end
|
||||
local str, statsOrErr = Exp:ExportZone()
|
||||
if not str then
|
||||
Questie:Print("|cFFFF0000Export failed: " .. tostring(statsOrErr) .. "|r")
|
||||
else
|
||||
_OpenExportDialog(str, statsOrErr)
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
export_all_btn = {
|
||||
type = "execute",
|
||||
order = 3.3,
|
||||
|
||||
Reference in New Issue
Block a user