comparison main.lua @ 1:cf3106134425

Initial upload.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sat, 30 Oct 2010 19:13:05 +0000
parents
children 4d9949e554ef
comparison
equal deleted inserted replaced
0:14be231b69e6 1:cf3106134425
1 local nametag, addon = ...
2
3
4 -----------------------------------------------------------------------------
5 -- other locals
6 local on = false
7
8
9 -----------------------------------------------------------------------------
10 addon = LibStub("AceAddon-3.0"):NewAddon(addon, nametag,
11 "AceConsole-3.0", "AceEvent-3.0")
12
13 function addon:OnInitialize()
14 self:RegisterChatCommand("wjp", "ToggleEnable")
15 self.OnInitialize = nil
16 end
17
18 function addon:ToggleEnable()
19 on = not on
20 if on then
21 self:RegisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW")
22 else
23 self:UnregisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW")
24 end
25 self:Print(on and "Activated" or "Deactivated")
26 end
27
28 function addon:SPELL_ACTIVATION_OVERLAY_SHOW(...)
29 local _,spellID,_,positions = ...
30 local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID
31 self:Printf("%s at position: %s.", spell, positions)
32 end
33
34 -- vim:noet