示例#1
0
文件: Shop.php 项目: Synthx/Acamar
 public function allTypes($items)
 {
     $itemLib = new Item();
     $data = [];
     $string = '';
     foreach ($items as $item) {
         if (!in_array($item->type, $data)) {
             array_push($data, $item->type);
             $string .= '<option value=".type_' . $item->type . '">' . $itemLib->type($item->type) . '</option>';
         }
     }
     return $string;
 }
示例#2
0
文件: Tokens.php 项目: synthx/infuse
 /**
  * Get item's image of token
  *
  * @param string $itemString
  */
 public function getItems($itemString)
 {
     $itemLib = new Item();
     $html = '';
     $itemArray = [];
     if (!empty($itemString)) {
         $items = explode(',', $itemString);
         foreach ($items as $item) {
             if (!empty($item)) {
                 array_push($itemArray, $item);
             }
         }
         $objects = ItemTemplateManager::whereIn('id', $itemArray)->orderByRaw('RAND()')->take(6)->get();
         foreach ($objects as $object) {
             $html .= $itemLib->generateTooltip($object->id, $object->name, $object->level, $object->type, $object->icon, $object->statsTemplate, 52);
         }
     }
     return $html;
 }
示例#3
0
文件: Player.php 项目: synthx/infuse
 /**
  * Generate item's tooltip
  *
  * @param int $icon
  * @param int $type
  * @param string $name
  * @param int $level
  * @param string $effect
  * @param int $pos
  */
 private function _getTooltip($icon, $type, $name, $level, $effect, $pos)
 {
     $itemLib = new itemLibrary();
     return '<a class="hover_boxjs" data="#item_' . $pos . '"><span class="ak-linker"><img src="' . asset('imgs/items/' . $icon . '.png') . '"></span></a><div id="item_' . $pos . '" style="display:none;"><div class="ak-top"><div class="ak-encyclo-detail-illu ak-illu"><embed src="' . asset('swf/items/' . $icon . '.swf') . '" width="100" height="100" wmode="transparent"></div><div class="ak-detail"><div class="ak-name">' . $name . '</div><div class="ak-type">' . $itemLib->type($type) . '</div><div class="ak-level">Niveau ' . $level . '</div></div></div><div class="ak-encyclo-detail"><div class="ak-container ak-tabs-container"><div class="ak-container ak-tabs-body tab-content"><div id="tab1" class="ak-tab"><div class="ak-content-list ak-tabs-inner-content ak-displaymode-col">' . $itemLib->getEffectOnCharacter($effect) . '</div></div></div></div></div></div>';
 }