include("MemoryItem.lua"); CInventory = class( function (self) local _bagId = 61; self.BagSlot = {} if( settings.profile.options.DEBUG_INV ) then printf( "We gonna update: %d slots.\n", settings.profile.options.INV_MAX_SLOTS ); end; local timeStart = getTime(); for slotNumber = 1, settings.profile.options.INV_MAX_SLOTS, 1 do self.BagSlot[slotNumber] = CItem( _bagId ); _bagId = _bagId + 1; end if( settings.profile.options.DEBUG_INV ) then printf( "Inventory update took: %d\n", deltaTime( getTime(), timeStart ) ); end; self.NextItemToUpdate = 1; end ); function CInventory:update() -- if( settings.profile.options.DEBUG_INV ) then -- printf( "We gonna update: %d slots.\n", settings.profile.options.INV_MAX_SLOTS ); -- end; local timeStart = getTime(); for slotNumber = 1, settings.profile.options.INV_MAX_SLOTS, 1 do self.BagSlot[slotNumber]:update(); end -- if( settings.profile.options.DEBUG_INV ) then printf( "Inventory update took: %d\n", deltaTime( getTime(), timeStart ) ); -- end; end;