diff --git a/HistOffline.lua b/HistOffline.lua
index feb4850..20e0fae 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -252,7 +252,7 @@ end
dung.pub = {}
dung.grp = {}
dung.vet = {}
- dung.trial = {}
+ dung.trials = {}
-- a table for each dungeon to which we add characters
@@ -262,7 +262,7 @@ end
end
for _,i in ipairs(trial2key) do
- dung.trial[i] = {}
+ dung.trials[i] = {}
end
for _,i in ipairs(vet2key) do
@@ -382,17 +382,11 @@ end
end
local key = ""
- local dname = ""
for id,_ in pairs (grp_dat) do
local L = grp_dat[id].L
local C = grp_dat[id].C
key = tostring(L).. tostring(C) -- make name key
- dname = grp_names[key]
- if dname == nil then
- dname = "key " .. key .." not found"
- end
- -- print(key .. " " .. dname)
- me.Grp_box:setcell(L, C, dname)
+ me.Grp_box:setcell(L, C, grp_names[key])
end
me.Grp_box.Redraw= "ALL"
@@ -473,12 +467,8 @@ end
local L = vet_dat[id].L
local C = vet_dat[id].C
key = tostring(L) .. tostring(C) -- make name key
- dname = grp_names[key] -- Vet Dungeons are grp
- if dname == nil then
- print("vet key " .. key .." not found")
- end
Vet_Info[key] = {count = 0}
- me.Vet_box:setcell(L,C,dname .. " (0)")
+ me.Vet_box:setcell(L,C,grp_names[key] .. " (0)")
end
@@ -529,7 +519,6 @@ end
for id,_ in pairs (trial_dat) do -- For Achievements we have..
- print ("chech " .. type(id))
if thischar.ach[id] ~= nil then
local L = trial_dat[id].L
local C = trial_dat[id].C
@@ -539,7 +528,6 @@ end
key = tostring(L) .. tostring(C) -- make name key
dname = trial_names[key]
- print ("fiund " .. dname)
-- Increment count and display
Trials_Info[key].count = Trials_Info[key].count+1
me.Trials_box:setcell(L,C, " (" .. Trials_Info[key].count ..")")
@@ -934,14 +922,14 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab)
dung.Grp_box = {}
dung.Grp_box = iup.matrix {numcol=#accounts[acc].names, numlin=#grp2key, widthdef=90}
--Set Line titles
- for i=1, #grp2key do
- dung.Grp_box:setcell(i, 0, grp_names[grp2key[i]])
+ for i, key in ipairs(grp2key) do
+ dung.Grp_box:setcell(i, 0, grp_names[key])
end
--set lines
dung.Grp_box:setcell(0,0, L.Location)
--Create Columns for Chars
- for i =1, #accounts[acc].names do
- dung.Grp_box:setcell(0, i, accounts[acc].names[i])
+ for i,char in ipairs(accounts[acc].names) do
+ dung.Grp_box:setcell(0, i, char)
end
iup.SetAttribute(dung.Grp_box, "READONLY", "YES")
@@ -978,21 +966,21 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab)
dung.Vet_box:setcell(0,0, L.Location)
--Create Columns for Chars
- for line,char in ipairs(accounts[acc].names_vet) do
- dung.Vet_box:setcell(0, line, char)
- --Done it??
- if dung.vet[key] == nil then
- print (key)
- end
- --[[ if dung.vet[key][char] == nil then
- dung.Vet_box:setcell(line,col, "N")
+ for line,key in ipairs(vet2key) do -- over each dungeon
+ -- does that char exist in the table.
+ for i,char in ipairs(accounts[acc].names_vet) do -- over each char in order
+ if dung.vet[key] == nil then
+ print ("key: " .. key .. " missing")
+ end
+ if dung.vet[key][char] == nil then
+ dung.Vet_box:setcell(line,i, "N")
else
- dung.Vet_box:setcell(line,col, "Y")
- end --]]
-
+ dung.Vet_box:setcell(line,i, "Y")
+ end
+ end
+ end
- end --]]
iup.SetAttribute(dung.Vet_box, "READONLY", "YES")
diff --git a/data/data.lua b/data/data.lua
index 8963612..f271af2 100644
--- a/data/data.lua
+++ b/data/data.lua
@@ -105,7 +105,7 @@
-- []= {L=5, C=4},
}
-trial_dat = {
+ trial_dat = {
--Hel Ra Citadel
[991] = {L=1, C=1},
[1136] = {L=1, C=1},