I want to write an addon, that receives the data of AngryAssignments und provides some utility functions for WeakAura. Let's say for example an aura, that displays if you are a kicker for Socrethar and when you should kick or something like that.
Getting the informations from AngryAssignments is not that problem. Write some code, that watches the combat log and shares information between raidmember seems also not that problem. But actually I am having trouble to access my methods from outside.
At first attempt I copied the basic code of AngryAssignments and deleted everything I don't needed.
AngryAssignAura = LibStub("AceAddon-3.0"):NewAddon("AngryAssignments_Aura", "AceConsole-3.0", "AceEvent-3.0", "AceComm-3.0", "AceTimer-3.0")
local AceGUI = LibStub("AceGUI-3.0")
local libS = LibStub("AceSerializer-3.0")
local libC = LibStub("LibCompress")
local lwin = LibStub("LibWindow-1.1")
local libCE = libC:GetAddonEncodeTable()
local LSM = LibStub("LibSharedMedia-3.0")
function AngryAssignAura:CHAT_MSG_ADDON(prefix, message, distributionType, sender)
-- DEFAULT_CHAT_FRAME:AddMessage("AngryAssignAura:CHAT_MSG_ADDON() called")
function AngryAssignAura:COMBAT_LOG_EVENT_UNFILTERED(timestamp, combatEvent, arg3, sourceGUID, sourceName, sourceFlags, arg7, destGUID, destName, destFlags, arg11, spellID, spellName, spellSchool)
-- DEFAULT_CHAT_FRAME:AddMessage("AngryAssignAura:COMBAT_LOG_EVENT_UNFILTERED() called")
, but this fails. The error mentions, that "GetPlayerGroupNumber" is a nil value. So I checked my AngryAssignAura variable.
/script for k,v in pairs(AngryAssignAura) do print(string.format("[%q]=%s", k, type(v))) end
Can't find any information about the functions I have written. I tried to look into the AceAddon Library, to understand what's going on there. But that's not something I can understand at first attempt. ;)
So how can I access my functions from external? The main idea is to shrink the required custom code in WeakAura. ;)