view main.lua @ 15:2a96ef4b411f 7.3

TOC bump for 6.2
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sun, 28 Jun 2015 13:28:10 -0400
parents f8000fae78da
children
line wrap: on
line source
local nametag, addon = ...

-----------------------------------------------------------------------------
local on = false
local L = GetLocale()

------- BEGIN GENERATED CODE.  DO NOT EDIT.
-- Please use the Localization App on WoWAce to update this
-- http://www.wowace.com/addons/what-just-procced/localization/
if L == 'deDE' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'enUS' or L == 'enGB' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'esES' or L == 'esMX' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'frFR' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'koKR' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'ruRU' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'zhCN' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
elseif L == 'zhTW' then
	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
end
------- END GENERATED CODE.  DO NOT EDIT.

-----------------------------------------------------------------------------
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 L["Activated"] or L["Deactivated"])
end

function addon:SPELL_ACTIVATION_OVERLAY_SHOW(_,spellID,_,positions)
	local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID
	self:Printf(L["%s at position %s."], spell, positions)
end

-- vim:noet