当前位置: 首页>>代码示例>>PHP>>正文


PHP Items::GetItemIcon方法代码示例

本文整理汇总了PHP中Items::GetItemIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP Items::GetItemIcon方法的具体用法?PHP Items::GetItemIcon怎么用?PHP Items::GetItemIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Items的用法示例。


在下文中一共展示了Items::GetItemIcon方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetQuestRelation

 private static function GetQuestRelation($ItemID)
 {
     $Statement = Items::$WConnection->prepare('
         SELECT
             *
         FROM
             quest_template
         WHERE
                 RewardItem1 = :itemid
             OR
                 RewardItem2 = :itemid
             OR
                 RewardItem3 = :itemid
             OR
                 RewardItem4 = :itemid
     ');
     $Statement->bindParam(':itemid', $ItemID);
     $Statement->execute();
     $Result = $Statement->fetch(PDO::FETCH_ASSOC);
     if (!empty($Result)) {
         if ($Result['RewardItem1'] != 0) {
             $Result['RewardItemIcon1'] = Items::GetItemIcon($Result['RewardItem1']);
         }
         if ($Result['RewardItem2'] != 0) {
             $Result['RewardItemIcon2'] = Items::GetItemIcon($Result['RewardItem2']);
         }
         if ($Result['RewardItem3'] != 0) {
             $Result['RewardItemIcon3'] = Items::GetItemIcon($Result['RewardItem3']);
         }
         if ($Result['RewardItem4'] != 0) {
             $Result['RewardItemIcon4'] = Items::GetItemIcon($Result['RewardItem4']);
         }
         return $Result;
     } else {
         return false;
     }
 }
开发者ID:Expecto,项目名称:FreedomCore,代码行数:37,代码来源:Items.FreedomCore.php

示例2: GetExtendedCost

 /**
  * Returns extended cost info for $costId cost.
  * @category Mangos class
  * @access   public
  * @param    int $costId
  * @return   array
  **/
 public function GetExtendedCost($costId)
 {
     if ($costId == 0) {
         return false;
     }
     if ($costId < 0) {
         $costId = abs($costId);
     }
     $costInfo = Armory::$aDB->selectRow("SELECT * FROM `ARMORYDBPREFIX_extended_cost` WHERE `id`=%d LIMIT 1", $costId);
     if (!$costInfo) {
         Armory::Log()->writeError('%s : wrong cost id: #%d', __METHOD__, $costId);
         return false;
     }
     $extended_cost = array();
     for ($i = 1; $i < 6; $i++) {
         if ($costInfo['item' . $i] > 0) {
             $extended_cost[$i]['count'] = $costInfo['item' . $i . 'count'];
             $extended_cost[$i]['icon'] = Items::GetItemIcon($costInfo['item' . $i]);
             $extended_cost[$i]['id'] = $costInfo['item' . $i];
         }
     }
     return $extended_cost;
 }
开发者ID:Lankytim,项目名称:wowarmory,代码行数:30,代码来源:class.mangos.php

示例3: showGuildBankContents

 /**
  * Generates array with guild bank contents.
  * @category Guilds class
  * @example Guilds::showGuildBankContents()
  * @todo Manage rights to access some GB tabs
  * @return array
  **/
 public function showGuildBankContents()
 {
     if (!$this->guildId) {
         $this->Log()->writeError('%s : guildId not defined', __METHOD__);
         return false;
     }
     $GuildBankContents = null;
     $GB = null;
     $j = 0;
     for ($bank = 0; $bank < 7; $bank++) {
         $x = 0;
         for ($i = 0; $i < 14; $i++) {
             if ($x > 97) {
                 return $GuildBankContents;
             }
             for ($j = 0; $j < 7; $j++) {
                 $GuildBankContents[$bank][$i]['slot_' . $j]['item_entry'] = $this->cDB->selectCell("SELECT `item_entry` FROM `guild_bank_item` WHERE `SlotId`=? AND `TabId`=?", $x, $bank);
                 $GuildBankContents[$bank][$i]['slot_' . $j]['item_icon'] = Items::GetItemIcon($GuildBankContents[$bank][$i]['slot_' . $j]['item_entry']);
                 $GuildBankContents[$bank][$i]['slot_' . $j]['item_count'] = Items::GetItemDataField(14, 0, 0, $this->cDB->selectCell("SELECT `item_guid` FROM `guild_bank_item` WHERE `SlotId`=? AND `TabId`=?", $x, $bank));
                 $x++;
             }
         }
     }
     return $GuildBankContents;
 }
开发者ID:sarrian,项目名称:wowarmory,代码行数:32,代码来源:class.guilds.php

示例4: GetSocketInfo

 /**
  * @return array
  **/
 public function GetSocketInfo($num)
 {
     if ($num <= 0 || $num > 4) {
         return 0;
     }
     if (isset($this->m_socketInfo[$num])) {
         return $this->m_socketInfo[$num];
     }
     $data = array();
     switch ($this->m_server) {
         case SERVER_MANGOS:
             $socketfield = array(1 => ITEM_FIELD_ENCHANTMENT_3_2, 2 => ITEM_FIELD_ENCHANTMENT_4_2, 3 => ITEM_FIELD_ENCHANTMENT_5_2);
             $socketInfo = $this->GetUInt32Value($socketfield[$num] - 1);
             break;
         case SERVER_TRINITY:
             $socketfield = array(1 => 6, 2 => 9, 3 => 12);
             $socketInfo = $this->tc_ench[$socketfield[$num]];
             break;
         default:
             Armory::Log()->writeError('%s : unknown server type (%d)', __METHOD__, $this->m_server);
             return false;
             break;
     }
     if ($socketInfo > 0) {
         $gemData = Armory::$aDB->selectRow("SELECT `text_%s` AS `text`, `gem` FROM `ARMORYDBPREFIX_enchantment` WHERE `id`=%d", Armory::GetLocale(), $socketInfo);
         $data['enchant_id'] = $socketInfo;
         $data['item'] = $gemData['gem'];
         $data['icon'] = Items::GetItemIcon($data['item']);
         $data['enchant'] = $gemData['text'];
         $data['color'] = Armory::$aDB->selectCell("SELECT `color` FROM `ARMORYDBPREFIX_gemproperties` WHERE `spellitemenchantement`=%d", $socketInfo);
         $this->m_socketInfo[$num] = $data;
         // Is it neccessary?
         return $data;
     }
     return false;
 }
开发者ID:Lankytim,项目名称:wowarmory,代码行数:39,代码来源:class.item.php

示例5: GetCharacterItemInfo

 /**
  * Returns array with data for item placed in $slot['slot']
  * @category Character class
  * @access   public
  * @param    array $slot
  * @return   array
  **/
 public function GetCharacterItemInfo($slot)
 {
     if (!$this->guid) {
         Armory::Log()->writeError('%s : player guid not provided', __METHOD__);
         return false;
     }
     if (!isset($this->m_items[$slot['slotid']])) {
         Armory::Log()->writeError('%s : slot %d is empty (nothing equipped?)', __METHOD__, $slot['slotid']);
         return false;
     }
     $item = $this->m_items[$slot['slotid']];
     $gems = array('g0' => $item->GetSocketInfo(1), 'g1' => $item->GetSocketInfo(2), 'g2' => $item->GetSocketInfo(3));
     $durability = $item->GetItemDurability();
     $item_data = Armory::$wDB->selectRow("SELECT `name`, `displayid`, `ItemLevel`, `Quality` FROM `item_template` WHERE `entry`=%d", $item->GetEntry());
     $enchantment = $item->GetEnchantmentId();
     $originalSpell = 0;
     $enchItemData = array();
     $enchItemDisplayId = 0;
     if ($enchantment > 0) {
         $originalSpell = Armory::$aDB->selectCell("SELECT `id` FROM `ARMORYDBPREFIX_spellenchantment` WHERE `Value`=%d", $enchantment);
         if ($originalSpell > 0) {
             $enchItemData = Armory::$wDB->selectRow("SELECT `entry`, `displayid` FROM `item_template` WHERE `spellid_1`=%d LIMIT 1", $originalSpell);
             if ($enchItemData) {
                 // Item
                 $enchItemDisplayId = Armory::$aDB->selectCell("SELECT `icon` FROM `ARMORYDBPREFIX_icons` WHERE `displayid`=%d", $enchItemData['displayid']);
             } else {
                 // Spell
                 $spellEnchData = Items::GenerateEnchantmentSpellData($originalSpell);
             }
         }
     }
     $item_info = array('displayInfoId' => $item_data['displayid'], 'durability' => $durability['current'], 'icon' => Items::GetItemIcon($item->GetEntry(), $item_data['displayid']), 'id' => $item->GetEntry(), 'level' => $item_data['ItemLevel'], 'maxDurability' => $durability['max'], 'name' => Armory::GetLocale() == 'en_gb' || Armory::GetLocale() == 'en_us' ? $item_data['name'] : Items::GetItemName($item->GetEntry()), 'permanentenchant' => $enchantment, 'pickUp' => 'PickUpLargeChain', 'putDown' => 'PutDownLArgeChain', 'randomPropertiesId' => 0, 'rarity' => $item_data['Quality'], 'seed' => $item->GetGUID(), 'slot' => $slot['slotid']);
     if (is_array($gems)) {
         for ($i = 0; $i < 3; $i++) {
             if ($gems['g' . $i]['item'] > 0) {
                 $item_info['gem' . $i . 'Id'] = $gems['g' . $i]['item'];
                 $item_info['gemIcon' . $i] = $gems['g' . $i]['icon'];
             }
         }
     }
     if (is_array($enchItemData) && isset($enchItemData['entry'])) {
         $item_info['permanentEnchantIcon'] = $enchItemDisplayId;
         $item_info['permanentEnchantItemId'] = $enchItemData['entry'];
     } elseif (isset($spellEnchData) && is_array($spellEnchData) && isset($spellEnchData['name'])) {
         $item_info['permanentEnchantIcon'] = 'trade_engraving';
         $item_info['permanentEnchantSpellName'] = $spellEnchData['name'];
         $item_info['permanentEnchantSpellDesc'] = $spellEnchData['desc'];
     }
     return $item_info;
 }
开发者ID:Lankytim,项目名称:wowarmory,代码行数:57,代码来源:class.characters.php

示例6: PerformAdvancedItemsSearch


//.........这里部分代码省略.........
         Armory::Log()->writeError('%s : SQL query was not created (probably "%s" is unknown source).', __METHOD__, $this->get_array['source']);
         return false;
     }
     $items_query = Armory::$wDB->select($global_sql_query);
     if (!$items_query) {
         Armory::Log()->writeError('%s : unable to execute SQL query "%s"', __METHOD__, $global_sql_query);
         unset($global_sql_query);
         return false;
     }
     $items_result = array();
     $exists_items = array();
     $source_items = self::GetItemSourceArray($items_query);
     $i = 0;
     $icons_to_add = array();
     $names_to_add = array();
     $icons_holder = array();
     $names_holder = array();
     foreach ($items_query as $tmp_item) {
         $icons_to_add[] = $tmp_item['displayid'];
         $names_to_add[] = $tmp_item['id'];
     }
     $tmp_icons_holder = Armory::$aDB->select("SELECT `displayid`, `icon` FROM `ARMORYDBPREFIX_icons` WHERE `displayid` IN (%s)", $icons_to_add);
     foreach ($tmp_icons_holder as $icon) {
         $icons_holder[$icon['displayid']] = $icon['icon'];
     }
     if (Armory::GetLoc() == 0) {
         $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name` AS `name` FROM `item_template` WHERE `entry` IN (%s)", $names_to_add);
     } else {
         $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name_loc%d` AS `name` FROM `locales_item` WHERE `entry` IN (%s)", Armory::GetLoc(), $names_to_add);
     }
     foreach ($tmp_names_holder as $name) {
         if ($name['name'] == null) {
             $name['name'] = Items::GetItemName($name['entry']);
         }
         $names_holder[$name['entry']] = $name['name'];
     }
     unset($tmp_icons_holder, $tmp_names_holder, $names_to_add, $icons_to_add);
     foreach ($items_query as $item) {
         if (isset($exists_items[$item['id']])) {
             continue;
             // Do not add the same items to result array
         }
         if ($i >= 200) {
             if ($count) {
                 return count($exists_items);
             } else {
                 return $items_result;
             }
         } elseif (!$count) {
             $tmp_src = isset($source_items[$item['id']]) ? $source_items[$item['id']] : null;
             $items_result[$i]['data'] = array();
             $items_result[$i]['filters'] = array();
             $items_result[$i]['data']['id'] = $item['id'];
             if (!isset($names_holder[$item['id']])) {
                 $items_result[$i]['data']['name'] = Items::GetItemName($item['id']);
             } else {
                 $items_result[$i]['data']['name'] = $names_holder[$item['id']];
             }
             if (self::CanAuction($item)) {
                 $items_result[$i]['data']['canAuction'] = 1;
             }
             $items_result[$i]['data']['rarity'] = $item['rarity'];
             if (!isset($icons_holder[$item['displayid']])) {
                 $items_result[$i]['data']['icon'] = Items::GetItemIcon($item['id'], $item['displayid']);
             } else {
                 $items_result[$i]['data']['icon'] = $icons_holder[$item['displayid']];
             }
             $items_result[$i]['filters'][0] = array('name' => 'itemLevel', 'value' => $item['ItemLevel']);
             $items_result[$i]['filters'][1] = array('name' => 'relevance', 'value' => 100);
             // TODO: add relevance calculation for items
             // Add some filters (according with item source)
             if ($tmp_src != null) {
                 if ($tmp_src['source'] == 'sourceType.dungeon' && $tmp_src['areaKey'] != null && $tmp_src['areaUrl'] != null) {
                     $items_result[$i]['filters'][] = array('areaId' => $tmp_src['areaId'], 'areaKey' => $tmp_src['areaKey'], 'areaName' => $tmp_src['areaName'], 'name' => 'source', 'value' => 'sourceType.creatureDrop');
                 } else {
                     $items_result[$i]['filters'][] = array('name' => 'source', 'value' => $tmp_src['source']);
                 }
             } else {
                 switch ($this->get_array['source']) {
                     case 'reputation':
                         $items_result[$i]['filters'][] = array('name' => 'source', 'value' => 'sourceType.factionReward');
                         break;
                     case 'quest':
                         $items_result[$i]['filters'][] = array('name' => 'source', 'value' => 'sourceType.questReward');
                         break;
                     case 'pvpAlliance':
                     case 'pvpHorde':
                         $items_result[$i]['filters'][2] = array('name' => 'source', 'value' => 'sourceType.vendor');
                         break;
                 }
             }
         }
         $exists_items[$item['id']] = $item['id'];
         $i++;
     }
     if ($count == true) {
         return count($exists_items);
     }
     return $items_result;
 }
