Localization/zhCN

* add lost string lookups
This commit is contained in:
Sarjuuk
2024-07-04 21:27:21 +02:00
parent 2e9b503c59
commit c3bae7fe5e
3 changed files with 21 additions and 21 deletions

View File

@@ -236,10 +236,10 @@ class ObjectPage extends GenericPage
if ($ll['encounterId']) if ($ll['encounterId'])
$relBoss = [$ll['npcId'], Lang::profiler('encounterNames', $ll['encounterId'])]; $relBoss = [$ll['npcId'], Lang::profiler('encounterNames', $ll['encounterId'])];
// difficulty dummy // difficulty dummy
else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `difficultyEntry1` = ?d OR `difficultyEntry2` = ?d OR `difficultyEntry3` = ?d', $ll['npcId'], $ll['npcId'], $ll['npcId'])) else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `difficultyEntry1` = ?d OR `difficultyEntry2` = ?d OR `difficultyEntry3` = ?d', $ll['npcId'], $ll['npcId'], $ll['npcId']))
$relBoss = [$c['id'], Util::localizedString($c, 'name')]; $relBoss = [$c['id'], Util::localizedString($c, 'name')];
// base creature // base creature
else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `id` = ?d', $ll['npcId'])) else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `id` = ?d', $ll['npcId']))
$relBoss = [$c['id'], Util::localizedString($c, 'name')]; $relBoss = [$c['id'], Util::localizedString($c, 'name')];
} }

View File

@@ -289,7 +289,7 @@ class QuestPage extends GenericPage
$_ = $chain[0][0]; $_ = $chain[0][0];
while ($_) while ($_)
{ {
if ($_ = DB::Aowow()->selectRow('SELECT id AS typeId, IF(id = nextQuestIdChain, 1, 0) AS error, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, reqRaceMask FROM ?_quests WHERE nextQuestIdChain = ?d', $_['typeId'])) if ($_ = DB::Aowow()->selectRow('SELECT `id` AS `typeId`, IF(`id` = `nextQuestIdChain`, 1, 0) AS `error`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8`, `reqRaceMask` FROM ?_quests WHERE `nextQuestIdChain` = ?d', $_['typeId']))
{ {
if ($_['error']) if ($_['error'])
{ {
@@ -312,7 +312,7 @@ class QuestPage extends GenericPage
$_ = end($chain)[0]; $_ = end($chain)[0];
while ($_) while ($_)
{ {
if ($_ = DB::Aowow()->selectRow('SELECT id AS typeId, IF(id = nextQuestIdChain, 1, 0) AS error, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, reqRaceMask, nextQuestIdChain AS _next FROM ?_quests WHERE id = ?d', $_['_next'])) if ($_ = DB::Aowow()->selectRow('SELECT `id` AS `typeId`, IF(`id` = `nextQuestIdChain`, 1, 0) AS `error`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8`, `reqRaceMask`, `nextQuestIdChain` AS `_next` FROM ?_quests WHERE `id` = ?d', $_['_next']))
{ {
if ($_['error']) // error already triggered if ($_['error']) // error already triggered
break; break;

View File

@@ -1300,11 +1300,11 @@ class SpellPage extends GenericPage
if (in_array($_iId, $alreadyUsed)) if (in_array($_iId, $alreadyUsed))
return false; return false;
$item = DB::Aowow()->selectRow(' $item = DB::Aowow()->selectRow(
SELECT name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, i.id, ic.name AS iconString, quality 'SELECT `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8`, i.`id`, ic.`name` AS `iconString`, `quality`
FROM ?_items i FROM ?_items i
LEFT JOIN ?_icons ic ON ic.id = i.iconId LEFT JOIN ?_icons ic ON ic.`id` = i.`iconId`
WHERE i.id = ?d', WHERE i.`id` = ?d',
$_iId $_iId
); );
@@ -1341,18 +1341,18 @@ class SpellPage extends GenericPage
{ {
$_level++; $_level++;
// assume that tradeSpells only use the first index to create items, so this runs somewhat efficiently >.< // assume that tradeSpells only use the first index to create items, so this runs somewhat efficiently >.<
$spells = DB::Aowow()->select(' $spells = DB::Aowow()->select(
SELECT reagent1, reagent2, reagent3, reagent4, reagent5, reagent6, reagent7, reagent8, 'SELECT `reagent1`, `reagent2`, `reagent3`, `reagent4`, `reagent5`, `reagent6`, `reagent7`, `reagent8`,
reagentCount1, reagentCount2, reagentCount3, reagentCount4, reagentCount5, reagentCount6, reagentCount7, reagentCount8, `reagentCount1`, `reagentCount2`, `reagentCount3`, `reagentCount4`, `reagentCount5`, `reagentCount6`, `reagentCount7`, `reagentCount8`,
name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc6`, `name_loc8`,
iconIdBak, `iconIdBak`,
s.id AS ARRAY_KEY, ic.name AS iconString s.`id` AS ARRAY_KEY, ic.`name` AS `iconString`
FROM ?_spell s FROM ?_spell s
JOIN ?_icons ic ON s.iconId = ic.id JOIN ?_icons ic ON s.`iconId` = ic.`id`
WHERE (effect1CreateItemId = ?d AND effect1Id = 24)',// OR WHERE (`effect1CreateItemId` = ?d AND `effect1Id` = ?d)',// OR
// (effect2CreateItemId = ?d AND effect2Id = 24) OR // (`effect2CreateItemId` = ?d AND `effect2Id` = ?d) OR
// (effect3CreateItemId = ?d AND effect3Id = 24)', // (`effect3CreateItemId` = ?d AND `effect3Id` = ?d)',
$_iId //, $_iId, $_iId $_iId, SPELL_EFFECT_CREATE_ITEM //, $_iId, SPELL_EFFECT_CREATE_ITEM, $_iId, SPELL_EFFECT_CREATE_ITEM
); );
if (!$spells) if (!$spells)