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


PHP creatureinfo2函数代码示例

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


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

示例1: creatureinfo

function creatureinfo($id)
{
    global $DB;
    global $npc_cols;
    $row = $DB->selectRow('
			SELECT ?#, c.entry
			{
				, l.name_loc' . $_SESSION['locale'] . ' as `name_loc`
				, l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`
				, ?
			}
			FROM ?_factiontemplate, creature_template c
			{
				LEFT JOIN (locales_creature l)
				ON l.entry=c.entry AND ?
			}
			WHERE
				c.entry = ?d
				AND factiontemplateID = faction_A
			LIMIT 1
		', $npc_cols[0], $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $id);
    return creatureinfo2($row);
}
开发者ID:Reved,项目名称:aowow,代码行数:23,代码来源:allnpcs.php

示例2: JOIN

		SELECT ?#, c.entry
			{, l.name_loc?d AS `name_loc`,
			l.subname_loc' . $_SESSION['locale'] . ' AS `subname_loc`}
		FROM ?_factiontemplate, creature_template c
			{LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ?d}
		WHERE
			(name LIKE ?
			OR subname LIKE ?
			{OR c.entry IN (?a)})
			AND factiontemplateID=faction_A
	', $npc_cols[0], $m ? $_SESSION['locale'] : DBSIMPLE_SKIP, $m ? 1 : DBSIMPLE_SKIP, $nsearch, $nsearch, $m ? $m : DBSIMPLE_SKIP);
unset($m);
unset($t);
unset($tmp);
foreach ($rows as $numRow => $row) {
    $found['npc'][] = creatureinfo2($row);
}
// Ищем объекты
if ($_SESSION['locale'] > 0) {
    $tmp = $DB->select('
			SELECT entry
			FROM locales_gameobject
			WHERE
				name_loc?d LIKE ?
		', $_SESSION['locale'], $nsearch);
    foreach ($tmp as $t) {
        $m[] = $t['entry'];
    }
}
$rows = $DB->select('
		SELECT g.?#
开发者ID:hearthstone-wow,项目名称:AoWoW,代码行数:31,代码来源:search.php

示例3: JOIN

		SELECT c.?#, c.entry
		{
			, l.name_loc?d AS name_loc
			, l.subname_loc?d AS subname_loc
		}
		FROM ?_factiontemplate, creature_template c
		{ LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ? }
		WHERE
			factiontemplateID=faction_A
			{AND type=?}
		ORDER BY minlevel DESC, name
		{LIMIT ?d}
		', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type != '' ? $type : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $npcs = array();
    foreach ($rows as $row) {
        $npcs[] = creatureinfo2($row);
    }
    save_cache(NPC_LISTING, $cache_key, $npcs);
}
if (!($npc_tot = load_cache(NPC_TOT, 'npc_tot'))) {
    unset($npc_tot);
    $npc_tot = $DB->select('
		SELECT COUNT(entry) as npc_tot
		FROM creature_template c
		');
    save_cache(NPC_TOT, 'npc_tot', $npc_tot);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('NPCs'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'username' => $_SESSION['username'], 'path' => path(0, 4, $type));
$smarty->assign('page', $page);
$smarty->assign('npcs', $npcs);
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:npcs.php

示例4: JOIN

		SELECT c.?#, c.entry
		{
			, l.name_loc?d as `name_loc`
			, l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`
		}
		FROM ?_factiontemplate, creature_template c
		{ LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ? }
		WHERE 1=1
			{AND type=?}
			{AND family=?}
			AND factiontemplateID=faction_A
		ORDER BY minlevel DESC, name
		{LIMIT ?d}
		', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type != '' ? $type : DBSIMPLE_SKIP, isset($family) ? $family : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $npcs = array();
    foreach ($rows as $numRow => $row) {
        $npcs[$numRow] = array();
        $npcs[$numRow] = creatureinfo2($row);
    }
    save_cache(5, $cache_str, $npcs);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('NPCs'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'path' => '[0, 4,' . $type . ',' . $family . ']');
$smarty->assign('page', $page);
if (count($npcs >= 0)) {
    $smarty->assign('npcs', $npcs);
}
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Загружаем страницу
$smarty->display('npcs.tpl');
开发者ID:hearthstone-wow,项目名称:AoWoW,代码行数:31,代码来源:npcs.php

示例5: iteminfo2

                $faction['items'][] = iteminfo2($row, 0);
            }
            unset($faction['items']);
        }
        // Персонажи, состоящие во фракции
        $creature_rows = $DB->select('
			SELECT ?#, entry
			FROM creature_template, ?_factiontemplate
			WHERE
				faction_A IN (SELECT factiontemplateID FROM ?_factiontemplate WHERE factionID=?d)
				AND factiontemplateID=faction_A
			', $npc_cols[0], $id);
        if ($creature_rows) {
            $faction['creatures'] = array();
            foreach ($creature_rows as $i => $row) {
                $faction['creatures'][] = creatureinfo2($row);
            }
            unset($creature_rows);
        }
        // Квесты для этой фракции
        $quests_rows = $DB->select('
			SELECT ?#
			FROM quest_template
			WHERE
				RewRepFaction1=?d
				OR RewRepFaction2=?d
				OR RewRepFaction3=?d
				OR RewRepFaction4=?d
			', $quest_cols[2], $id, $id, $id, $id);
        if ($quests_rows) {
            $faction['quests'] = array();
开发者ID:hearthstone-wow,项目名称:AoWoW,代码行数:31,代码来源:faction.php

示例6: array

        $item['skinnedfrom'] = array();
        foreach ($drops_sk as $lootid => $drop) {
            $rows = $DB->select('
				SELECT c.?#, c.entry
				{
					, l.name_loc?d as `name_loc`
					, l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`
				}
				FROM ?_udwbase_factiontemplate, ?_creature_template c
				{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
				WHERE
					skinloot=?d
					AND factiontemplateID=faction_A
				', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $lootid);
            foreach ($rows as $numRow => $row) {
                $item['skinnedfrom'][] = array_merge(creatureinfo2($row), $drop);
            }
        }
        unset($rows);
        unset($lootid);
        unset($drop);
    }
    unset($drops_sk);
    // Дизенчантитcя в:
    if (!($item['disenchanting'] = loot('?_disenchant_loot_template', $item['DisenchantID']))) {
        unset($item['disenchanting']);
    }
    // Получается дизэнчантом из..
    $drops_de = drop('?_disenchant_loot_template', $item['entry']);
    if ($drops_de) {
        $item['disenchantedfrom'] = array();
开发者ID:ryancheung,项目名称:aowow-1,代码行数:31,代码来源:item.php

示例7: JOIN

        $usedbynpc = $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
				(spell1 = ?d
				OR spell2 = ?d
				OR spell3 = ?d
				OR spell4 = ?d)
				AND factiontemplateID=faction_A
			', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']);
        if ($usedbynpc) {
            $spell['usedbynpc'] = array();
            foreach ($usedbynpc as $i => $row) {
                $spell['usedbynpc'][] = creatureinfo2($row);
            }
            unset($usedbynpc);
        }
        // Используется вещями:
        $usedbyitem = $DB->select('
			SELECT ?#, c.entry
			{ , name_loc?d AS name_loc }
			FROM ?_icons, item_template c
			{ LEFT JOIN (locales_item l) ON c.entry = l.entry AND ? }
			WHERE
				(spellid_1 = ?d OR (spellid_2 = ?d AND spelltrigger_2!=6) OR spellid_3 = ?d OR spellid_4 = ?d OR spellid_5 = ?d)
				AND id=displayID
			', $item_cols[2], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']);
        if ($usedbyitem) {
            $spell['usedbyitem'] = array();
开发者ID:Reved,项目名称:aowow,代码行数:31,代码来源:spell.php

示例8: unset

                }
                unset($taughtbyquest);
            }
            // Список НПЦ, кастующих нужный спелл, бла-бла-бла
            $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 (SELECT entry FROM npc_trainer WHERE spell in (?a))
					AND factiontemplateID=faction_A
				', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $taughtbyspells);
            if ($taughtbytrainers) {
                foreach ($taughtbytrainers as $i => $npcrow) {
                    $spell['taughtbynpc'][] = creatureinfo2($npcrow);
                }
                unset($taughtbytrainers);
            }
            // Список книг, кастующих спелл, обучающий нужному спеллу
            $taughtbyitem = $DB->select('
				SELECT ?#, c.entry
				{ , name_loc?d AS name_loc }
				FROM ?_icons, item_template c
				{ LEFT JOIN (locales_item l) ON c.entry = l.entry AND ? }
				WHERE
					((spellid_1 IN (?a))
					OR (spellid_2 IN (?a))
					OR (spellid_3 IN (?a))
					OR (spellid_4 IN (?a))
					OR (spellid_5 IN (?a)))
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:spell.php


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