# HG changeset patch # User Aaron@Aaron-PC # Date 1282523473 18000 # Node ID da9bbf7b08c7ff9fece5a4197cc24547f9bcf905 # Parent 85c7ff88e489e428e1bba8dd84220776168de0cd Fix worldmap update diff -r 85c7ff88e489 -r da9bbf7b08c7 core.lua --- 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