Mercurial > wow > recipeprofit
comparison core.lua @ 2:050ca47f9138 stable
Highlighting functions refined. Now displays * near items as well.
| author | Aaron Bregger |
|---|---|
| date | Thu, 12 Aug 2010 00:08:51 -0500 |
| parents | dceccfaf0a50 |
| children | cea137e9e8f0 |
comparison
equal
deleted
inserted
replaced
| 1:dceccfaf0a50 | 2:050ca47f9138 |
|---|---|
| 128 for i=1, MERCHANT_ITEMS_PER_PAGE, 1 do | 128 for i=1, MERCHANT_ITEMS_PER_PAGE, 1 do |
| 129 local buttonframe = _G["MerchantItem"..i]; | 129 local buttonframe = _G["MerchantItem"..i]; |
| 130 buttonframe:HookScript("OnUpdate", function(self) | 130 buttonframe:HookScript("OnUpdate", function(self) |
| 131 local buttonName = _G[self:GetName().."Name"]; | 131 local buttonName = _G[self:GetName().."Name"]; |
| 132 local link = GetMerchantItemLink(_G[self:GetName().."ItemButton"]:GetID()); | 132 local link = GetMerchantItemLink(_G[self:GetName().."ItemButton"]:GetID()); |
| 133 if(not link) then | |
| 134 return; | |
| 135 end | |
| 136 | |
| 133 local sName, sLink, iRarity, iLevel, iMinLevel, sType, sSubType, iStackCount = GetItemInfo(link) | 137 local sName, sLink, iRarity, iLevel, iMinLevel, sType, sSubType, iStackCount = GetItemInfo(link) |
| 134 | 138 |
| 135 if(sType == "Recipe" and safeRecipes[sName]) then | 139 if(sType == "Recipe" and safeRecipes[sName]) then |
| 136 SetItemButtonNameFrameVertexColor(self, 0, 0, 1.0); | 140 SetItemButtonNameFrameVertexColor(self, 0, 0, 1.0); |
| 137 SetItemButtonSlotVertexColor(self, 0, 0, 0.5); | 141 SetItemButtonSlotVertexColor(self, 0, 0, 0.5); |
| 142 buttonName:SetText("* " .. sName) | |
| 138 if(GetItemCount(link, true) == 0) then | 143 if(GetItemCount(link, true) == 0) then |
| 139 buttonName:SetTextColor(0,1,1); | 144 buttonName:SetTextColor(0,1,1); |
| 140 elseif(GetItemCount(link, true) < 5) then | 145 elseif(GetItemCount(link, true) < 5) then |
| 141 buttonName:SetTextColor(1,0,1); | 146 buttonName:SetTextColor(1,0,1); |
| 142 else | 147 else |
