Contents |
Its a helper class to fetch the character data of the battle.net armory for World of Warcraft
Its pretty simple to initialize the class. You do not need to include it by hand, just load it as a game object
$game->new_object('bnet_armory', 'armory', array(SERVERLOC, LANGUAGE));
| Name | Description | Default |
|---|---|---|
| SERVERLOC | The Location of the server | us |
| LANGUAGE | The language of the fetched data | en |
$game->obj['armory']->setSettings(array('loc'=>SERVERLOC, 'locale'=>LANGUAGE));
The functions returns an array with all the fetched data.
If there's an error fetching the data, the value "status" is set to "error". you can check if the status value is available. It is only available in case of an error. The "reason" value contains the reason why the error appeared
The output is an array with all the character data fetched of the bnet-armory
$chardata = $game->obj['armory']->character(MEMBERNAME, SERVERNAME, FORCE);
| Name | Description | Possible Values |
|---|---|---|
| MEMBERNAME | The character name to search for on armory | string |
| SERVERNAME | The server name to search for an member | string |
| FORCE | Force an update or use the cached version (recommended: used cached version!) | true/false |
The lastupdated timestamp needs to be divided by thousand.
$timestamp = ($chardata['lastModified']/ 1000);
To show it in the timeformat of the user:
$time->user_date(($testdata['lastModified']/ 1000)
If you need the races/classes/gender ID of eqdkp, just use the convert function:
$game->obj['armory']->ConvertID($chardata['gender'], 'int', 'gender'));
The output is an array with all the guild data fetched of the bnet-armory
$chardata = $game->obj['armory']->guild(GUILD, REALM, FORCE);
| Name | Description | Possible Values |
|---|---|---|
| GUILD | The name of the guild | string |
| REALM | The realmname of the guild | string |
| FORCE | Force an update or use the cached version (recommended: used cached version!) | true/false |
The output is an array with all the realms data fetched of the bnet-armory
$chardata = $game->obj['armory']->realms(REALMS, FORCE);
| Name | Description | Possible Values |
|---|---|---|
| RELAMS | An array with one or multiple realm names | array |
| FORCE | Force an update or use the cached version (recommended: used cached version!) | true/false |
The output is an array with all the item data fetched of the bnet-armory
$chardata = $game->obj['armory']->item(ITEMID, FORCE);
| Name | Description | Possible Values |
|---|---|---|
| ITEMID | The itemid of the item to fetch | array |
| FORCE | Force an update or use the cached version (recommended: used cached version!) | true/false |
A List of all available guild or char achievements
$chardata = $game->obj['armory']->getdata_achievements(TYPE, FORCE));
| Name | Description | Possible Values |
|---|---|---|
| TYPE | The type of the list to fetch | character, guild |
| FORCE | Force an update or use the cached version (recommended: used cached version!) | true/false |
This function outputs the URL to the cached character icon. Simply add it to an img tag.
$game->obj['armory']->characterIcon($chardata['thumbnail']);
This function outputs the URL to the cached guild tabard image. Simply add it to an img tag.
$game->obj['armory']->guildTabard(BATTLE.NET API EMBLEM ARRAY, FACTION, GUILDNAME, IMAGE SIZE);
Working with chardata, too. But you have to set the side to 0 for alliance and 1 for horde by yourself and set the correct emblem-array. p.e.
$game->obj['armory']->guildTabard($guilddata['emblem'], $guilddata['side'], $guilddata['name'], 215);