开发者ID:Lankytim,项目名称:wowarmory,代码行数:101,代码来源:class.search.php

示例7: BuildGuildBankItemList

 /**
  * Returns guild bank items
  * @category Guilds class
  * @category Guilds class
  * @access   public
  * @return   array
  **/
 public function BuildGuildBankItemList()
 {
     if (!$this->guildId) {
         Armory::Log()->writeError('%s : guildId not defined', __METHOD__);
         return false;
     }
     $items_list = Armory::$cDB->select("SELECT `item_entry` AS `id`, `item_guid` AS `seed`, `SlotId` AS `slot`, `TabId` AS `bag` FROM `guild_bank_item` WHERE `guildid`=%d", $this->guildId);
     $count_items = count($items_list);
     for ($i = 0; $i < $count_items; $i++) {
         $item_data = Armory::$wDB->selectRow("SELECT `RandomProperty`, `RandomSuffix` FROM `item_template` WHERE `entry` = %d LIMIT 1", $items_list[$i]['id']);
         $tmp_durability = Items::GetItemDurabilityByItemGuid($items_list[$i]['seed'], $this->m_server);
         $items_list[$i]['durability'] = (int) $tmp_durability['current'];
         $items_list[$i]['maxDurability'] = (int) $tmp_durability['max'];
         $items_list[$i]['icon'] = Items::GetItemIcon($items_list[$i]['id']);
         $items_list[$i]['name'] = Items::GetItemName($items_list[$i]['id']);
         $items_list[$i]['qi'] = Items::GetItemInfo($items_list[$i]['id'], 'quality');
         if ($this->m_server == SERVER_MANGOS) {
             $items_list[$i]['quantity'] = Items::GetItemDataField(ITEM_FIELD_STACK_COUNT, 0, 0, $items_list[$i]['seed']);
         } elseif ($this->m_server == SERVER_TRINITY) {
             $items_list[$i]['quantity'] = Armory::$cDB->selectCell("SELECT `count` FROM `item_instance` WHERE `guid`=%d", $items_list[$i]['seed']);
         }
         //TODO: Find correct random property/suffix for items in guild vault.
         $items_list[$i]['randomPropertiesId'] = Items::GetRandomPropertiesData($items_list[$i]['id'], 0, $items_list[$i]['seed'], true, $this->m_server, null, $item_data);
         $tmp_classinfo = Items::GetItemSubTypeInfo($items_list[$i]['id']);
         $items_list[$i]['subtype'] = null;
         $items_list[$i]['subtypeLoc'] = $tmp_classinfo['subclass_name'];
         $items_list[$i]['type'] = $tmp_classinfo['key'];
         $items_list[$i]['slot']++;
     }
     return $items_list;
 }
