本文整理汇总了PHP中Items::GetItemDurabilityByItemGuid方法的典型用法代码示例。如果您正苦于以下问题:PHP Items::GetItemDurabilityByItemGuid方法的具体用法?PHP Items::GetItemDurabilityByItemGuid怎么用?PHP Items::GetItemDurabilityByItemGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Items
的用法示例。
在下文中一共展示了Items::GetItemDurabilityByItemGuid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BuildGuildBankItemList
/**
* Returns list of items that stored in guild bank
* @category Guilds class
* @example Guilds::BuildGuildBankItemList()
* @return array
**/
public function BuildGuildBankItemList()
{
if (!$this->guildId) {
$this->Log()->writeError('%s : guildId not defined', __METHOD__);
return false;
}
$items_list = $this->cDB->select("SELECT `item_entry` AS `id`, `item_guid` AS `seed`, `SlotId` AS `slot`, `TabId` AS `bag` FROM `guild_bank_item` WHERE `guildid`=?", $this->guildId);
$count_items = count($items_list);
for ($i = 0; $i < $count_items; $i++) {
$tmp_durability = Items::GetItemDurabilityByItemGuid($items_list[$i]['seed']);
$items_list[$i]['durability'] = $tmp_durability['current'];
$items_list[$i]['maxDurability'] = $tmp_durability['max'];
unset($tmp_durability);
$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');
$items_list[$i]['quantity'] = Items::GetItemDataField(ITEM_FIELD_STACK_COUNT, 0, 0, $items_list[$i]['seed']);
$items_list[$i]['randomPropertiesId'] = 0;
$tmp_classinfo = Items::GetItemSubTypeInfo($items_list[$i]['id']);
$items_list[$i]['subtype'] = '';
$items_list[$i]['subtypeLoc'] = $tmp_classinfo['subclass_name'];
$items_list[$i]['type'] = $tmp_classinfo['key'];
$items_list[$i]['slot']++;
}
return $items_list;
}
示例2: 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;
}