Thread Tools Display Modes
01-13-17, 02:11 PM   #1
Glon
A Defias Bandit
Join Date: Jan 2017
Posts: 2
Addon working only against a certain class

Hi there,

I'm trying to make one of my addons (RangeDisplay) work only when the player I'm targetting is a warrior. I have very little experience with lua coding, and had no luck finding any thread on this so far. Is it at all possible? If so, is there a chance to add such a feature to an already written addon?
  Reply With Quote
01-13-17, 02:45 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
local _,classfile = UnitClass("target")
if classfile == "WARRIOR" then
-- your target is a warrior
end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-14-17, 09:44 AM   #3
Glon
A Defias Bandit
Join Date: Jan 2017
Posts: 2
Had some trouble implementing it, but eventually it works perfectly. Thank you very much, Fizzlemizz .
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Addon working only against a certain 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