# HG changeset patch # User MMOSimca # Date 1437621484 14400 # Node ID 22f08f6717eaedb041f26e71f1ead0b1bfbc5e5f # Parent 866bba4d8ab602a81615f545f10ec34bc2ae67ec Updated timer loops to just use math.huge, since their iterations are evaluated in Lua. diff -r 866bba4d8ab6 -r 22f08f6717ea Main.lua --- a/Main.lua Tue Jul 21 18:48:31 2015 -0400 +++ b/Main.lua Wed Jul 22 23:18:04 2015 -0400 @@ -990,15 +990,9 @@ languages_known[_G.GetLanguageByIndex(index)] = true end - -- These two timers loop indefinitely by constantly resetting their remaining iterations to 100k. - item_process_timer_handle = C_Timer.NewTicker(30, function() - item_process_timer_handle._remainingIterations = 100000 - WDP:ProcessItems() - end, 100000) - target_location_timer_handle = C_Timer.NewTicker(0.5, function() - target_location_timer_handle._remainingIterations = 100000 - WDP:UpdateTargetLocation() - end, 100000) + -- These two timers loop indefinitely using Lua's infinity constant + item_process_timer_handle = C_Timer.NewTicker(30, WDP.ProcessItems, math.huge) + target_location_timer_handle = C_Timer.NewTicker(0.5, WDP.UpdateTargetLocation, math.huge) _G.hooksecurefunc("UseContainerItem", function(bag_index, slot_index, target_unit) if target_unit then