Thread Tools Display Modes
07-25-14, 04:36 PM   #1
citrot
A Murloc Raider
Join Date: Jul 2014
Posts: 5
Question How to query Paladin's Seal in MoP?

Hi!

New to wowinterface. If i missed forum where to ask something like this, plz tell me.

Developing an addon for mop 5.4.x, and encountered a problem. How to query paladin's active seal?

If i use stuff like this:
http://www.wowwiki.com/API_UnitBuff
or this:
http://www.wowwiki.com/API_UnitAura
they find nothing. Paladin's seal in mop seems like warrior's stance or dont know (i cannot scan those either). They arent regular buffs.

Any tipp will be great! Thank you.
  Reply With Quote
07-25-14, 04:51 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
http://wowpedia.org/API_GetShapeshiftForm
  Reply With Quote
07-26-14, 01:48 AM   #3
citrot
A Murloc Raider
Join Date: Jul 2014
Posts: 5
Thumbs up

Originally Posted by semlar View Post
It was helpful, already have my working function, thank you!
  Reply With Quote
07-26-14, 10:52 AM   #4
jlam
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 29
You'll need to be careful -- the stance numbers do not always match between Mac and PC. You can get the stance number via "stance = GetShapeshiftForm()", but you need to match up the localized name returned in GetShapeshiftFormInfo(stance) with the localized name of the paladin seal to known which one it really is.

You can see an example of this technique in Ovale's OvaleStance module.
  Reply With Quote
07-31-14, 06:25 AM   #5
citrot
A Murloc Raider
Join Date: Jul 2014
Posts: 5
Originally Posted by jlam View Post
You'll need to be careful -- the stance numbers do not always match between Mac and PC. You can get the stance number via "stance = GetShapeshiftForm()", but you need to match up the localized name returned in GetShapeshiftFormInfo(stance) with the localized name of the paladin seal to known which one it really is.

You can see an example of this technique in Ovale's OvaleStance module.
Thank you for tipp. Actually, i am doing this in my addon to query activated stance (copy / pasted here):

Code:
  i4= "";
  for i3= 1, 10 do
    _,i1,i2= GetShapeshiftFormInfo(i3);
    if (i1==nil) then i1=""; end
    if (i2==nil) then i2=0; end
    if (i2==1) then
      i4= i1;
      break;
      end
    end
In the end, i4 still contains empty string, if no activated stance on paladin. Oh, and those nil checks inside only for safe. Name is only checked against en/us version (for different localized names, i will deal with them later).

Last edited by citrot : 07-31-14 at 06:28 AM.
  Reply With Quote
07-31-14, 07:48 AM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Please tell me that code snipped isn't your actual code!
  Reply With Quote
07-31-14, 10:37 AM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by jlam View Post
You'll need to be careful -- the stance numbers do not always match between Mac and PC.
GetShapeshiftFormID evidently returns a unique ID representing your stance, so that might save you some code.

citrot: If you describe exactly what your goal is we can be a little more helpful.

To get the name of your active form you can simply do this..
Lua Code:
  1. local icon, name = GetShapeshiftFormInfo(GetShapeshiftForm())
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to query Paladin's Seal in MoP?


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