开发者ID:Lankytim,项目名称:wowarmory,代码行数:38,代码来源:class.guilds.php

示例8: BuildGuildBankLogList

 /**
  * Returns guild bank logs
  * @category Guilds class
  * @category Guilds class
  * @access   public
  * @return   array
  **/
 public function BuildGuildBankLogList()
 {
     if (!$this->guildId) {
         Armory::Log()->writeError('%s : guildId not defined', __METHOD__);
         return false;
     }
     $log_list = Armory::$cDB->select("SELECT `LogGuid` AS `logId`, `TabId` AS `obag`, `EventType` AS `type`,\n\t\t`DestTabId` AS `dbag`, (SELECT `name` FROM `characters` WHERE `guid`=`PlayerGuid`) AS `player`,\t\n\t\t(SELECT `guild_rank`.`rname` FROM `guild_rank` WHERE `guildid`=%d AND `rid`=`guild_member`.`rank`) AS `rname`,\n\t\t`guild_member`.`rank`, `ItemOrMoney` AS `entry`, `ItemStackCount` AS `quantity`, `TimeStamp` AS `ts`\n\t\tFROM `guild_bank_eventlog` AS `guild_bank_eventlog`\n\t\tLEFT JOIN `guild_member` AS `guild_member` ON `guild_member`.`guid`=`guild_bank_eventlog`.`PlayerGuid` AND `guild_member`.`guildid`=%d\n\t\tWHERE `guild_bank_eventlog`.`guildid`=%d ORDER BY `ts` DESC LIMIT 500;", $this->guildId, $this->guildId, $this->guildId);
     $count_logs = count($log_list);
     for ($i = 0; $i < $count_logs; $i++) {
         $log_list[$i]['ts'] = date('Y-m-d H:i:s', $log_list[$i]['ts']);
         switch ($log_list[$i]['type']) {
             case 1:
                 //deposit
                 $log_list[$i]['item'] = 1;
                 $log_list[$i]['dbag'] = $log_list[$i]['obag'];
                 $log_list[$i]['obag'] = '';
                 break;
             case 2:
                 //withdraw
                 $log_list[$i]['item'] = 1;
                 $log_list[$i]['dbag'] = '';
                 break;
             case 3:
                 //move
             //move
             case 7:
                 //move
                 $log_list[$i]['item'] = 1;
                 break;
             case 4:
             case 5:
             case 6:
                 //repair
             //repair
             case 8:
             case 9:
                 //buytab
             //buytab
             default:
                 $log_list[$i]['item'] = 0;
                 $log_list[$i]['dbag'] = '';
                 $log_list[$i]['obag'] = '';
                 $log_list[$i]['money'] = $log_list[$i]['entry'];
                 break;
         }
         if ($log_list[$i]['item']) {
             $log_list[$i]['icon'] = Items::GetItemIcon($log_list[$i]['entry']);
             $log_list[$i]['name'] = Items::GetItemName($log_list[$i]['entry']);
             $log_list[$i]['qi'] = Items::GetItemInfo($log_list[$i]['entry'], 'quality');
         }
     }
     return $log_list;
 }
