Talents..

100 Night Elf Hunter
13825
so im looking at the new character talent output in the api .. and unless this changes but is there a field for specialization?
Reply Quote
93 Human Paladin
10065
It's there. You can find it between glyphs and talents. You can see it here in this structure page:

http://www.defiantguild.net/character_talents.cfm
Reply Quote
Battle.net Developer
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.
Reply Quote
85 Tauren Druid
12505
08/28/2012 05:34 PMPosted by Peratryn
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.


That is a cute display pic, whatever it is supposed to be.
Reply Quote
85 Night Elf Druid
9870
08/29/2012 06:09 AMPosted by Herbaknaut
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.


That is a cute display pic, whatever it is supposed to be.

'Tis a Zergling :)
Reply Quote
85 Night Elf Druid
9870
An example of the spec field from the API:
[spec] => Array
(
[name] => Guardian
[role] => TANK
[backgroundImage] => bg-druid-bear
[icon] => ability_racial_bearform
[description] => Takes on the form of a mighty bear to absorb damage and protect allies.
[order] => 2
)

When I output the icon using the standard icon paths I have, I get a file not found. Has the path for spec icons changed?

Answered my own question. Do not use backgroundImage field when looking for icon, use icon field. /facepalm.
Edited by Vester on 8/29/2012 1:47 PM PDT
Reply Quote
100 Night Elf Hunter
13825
its a standard spell icon now
URLhttp://us.media.blizzard.com/wow/icons/36/ability_racial_bearform.jpg
Reply Quote
100 Night Elf Hunter
13825
i use the background images :) my talents look fancy lol
Reply Quote
93 Human Paladin
10065
08/28/2012 05:34 PMPosted by Peratryn
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":[]
Reply Quote
Battle.net Developer
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).
Reply Quote
85 Night Elf Druid
9870
08/29/2012 01:49 PMPosted by Ulminia
i use the background images :) my talents look fancy lol


What's the URL for background images?
Reply Quote
100 Night Elf Hunter
13825
i dont know what blizzard is using but i got mine from the game files
Reply Quote
85 Human Rogue
13995
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'];
Reply Quote
Battle.net Developer
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.
Reply Quote
85 Human Rogue
13995
Peratryn,
First off, I would like to thank you for taking your time and responding to my post.
I think you misunderstood what I'm talking about, but let me try to clarify it. I'm making a guild roster with PHP and the only spec I'm able to pull from the character talents api is the primary or "selected" spec. Say for instance i'm a Death Knight and I have Blood spec and Frost spec, what I'm trying to do is pull those two names from the URL below on to my guild roster and display those names on my PHP page to the viewer.

http://us.battle.net/api/wow/character/whisperwind/Lucyifer?fields=talents

Hope this helps, Thanks
Kneep
Reply Quote
100 Night Elf Hunter
13825
Talent info allways is displayed primary then secondary in the api as it looks.. but i allways use there active spck as the one i display this is my code

$a is your character array with talent info

foreach ($a['talents'] as $build => $spec)
{
if (isset($spec['selected']))
{
$primary = $spec['spec']['name'];
}
else
{
$secondary = $spec['spec']['name'];
}

}
Reply Quote
Battle.net Developer
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.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)

Reported!

[Close]