Go to most recent revision | Compare with Previous | Blame | View Log
--[[ Addon: Taos Group Ultimate Author: TProg Taonnor Created by @Taonnor ]]-- --[[ Global variables ]]-- local LOG_ACTIVE = false --[[ Class GroupHandler ]]-- GroupHandler = {} GroupHandler.__index = GroupHandler --[[ Class Members ]]-- GroupHandler.Name = "TGU-GroupHandler" --[[ Called when group member joined group ]]-- function GroupHandler.OnGroupMemberJoined() if (LOG_ACTIVE) then logTrace("GroupHandler.OnGroupMemberJoined") end CALLBACK_MANAGER:FireCallbacks("TGU-GroupChanged") end --[[ Called when group member left group ]]-- function GroupHandler.OnGroupMemberLeft() if (LOG_ACTIVE) then logTrace("GroupHandler.OnGroupMemberLeft") end CALLBACK_MANAGER:FireCallbacks("TGU-GroupChanged") end --[[ Called when groupUnitTags updated ]]-- function GroupHandler.OnGroupUpdate() if (LOG_ACTIVE) then logTrace("GroupHandler.OnGroupUpdate") end CALLBACK_MANAGER:FireCallbacks("TGU-GroupChanged") end --[[ Called on ??? ]]-- function GroupHandler.OnUnitFrameUpdate() if (LOG_ACTIVE) then logTrace("GroupHandler.OnUnitFrameUpdate") end CALLBACK_MANAGER:FireCallbacks("TGU-GroupChanged") end --[[ Initialize initializes GroupHandler ]]-- function GroupHandler.Initialize() if (LOG_ACTIVE) then logTrace("GroupHandler.Initialize") end -- Initial call GroupHandler:OnGroupUpdate() -- Register events EVENT_MANAGER:RegisterForEvent(GroupHandler.Name, EVENT_GROUP_MEMBER_JOINED, GroupHandler.OnGroupMemberJoined) EVENT_MANAGER:RegisterForEvent(GroupHandler.Name, EVENT_GROUP_MEMBER_LEFT, GroupHandler.OnGroupMemberLeft) EVENT_MANAGER:RegisterForEvent(GroupHandler.Name, EVENT_GROUP_UPDATE, GroupHandler.OnGroupUpdate) EVENT_MANAGER:RegisterForEvent(GroupHandler.Name, EVENT_UNIT_FRAME_UPDATE, GroupHandler.OnUnitFrameUpdate) end