Changed data export method to be a bit more streamlined. Not all data will be exported and a purge will not clear the data. This is for my use only, so I will have no pity on the fool who sets export to true and then complains about the memory usage.
Cette révision appartient à :
Parent
0b8d9b7f81
révision
087f25681e
|
@ -10,7 +10,7 @@
|
|||
## Version: 4.0.1.$svnversion$
|
||||
## Dependencies: QHData-base
|
||||
## OptionalDeps: Cartographer_Waypoints, TomTom, Cartographer_InstanceMaps, !Swatter, tekticles, UnicodeFont, ClearFont2
|
||||
## SavedVariables: QuestHelper_Pref QuestHelper_UID QuestHelper_SaveDate QuestHelper_Errors QuestHelper_Collector QuestHelper_Collector_Version
|
||||
## SavedVariables: QuestHelper_Pref QuestHelper_UID QuestHelper_SaveDate QuestHelper_Errors QuestHelper_Collector QuestHelper_Collector_Version QHDB_Export
|
||||
## SavedVariablesPerCharacter: QuestHelper_KnownFlightRoutes QuestHelper_Home QuestHelper_CharVersion QuestHelper_Flight_Updates
|
||||
## X-Website: http://www.quest-helper.com/
|
||||
## X-Embeds: AstrolabeQH, ChatThrottleLib
|
||||
|
|
|
@ -2,7 +2,8 @@ QuestHelper_File["db_get.lua"] = "4.0.1.$svnversion$"
|
|||
QuestHelper_Loadtime["db_get.lua"] = GetTime()
|
||||
|
||||
local dev_mode = (QuestHelper_File["db_get.lua"] == "Development Version")
|
||||
|
||||
QHDB_Export = {}
|
||||
local export = false
|
||||
-- yoink
|
||||
--[[
|
||||
local QHDB_temp = QHDB
|
||||
|
@ -200,7 +201,8 @@ function DB_GetItem(group, id, silent, register)
|
|||
if ite then
|
||||
frequencies[ite] = (frequencies[ite] or 0) + (register and 1 or 1000000000) -- effectively infinity
|
||||
end
|
||||
|
||||
|
||||
if export then QHDB_Export[group][id] = ite end
|
||||
return ite
|
||||
end
|
||||
|
||||
|
@ -274,30 +276,3 @@ function DB_DumpItems()
|
|||
end
|
||||
return dt
|
||||
end
|
||||
|
||||
function DB_PrintTable(tbl, idt)
|
||||
for k, v in pairs(tbl) do
|
||||
if type(v) ~= "table" then
|
||||
print(idt .. tostring(k) .. " = " .. tostring(v))
|
||||
else
|
||||
print(idt .. tostring(k) .. " =")
|
||||
DB_PrintTable(v, idt .. " ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function DB_Export()
|
||||
for group, _ in pairs(QHDB) do
|
||||
print(group)
|
||||
for idx = 1, 99999 do
|
||||
if DB_HasItem(group, idx) then
|
||||
local ite = DB_GetItem(group, idx)
|
||||
if type(ite) == "table" then
|
||||
DB_PrintTable(ite, " ")
|
||||
else
|
||||
print(ite)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Référencer dans un nouveau ticket