Signed-off-by: His Dad <John@hisdad.org>

His Dad [10-03-16 - 09:03]
Signed-off-by: His Dad <John@hisdad.org>
Filename
Doc/Changelog.txt
HistOffline.lua
data/Trial.lua
data/en/en.lua
history.txt
diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt
index e961f6c..d379815 100644
--- a/Doc/Changelog.txt
+++ b/Doc/Changelog.txt
@@ -1,3 +1,8 @@
+2016-10-04 version 24
+	A minor to fix to record time played.
+	Now records Leveling when Champion Points are earned. Looks a bit odd since that's account wide.
+	No Change to histoffline, but I'm starting work on the trials.
+
 2016-10-01 version 23
     No change to in-game client, histoffline code has been refactored.
 	The saved variables  data file format is unchanged. You can revert to an earlier version ok.
diff --git a/HistOffline.lua b/HistOffline.lua
index c1e0802..64c354e 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -14,10 +14,12 @@ local Colour_Heading_Complete = "#58FA58"

 --iup.SetGlobal("UTF8MODE","YES")
 -- ========================
-version= "23"
+version= "24"
 require( "iuplua" )
 require( "iupluacontrols" )
 dofile "../../SavedVariables/History.lua"
+Craglorn_Dat={}
+Craglorn_Order={"N","V","VH"}
 Grp_Dat={}

 Grp_Order={"1N","1V","1VH","2N","2V","2VH"}
@@ -194,7 +196,7 @@ for acc,_ in pairs(History_SV["Default"]) do
 		end
 		-- == Cumulative TimePlayed
 		if thischar.timeplayed == nil then
-			me.timeplayed = math.floor(thischar.levels[level].time/60)
+			me.timeplayed = math.floor(thischar.levels[level].time/60)   -- Old version compat
 		else
 			me.timeplayed = thischar.timeplayed
 		end
diff --git a/data/Trial.lua b/data/Trial.lua
index 593fb6a..ce5d98b 100644
--- a/data/Trial.lua
+++ b/data/Trial.lua
@@ -1,23 +1,50 @@

 trial_dat = {
 --Hel Ra Citadel Vet
-[870] = {L=1, C=1, key ="11"},
-[991] = {L=1, C=1,key ="11"},
-[1136] = {L=1, C=1, key ="11"},
-[1080] = {L=1, C=1, key ="11"},
+[870] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel: The War Horn",
+[991] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Completed",  "Defeat the Celestial Warrior, freeing him from the Serpent's control."
+[1136] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Difficult Mode","Defeat the Celestial Warrior after enraging him through the destruction of his statue army.",
+[1080] = {L=1, C=1, key ="11"},		-- "Time Trial: Hel Ra Citadel",

 --Aetherian Archive Vet
-[990] = {L=2, C=1, key ="21"},
-[1137] = {L=2, C=1, key ="21"},
-[1081] = {L=2, C=1, key ="21"},
+[990] = {L=2, C=1, key ="21"},		-- "Aetherian Archive Completed", "Defeat the Celestial Mage, freeing her from the Serpent's control."
+[1137] = {L=2, C=1, key ="21"},		-- "Aetherian Archive Difficult Mode" "Defeat the Celestial Mage after taunting her by smashing the Aetherial Orbs."
+[1081] = {L=2, C=1, key ="21"},		-- "Time Trial: Aetherian Archive",

 --Sanctum Ophidia Vet
-[1123] = {L=3, C=1, key ="31"},
-[1124] = {L=3, C=1, key ="31"},
-[1138] = {L=3, C=1, key ="31"},
+[1123] = {L=3, C=1, key ="31"},    -- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
+[1124] = {L=3, C=1, key ="31"},    -- "Time Trial: Sanctum Ophidia",
+[1138] = {L=3, C=1, key ="31"},    -- "Sanctum Ophidia Difficult Mode", Defeat the Celestial Serpent after desecrating the sacred banners of the Scaled Court",
 -- Craglorn Trials
---	[1139] = {L=3, C=1, key ="31"},
+
 --Dragonstar Arena Vet
 [992] = {L=4, C=1, key ="41"},
 [1140] = {L=4, C=1, key ="41"},
 }
