Originally Posted by Garkin
|
I have some questions about that section actually. It seems counter intuitive:
Code:
local function OnTrackStateChanged(questTracker, tracked, trackType, arg1, arg2)
if tracked then
d("A quest was tracked")
else
d("A quest was untracked")
end
end
CALLBACK_MANAGER:RegisterCallback("QuestTrackerTrackingStateChanged", OnTrackStateChanged)
Why do I write 'OnTrackStateChanged' before regsitering the Callback? Is it's parameter list supposed to be the "siganture" of the Event?
If it is only the protoype for the Events Signature, why does it also contain code? Was somebody just lazy and wanted to use the same function as Prototype for Registering the Event and as the Callback that is later registerd to the event?