savedvariables refactoring

This commit is contained in:
Manuel Simon Hirsig
2017-03-18 12:24:20 +01:00
parent 57543230f3
commit 1829ce6374
10 changed files with 89 additions and 86 deletions
+16
View File
@@ -39,6 +39,22 @@ function LOAD()
end)
end
do
local characters = empty
function M.is_player(name)
return characters[name] and true or false
end
function LOAD2()
characters = persistence.realm'characters'
for k, v in characters do
if GetTime() > v + 60 * 60 * 24 * 30 then
characters[k] = nil
end
end
characters[UnitName'player'] = GetTime()
end
end
do
local sell_scan_queued, incomplete_buy_data
function on_merchant_show()