Beispiel #1
0
 function _parseTooltipArmory($itemid)
 {
     global $roster;
     // check for armory object
     if (!is_object($this->armory_db)) {
         $this->_initArmoryDb();
     }
     $data = $this->armory_db->fetchItemTooltip($itemid, $this->locale);
     //		$data = $this->armory_db->fetchItemTooltip($itemid, 'deDE');
     //trim the fat
     $data = $data['page'][0]['child']['itemTooltips'][0]['child']['itemTooltip'][0]['child'];
     //aprint($data);
     //exit;
     /*
     		if( !empty($data) )
     		{
     			//assign data structure
     			$tt['Attributes']['TempEnchantment'][] = $matches[1];
     //			$tt['Attributes']['SocketBonus'] = $data[];
     //			$tt['Attributes']['Enchantment'] = $matches[1];
     			$tt['General']['Name'] = $data['name'][0]['data'];
     			$tt['General']['ItemId'] = $this->item_id;
     			$tt['General']['ItemColor'] = $this->color;
     			$tt['General']['Icon'] = $this->icon;
     			$tt['General']['Slot'] = $this->slot;
     			$tt['General']['Parent'] = $this->parent;
     			$tt['General']['Tooltip'] = str_replace("\n", '<br>', $this->tooltip);
     			$tt['General']['Locale']=$this->locale;
     
     			//foreach( $data[] )
     			$tt['Attributes']['BaseStats'][$matches[2]] = $matches[0];
     
     
     			$tt['Effects']['Use'][] = $line;
     			$tt['Attributes']['Requires'][] = $line;
     			$tt['Effects']['ChanceToProc'][] = $line;
     			$tt['Effects']['Equip'][] = $line;
     			$tt['Effects']['ChanceToProc'][] = $line;
     			$tt['Attributes']['BindType'] = $line;
     			$tt['Attributes']['Set']['SetBonus'][] = $line;
     
     			$tt['Attributes']['Durability']['Line']= 'Durability ';
     			$tt['Attributes']['Durability']['Current'] = $matches[1];
     			$tt['Attributes']['Durability']['Max'] = $matches[2];
     			$tt['Attributes']['Class'] = explode(', ', $matches[2]);
     			$tt['Attributes']['ClassText'] = $matches[1];
     			$tt['Attributes']['Race'] = explode(', ', $matches[2]);
     			$tt['Attributes']['RaceText'] = $matches[1];
     			$tt['Attributes']['Sockets'][$matches[1]] = $matches[0];
     			$this->isSocketable = true;
     			$tt['Attributes']['Set']['InactiveSet'][] = $line;
     			$tt['Attributes']['ItemNote'] = $line;
     			$tt['Attributes']['Unique'] = $line;
     			$tt['Attributes']['ArmorClass']['Line'] = $matches[0];
     			$tt['Attributes']['ArmorClass']['Rating'] = $matches[1];
     			$tt['Attributes']['ArmorType'] = $line[1];
     			$tt['Attributes']['ArmorSlot'] = $line[0];
     			$this->isArmor = true;
     			$tt['Attributes']['WeaponType'] = $line[1];
     			$tt['Attributes']['WeaponSlot'] = $line[0];
     			$this->isWeapon = true;
     			$tt['Attributes']['WeaponSpeed'] = $line[1];
     			$tt['Attributes']['WeaponDamage'] = $line[0];
     			$this->isWeapon = true;
     			$tt['Attributes']['WeaponDPS'] = $line;
     			$this->isWeapon = true;
     			$tt['Attributes']['MadeBy']['Name'] = $matches[1];
     			$tt['Attributes']['MadeBy']['Line'] = $matches[0];
     			$tt['Attributes']['Set']['ArmorSet']['Name'] = $matches[1];
     			$this->isSetPiece = true;
     			$setpiece = 1;
     			$tt['Attributes']['Set']['ArmorSet']['Piece'][$setpiece]['Name'] = trim($line);
     			$tt['Attributes']['WeaponSlot'] = $line;
     			$this->isWeapon = true;
     			$tt['Attributes']['ArmorSlot'] = $line;
     			$this->isArmor = true;
     			$tt['Attributes']['BagSize'] = $matches[1];
     			$tt['Attributes']['BagDesc'] = $line;
     			$this->isBag = true;
     			$tt['Attributes']['Charges'] = $line;
     			$tt['Poison']['Effect'][] = $line;
     			$this->isPoison = true;
     			$tt['Attributes']['Conjured'][] = $line;
     			$this->parsed_item = $tt;
     			$this->attributes = ( isset($tt['Attributes']) ? $tt['Attributes'] : null );
     			$this->effects = ( isset($tt['Effects']) ? $tt['Effects'] : null );
     */
     /**
     		if( $gem1 || $gem2 || $gem3 )
     		{
     			$gems = array($gem1,$gem2,$gem3);
     			$i = 1;
     			foreach( $gems as $gem )
     			{
     				if( $gem )
     				{
     					$tt['Attributes']['Gems'][$i] = $this->fetchGem($gem);
     					if( isset($tt['Attributes']['Gems'][$i]['Bonus']) )
     					{
     						$tooltip = str_replace( $tt['Attributes']['Gems'][$i]['Bonus'] . "\n", '', $tooltip);
     					}
     					else
     					{
     						trigger_error('Unable to find gem_socketid: ' . $gem . ' locale: ' . $this->locale . ' in Gems table! [' . $this->item_id . ']' );
     						$this->isParseError = true;
     					}
     				}
     				$i++;
     			}
     			$this->isSocketable = true;
     		}
     */
     //			aprint($tt);
     //		}
 }
