Example #1
0
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;
}
Example #2
0
                 }
                 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']}&nbsp;{$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'>&nbsp;<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'>&nbsp;<a href=\"?quest={$nextquest['entry']}\">{$nextquest['Title']}</a>";
             } else {
                 echo "<a href=\"?quest={$nextquest['entry']}\">{$nextquest['Title']}</a>";
             }
         }
         echo "</td></tr>";
     }
 }
 ###