comparison SecureMenu.lua @ 93:c369a2e16ab6

Added prospecting and common data
author contrebasse
date Thu, 19 May 2011 20:25:41 +0200
parents 996aaa818d04
children e3147b41ea9d
comparison
equal deleted inserted replaced
92:c1214d48fa1c 93:c369a2e16ab6
262 end 262 end
263 btn.itemName:SetText(name) 263 btn.itemName:SetText(name)
264 btn.icon:SetTexture(texture) 264 btn.icon:SetTexture(texture)
265 265
266 -- Set chance to have the item or the number of items created 266 -- Set chance to have the item or the number of items created
267 btn.resultNumber:Hide()
267 if reagent[3] then 268 if reagent[3] then
268 if reagent[3]<1 then 269 if reagent[3]<1 then
269 btn.resultNumber:SetText((reagent[3]*100).."%") 270 btn.resultNumber:SetText((reagent[3]*100).."%")
271 btn.resultNumber:Show()
270 elseif reagent[4] and reagent[3]~=reagent[4] then 272 elseif reagent[4] and reagent[3]~=reagent[4] then
271 btn.resultNumber:SetText(math.min(reagent[3],reagent[4]).."-"..math.max(reagent[3],reagent[4])) 273 btn.resultNumber:SetText(math.min(reagent[3],reagent[4]).."-"..math.max(reagent[3],reagent[4]))
274 btn.resultNumber:Show()
272 elseif reagent[3]>1 then 275 elseif reagent[3]>1 then
273 btn.resultNumber:SetText(reagent[3]) 276 btn.resultNumber:SetText(reagent[3])
277 btn.resultNumber:Show()
274 end 278 end
275 end 279 end
276 280
277 -- Save params 281 -- Save params
278 btn.itemID = itemID 282 btn.itemID = itemID
337 -- Special spell 341 -- Special spell
338 existsValidEntries = true 342 existsValidEntries = true
339 noSkipped = menuAddItem(reagent.macro,itemID,reagent) and noSkipped 343 noSkipped = menuAddItem(reagent.macro,itemID,reagent) and noSkipped
340 else 344 else
341 -- Standard tradeskill spell 345 -- Standard tradeskill spell
342 if reagent.spellName == A.currentTradeSkill then 346 if not reagent.spellName or reagent.spellName == A.currentTradeSkill then
343 existsValidEntries = true 347 existsValidEntries = true
344 noSkipped = menuAddItem(A.craft,itemID,reagent) and noSkipped 348 noSkipped = menuAddItem(A.craft,itemID,reagent) and noSkipped
345 end 349 end
346 end -- if 350 end -- if
347 end -- for 351 end -- for