View Single Post
09-10-12, 11:09 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Læe View Post
Can you make one for a Fury/Arms Warrior so it would tell me if I'm in Defensive Stance when not in Protection spec? I thought they would turn off your stance when you switch spec like they do for Death Knights but they don't. I tried using TellMeWhen for it but can't seem to get it to work.
Code:
local name, _, icon = GetSpellInfo(71)
local message = format("Get out of |T%s:20:20:-5|t %s!", icon, name)
local color = { r = 1, g = 1, b = 0 }

local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
	if GetSpecialization() ~= 3 and GetShapeshiftForm() == 2 then
		RaidNotice_AddMessage(RaidWarningFrame, message, color)
	end
end)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote