Reply
Thread Tools Display Modes
Unread 12-29-05, 02:29 PM   #1
Viperb0y
A Murloc Raider
 
Viperb0y's Avatar
Join Date: Dec 2005
Posts: 8
Get the current warrior stance

Hi,

is there a way to see in which stance a warrior currently is? I've searched for this but I found nothing!

Thanks for your help
Viperb0y is offline   Reply With Quote
Unread 12-29-05, 05:16 PM   #2
Gello
A Scalebane Royal Guard
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 444
Warrior stances are:
1 - Battle Stance
2 - Defensive Stance
3 - Berserker Stance

You can find out if you are in one by doing one of:

/script local _,_,isActive = GetShapeshiftFormInfo(1) if isActive then --[[ In Battle Stance ]] end
/script local _,_,isActive = GetShapeshiftFormInfo(2) if isActive then --[[ In Defensive Stance ]] end
/script local _,_,isActive = GetShapeshiftFormInfo(3) if isActive then --[[ In Berserker Stance ]] end

More generically, if in an addon for instance, you can loop through:

function GetForm()
local i,name,isActive,form
for i=1,GetNumShapeshiftForms() do
_,name,isActive = GetShapeshiftFormInfo(i)
if isActive then
form = name
end
end
return form
end

Then GetForm() will return the name of the stance you're in (or name of the druid form you're in if any, rogue stealth also, etc)
Gello is offline   Reply With Quote
Unread 12-29-05, 06:32 PM   #3
Viperb0y
A Murloc Raider
 
Viperb0y's Avatar
Join Date: Dec 2005
Posts: 8
Hi,

thanks a lot Gello Now my little Addon works
Viperb0y is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Get the current warrior stance

Thread Tools
Display Modes

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