function getQuest($quest_id, $fields = "*") { global $dDB, $config; $quest = $dDB->selectRow("-- CACHE: 1h\n SELECT {$fields} FROM `quest_template` WHERE `entry` = ?d", $quest_id); if ($quest) { localiseQuest($quest); } return $quest; }
} echo "</td></tr>"; $needForQuest = $dDB->selectRow("SELECT * FROM `quest_template` WHERE ABS(`PrevQuestId`) = ?d", $nextquest['entry']); } else { $nextquest = 0; } } $step++; } } // Ищем квесты требующие выполнение даного квеста $needForQuest = $dDB->selectPage($number, "SELECT * FROM `quest_template` WHERE ABS(`PrevQuestId`) = ?d", $quest['entry']); if ($needForQuest and $number > 1) { echo "<tr><td class = head>{$lang['req_for_quest_next']}</td></tr>"; foreach ($needForQuest as $nextquest) { localiseQuest($nextquest); echo "<tr><td>"; echo "<div style='float: right;'>({$lang['level']} {$nextquest['QuestLevel']})</div>"; if (getAllowableRace($nextquest['RequiredRaces']) && $nextquest['RequiredRaces'] & 1101 && $nextquest['RequiredRaces'] != 1791) { echo "<img width=14 height=14 src='images/player_info/factions_img/alliance.gif'> <a href=\"?quest={$nextquest['entry']}\">{$nextquest['Title']}</a>"; } else { if (getAllowableRace($nextquest['RequiredRaces']) && $nextquest['RequiredRaces'] & 690 && $nextquest['RequiredRaces'] != 1791) { echo "<img width=14 height=14 src='images/player_info/factions_img/horde.gif'> <a href=\"?quest={$nextquest['entry']}\">{$nextquest['Title']}</a>"; } else { echo "<a href=\"?quest={$nextquest['entry']}\">{$nextquest['Title']}</a>"; } } echo "</td></tr>"; } } ###