Below you will see my code. But, most of my questions are more broad stroke.
How are packages recognized in LUA and what are the references?
E.G:
Code:
if i have an .lua document at /addon/myAddon/main.lua
and another document at /addon/myAddon/somethingDir/something.lua
how would I reference something.lua functions?
EVENT_MANAGER <-- kind of two questions with this one that came about.
1. LUA doesn't have classes what do I call documents that house my code?
2. does the ESO client call EVENT_MANGER method and I am overriding it? If not am I calling the RegisterForEvent method inside EVENT_MANGER "class"?
Test code below doesn't display anything when leader is changed. Don't need an answer to this as I am hoping my above questions will cover this, but this issue is what made me ask the above questions.
Code:
Nilucian = {}
Nilucian.name="Nilucian"
function initialize(eventCode,addon)
if addon ~= Nilucian.name then return end
end
function Nilucian:runIt(eventCode,leaderName)
if addon ~= Nilucian.name then return end
d("test")
d("new leader: "+leaderName)
end
EVENT_MANAGER:RegisterForEvent(Nilucian.name, EVENT_ADD_ON_LOADED, initialize)
EVENT_MANAGER:RegisterForEvent(Nilucian.name, EVENT_LEADER_UPDATE, Nilucian.runIt)