View Single Post
10-13-14, 03:38 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
PTR bug? Secure GetShapeshiftForm() and _onstate

I'm experiencing something strange on the PTR with states and GetShapeshiftForm().

I'm using a state header and and registering something like this:

Lua Code:
  1. local tHeader = CreateFrame("Frame", "HeaderFrame", UIParent, "SecureHandlerStateTemplate")
  2. RegisterStateDriver(tHeader, 1, "[form:1/2/3/4]a;b")  
  3. tHeader:SetAttribute("_onstate-1", [[
  4.     print(newstate, GetShapeshiftForm())
  5. ]])
Testing this code with a druid on PTR does reveal this:
  • switching from normal form (0) to bear (form1) triggers the state but prints "a 0"
  • switching from normal form (0) to cat (form2) triggers the state but prints "a 0"
  • switching from normal form (0) to travel (form3) triggers the state AND prints "a 3" (as expected)
  • switching from normal form (0) to moonkin (form4) triggers the state but prints "a 0"

So, there's something broken with GetShapeshiftForm() (the secure version at least) on PTR, isn't it?
Could someone please confirm that this is not the desired behavior?

[e]
Switching directly from one form to another without taking the long way via normal form does produce totally weird and unpredictable results. The state doesn't even trigger at all. Except when switching from whatever to form:3 - where state a and b Trigger both. oO

[e]
Same with Priest and Shadowform.
Warrior returns always 1 - no matter what stance.

Last edited by Duugu : 10-13-14 at 03:53 PM.