WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   GetActiveSpecGroup() giving wrong value return. (https://www.wowinterface.com/forums/showthread.php?t=44137)

suicidalkatt 09-03-12 09:43 PM

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.

Seerah 09-03-12 10:18 PM

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.

:)

SDPhantom 09-04-12 01:19 AM

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).

zork 09-04-12 01:28 AM

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


All times are GMT -6. The time now is 04:01 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI