Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ffxiv_task_ vs onupdate handler.
#13
(12-14-2014, 05:41 PM)Ace Wrote:  ffxiv_task_assist.add vs ffxiv_task_assist:add

i had it ffxiv_task_assist:add

Code:
function wim.ModuleInit()
  d(TableSize(ffxiv_task_assist.process_elements)) -- prints 0
  ke_ntcne = ml_element:create( "ntcne", c_ntcne, e_ntcne, 28)
  ffxiv_task_assist:add(    ke_ntcne, ffxiv_task_assist.process_elements)
  d(TableSize(ffxiv_task_assist.process_elements)) -- prints 1
end

it is added.
but its never checked or used?

im guessing this is where it checks the cne list:
Code:
function ml_cne_hub.eval_elements(elementList)
    for k, elem in pairs( elementList ) do
        if (gLogCNE == "1") then
            ml_debug( "Evaluating:" .. tostring( elem.name ) )
        end
        elem.eval = elem:evaluate()
    if (gLogCNE == "1") then
            ml_debug( elem.name .. " evaluation result:" .. tostring( elem.eval ) )
        end
    end
end

i dont know Lua at all but it looks to me
this function is called once only with the instanced version of the object.

Code:
function ml_task:Process()
    if (TableSize(self.process_elements) > 0) then
        ml_cne_hub.clear_queue()
        ml_cne_hub.eval_elements(self.process_elements) --  <<< here

        ml_cne_hub.queue_to_execute()
        ml_cne_hub.execute()
        return false
    else
        ml_debug("no elements in process table")
    end
end

in this thread a dev said he added specific code. i dont see it ?
Is there a new way to do it ?

EDIT:
btw i used to add it like this
Code:
init_ntcne = false
function wim.doPulse( Event, ticks )
  if ml_task_hub:CurrentTask() and not init_ntcne then
    ke_ntcne = ml_element:create( "ntcne", c_ntcne, e_ntcne, 28)
    ml_task_hub:CurrentTask():add(ke_ntcne, ml_task_hub:CurrentTask().process_elements)
    init_ntcne = true
  end
end
which is basically waiting for a task to be created ( by press bot enabled etc.. )
and then add it to that.
but i would much rather have the solution the dev mentioned in this thread
Reply
 


Messages In This Thread
RE: ffxiv_task_ vs onupdate handler. - by HansW - 11-30-2013, 09:27 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-16-2013, 10:22 PM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-16-2013, 11:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 12:36 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 01:26 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 02:33 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 03:08 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 04:34 AM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 04:05 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 05:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 05:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 07:38 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 08:11 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 09:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 10:00 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-15-2014, 12:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products