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)