Thread Tools Display Modes
Unread 09-03-12, 09:43 PM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 316
GetActiveSpecGroup() giving wrong value return.

So is it just me or is GetActiveSpecGroup() giving a reversed return?

A couple of dumps like this seems to give opposing values:

...While in your primary talents:
Lua Code:
  1. /dump GetSpecializationInfo(1)

Returns:
Code:
Dump: value=GetSpecializationInfo(1)
[1]=265,
[2]="Affliction",
[3]="A master of shadow magic who specializes in drains and damage-over-time spells.",
[4]="Interface\\Icons\\Spell_Shadow_DeathCoil",
[5]="bg-warlock-affliction",
[6]="DAMAGER"
...While STILL in primary spec:

Lua Code:
  1. /dump GetSpecializationInfo(GetActiveSpecGroup())

Returns:
Code:
Dump: value=GetSpecializationInfo(GetActiveSpecGroup())
[1]=266,
[2]="Demonology",
[3]="A master of demonic magic who transforms into a demon and compels demonic powers to aid him.",
[4]="Interface\\Icons\\Spell_Shadow_Metamorphosis",
[5]="bg-warlock-demonology",
[6]="DAMAGER"
Edit: Just me being a tard and not realizing that GetSpecializationInfo() isn't used for direct talent group associations.

Last edited by suicidalkatt : 09-03-12 at 10:04 PM.
suicidalkatt is offline  
Unread 09-03-12, 10:18 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,688
To clarify for others who may view this post, GetSpecializationInfo() is to view info on one of the three selectable specializations (talent sets) for your class. Such as Arcane, Fire or Frost for mages. GetActiveSpecGroup() will return with either 1 or 2, depending on if you are in your primary or secondary spec.

__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Seerah is offline  
Unread 09-04-12, 01:19 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,062
From what I can tell, GetSpecializationInfo(ID) accepts a value 1-3 to represent each specialization. For Druids, this is 1-4 to cover the extra Guardian spec. While GetActiveSpecGroup() returns if you're currently using your Primary or Secondary spec, this is irrelevant. You need to use GetSpecialization() to return the proper index that is the current active spec. This only works on the player, to get the spec of an inspection target, you need to get the ID from GetInspectSpecialization(Unit) and pass it to GetSpecializationInfoByID(ID).
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-04-12 at 01:23 AM.
SDPhantom is offline  
Unread 09-04-12, 01:28 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
To complete the list a bit. If you want to track stance informations you can use:

GetShapeshiftForm()
return: index
http://wowprogramming.com/docs/api/GetShapeshiftForm

GetShapeshiftFormInfo(index)
return: texture, name, isActive, isCastable = GetShapeshiftFormInfo(index)
http://wowprogramming.com/docs/api/G...eshiftFormInfo
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is online now  
 

Go BackWoWInterface » WoD Beta » MoP archived threads » GetActiveSpecGroup() giving wrong value return.

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