mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
stop using pairs instead of index loops, please, it's so much slower
This commit is contained in:
@@ -62,7 +62,8 @@ local function initMarketItems()
|
||||
-- populate all market items
|
||||
marketItems = {}
|
||||
local types = g_things.findThingTypeByAttr(ThingAttrMarket)
|
||||
for k,t in pairs(types) do
|
||||
for idx = 1, #types do
|
||||
local t = types[idx]
|
||||
local newItem = Item.create(t:getId())
|
||||
if newItem then
|
||||
local item = {
|
||||
@@ -352,4 +353,4 @@ function Market.onItemBoxChecked(widget)
|
||||
if widget:isChecked() then
|
||||
Market.updateSelectedItem(widget.item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user