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


PHP Items::GetItemDataField方法代码示例

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


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

示例1: 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

示例2: 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;
 }
开发者ID:sarrian,项目名称:wowarmory,代码行数:32,代码来源:class.guilds.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) {
         return false;
     }
     $GuildBankContents = '';
     $GB = '';
     $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, $this->cDB->selectCell("SELECT `item_guid` FROM `guild_bank_item` WHERE `SlotId`=? AND `TabId`=?", $x, $bank));
                 $x++;
             }
         }
     }
     return $GuildBankContents;
 }
开发者ID:ExTRaY,项目名称:wowarmory,代码行数:31,代码来源:class.guilds.php


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