ThornyFFXI/LuAshitacast

OnLoad executes before job change is registered

Closed this issue · 1 comments

I'm not sure if this would be considered a bug or not. Either way, I thought it might be helpful information.

Behavior can be shown with the following code in the OnLoad function

ashita.tasks.once(1,function()
   print(gData.GetPlayer().MainJob);
   print(AshitaCore:GetResourceManager():GetString("jobs_abbr", AshitaCore:GetMemoryManager():GetPlayer():GetMainJob()));
end);

With no delay (remove ashita.tasks.once), both prints will report the previous job on job change. With a delay (0.6 or greater for me), both prints will report the new job on job change.

I wouldn't consider this a bug, as the onload is triggered by job change itself. Something to be aware of, but no plans to correct.