本文整理汇总了PHP中localizedName函数的典型用法代码示例。如果您正苦于以下问题:PHP localizedName函数的具体用法?PHP localizedName怎么用?PHP localizedName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了localizedName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: creatureinfo2
function creatureinfo2(&$Row)
{
global $smarty;
// Номер создания
$creature['entry'] = $Row['entry'];
// Имя создания
$creature['name'] = localizedName($Row);
// Заменяем " (1)" на " (героич.)"
$creature['name'] = str_replace(' (1)', LOCALE_HEROIC, $creature['name']);
// Подимя создания
$creature['subname'] = localizedName($Row, 'subname');
// Min/Max уровни
$creature['minlevel'] = $Row['minlevel'];
$creature['maxlevel'] = $Row['maxlevel'];
// TODO: Месторасположение
// $creature['location'] = location($creature['entry'],'creature');
// TODO: Реакция на фракции
$creature['react'] = $Row['A'] . ',' . $Row['H'];
// Тип NPC
$creature['type'] = $Row['type'];
// Тег NPC
$creature['tag'] = str_normalize($Row['subname']);
// Ранг NPC
$creature['classification'] = $Row['rank'];
return $creature;
}
示例2: creatureinfo2
function creatureinfo2($Row)
{
$creature = array('entry' => $Row['entry'], 'name' => str_replace(' (1)', LOCALE_HEROIC, localizedName($Row)), 'subname' => localizedName($Row, 'subname'), 'minlevel' => $Row['minlevel'], 'maxlevel' => $Row['maxlevel'], 'react' => $Row['A'] . ',' . $Row['H'], 'type' => $Row['type'], 'classification' => $Row['rank']);
$x .= "</td></tr></table>";
$creature['tooltip'] = $x;
return $creature;
}
示例3: render_npc_tooltip
function render_npc_tooltip(&$Row)
{
global $type;
global $rank;
$x = '<table>';
$x .= '<tr><td><b class="q">' . localizedName($Row) . '</b></td></tr>';
$x .= '<tr><td>' . localizedName($Row, 'subname') . '</td></tr>';
$x .= '<tr><td>Level ';
if ($Row['rank'] == 3) {
$x .= '??';
} else {
$x .= $Row['minlevel'];
if ($Row['minlevel'] != $Row['maxlevel']) {
$x .= ' - ' . $Row['maxlevel'];
}
}
$x .= ' ' . $type[$Row['type']] . ' (' . $rank[$Row['rank']] . ')</td></tr>';
$x .= '</table>';
return $x;
}
示例4: render_spell_tooltip
function render_spell_tooltip(&$row)
{
// БД
global $DB;
// Время каста
if ($row['spellcasttimesID'] > 1) {
$casttime = $DB->selectCell('SELECT base FROM ?_spellcasttimes WHERE id=? LIMIT 1', $row['spellcasttimesID']) / 1000;
}
// Дальность действия
$range = $DB->selectCell('SELECT rangeMax FROM ?_spellrange WHERE rangeID=? LIMIT 1', $row['rangeID']);
// Реагенты
$reagents = array();
$i = 0;
for ($j = 1; $j <= 8; $j++) {
if ($row['reagent' . $j] > 0) {
$reagents[$i] = array();
// Имя реагента
$names = $DB->selectRow('
SELECT name{, l.name_loc?d as `name_loc`}
FROM item_template i
{ LEFT JOIN (locales_item l) ON l.entry = i.entry AND ? }
WHERE i.entry = ?d', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $row['reagent' . $j]);
$reagents[$i]['name'] = localizedName($names);
// Количество реагентов
// В количестве может быть значение -1, что с ним делать?
$reagents[$i]['count'] = abs($row['reagentcount' . $j]);
$i++;
}
}
// Инструменты
$tools = array();
$i = 0;
for ($j = 1; $j <= 2; $j++) {
if ($row['tool' . $j]) {
$tools[$i] = array();
// Имя инструмента
$names = $DB->selectRow('
SELECT name{, l.name_loc?d as `name_loc`}
FROM item_template i
{ LEFT JOIN (locales_item l) ON l.entry = i.entry AND ? }
WHERE i.entry = ?d', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $row['tool' . $j]);
$tools[$i]['name'] = localizedName($names);
$i++;
}
}
// До подсказка о спелле
$desc = spell_desc2($row);
$x = '';
$x .= '<table><tr><td>';
if ($row['rank_loc' . $_SESSION['locale']]) {
$x .= '<table width="100%"><tr><td>';
}
$x .= '<b>' . $row['spellname_loc' . $_SESSION['locale']] . '</b><br />';
if ($row['rank_loc' . $_SESSION['locale']]) {
$x .= '</td><th><b class="q0">' . $row['rank_loc' . $_SESSION['locale']] . '</b></th></tr></table>';
}
if ($range && ($row['manacost'] > 0 || $row['manacostpercent'] > 0)) {
$x .= '<table width="100%"><tr><td>';
}
if ($row['manacost'] > 0) {
$x .= $row['manacost'] . ' mana<br />';
}
if ($row['manacostpercent'] > 0) {
$x .= $row['manacostpercent'] . "% of base mana<br />";
}
if ($range && ($row['manacost'] > 0 || $row['manacostpercent'] > 0)) {
$x .= '</td><th>';
}
if ($range) {
$x .= $range . ' yd range<br />';
}
if ($range && ($row['manacost'] > 0 || $row['manacostpercent'] > 0)) {
$x .= '</th></tr></table>';
}
if (($row['ChannelInterruptFlags'] || isset($casttime) || $row['spellcasttimesID'] == 1) && $row['cooldown']) {
$x .= '<table width="100%"><tr><td>';
}
if ($row['ChannelInterruptFlags']) {
$x .= 'Channeled';
} elseif (isset($casttime)) {
$x .= $casttime . ' sec cast';
} elseif ($row['spellcasttimesID'] == 1) {
$x .= 'Instant';
}
if ($row['procChance'] < 100.0) {
$x .= ' <span title="spell proc chance" class="q0">' . $row['procChance'] . '%</span>';
}
if (($row['ChannelInterruptFlags'] || isset($casttime) || $row['spellcasttimesID'] == 1) && $row['cooldown']) {
$x .= '</td><th>';
}
if ($row['cooldown']) {
$x .= $row['cooldown'] / 1000 . ' sec cooldown';
}
if (($row['ChannelInterruptFlags'] || isset($casttime) || $row['spellcasttimesID'] == 1) && $row['cooldown']) {
$x .= '</th></tr></table>';
}
$x .= '</td></tr></table>';
if ($reagents) {
$x .= '<table><tr><td>';
$x .= LOCALE_REAGENTS;
//.........这里部分代码省略.........
示例5: unset
}
}
unset($rows);
// ГО
$rows = $DB->select('
SELECT g.entry, g.name
{, l.name_loc?d AS name_loc}
FROM gameobject_involvedrelation q, gameobject_template g
{LEFT JOIN (locales_gameobject l) ON l.entry = g.entry AND ?}
WHERE
q.quest=?d
AND g.entry=q.id
', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $quest['entry']);
if ($rows) {
foreach ($rows as $tmp) {
$tmp['name'] = localizedName($tmp);
$quest['end'][] = array_merge($tmp, array('type' => 'object'));
}
}
unset($rows);
// Цель критерии
$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
GROUP BY a.id
示例6: extract_values
$smarty->config_load($conf_file, 'object');
@(list($type) = extract_values($podrazdel));
$cache_key = cache_key($type);
if (!($data = load_cache(OBJECT_LISTING, $cache_key))) {
unset($data);
// Получаем данные по этому типу объектов
$rows = $DB->select("\n\t\t\tSELECT g.* {, a.requiredskill1 as ?#} {, a.requiredskill2 as ?#}\n\t\t\t\t{, l.name_loc?d AS `name_loc`}\n\t\t\tFROM {gameobject_queststarter ?# LEFT JOIN gameobject_questender qe ON qs.id = qe.id, } {?_lock ?#, } gameobject_template g\n\t\t\t\t{LEFT JOIN (locales_gameobject l) ON l.entry=g.entry AND ?d}\n\t\t\tWHERE \n\t\t\t\tg.name <> ''\n\t\t\t\t{ AND g.type = ? } \n\t\t\t\t{ AND g.data0=a.lockID AND g.type=3 AND a.type1=2 AND 1=?} \n\t\t\t\t{ AND g.data0=a.lockID AND g.type=3 AND a.type2=2 AND 1=?} \n\t\t\t\t{ AND a.lockproperties1=2 AND 1=?}\n\t\t\t\t{ AND a.lockproperties1=3 AND 1=?}\n\t\t\t\t{ AND a.lockproperties2=1 AND 1=?}\n\t\t\t\t{ AND g.entry = qs.?#}\n\t\t\tORDER by name\n\t\t\t{LIMIT ?d}\n\t\t", in_array($type, array(-3, -4)) ? 'skill' : DBSIMPLE_SKIP, $type == -5 ? 'skill' : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $type == -2 ? 'qs' : DBSIMPLE_SKIP, in_array($type, array(-3, -4, -5)) ? 'a' : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type > 0 ? $type : DBSIMPLE_SKIP, in_array($type, array(-3, -4)) ? 1 : DBSIMPLE_SKIP, $type == -5 ? 1 : DBSIMPLE_SKIP, $type == -3 ? 1 : DBSIMPLE_SKIP, $type == -4 ? 1 : DBSIMPLE_SKIP, $type == -5 ? 1 : DBSIMPLE_SKIP, $type == -2 ? 'id' : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
$i = 0;
$data = array();
foreach ($rows as $row) {
$data[$i] = array();
$data[$i]['entry'] = $row['entry'];
if (isset($row['skill'])) {
$data[$i]['skill'] = $row['skill'];
}
$data[$i]['name'] = preg_replace('/[\\r\\n]+/', " ", localizedName($row));
// TODO: Расположение
$data[$i]['location'] = "[-1]";
// Тип объекта
$data[$i]['type'] = isset($type) ? $type : $row['type'];
$t_name = trim($data[$i]['name']);
$i++;
}
save_cache(OBJECT_LISTING, $cache_key, $data);
}
if (!($object_tot = load_cache(OBJECT_TOT, 'object_tot'))) {
unset($object_tot);
// Получаем данные по этому типу объектов
$object_tot = $DB->select('
SELECT COUNT(g.entry) as num_objects
FROM gameobject_template g
示例7: GetQuestReq
function GetQuestReq($id, $count, $type)
{
global $DB;
switch ($type) {
case 1:
$row = $DB->selectRow('
SELECT name
{, l.name_loc?d AS name_loc}
FROM creature_template c
{ LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ? }
WHERE
c.entry = ?d
LIMIT 1
', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $id);
$name = localizedName($row);
return $name . ($count > 1 ? ' x' . $count : '');
break;
case 2:
$row = $DB->selectRow('
SELECT name
{, l.name_loc?d AS name_loc}
FROM item_template c
{ LEFT JOIN (locales_item l) ON l.entry=c.entry AND ? }
WHERE
c.entry = ?d
LIMIT 1
', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $id);
$name = localizedName($row);
return $name . ($count > 1 ? ' x' . $count : '');
break;
}
}
示例8: render_object_tooltip
function render_object_tooltip(&$Row, $object_type)
{
global $type;
$x = '<table>';
$x .= '<tr><td><b class="q">' . localizedName($Row) . '</b></td></tr>';
$x .= '<tr><td>' . $type[$object_type] . '</td></tr>';
$x .= '</table>';
return $x;
}
示例9: JOIN
$tmp = $DB->selectRow('
SELECT c.entry, c.name
{
, l.name_loc?d as `name_loc`
}
FROM creature_template c
{
LEFT JOIN (locales_creature l)
ON l.entry = c.entry AND ?
}
WHERE
c.difficulty_entry_1 = ?d
LIMIT 1
', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $npc['entry']);
if ($tmp) {
$npc['heroic'] = array('type' => 1, 'entry' => $tmp['entry'], 'name' => localizedName($tmp));
$npc['name'] = str_replace(' (1)', '', $npc['name']);
$normal_entry = $tmp['entry'];
unset($tmp);
}
}
// Дроп
$lootid = $row['lootid'];
$skinid = $row['skinloot'];
$pickpocketid = $row['pickpocketloot'];
// И�пользуемые �пеллы
$npc['ablities'] = array();
$tmp = array();
for ($j = 0; $j <= 4; ++$j) {
if ($row['spell' . $j] && !in_array($row['spell' . $j], $tmp)) {
$tmp[] = $row['spell' . $j];
示例10: JOIN
f.name_loc' . $_SESSION['locale'] . ' as `faction-name`, ft.factionID as `factionID`
FROM ?_factiontemplate ft, ?_factions f, creature_template c
{
LEFT JOIN (locales_creature l)
ON l.entry = c.entry AND ?
}
WHERE
c.entry = ?
AND ft.factiontemplateID = c.faction_A
AND f.factionID = ft.factionID
LIMIT 1
', $npc_cols[1], $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $id);
if ($row) {
$npc = $row;
$npc['name'] = localizedName($row);
$npc['subname'] = localizedName($row, 'subname');
if ($npc['rank'] == 3) {
$npc['minlevel'] = '??';
$npc['maxlevel'] = '??';
}
$npc['mindmg'] = round(($row['mindmg'] + $row['attackpower']) * $row['dmg_multiplier']);
$npc['maxdmg'] = round(($row['maxdmg'] + $row['attackpower']) * $row['dmg_multiplier']);
$toDiv = array('minhealth', 'maxmana', 'minmana', 'maxhealth', 'armor', 'mindmg', 'maxdmg');
// Разделяем на тысячи (ххххххххх => ххх,ххх,ххх)
foreach ($toDiv as $e) {
$npc[$e] = number_format($npc[$e]);
}
$npc['rank'] = $smarty->get_config_vars('rank' . $npc['rank']);
// faction_A = faction_H
$npc['faction_num'] = $row['factionID'];
$npc['faction'] = $row['faction-name'];
示例11: array
$glyphs = array();
$glyphs = $DB->select('
SELECT it.entry, it.name, it.subclass, it.spellid_1 AS spellid, i.iconname, gp.typeflags
{, l.name_loc?d AS name_loc }
FROM ?_glyphproperties gp, ?_spell s, ?_icons i, item_template it
{ LEFT JOIN locales_item l ON (l.entry = it.entry AND ?) }
WHERE
it.class = 16
AND it.displayid = i.id
AND it.spellid_1 = s.spellid
AND s.effect1id = ?d
AND gp.id = s.effect1MiscValue
', $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, 74);
$g_glyphs = array();
foreach ($glyphs as $glyph) {
$name = localizedName($glyph);
if ($_SESSION['locale'] == 0) {
$name = str_replace(LOCALE_GLYPH_OF, '', $name);
}
$g_glyphs[$glyph['entry']] = array('name' => (string) $name, 'description' => (string) spell_desc($glyph['spellid']), 'icon' => (string) $glyph['iconname'], 'type' => (int) ($glyph['typeflags'] & 1 ? 2 : 1), 'classs' => (int) $glyph['subclass'], 'skill' => (int) 2);
}
save_cache(25, 'x', $g_glyphs);
}
echo 'var g_glyphs=' . php2js($g_glyphs);
break;
case 'talent-icon':
$iconname = strtolower($_GET['icon']);
if (!$DB->selectCell('SELECT 1 FROM ?_spellicons WHERE iconname = ?', $iconname)) {
exit;
}
if ($name = load_cache(21, $iconname)) {
示例12: JOIN
LEFT JOIN (?_factions f2) ON f1.team <> 0
WHERE
f1.factionID = ?d
AND f1.team = f2.factionID
LIMIT 1
', $_SESSION['locale'], $_SESSION['locale'], $_SESSION['locale'], $_SESSION['locale'], $id);
if ($row) {
$faction = array();
// Номер фракции
$faction['entry'] = $row['factionID'];
// Название фракции
$faction['name'] = localizedName($row, 'name');
// Описание фракции, из клиента:
$faction['description1'] = localizedName($row, 'description1');
// Описание фракции, c wowwiki.com, находится в таблице factions.sql:
$faction['description2'] = localizedName($row, 'description2');
// Команда/Группа фракции
if ($row['category2'] != 0) {
$faction['group'] = $row['group'];
$faction['category'] = $DB->selectCell('SELECT team FROM ?_factions WHERE factionID = ?d LIMIT 1', $row['category2']);
$faction['category2'] = $row['category2'];
}
// Альянс(1)/Орда(2)
if ($row['side'] != 0) {
$faction['side'] = $row['side'];
}
// Итемы с requiredreputationfaction
$item_rows = $DB->select('
SELECT ?#, entry
FROM item_template i, ?_icons a
WHERE
示例13: in_array
{ AND a.lockproperties1=2 AND 1=?}
{ AND a.lockproperties1=3 AND 1=?}
{ AND a.lockproperties2=1 AND 1=?}
{ AND g.entry = q.?#}
ORDER by name
{LIMIT ?d}
', in_array($type, array(-3, -4)) ? 'skill' : DBSIMPLE_SKIP, $type == -5 ? 'skill' : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $type == -2 ? 'q' : DBSIMPLE_SKIP, in_array($type, array(-3, -4, -5)) ? 'a' : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type > 0 ? $type : DBSIMPLE_SKIP, in_array($type, array(-3, -4)) ? 1 : DBSIMPLE_SKIP, $type == -5 ? 1 : DBSIMPLE_SKIP, $type == -3 ? 1 : DBSIMPLE_SKIP, $type == -4 ? 1 : DBSIMPLE_SKIP, $type == -5 ? 1 : DBSIMPLE_SKIP, $type == -2 ? 'id' : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
$i = 0;
$data = array();
foreach ($rows as $row) {
$data[$i] = array();
$data[$i]['entry'] = $row['entry'];
if (isset($row['skill'])) {
$data[$i]['skill'] = $row['skill'];
}
$data[$i]['name'] = localizedName($row);
// TODO: Расположение
$data[$i]['location'] = "[-1]";
// Тип объекта
$data[$i]['type'] = isset($type) ? $type : $row['type'];
$i++;
}
save_cache(4, $cache_key, $data);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('Objects'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'path' => path(0, 5, $type));
$smarty->assign('page', $page);
// Передаем массив данных шаблонизатору
$smarty->assign('data', $data);
// Статистика выполнения mysql запросов
$smarty->assign('mysql', $DB->getStatistics());
示例14: creatureinfo2
function creatureinfo2($Row)
{
$name_sub_locale = localizedName($Row, 'subname');
$creature = array('entry' => $Row['entry'], 'name' => str_replace(' (1)', LOCALE_HEROIC, localizedName($Row)), 'subname' => $name_sub_locale, 'minlevel' => $Row['minlevel'], 'maxlevel' => $Row['maxlevel'], 'react' => $Row['A'] . ',' . $Row['H'], 'type' => $Row['type'], 'classification' => $Row['rank']);
$x = '';
$x = '';
$x .= '';
$x .= "<table><tr><td><b class=\"q\">" . htmlspecialchars(str_replace(' (1)', LOCALE_HEROIC, localizedName($Row))) . "</b></td></tr></table><table><tr><td>";
if (!empty($name_sub_locale)) {
$x .= $name_sub_locale . "<br>";
}
$level = $Row['rank'] == 3 ? '??' : ($Row['minlevel'] == $Row['maxlevel'] ? $Row['minlevel'] : "{$Row['minlevel']} - {$Row['maxlevel']}");
switch ($Row['rank']) {
case 1:
$rank = ' ' . LOCALE_NPCRANK_ELITE . '';
break;
case 2:
$rank = ' ' . LOCALE_NPCRANK_RAREELITE . '';
break;
case 3:
$rank = ' ' . LOCALE_NPCRANK_BOSS . '';
break;
case 4:
$rank = ' ' . LOCALE_NPCRANK_RARE . '';
break;
default:
$rank = '';
break;
}
switch ($Row['type']) {
case 1:
$type = LOCALE_NPCTYPE_BEAST;
break;
case 2:
$type = LOCALE_NPCTYPE_DRANGONKIN;
break;
case 3:
$type = LOCALE_NPCTYPE_DEMON;
break;
case 4:
$type = LOCALE_NPCTYPE_ELEMENTAL;
break;
case 5:
$type = LOCALE_NPCTYPE_GIANT;
break;
case 6:
$type = LOCALE_NPCTYPE_UNDEAD;
break;
case 7:
$type = LOCALE_NPCTYPE_HUMANOID;
break;
case 8:
$type = LOCALE_NPCTYPE_CRITTER;
break;
case 9:
$type = LOCALE_NPCTYPE_MECHANIC;
break;
case 10:
$type = LOCALE_NPCTYPE_UNCATEGORIZED;
break;
default:
$type = '';
break;
}
$x .= "" . LOCALE_LVL . " {$level} {$type}{$rank}";
$x .= "</td></tr></table>";
$creature['tooltip'] = $x;
return $creature;
}
示例15: objectinfo2
function objectinfo2(&$Row, $level = 0)
{
global $DB;
// Номер объекта
$object['entry'] = $Row['entry'];
// Название объекта
$object['name'] = localizedName($Row);
// Тип объекта
$object['type'] = $Row['type'];
if ($level > 0) {
// В зависимости от типа объекта, заполняем поля:
switch ($object['type']) {
case GAMEOBJECT_TYPE_DOOR:
/*
* data0: startOpen (Boolean flag)
* data1: open (LockId from Lock.dbc)
* data2: autoClose (long unknown flag)
* data3: noDamageImmune (Boolean flag)
* data4: openTextID (Unknown Text ID)
* data5: closeTextID (Unknown Text ID)
*/
$object['lockid'] = $Row['data1'];
break;
case GAMEOBJECT_TYPE_BUTTON:
/*
* data0: startOpen (State)
* data1: open (LockId from Lock.dbc)
* data2: autoClose (long unknown flag)
* data3: linkedTrap (gameobject_template.entry (Spawned GO type 6))
* data4: noDamageImmune (Boolean flag)
* data5: large? (Boolean flag)
* data6: openTextID (Unknown Text ID)
* data7: closeTextID (Unknown Text ID)
* data8: losOK (Boolean flag)
*/
$object['lockid'] = $Row['data1'];
case GAMEOBJECT_TYPE_QUESTGIVER:
/*
* data0: open (LockId from Lock.dbc)
* data1: questList (unknown ID)
* data2: pageMaterial (PageTextMaterial.dbc)
* data3: gossipID (unknown ID)
* data4: customAnim (unknown value from 1 to 4)
* data5: noDamageImmune (Boolean flag)
* data6: openTextID (Unknown Text ID)
* data7: losOK (Boolean flag)
* data8: allowMounted (Boolean flag)
* data9: large? (Boolean flag)
*/
$object['lockid'] = $Row['data0'];
break;
case GAMEOBJECT_TYPE_CHEST:
/*
* data0: open (LockId from Lock.dbc)
* data1: chestLoot (gameobject_loot_template.entry) *This field is obtained from WDB data and is not to be changed*
* data2: chestRestockTime (time in seconds)
* data3: consumable (State: Boolean flag)
* data4: minRestock (Min successful loot attempts for Mining, Herbalism etc)
* data5: maxRestock (Max successful loot attempts for Mining, Herbalism etc)
* data6: lootedEvent (unknown ID)
* data7: linkedTrap (gameobject_template.entry (Spawned GO type 6))
* data8: questID (v_quest_template.entry of completed quest)
* data9: level (minimal level required to open this gameobject)
* data10: losOK (Boolean flag)
* data11: leaveLoot (Boolean flag)
* data12: notInCombat (Boolean flag)
* data13: log loot (Boolean flag)
* data14: openTextID (Unknown ID)
* data15: use group loot rules (Boolean flag)
*/
$object['lockid'] = $Row['data0'];
$object['lootid'] = $Row['data1'];
break;
case GAMEOBJECT_TYPE_BINDER:
/* Object type not used */
break;
case GAMEOBJECT_TYPE_GENERIC:
/*
* data0: floatingTooltip (Boolean flag)
* data1: highlight (Boolean flag)
* data2: serverOnly? (Always 0)
* data3: large? (Boolean flag)
* data4: floatOnWater (Boolean flag)
* data5: questID (Required active v_quest_template.entry to work)
*/
break;
case GAMEOBJECT_TYPE_TRAP:
/*
* data0: open (LockId from Lock.dbc)
* data1: level (npc equivalent level for casted spell)
* data2: radius (Distance)
* data3: spell (Spell Id from spell.dbc)
* data4: charges (0 or 1)
* data5: cooldown (time in seconds)
* data6: ? (unknown flag)
* data7: startDelay? (time in seconds)
* data8: serverOnly? (always 0)
* data9: stealthed (Boolean flag)
* data10: large? (Boolean flag)
* data11: stealthAffected (Boolean flag)
//.........这里部分代码省略.........