# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1288465985 0 # Node ID cf310613442502da676d06768c62a2eae2dc8ef1 # Parent 14be231b69e6977cade1f356c541ef86cc0720ef Initial upload. diff -r 14be231b69e6 -r cf3106134425 .pkgmeta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.pkgmeta Sat Oct 30 19:13:05 2010 +0000 @@ -0,0 +1,17 @@ +package-as: WhatJustProcced + +externals: + libs/LibStub: + url: svn://svn.wowace.com/wow/libstub/mainline/trunk + tag: latest + libs/CallbackHandler-1.0: + url: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0 + tag: latest + libs/AceAddon-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0 + libs/AceEvent-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0 + libs/AceConsole-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0 + +# vim: et diff -r 14be231b69e6 -r cf3106134425 WhatJustProcced.toc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WhatJustProcced.toc Sat Oct 30 19:13:05 2010 +0000 @@ -0,0 +1,16 @@ +## Interface: 40000 +## Title: What Just Procced +## Notes: Provides training reminders to help decipher the Blizzard Spell Alerts. +## Author: Farmbuyer of Kilrogg +## OptionalDeps: Ace3 + +#@no-lib-strip@ +libs\LibStub\LibStub.lua +libs\CallbackHandler-1.0\CallbackHandler-1.0.xml +libs\AceAddon-3.0\AceAddon-3.0.xml +libs\AceEvent-3.0\AceEvent-3.0.xml +libs\AceConsole-3.0\AceConsole-3.0.xml +#@end-no-lib-strip@ + +main.lua + diff -r 14be231b69e6 -r cf3106134425 main.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.lua Sat Oct 30 19:13:05 2010 +0000 @@ -0,0 +1,34 @@ +local nametag, addon = ... + + +----------------------------------------------------------------------------- +-- other locals +local on = false + + +----------------------------------------------------------------------------- +addon = LibStub("AceAddon-3.0"):NewAddon(addon, nametag, + "AceConsole-3.0", "AceEvent-3.0") + +function addon:OnInitialize() + self:RegisterChatCommand("wjp", "ToggleEnable") + self.OnInitialize = nil +end + +function addon:ToggleEnable() + on = not on + if on then + self:RegisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW") + else + self:UnregisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW") + end + self:Print(on and "Activated" or "Deactivated") +end + +function addon:SPELL_ACTIVATION_OVERLAY_SHOW(...) + local _,spellID,_,positions = ... + local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID + self:Printf("%s at position: %s.", spell, positions) +end + +-- vim:noet