Talents..

#1 - Aug. 28, 2012, 8:45 p.m.
Blizzard Post
so im looking at the new character talent output in the api .. and unless this changes but is there a field for specialization?
Forum Avatar
Battle.net Developer
#3 - Aug. 29, 2012, 12:34 a.m.
Blizzard Post
Currently if you haven't chosen a spec, there won't be a field. This happens for all characters that haven't logged in and out of 5.0.4 yet, and anyone that does and doesn't choose a spec.
Forum Avatar
Battle.net Developer
#10 - Aug. 30, 2012, 5:33 a.m.
Blizzard Post
08/29/2012 04:12 PMPosted by Oxoxoxoxen
Currently if you haven't chosen a spec, there won't be a field. This happens for all characters that haven't logged in and out of 5.0.4 yet, and anyone that does and doesn't choose a spec.


Is this the intended behavior for people who have not chosen their talents yet?

"talents":[null],

Shouldn't it be:

"talents":[]


It will be when their profile is updated to not be a 4.3.4 profile (When they log out of the game).
Forum Avatar
Battle.net Developer
#15 - Aug. 31, 2012, 2:39 p.m.
Blizzard Post
I think it just me, but how can i distinguish between the two specs names on a guild roster? Like for instance i can pull the primary spec name easily but not the secondary spec name?

code:
$primary = $p['character']['spec']['name'];
$secondary = $p['character']['spec']['name'];


The guild roster does not contain the secondary spec.
Forum Avatar
Battle.net Developer
#18 - Sept. 4, 2012, 7:11 p.m.
Blizzard Post
As Ulminia already stated, you just have to look at the two talent groups listed, same as in the old api.

Here is the data from your provided url, with all non-relevant fields removed for now:

talents: [
{
selected: true,
spec: {
name: "Blood",
role: "TANK",
...
}
},
{
spec: {
name: "Frost",
role: "DPS",
...
}
}
]


The talent block that includes the "selected: true" field is the one currently active, and the other is not. Right now the two talent groups correspond directly with the primary and secondary specs in game.