Fixing various

This commit is contained in:
Antonis Farangitakis 2016-12-29 19:19:24 +02:00 committed by Antz
parent f79e902477
commit 24e1fac367
5 changed files with 31 additions and 15 deletions

View File

@ -81,10 +81,18 @@ switch ($what) {
save_cache(11, $id, $quest);
}
$x .= '$WowheadPower.registerQuest(' . $id . ', 0,{';
if ($quest['name'])
$x .= 'name: \'' . str_normalize($quest['name']) . '\',';
if (isset($quest['Title']))
{
$x .= 'name: \'' . str_normalize($quest['Title']) . '\',';
}
else
{
$x .= 'name: \'' . 'error' . '\',';
}
if ($quest['tooltip'])
{
$x .= 'tooltip: \'' . str_normalize($quest['tooltip']) . '\'';
}
$x .= '});';
break;
default:

View File

@ -10,11 +10,11 @@
*
*/
require_once 'includes/game.php';
require_once 'includes/allspells.php';
require_once 'includes/allitemsets.php';
require_once 'includes/allobjects.php';
require_once 'includes/allquests.php';
require_once('includes/game.php');
require_once('includes/allspells.php');
require_once('includes/allitemsets.php');
require_once('includes/allobjects.php');
require_once('includes/allquests.php');
// Массивы с названиями столбцов, необходимых для различных уровней вызова функций
// для allitems($level=0) - соответствия номер-иконка

View File

@ -167,8 +167,10 @@ function GetQuestStrings(&$data) {
$data['OfferRewardText'] = QuestReplaceStr(htmlspecialchars(!empty($data['OfferRewardText_loc']) ? $data['OfferRewardText_loc'] : $data['OfferRewardText'] ));
$data['EndText'] = QuestReplaceStr(htmlspecialchars(!empty($data['EndText_loc']) ? $data['EndText_loc'] : $data['EndText'] ));
for ($j = 0; $j <= 3; ++$j)
for ($j = 1; $j <= 4; ++$j)
{
$data['ObjectiveText'][$j] = QuestReplaceStr(htmlspecialchars(!empty($data['ObjectiveText' . $j . '_loc']) ? $data['ObjectiveText' . $j . '_loc'] : $data['ObjectiveText' . $j]));
}
}
/**

View File

@ -315,9 +315,15 @@ function mass_coord(&$data) {
foreach ($data as $ndata) {
// Если помимо координат есть ещё данные о респауне, преобразуем их к удобочитаемому виду:
if (isset($ndata['spawntimesecs']))
$tmp = array_merge(coord_db2wow($ndata['m'], $ndata['x'], $ndata['y'], false), array('r' => sec_to_time($ndata['spawntimesecs'])));
{
$coord_db2wow = coord_db2wow($ndata['m'], $ndata['x'], $ndata['y'], false) ?: array();
$tmp = array_merge($coord_db2wow, array('r' => sec_to_time($ndata['spawntimesecs'])));
}
else
{
$tmp = coord_db2wow($ndata['m'], $ndata['x'], $ndata['y'], false);
}
$tmp['t'] = $ndata['type'];
$xdata[] = $tmp;
}

12
npc.php
View File

@ -234,10 +234,10 @@ if (!$npc = load_cache(1, intval($id))) {
// Начиниают квесты...
$rows_qs = $DB->select('
SELECT ?#
FROM ?_creature_questrelation c, ?_quest_template q
SELECT c.?#
FROM ?_quest_relations c, ?_quest_template q
WHERE
c.id=?
c.entry=?
AND q.entry=c.quest
', $quest_cols[2], $id
);
@ -251,10 +251,10 @@ if (!$npc = load_cache(1, intval($id))) {
// Заканчивают квесты...
$rows_qe = $DB->select('
SELECT ?#
FROM ?_creature_involvedrelation c, ?_quest_template q
SELECT c.?#
FROM ?_quest_relations c, ?_quest_template q
WHERE
c.id=?
c.entry=?
AND q.entry=c.quest
', $quest_cols[2], $id
);