From cac5b86345222e03263d9e1705ad634a5e6c20f8 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Thu, 21 Oct 2010 11:07:20 -0400 Subject: [PATCH] -Updates FixDB to remove old token data. --- BagSync.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/BagSync.lua b/BagSync.lua index 861da15..994520d 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -440,13 +440,17 @@ function BagSync:FixDB_Data() if BagSyncTOKEN_DB[realm] and BagSyncTOKEN_DB[realm][2] then BagSyncTOKEN_DB[realm][2] = nil end for k, v in pairs(rd) do - --token or points - for x, y in pairs(v) do - --token id or honor id - if x ~= "name" and x ~= "icon" and x ~= "header" then - if not storeUsers[realm][x] then - --if the user doesn't exist then delete data - BagSyncTOKEN_DB[realm][k][x] = nil + --5.1 check for old token data, if numeric then delete it + if tonumber(k) then + BagSyncTOKEN_DB[realm][k] = nil + else + --k = token name + for x, y in pairs(v) do + if x ~= "icon" and x ~= "header" then + if not storeUsers[realm][x] then + --if the user doesn't exist then delete data + BagSyncTOKEN_DB[realm][k][x] = nil + end end end end -- 1.7.9.5