changeset 28:da9bbf7b08c7

Fix worldmap update
author Aaron@Aaron-PC
date Sun, 22 Aug 2010 19:31:13 -0500
parents 85c7ff88e489
children 34e70bd042b1
files core.lua
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core.lua	Sun Aug 22 10:22:17 2010 -0500
+++ b/core.lua	Sun Aug 22 19:31:13 2010 -0500
@@ -235,7 +235,7 @@
     self:RegisterEvent("MERCHANT_SHOW",   "UpdateButtons")
     self:RegisterEvent("MERCHANT_UPDATE", "UpdateButtons")
     self:RegisterEvent("BAG_UPDATE",      "UpdateButtons")
-    
+  
     RecipeProfit:DoMerge()
 end  
 
@@ -246,6 +246,16 @@
 
 function RecipeProfit:UpdateButtons(event, ...)
     --print("UpdateButtons", event)
+    if(WorldMapFrame:IsShown()) then
+        local continent, zone = GetCurrentMapContinent(), GetCurrentMapZone()
+        SetMapZoom(continent)
+        SetMapZoom(continent, zone)
+    else
+        SetMapZoom(-1)
+    end
+    
+    GatherMate:GetModule("Display"):UpdateMaps()
+    
     if(not MerchantFrame:IsVisible()) then
         --print("UpdateButtons - (Event: ", event, ") - MerchantFrame not visible.");
         return;
@@ -324,6 +334,7 @@
         SetItemButtonNameFrameVertexColor(self, 0, 0, 1.0);
         SetItemButtonSlotVertexColor(self, 0, 0, 0.5);
         buttonName:SetText("* " .. sName)
+        
         if(GetItemCount(link, true) == 0) then
             buttonName:SetTextColor(0,1,1);
         elseif(GetItemCount(link, true) < 5) then
@@ -331,6 +342,7 @@
         else
             buttonName:SetTextColor(1,0,0);
         end
+
     else
         buttonName:SetTextColor(GameFontNormalSmall:GetTextColor());
     end