Mercurial > wow > what-just-procced
view 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 |
line wrap: on
line source
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