+
+
+Craglorm_Conqueror = "" -- [1139] = "Craglorn Trials Conqueror" "Complete Hel Ra Citadel, Aetherian Archive, and Sanctum Ophidia at their highest difficulties.",
+
+Craglorn_Dat["N"].id = {
+[1474] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Conqueror",
+[1503] = {L=2, C=1, key ="21"},		-- "Aetherian Archive Conqueror" Defeat the Celestial Mage in Veteran Aetherian Archive, while the Trial is scaled to Champion 160.",
+[1462] = {L=3, C=1, key ="31"},		-- "Sanctum Ophidia Conqueror",
+}
+Craglorn_Dat["V"].id = {
+[991] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Completed",  "Defeat the Celestial Warrior, freeing him from the Serpent's control."
+[870] = {L=2, C=1, key ="21"},		-- "Hel Ra Citadel: The War Horn", "Sound the war horn in Veteran Hel Ra Citadel and defeat the ancient warriors who answer.",
+[1080] = {L=3, C=1, key ="31"},		-- "Time Trial: Hel Ra Citadel", "Completed the Hel Ra Citadel within a time limit of 33 minutes.",
+[990] = {L=4, C=1, key ="41"},		-- "Aetherian Archive Completed", "Defeat the Celestial Mage, freeing her from the Serpent's control."
+[1081] = {L=5, C=1, key ="51"},		-- "Time Trial: Aetherian Archive", "Completed the Aetherian Archive within a time limit of 33 minutes.",
+[1123] = {L=6, C=1, key ="61"},     -- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
+[1124] = {L=7, C=1, key ="71"},     -- "Time Trial: Sanctum Ophidia", "Completed the Sanctum Ophidia within a time limit of 33 minutes.",
+[992] = {L=8, C=1, key ="81"},		-- "Dragonstar Arena Champion",  "Conquer all challengers and earn the title of Dragonstar Arena Champion!",
+}
+Craglorn_Dat["VH"].id = {
+[1136] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Difficult Mode","Defeat the Celestial Warrior after enraging him through the destruction of his statue army.",
+[1137] = {L=2, C=1, key ="21"},		-- "Aetherian Archive Difficult Mode" "Defeat the Celestial Mage after taunting her by smashing the Aetherial Orbs."
+[1138] = {L=3, C=1, key ="31"},     -- "Sanctum Ophidia Difficult Mode", Defeat the Celestial Serpent after desecrating the sacred banners of the Scaled Court",
+[1140] = {L=4, C=1, key ="41"},		-- "Dragonstar Arena Conqueror", "Conquer all challengers on the increased difficulty version of Dragonstar Arena.",
+}
+
+
diff --git a/data/en/en.lua b/data/en/en.lua
index d53a962..3610b16 100644
--- a/data/en/en.lua
+++ b/data/en/en.lua
@@ -142,6 +142,7 @@ grp_names = {
 	["54"]= "Vaults of Madness",
 }

+Trial_Names= {}
 trial_names = {
 --Craglorn
 	["11"] = "Hel Ra Citadel",
@@ -149,6 +150,30 @@ trial_names = {
 	["31"] = "Sanctum Ophidia",
 	["41"] = "Dragonstar Arena",
 }
+
+Craglorn_Names= {}
+Craglorn_Names["N"] = {
+	["11"] = "Hel Ra Citadel Conqueror",
+	["21"] = "Aetherian Archive Conqueror",
+	["31"] = "Sanctum Ophidia Conqueror",
+}
+Craglorn_Names["V"] = {
+	["11"] = "Hel Ra Citadel Completed",
+	["21"] = "Hel Ra Citadel: The War Horn",
+	["31"] = "Time Trial: Hel Ra Citadel",
+	["41"] = "Aetherian Archive Completed",
+	["51"] = "Time Trial: Aetherian Archive",
+	["61"] = "Sanctum Ophidia Completed",
+	["71"] = "Time Trial: Sanctum Ophidia",
+	["81"] = "Dragonstar Arena Champion",
+}
+
+Craglorn_Names["VH"] = {
+	["11"] = "Hel Ra Citadel Difficult Mode"",
+	["21"] = "Aetherian Archive Difficult Mode",
+	["31"] = "Sanctum Ophidia Difficult Mode",
+	["41"] = "Dragonstar Arena Conqueror",
+}
 Locations = {
 --EP
 		["11"] = "Stonefalls",
diff --git a/history.txt b/history.txt
index 65bab65..e128a3c 100644
--- a/history.txt
+++ b/history.txt
@@ -1,6 +1,6 @@
 ## Title: Dad's History
 ## APIVersion: 100016 100017
-## Version: 23
+## Version: 24
 ## Author: HisDad
 ## Description: Record progress of all characters for offline viewing.
 ## SavedVariables: History_SV