Beispiel #2
0
 * @link       http://ulminia.zenutech.com
 * @package    Raid Progresion
*/
define("USE_CURL", TRUE);
/*
      end my localisaiation for xml....
*/
function arraydisplay($array)
{
    echo '<pre>';
    print_r($array);
}
$pages = array('92' => array('0' => 'General'), '96' => array('0' => 'Quests', '1' => 'Classic', '2' => 'The Burning Crusade', '3' => 'Wrath of the Lich King'), '97' => array('0' => 'Exploration', '1' => 'Eastern Kingdoms', '2' => 'Kalimdor', '3' => 'Outland', '4' => 'Northrend'), '95' => array('0' => 'Player vs. Player', '1' => 'Arena', '2' => 'Alterac Valley', '3' => 'Arathi Basin', '4' => 'Eye of the Storm', '5' => 'Warsong Gulch', '6' => 'Strand of the Ancients', '7' => 'Wintergrasp', '8' => 'Isle of Conquest'), '168' => array('0' => 'Dungeons &amp; Raids', '1' => 'Classic', '2' => 'The Burning Crusade', '3' => 'Lich King Dungeon', '4' => 'Lich King Heroic', '5' => 'Lich King 10-Player Raid', '6' => 'Lich King 25-Player Raid', '7' => 'Secrets of Ulduar 10-Player Raid', '8' => 'Secrets of Ulduar 25-Player Raid', '9' => 'Call of the Crusade 10-Player Raid', '10' => 'Call of the Crusade 25-Player Raid', '11' => 'Call of the Crusade 10-Player Raid', '12' => 'Call of the Crusade 25-Player Raid', '13' => 'Fall of the Lich King 10-Player Raid', '14' => 'Fall of the Lich King 25-Player Raid'), '169' => array('0' => 'Professions', '1' => 'Cooking', '2' => 'Fishing', '3' => 'First Aid'), '201' => array('0' => 'Reputation', '1' => 'Classic', '2' => 'The Burning Crusade', '3' => 'Wrath of the Lich King'), '155' => array('0' => 'World Events', '1' => 'Lunar Festival', '2' => 'Love is in the Air', '3' => 'Noblegarden', '4' => 'Children\'s Week', '5' => 'Midsummer', '6' => 'Brewfest', '7' => 'Hallow\'s End', '8' => 'Pilgrim\'s Bounty', '9' => 'Winter Veil', '10' => 'Argent Tournament'), '81' => array('0' => 'Feats of Strength'));
require_once ROSTER_LIB . 'simple.class.php';
require_once ROSTER_LIB . 'armory.class.php';
$armory = new RosterArmory();
foreach ($pages as $cat => $title) {
    $r = $armory->fetchArmorya($type = '12', $character = 'Ulminia', $guild = false, $realm = 'Zangarmarsh', $item_id = $cat, $fetch_type = 'array');
    //getArmoryDataXML($url);
    $g = 0;
    foreach ($r as $category) {
        // echo '<hr><br>~~-  '.$title[0].'~~~<br>';
        foreach ($category->achievement as $achievement) {
            $achv_points = '';
            $achv_icon = '';
            $achv_title = '';
            $achv_disc = '';
            $achv_date = '';
            $achv_title = '';
            $achv_id = '';
            $achv_reward_title = '';
Beispiel #3
0
 /**
  * fetches guild info
  *
  */
 function checkGuildInfo($name = false, $server = false, $region = false)
 {
     global $roster, $addon;
     include_once ROSTER_LIB . 'armory.class.php';
     $armory = new RosterArmory();
     $content = $this->_parseData($armory->fetchGuild($name, $region, $server, $fetch_type = 'array'));
     //$this->getguilddata( $roster->data['guild_name'], $this->region, $this->server, $fetch_type='array' );//$this->fetchGuild( $this->memberName, $roster->config['locale'], $this->server );
     if ($this->_xcheckarray($content, array('guildInfo', 'guildHeader'))) {
         $this->_debug(1, true, 'Checked guild on existence', 'OK');
         return true;
     } else {
         $this->_debug(1, false, 'Checked guild on existence', 'Failed');
         return false;
     }
 }