Potential fix for multiple account bug (Bug ID 945).

Khaibit [07-11-14 - 02:23]
Potential fix for multiple account bug (Bug ID 945).
Filename
Shopkeeper.lua
diff --git a/Shopkeeper.lua b/Shopkeeper.lua
index 33275b6..b2c1734 100644
--- a/Shopkeeper.lua
+++ b/Shopkeeper.lua
@@ -1,5 +1,5 @@
 -- Shopkeeper Main Addon File
--- Last Updated July 7, 2014
+-- Last Updated July 8, 2014
 -- Written July 2014 by Dan Stone (@khaibit) - dankitymao@gmail.com
 -- Released under terms in license accompanying this file.
 -- Distribution without license is prohibited!
@@ -529,8 +529,8 @@ function Shopkeeper.DoSearch(searchText)
           for i = 1, 3 do
             local fixedTerm = result[i]
             if i == 3 then
-              -- Need to do something here or elsewhere to get text name out of link
-              -- Can we build a tooltip offscreen and grab the text line from that somehow?
+              -- Once 1.3.0 is live:
+              -- fixedTerm = GetItemLinkName(fixedTerm)
               local itName = fixedTerm
             end

@@ -799,6 +799,8 @@ function Shopkeeper.DoReset()
   Shopkeeper.DisplayRows()
   Shopkeeper:ScanStores(true, false)
   CHAT_SYSTEM:AddMessage("[Shopkeeper] " .. Shopkeeper.translate('resetDone'))
+  d(Shopkeeper.GetAccountName())
+  d("ShopkeeperAccountVars" .. Shopkeeper.GetAccountName())
 end

 -- Set up the main window and the additional button added to the guild store interface
@@ -940,8 +942,8 @@ function Shopkeeper:Initialize()
     ["scanHistory"] = {},
   }

-  self.savedVariables = ZO_SavedVars:New("ShopkeeperSavedVars", 1, nil, Defaults)
-  self.acctSavedVariables = ZO_SavedVars:NewAccountWide("ShopkeeperSavedVars", 1, nil, acctDefaults)
+  self.savedVariables = ZO_SavedVars:New("ShopkeeperSavedVars", 1, Shopkeeper.GetAccountName(), Defaults)
+  self.acctSavedVariables = ZO_SavedVars:NewAccountWide("ShopkeeperSavedVars", 1, Shopkeeper.GetAccountName(), acctDefaults)
   self.ScanResults = Shopkeeper.acctSavedVariables.scanHistory

   self:LibAddonInit()