I downloaded Bang Bang! just to check it out and the design is simply atrocious. Ever heard of
local variables?
Because it's basically 100% spaghetti coded you must be using a ton of memory compared to what you should be using for a mod like this.
Also, why would you put a
Sell Junk button in an addon aimed towards recounting your PvP activity?
Lua Code:
-- found in core.lua
function VENDER()
total = 0
for bolsos = 0,4 do
for huecos = 1, GetContainerNumSlots(bolsos) do
producto = GetContainerItemLink(bolsos, huecos)
if producto then
_, _, raro, _, _, _, _, _, _, _, precio = GetItemInfo(producto)
_, items = GetContainerItemInfo(bolsos, huecos)
if raro == 0 and precio ~= 0 then
total = total + (precio * items)
print("|cff555555Sold "..items.." "..producto.. " |cff555555" .. GetCoinTextureString(precio * items))
UseContainerItem(bolsos, huecos)
end
end
end
end
if total ~= 0 then
print("|cff555555--")
print("Total money gained: " .. GetCoinTextureString(total))
else
print("|cff555555No grey items to sell.")
end
end
local BotonVender = CreateFrame( "Button" , nil, MerchantFrame, "UIPanelButtonTemplate" )
BotonVender:SetText("Sell Junk")
BotonVender:SetWidth(90)
BotonVender:SetHeight(21)
BotonVender:SetPoint("TopRight", -180, -30 )
BotonVender:RegisterForClicks("AnyUp")
BotonVender:SetScript("Onclick", VENDER)
--