Hello Guys,
i feel kind of stupid ... i dont even get the "Writing_your_first_addon" to work ...
Code:
LempsAddon = {}
LempsAddon.name = "LempsAddon"
LempsAddon.version = "1.0"
local LempsAddon.inCombat = false
local function LempsAddon.CombatStateChanged(combatState)
self.inCombat = combatState
if self.inCombat then
d("fight")
else
d("no fight")
end
end
local function LempsAddon:Initialize(event, addon)
self.inCombat = IsUnitInCombat("player")
EVENT_MANAGER:RegisterForEvent("LempsAddon", EVENT_PLAYER_COMBAT_STATE, LempsAddon.CombatStateChanged)
end
local function LempsAddon.OnAddOnLoaded(event, addonName)
if addonName == LempsAddon.name then
LempsAddon:Initialize()
end
end
EVENT_MANAGER:RegisterForEvent("LempsAddon", EVENT_ADD_ON_LOADED, LempsAddon.OnAddOnLoaded)
This is my code but it just doesnt work ... I dont even get where this code would be able to not work ... I see no Text output to the chat (debug) at all