V37 ready for morrowwind

His Dad [05-21-17 - 06:32]
V37 ready for morrowwind
Filename
Delete-Character.lua
Doc/Changelog.txt
diff --git a/Delete-Character.lua b/Delete-Character.lua
index 26ca4ef..74c6102 100644
--- a/Delete-Character.lua
+++ b/Delete-Character.lua
@@ -17,7 +17,7 @@ local dateformat_log = "%Y-%m-%d-%H-%M-%S"

 --iup.SetGlobal("UTF8MODE","YES")
 -- ========================
-version= "21"
+version= "22"
 require( "iuplua" )
 require( "iupluacontrols" )
 dofile "../../SavedVariables/History.lua"
@@ -114,66 +114,27 @@ if account == nil then
 --	os.exit()
 end

--- Select Server

-world_list = {}		-- String list for selection dialog
-nworlds = 0
-for i,j in pairs(History_SV["Default"][account]["$AccountWide"]["worlds"]) do
-	nworlds = nworlds +1
-	table.insert(world_list, i)
-end
-
-
--- insert marker for older chars
-table.insert(world_list, "##NEITHER##")

-if nworlds > 1 then
-	local selected = iup.ListDialog (1, L.ChooseWorld,
-			nworlds+1,	--Size
-			world_list,
-			1, --Initial
-			1,nworlds+1	--MaxCol MaxLine
-			)

-	if selected <0 then
-		iup.Close()
-	--	os.exit()
-	end
-	world = world_list[selected+1]
-end


 playerNames = {}
 playerName2ID={}

-if world == "##NEITHER##" then
-
-	  for playerID, j in pairs(History_SV["Default"][account]["$AccountWide"]["data"]) do
-		if j.world == nil  then
-			  if j.name == nil then
-				table.insert(playerNames, playerID)   -- old Style
-				playerName2ID[playerID] = playerID
-			  else
-				table.insert(playerNames, j.name)
-				playerName2ID[j.name] = playerID
-			  end
-		end
-	  end
-
-else
-	  for playerID, j in pairs(History_SV["Default"][account]["$AccountWide"]["data"]) do
-		if j.world == world then
-			  if j.name == nil then
-				table.insert(playerNames, playerID)   -- old Style
-				playerName2ID[playerID] = playerID
-			  else
-				table.insert(playerNames, j.name)
-				playerName2ID[j.name] = playerID
-			  end
-		end
-	  end
+
+for playerID, j in pairs(History_SV["Default"][account]["$AccountWide"]["data"]) do
+  if j.name == nil then
+	table.insert(playerNames, playerID)   -- old Style
+	playerName2ID[playerID] = playerID
+  else
+	table.insert(playerNames, j.name)
+	playerName2ID[j.name] = playerID
+  end
+
 end

+
 -- No players.
 if #playerNames ==  0 then
     print ("Payer names")
@@ -189,7 +150,7 @@ selected = iup.ListDialog (1, L.ChooseChartoDelete,
 			)

 if selected <0 then
-    print ("n ot Selected")
+    print ("not Selected")
 --	iup.Close()		-- Cancelled
 --	os.exit()
 end
diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt
index ffb40b2..518fbb0 100644
--- a/Doc/Changelog.txt
+++ b/Doc/Changelog.txt
@@ -1,5 +1,6 @@
-2017-04-24 version 37
+2017-05-21 version 37
 	API Bump
+	Fixed up old character deletion. Decided to keep it simple and not worry about servers.

 2017-02-11 version 36
 	Fixed bug for crash starting new character
@@ -39,7 +40,7 @@
 	Fix for Wrong Achievements on some mode II veteran dungeons

 2016-11-26 version 27
-	Internal changes. Unused achievement catgories not saved.
+	Internal changes. Unused achievement categories not saved.
 	Now recording levelling again.
 	had been broken for ages and no one noticed, even me.
 	The savedvariables files should be smaller.