Thread Tools Display Modes
08-30-15, 10:27 AM   #1
m4j357yc4
A Kobold Labourer
Join Date: Jun 2015
Posts: 1
Way to activate different panels according to target class.

Is that possible? I will create panels for each class. I dont know the perfect way to explain this. My english not good.

Panel A = Will be loaded on screen if only target is Death Knight.
Panel B = Will be loaded on screen if only target is Mage.

Found this for class colors.
-- OnEvent
local _, class = UnitClass("target")
if class then
if (class=="DEATHKNIGHT") then
self.bg:SetVertexColor(0.77, 0.12, 0.23, self.bg:GetAlpha())
elseif (class=="DRUID") then
self.bg:SetVertexColor(1,0.49,0.04, self.bg:GetAlpha())
elseif (class=="HUNTER") then
self.bg:SetVertexColor(0.67,0.83,0.45, self.bg:GetAlpha())
elseif (class=="MAGE") then
self.bg:SetVertexColor(0.41,0.8,0.94, self.bg:GetAlpha())
elseif (class=="PALADIN") then
self.bg:SetVertexColor(0.96,0.55,0.73, self.bg:GetAlpha())
elseif (class=="PRIEST") then
self.bg:SetVertexColor(1,1,1, self.bg:GetAlpha())
elseif (class=="ROGUE") then
self.bg:SetVertexColor(1,0.96,0.41, self.bg:GetAlpha())
elseif (class=="SHAMAN") then
self.bg:SetVertexColor(0,0.44,0.87, self.bg:GetAlpha())
elseif (class=="WARLOCK") then
self.bg:SetVertexColor(0.58,0.51,0.79, self.bg:GetAlpha())
elseif (class=="WARRIOR") then
self.bg:SetVertexColor(0.78,0.61,0.43, self.bg:GetAlpha())
end
end


But i want something like this

-- OnEvent
local _, class = UnitClass("target")
if class then
if (class=="DEATHKNIGHT") then
Load
end.


Last edited by m4j357yc4 : 08-30-15 at 10:32 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Way to activate different panels according to target class.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off