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


PHP spellinfo2函数代码示例

本文整理汇总了PHP中spellinfo2函数的典型用法代码示例。如果您正苦于以下问题:PHP spellinfo2函数的具体用法?PHP spellinfo2怎么用?PHP spellinfo2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: spellinfo

/**
 *
 * @param type $id
 * @return type 
 */
function spellinfo($id)
{
    global $DB;
    $row = $DB->selectRow('
		SELECT s.*, i.iconname
		FROM ?_aowow_spell s, ?_aowow_spellicons i
		WHERE
			s.spellID=?
			AND i.id = s.spellicon
		LIMIT 1
		', $id);
    return spellinfo2($row);
}
开发者ID:Refuge89,项目名称:World-of-Warcraft-Trinity-Core-MaNGOS,代码行数:18,代码来源:allspells.php

示例2: foreach

		FROM ?_itemset
		WHERE name LIKE ?
	', $nsearch);
foreach ($rows as $numRow => $row) {
    $found['itemset'][] = itemsetinfo2($row);
}
// Ищем спеллы
$rows = $DB->select('
		SELECT ?#, spellID
		FROM ?_spell s, ?_spellicons i
		WHERE
			s.spellname like ?
			AND i.id = s.spellicon
	', $spell_cols[2], $nsearch);
foreach ($rows as $numRow => $row) {
    $found['spell'][] = spellinfo2($row);
}
$keys = array_keys($found);
if (count($found) == 1 and count($found[$keys[0]]) == 1) {
    header("Location: ?" . $keys[0] . '=' . $found[$keys[0]][0]['entry']);
} else {
    $smarty->assign('found', $found);
    // Если хоть одна информация о вещи найдена - передаём массив с информацией о вещях шаблонизатору
    if (isset($allitems)) {
        $smarty->assign('allitems', $allitems);
    }
    if (isset($allspells)) {
        $smarty->assign('allspells', $allspells);
    }
    // Параметры страницы
    $page = array();
开发者ID:hearthstone-wow,项目名称:AoWoW,代码行数:31,代码来源:search.php

示例3: foreach

        // Talents
        // todo
    } else {
        $spells['sort'] = "'name'";
        // просто спеллы
        $rows = $DB->select('
			SELECT
				?#, `s`.`spellID`
			FROM ?_spell s, ?_spellicons i
			WHERE
				i.id=s.spellicon
			{LIMIT ?d}
		', $spell_cols[2], $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    }
    foreach ($rows as $i => $row) {
        $spells['data'][] = spellinfo2($row);
    }
    save_cache(15, $cache_str, $spells);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => ($title ? $title . ' - ' : '') . $smarty->get_config_vars('Spells'), 'tab' => 0, 'type' => 6, 'typeid' => 0, 'path' => "[0, 1, " . intval($s1) . ", " . intval($s2) . ", " . intval($s3) . "]", 'sort' => isset($spells['sort']) ? $spells['sort'] : "'level','name'");
$smarty->assign('page', $page);
// Статистика выполнения mysql запросов
$smarty->assign('mysql', $DB->getStatistics());
// Если хоть одна информация о вещи найдена - передаём массив с информацией о вещях шаблонизатору
if (isset($allitems)) {
    $smarty->assign('allitems', $allitems);
}
if (count($allspells) >= 0) {
    $smarty->assign('allspells', $allspells);
}
开发者ID:OregonCore,项目名称:AoWoW,代码行数:31,代码来源:spells.php

示例4: array

    $teachspells = $DB->select('
		SELECT ?#, spellID
		FROM ?_npc_trainer, ?_aowow_spell, ?_aowow_spellicons
		WHERE
			entry=?d
			AND spellID=Spell
			AND id=spellicon
		', $spell_cols[2], $npc['entry']);
    if ($teachspells) {
        if (!isset($npc['teaches'])) {
            $npc['teaches'] = array();
        }
        foreach ($teachspells as $teachspell) {
            $num = count($npc['teaches']);
            $npc['teaches'][$num] = array();
            $npc['teaches'][$num] = spellinfo2($teachspell);
        }
    }
    unset($teachspells);
    // Продает:
    $rows_s = $DB->select('
		SELECT ?#, i.entry, i.maxcount, n.`maxcount` as `drop-maxcount`
			{, l.name_loc?d AS `name_loc`}
		FROM ?_npc_vendor n, ?_aowow_icons, ?_item_template i
			{LEFT JOIN (?_locales_item l) ON l.entry=i.entry AND ?d}
		WHERE
			n.entry=?
			AND i.entry=n.item
			AND id=i.displayid
		', $item_cols[2], $_SESSION['locale'] ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] ? 1 : DBSIMPLE_SKIP, $id);
    if ($rows_s) {
开发者ID:Refuge89,项目名称:World-of-Warcraft-Trinity-Core-MaNGOS,代码行数:31,代码来源:npc.php

示例5: array

		FROM ?_udwbase_spell s, ?_udwbase_spellicons i
		WHERE
			((s.effect1itemtype=?d
			OR s.effect2itemtype=?d
			OR s.effect3itemtype=?)
			AND (i.id = s.spellicon))
		', $spell_cols[2], $item['entry'], $item['entry'], $item['entry']);
    if ($rows_cf) {
        $item['createdfrom'] = array();
        foreach ($rows_cf as $numRow => $row) {
            $skillrow = $DB->selectRow('
				SELECT skillID, min_value, max_value
				FROM ?_udwbase_skill_line_ability
				WHERE spellID=?d
				LIMIT 1', $row['spellID']);
            $item['createdfrom'][] = spellinfo2(array_merge($row, $skillrow));
        }
        unset($skillrow);
    }
    unset($rows_cf);
    // Ловится в ...
    $drops_fi = drop('?_fishing_loot_template', $item['entry']);
    if ($drops_fi) {
        $item['fishedin'] = array();
        foreach ($drops_fi as $lootid => $drop) {
            // Обычные локации
            $row = $DB->selectRow('
				SELECT name_loc' . $_SESSION['locale'] . ' AS name, areatableID as id
				FROM ?_udwbase_zones
				WHERE
					areatableID=?d
开发者ID:ryancheung,项目名称:aowow-1,代码行数:31,代码来源:item.php

示例6: array

			SELECT s.*, i.iconname
			FROM ?_spell s, ?_spellicons i
			WHERE
				s.spellname_loc' . $_SESSION['locale'] . ' = ?
				AND s.spellID <> ?d
				AND (
							(s.effect1id = ?d AND s.effect1id!=0)
							OR (s.effect2id = ?d AND s.effect2id!=0)
							OR (s.effect3id = ?d AND s.effect3id!=0)
						)
				AND i.id=s.spellicon
			', $spell['name'], $spell['entry'], $row['effect1id'], $row['effect2id'], $row['effect3id']);
        if ($seealso) {
            $spell['seealso'] = array();
            foreach ($seealso as $i => $row) {
                $spell['seealso'][] = spellinfo2($row);
            }
            unset($seealso);
        }
        // Кто обучает этому спеллу
        $spell['taughtbynpc'] = array();
        // Список тренеров, обучающих нужному спеллу
        $trainers = $DB->selectCol('SELECT entry FROM npc_trainer WHERE spell = ?d', $spell['entry']);
        if ($trainers) {
            $taughtbytrainers = $DB->select('
				SELECT ?#, c.entry
				{ , name_loc?d AS name_loc, subname_loc' . $_SESSION['locale'] . ' AS subname_loc }
				FROM ?_factiontemplate, creature_template c
				{ LEFT JOIN (locales_creature l) ON c.entry = l.entry AND ? }
				WHERE
					c.entry IN (?a)
开发者ID:Reved,项目名称:aowow,代码行数:31,代码来源:spell.php

示例7: unset

    }
    unset($rows_cf);
    // Добывается из спелла
    $drops_sp = drop('spell_loot_template', $item['entry']);
    if ($drops_sp) {
        $item['containedinspell'] = array();
        foreach ($drops_sp as $lootid => $drop) {
            $rows = $DB->select('
				SELECT s.?#, s.spellID
				FROM ?_spell s, ?_spellicons i
				WHERE
					s.spellID = ?d
					AND i.id = s.spellicon
				', $spell_cols[2], $lootid);
            foreach ($rows as $row) {
                $item['containedinspell'][] = array_merge(spellinfo2($row), $drop);
            }
            unset($rows);
        }
    }
    unset($drops_sp);
    // Цель критерии
    $rows = $DB->select('
			SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
			FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a
			LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
			WHERE
				a.icon = s.id
				AND a.id = c.refAchievement
				AND c.type IN (?a)
				AND c.value1 = ?d
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:item.php


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