开发者ID:saqar,项目名称:WoW-Armory,代码行数:60,代码来源:class.guilds.php

示例9: SearchItems

 /**
  * Search items with $query name. If $num == true, function will return only number of 
  * @category Utils/Armory class
  * @example Utils::SearchItems('ashes of al'ar')
  * @return array, int
  **/
 public function SearchItems($query, $num = false)
 {
     if ($num == true) {
         $Q = $this->wDB->selectPage($itemsNum, "SELECT `entry` FROM `item_template` WHERE `name` LIKE ? LIMIT 200", '%' . $query . '%');
         $QQ = $this->wDB->selectPage($itemsNumRuRU, "SELECT `entry` FROM `locales_item` WHERE `name_loc8` LIKE ? LIMIT 200", '%' . $query . '%');
         $rNum = $itemsNum + $itemsNumRuRU;
         if ($rNum > 200) {
             $rNum = 200;
         }
         return $rNum;
     }
     $searchResults = $this->wDB->select("\n        SELECT `entry`, `Quality`, `ItemLevel`\n            FROM `item_template`\n                WHERE `name` LIKE ? OR `entry` IN \n                (\n                    SELECT `entry`\n                    FROM `locales_item`\n                    WHERE `name_loc8` LIKE ?\n                )\n                LIMIT 200", '%' . $query . '%', '%' . $query . '%');
     if (!$searchResults) {
         return false;
     }
     $countItems = count($searchResults);
     for ($i = 0; $i < $countItems; $i++) {
         $searchResults[$i]['name'] = Items::GetItemName($searchResults[$i]['entry']);
         $searchResults[$i]['icon'] = Items::GetItemIcon($searchResults[$i]['entry']);
     }
     return $searchResults;
 }
开发者ID:ExTRaY,项目名称:wowarmory,代码行数:28,代码来源:class.utils.php


注:本文中的Items::GetItemIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。