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


PHP Items::BondTranslation方法代码示例

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


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

示例1: GetItemInfo

 public static function GetItemInfo($ItemID)
 {
     global $FCCore;
     $Statement = Items::$WConnection->prepare('
         SELECT
             it.*,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE
             entry = :itemid
     ');
     $Statement->bindParam(':itemid', $ItemID);
     $Statement->execute();
     $Result = $Statement->fetch(PDO::FETCH_ASSOC);
     if (empty($Result) || $ItemID != $Result['entry']) {
         return false;
     } else {
         $Result['subclass'] = Items::ItemSubClass($Result['class'], $Result['subclass']);
         $Result['class'] = Items::ItemClass($Result['class']);
         $Result['BuyPrice'] = Text::MoneyToCoins($Result['BuyPrice']);
         $Result['SellPrice'] = Text::MoneyToCoins($Result['SellPrice']);
         $Result['bond_translation'] = Items::BondTranslation($Result['bonding']);
         $Result['it_translation'] = Items::InventoryTypeTranslation($Result['InventoryType']);
         if ($Result['RequiredSkill'] != 0) {
             $Result['SkillData'] = Items::GetSkillReqs($Result['RequiredSkill'], $Result['RequiredSkillRank']);
         }
         $StatsCount = 0;
         for ($i = 1; $i <= 10; $i++) {
             if ($Result['stat_type' . $i] != 0) {
                 $StatsCount++;
             }
         }
         if ($StatsCount > 0) {
             for ($i = 1; $i <= $StatsCount; $i++) {
                 $Result['stat_translation' . $i] = Items::StatTranslation($Result['stat_type' . $i]);
             }
         }
         for ($i = 1; $i <= 3; $i++) {
             if ($Result['socketColor_' . $i] != 0) {
                 $Result['socket' . $i] = Items::SocketDescription($Result['socketColor_' . $i]);
             }
         }
         for ($i = 1; $i <= 5; $i++) {
             if ($Result['spellid_' . $i] != 0 && $Result['spellid_' . $i] != -1) {
                 $Result['spt_translation' . $i] = Items::SpellTrigger($Result['spelltrigger_' . $i]);
                 $Result['spell_data' . $i] = Spells::SpellInfo($Result['spellid_' . $i]);
                 if (strstr($Result['name'], $Result['spell_data' . $i]['Name'])) {
                     $Result['spell_data' . $i]['SearchForCreature'] = Items::FindCreatureBySpell($Result['spellid_' . $i]);
                 }
             }
         }
         if ($Result['socketBonus'] != 0) {
             $Result['socketBonusDescription'] = Items::SocketBonus($Result['socketBonus']);
         }
         $Result['itemsetinfo'] = Items::GetItemSetInfo($ItemID);
         if ($Result['GemProperties'] != 0) {
             $Result['gem_bonus'] = Items::getGemBonus($Result['GemProperties']);
         }
         return $Result;
     }
 }
开发者ID:Expecto,项目名称:FreedomCore,代码行数:64,代码来源:Items.FreedomCore.php

示例2: GetItemArrayData

 private static function GetItemArrayData($ItemArray)
 {
     global $FCCore;
     $SQL = 'SELECT
             it.entry,
             it.class,
             it.subclass,
             it.name,
             it.displayid,
             it.Quality,
             it.BuyPrice,
             it.SellPrice,
             it.bonding,
             it.RequiredLevel,
             it.InventoryType,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE
             entry IN (' . $ItemArray . ')';
     $Statement = Zones::$WConnection->prepare($SQL);
     $Statement->execute();
     $Result = $Statement->fetchAll(PDO::FETCH_ASSOC);
     $ArrayIndex = 0;
     foreach ($Result as $Item) {
         $Result[$ArrayIndex]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
         $Result[$ArrayIndex]['class'] = Items::ItemClass($Item['class']);
         $Result[$ArrayIndex]['BuyPrice'] = Text::MoneyToCoins($Item['BuyPrice']);
         $Result[$ArrayIndex]['SellPrice'] = Text::MoneyToCoins($Item['SellPrice']);
         $Result[$ArrayIndex]['bond_translation'] = Items::BondTranslation($Item['bonding']);
         $Result[$ArrayIndex]['it_translation'] = Items::InventoryTypeTranslation($Item['InventoryType']);
         $ArrayIndex++;
     }
     return $Result;
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:37,代码来源:Zones.FreedomCore.php


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