From 3fba9bfb888cfb2e4921ad97badcad974e7ba239 Mon Sep 17 00:00:00 2001 From: atomaka Date: Wed, 29 Jun 2011 08:06:52 -0400 Subject: [PATCH] Outline for initial flow idea. --- GemStacker.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/GemStacker.lua b/GemStacker.lua index e13c0e5..acd6097 100644 --- a/GemStacker.lua +++ b/GemStacker.lua @@ -1,5 +1,29 @@ GemStacker = LibStub('AceAddon-3.0'):NewAddon('GemStacker','AceConsole-3.0','AceEvent-3.0'); local core = GemStacker; +function core:OnInitialize() + +end + +function core:OnEnable() + self:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED','CheckGemCut'); +end + +function core:CheckGemCut(_,event,_,sourceGUID,sourceName,_,_,_,_,_,_,spellSchool) + if(not gemCasts[spellSchool]) then return end; + + self:RegisterEvent('BAG_UPDATE','StackGem'); +end + +function core:StackGem(container) + --find the item (tricky?) + + --check all bags to see if there is an existing stack + + --if there is an existing stack and it is not max, stack the new gem on the old stack + + self:UnregisterEvent('BAG_UDATE'); +end + --BAG_UPDATE - container --SPELL_CAST_START \ No newline at end of file