Template/Update (Part 31)

* convert dbtype 'quest'
 * make use of separate GlobalStrings for spell rewards
This commit is contained in:
Sarjuuk
2025-08-13 17:02:52 +02:00
parent 253cbcb4d9
commit e876463f3b
17 changed files with 834 additions and 779 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
class QuestPowerResponse extends TextResponse implements ICache
{
use TrCache, TrTooltip;
private const /* string */ POWER_TEMPLATE = '$WowheadPower.registerQuest(%d, %d, %s);';
protected int $type = Type::QUEST;
protected int $typeId = 0;
protected int $cacheType = CACHE_TYPE_TOOLTIP;
protected array $expectedGET = array(
'domain' => ['filter' => FILTER_CALLBACK, 'options' => [Locale::class, 'tryFromDomain']]
);
public function __construct(string $id)
{
parent::__construct($id);
// temp locale
if ($this->_get['domain'])
Lang::load($this->_get['domain']);
$this->typeId = intVal($id);
}
protected function generate() : void
{
$quest = new QuestList(array(['id', $this->typeId]));
if ($quest->error)
$this->cacheType = CACHE_TYPE_NONE;
else
$opts = array(
'name' => Lang::unescapeUISequences($quest->getField('name', true), Lang::FMT_RAW),
'tooltip' => $quest->renderTooltip(),
'daily' => $quest->isDaily() ? 1 : null
);
$this->result = new Tooltip(self::POWER_TEMPLATE, $this->typeId, $opts ?? []);
}
}
?>

142
endpoints/quests/quests.php Normal file
View File

@@ -0,0 +1,142 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
class QuestsBaseResponse extends TemplateResponse implements ICache
{
use TrListPage, TrCache;
private const SUB_SUB_CAT = array(
// Quest Hubs
3679 => 3519, 4024 => 3537, 25 => 46, 1769 => 361,
// Startzones: Horde
132 => 1, 9 => 12, 3431 => 3430, 154 => 85,
// Startzones: Alliance
3526 => 3524, 363 => 14, 220 => 215, 188 => 141,
// Group: Caverns of Time
2366 => 1941, 2367 => 1941, 4100 => 1941,
// Group: Hellfire Citadell
3562 => 3535, 3713 => 3535, 3714 => 3535,
// Group: Auchindoun
3789 => 3688, 3790 => 3688, 3791 => 3688, 3792 => 3688,
// Group: Tempest Keep
3847 => 3842, 3848 => 3842, 3849 => 3842,
// Group: Coilfang Reservoir
3715 => 3905, 3716 => 3905, 3717 => 3905,
// Group: Icecrown Citadel
4809 => 4522, 4813 => 4522, 4820 => 4522
);
protected int $type = Type::QUEST;
protected int $cacheType = CACHE_TYPE_PAGE;
protected string $template = 'quests';
protected string $pageName = 'quests';
protected ?int $activeTab = parent::TAB_DATABASE;
protected array $breadcrumb = [0, 3];
protected array $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected array $expectedGET = array(
'filter' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => Filter::PATTERN_PARAM]]
);
protected array $validCats = Game::QUEST_CLASSES;
public function __construct(string $pageParam)
{
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageParam);
$this->subCat = $pageParam !== '' ? '='.$pageParam : '';
$this->filter = new QuestListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->filterError = $this->filter->error;
}
protected function generate() : void
{
$this->h1 = Util::ucFirst(Lang::game('quests'));
$conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
$this->filter->evalCriteria();
if ($_ = $this->filter->getConditions())
$conditions[] = $_;
$this->filterError = $this->filter->error; // maybe the evalX() caused something
if (isset($this->category[1]))
$conditions[] = ['zoneOrSort', $this->category[1]];
else if (isset($this->category[0]))
$conditions[] = ['zoneOrSort', $this->validCats[$this->category[0]]];
/*************/
/* Menu Path */
/*************/
foreach ($this->category as $c)
$this->breadcrumb[] = $c;
if (isset($this->category[1]) && isset(self::SUB_SUB_CAT[$this->category[1]]))
array_splice($this->breadcrumb, 3, 0, self::SUB_SUB_CAT[$this->category[1]]);
/**************/
/* Page Title */
/**************/
array_unshift($this->title, $this->h1);
if (isset($this->category[1]))
array_unshift($this->title, Lang::quest('cat', $this->category[0], $this->category[1]));
else if (isset($this->category[0]))
{
$c0 = Lang::quest('cat', $this->category[0]);
array_unshift($this->title, is_array($c0) ? $c0[0] : $c0);
}
/****************/
/* Main Content */
/****************/
$this->redButtons[BUTTON_WOWHEAD] = true;
if ($fiQuery = $this->filter->buildGETParam())
$this->wowheadLink .= '&filter='.$fiQuery;
$quests = new QuestList($conditions, ['extraOpts' => $this->filter->extraOpts, 'calcTotal' => true]);
$this->extendGlobalData($quests->getJSGlobals());
$tabData = ['data' => $quests->getListviewData()];
if ($rc = $this->filter->fiReputationCols)
$tabData['extraCols'] = '$fi_getReputationCols('.json_encode($rc, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE).')';
else if ($this->filter->fiExtraCols)
$tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
// create note if search limit was exceeded
if ($quests->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_questsfound', $quests->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
$tabData['_truncated'] = 1;
}
else if (isset($this->category[1]) && $this->category[1] > 0)
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_questgivers, '.$this->category[1].', g_zones['.$this->category[1].'], '.$this->category[1].')';
$this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"]);
$this->lvTabs->addListviewTab(new Listview($tabData, QuestList::$brickFile));
parent::generate();
}
}
?>

View File

@@ -36,7 +36,7 @@ class QuestList extends DBTypeList
$_curTpl['cat1'] = $_curTpl['zoneOrSort']; // should probably be in a method...
$_curTpl['cat2'] = 0;
foreach (Game::$questClasses as $k => $arr)
foreach (Game::QUEST_CLASSES as $k => $arr)
{
if (in_array($_curTpl['cat1'], $arr))
{

View File

@@ -31,7 +31,7 @@ class Game
1 => ['ability_rogue_eviscerate', 'ability_warrior_innerrage', 'ability_warrior_defensivestance' ]
);
public static $questClasses = array(
public const /* array */ QUEST_CLASSES = array(
-2 => [ 0],
0 => [ 1, 3, 4, 8, 9, 10, 11, 12, 25, 28, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 85, 130, 132, 139, 154, 267, 1497, 1519, 1537, 2257, 3430, 3431, 3433, 3487, 4080, 4298],
1 => [ 14, 15, 16, 17, 141, 148, 188, 215, 220, 331, 357, 361, 363, 400, 405, 406, 440, 490, 493, 618, 1377, 1637, 1638, 1657, 1769, 3524, 3525, 3526, 3557],

View File

@@ -490,7 +490,7 @@ class Lang
public static function formatSkillBreakpoints(array $bp, int $fmt = self::FMT_MARKUP) : string
{
$tmp = self::game('difficulty').self::main('colon');
$tmp = self::game('difficulty');
$base = match ($fmt)
{

View File

@@ -330,7 +330,7 @@ $lang = array(
'mails' => "Briefe",
'cooldown' => "%s Abklingzeit",
'difficulty' => "Modus",
'difficulty' => "Modus: ",
'dispelType' => "Bannart",
'duration' => "Dauer",
'eventShort' => "Ereignis: %s",
@@ -1135,8 +1135,8 @@ $lang = array(
),
'event' => array(
'notFound' => "Dieses Weltereignis existiert nicht.",
'start' => "Anfang",
'end' => "Ende",
'start' => "Anfang: ",
'end' => "Ende: ",
'interval' => "Intervall",
'inProgress' => "Ereignis findet gerade statt",
'category' => ["Nicht kategorisiert", "Feiertage", "Wiederkehrend", "Spieler vs. Spieler"]
@@ -1272,22 +1272,22 @@ $lang = array(
'_transfer' => 'Dieses Quest wird mit <a href="?quest=%d" class="q1">%s</a> vertauscht, wenn Ihr zur <span class="icon-%s">%s</span> wechselt.',
'questLevel' => "Stufe %s",
'requirements' => "Anforderungen",
'reqMoney' => "Benötigtes Geld",
'reqMoney' => "Benötigtes Geld: %s",
'money' => "Geld",
'additionalReq' => "Zusätzliche Anforderungen um das Quest zu erhalten",
'reqRepWith' => 'Eure Reputation mit <a href="?faction=%d">%s</a> %s %s sein',
'reqRepMin' => "muss mindestens",
'reqRepMax' => "darf höchstens",
'progress' => "Fortschritt",
'provided' => "Bereitgestellt",
'provided' => "(Bereitgestellt)",
'providedItem' => "Bereitgestellter Gegenstand",
'completion' => "Abschluss",
'description' => "Beschreibung",
'playerSlain' => "Spieler getötet",
'profession' => "Beruf",
'timer' => "Zeitbegrenzung",
'loremaster' => "Meister der Lehren",
'suggestedPl' => "Empfohlene Spielerzahl",
'playerSlain' => "Spieler getötet&nbsp;(%d)",
'profession' => "Beruf: ",
'timer' => "Zeitbegrenzung: ",
'loremaster' => "Meister der Lehren: ",
'suggestedPl' => "Empfohlene Spielerzahl: %d",
'keepsPvpFlag' => "Hält Euch im PvP",
'daily' => 'Täglich',
'weekly' => "Wöchentlich",
@@ -1308,16 +1308,17 @@ $lang = array(
'enabledByQ' => "Aktiviert durch",
'enabledByQDesc'=> "Ihr könnt diese Quest nur annehmen, wenn eins der nachfolgenden Quests aktiv ist",
'gainsDesc' => "Bei Abschluss dieser Quest erhaltet Ihr",
'theTitle' => 'den Titel "%s"',
'unavailable' => "Diese Quest wurde als nicht genutzt markiert und kann weder erhalten noch vollendet werden.",
'experience' => "Erfahrung",
'expConvert' => "(oder %s, wenn auf Stufe %d vollendet)",
'expConvert2' => "%s, wenn auf Stufe %d vollendet",
'chooseItems' => "Auf Euch wartet eine dieser Belohnungen",
'receiveItems' => "Ihr bekommt",
'receiveAlso' => "Ihr bekommt außerdem",
'spellCast' => "Der folgende Zauber wird auf Euch gewirkt",
'spellLearn' => "Ihr erlernt",
'rewardChoices' => "Auf Euch wartet eine dieser Belohnungen:", // REWARD_CHOICES
'rewardItems' => "Ihr bekommt:", // REWARD_ITEMS_ONLY
'rewardAlso' => "Ihr bekommt außerdem:", // REWARD_ITEMS
'rewardSpell' => "Ihr erlernt:", // REWARD_SPELL
'rewardAura' => "Der folgende Zauber wird auf Euch gewirkt:", // REWARD_AURA
'rewardTradeSkill'=>"Ihr erlernt die Herstellung von:", // REWARD_TRADESKILL_SPELL
'rewardTitle' => 'Euch wird folgender Titel verliehen: "<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d |4Talentpunkt:Talentpunkte;",
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> wird angezeigt)',
'questPoolDesc' => 'Nur %d |4Quest kann:Quests können; aus diesem Tab gleichzeitig aktiv sein',
@@ -1444,8 +1445,8 @@ $lang = array(
'mailDelivery' => 'Ihr werdet <a href="?mail=%d">diesen Brief</a>%s%s erhalten',
'mailBy' => ' von <a href="?npc=%d">%s</a>',
'mailIn' => " nach %s",
'delay' => "Verzögerung",
'sender' => "Absender",
'delay' => "Verzögerung: %s",
'sender' => "Absender: %s",
'untitled' => "Unbetitelter Brief #%d"
),
'pet' => array(

View File

@@ -330,7 +330,7 @@ $lang = array(
'mails' => "Mails",
'cooldown' => "%s cooldown",
'difficulty' => "Difficulty",
'difficulty' => "Difficulty: ",
'dispelType' => "Dispel type",
'duration' => "Duration",
'eventShort' => "Event: %s",
@@ -1135,8 +1135,8 @@ $lang = array(
),
'event' => array(
'notFound' => "This world event doesn't exist.",
'start' => "Start",
'end' => "End",
'start' => "Start: ",
'end' => "End: ",
'interval' => "Interval",
'inProgress' => "Event is currently in progress",
'category' => ["Uncategorized", "Holidays", "Recurring", "Player vs. Player"]
@@ -1272,22 +1272,22 @@ $lang = array(
'_transfer' => 'This quest will be converted to <a href="?quest=%d" class="q1">%s</a> if you transfer to <span class="icon-%s">%s</span>.',
'questLevel' => "Level %s",
'requirements' => "Requirements",
'reqMoney' => "Required money", // REQUIRED_MONEY
'reqMoney' => "Required money: %s", // REQUIRED_MONEY
'money' => "Money",
'additionalReq' => "Additional requirements to obtain this quest",
'reqRepWith' => 'Your reputation with <a href="?faction=%d">%s</a> must be %s %s',
'reqRepMin' => "at least",
'reqRepMax' => "lower than",
'progress' => "Progress",
'provided' => "Provided",
'provided' => "(Provided)",
'providedItem' => "Provided item",
'completion' => "Completion",
'description' => "Description",
'playerSlain' => "Players slain",
'profession' => "Profession",
'timer' => "Timer",
'loremaster' => "Loremaster",
'suggestedPl' => "Suggested players",
'playerSlain' => "Players slain&nbsp;(%d)",
'profession' => "Profession: ",
'timer' => "Timer: ",
'loremaster' => "Loremaster: ",
'suggestedPl' => "Suggested players: %d",
'keepsPvpFlag' => "Keeps you PvP flagged",
'daily' => "Daily",
'weekly' => "Weekly",
@@ -1308,16 +1308,17 @@ $lang = array(
'enabledByQ' => "Enabled by",
'enabledByQDesc'=> "This quest is available only, when one of these quests are active",
'gainsDesc' => "Upon completion of this quest you will gain",
'theTitle' => 'the title "%s"', // partly REWARD_TITLE
'unavailable' => "This quest was marked obsolete and cannot be obtained or completed.",
'experience' => "experience",
'expConvert' => "(or %s if completed at level %d)",
'expConvert2' => "%s if completed at level %d",
'chooseItems' => "You will be able to choose one of these rewards", // REWARD_CHOICES
'receiveItems' => "You will receive", // REWARD_ITEMS_ONLY
'receiveAlso' => "You will also receive", // REWARD_ITEMS
'spellCast' => "The following spell will be cast on you", // REWARD_AURA
'spellLearn' => "You will learn", // REWARD_SPELL
'rewardChoices' => "You will be able to choose one of these rewards:", // REWARD_CHOICES
'rewardItems' => "You will receive:", // REWARD_ITEMS_ONLY
'rewardAlso' => "You will also receive:", // REWARD_ITEMS
'rewardSpell' => "You will learn:", // REWARD_SPELL
'rewardAura' => "The following spell will be cast on you:", // REWARD_AURA
'rewardTradeSkill'=>"You will learn how to create:", // REWARD_TRADESKILL_SPELL
'rewardTitle' => 'You shall be granted the title: "<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d talent |4point:points;", // partly LEVEL_UP_CHAR_POINTS
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> is displayed)',
'questPoolDesc' => 'Only %d |4Quest:Quests; from this tab will be available at a time',
@@ -1444,8 +1445,8 @@ $lang = array(
'mailDelivery' => 'You will receive <a href="?mail=%d">this letter</a>%s%s',
'mailBy' => ' by <a href="?npc=%d">%s</a>',
'mailIn' => " after %s",
'delay' => "Delay",
'sender' => "Sender",
'delay' => "Delay: %s",
'sender' => "Sender: %s",
'untitled' => "Untitled Mail #%d"
),
'pet' => array(

View File

@@ -330,7 +330,7 @@ $lang = array(
'mails' => "Mails",
'cooldown' => "%s de reutilización",
'difficulty' => "Dificultad",
'difficulty' => "Dificultad: ",
'dispelType' => "Tipo de disipación",
'duration' => "Duración",
'eventShort' => "Evento: %s",
@@ -1135,8 +1135,8 @@ $lang = array(
),
'event' => array(
'notFound' => "Este evento del mundo no existe.",
'start' => "Empieza",
'end' => "Termina",
'start' => "Empieza: ",
'end' => "Termina: ",
'interval' => "Intervalo",
'inProgress' => "El evento está en progreso actualmente",
'category' => ["Sin categoría", "Vacacionales", "Periódicos", "Jugador contra Jugador"]
@@ -1272,22 +1272,22 @@ $lang = array(
'_transfer' => 'Esta misión será convertido a <a href="?quest=%d" class="q1">%s</a> si lo transfieres a la <span class="icon-%s">%s</span>.',
'questLevel' => 'Nivel %s',
'requirements' => 'Requisitos',
'reqMoney' => 'Dinero necesario',
'reqMoney' => 'Dinero necesario: %s',
'money' => 'Dinero',
'additionalReq' => "Requerimientos adicionales para obtener esta misión",
'reqRepWith' => 'Tu reputación con <a href="?faction=%d">%s</a> debe ser %s %s',
'reqRepMin' => "de al menos",
'reqRepMax' => "menor que",
'progress' => "Progreso",
'provided' => "Provisto",
'provided' => "(Provisto)",
'providedItem' => "Objeto provisto",
'completion' => "Terminación",
'description' => "Descripción",
'playerSlain' => "Jugadores derrotados",
'profession' => "Profesión",
'timer' => "Tiempo",
'loremaster' => "Maestro cultural",
'suggestedPl' => "Jugadores sugeridos",
'playerSlain' => "Jugadores derrotados&nbsp;(%d)",
'profession' => "Profesión: ",
'timer' => "Tiempo: ",
'loremaster' => "Maestro cultural: ",
'suggestedPl' => "Jugadores sugeridos: %d",
'keepsPvpFlag' => "Mantiene el JcJ activado",
'daily' => 'Diaria',
'weekly' => "Semanal",
@@ -1308,16 +1308,17 @@ $lang = array(
'enabledByQ' => "Activada por",
'enabledByQDesc'=> "Para aceptar esta misión debes haber tener activa alguna de estas misiones",
'gainsDesc' => "Cuando completes esta misión ganarás",
'theTitle' => 'el título "%s"',
'unavailable' => "Esta misión fue marcada como obsoleta y no puede ser obtenida o completada.",
'experience' => "experiencia",
'expConvert' => "(o %s si se completa al nivel %d)",
'expConvert2' => "%s si se completa al nivel %d",
'chooseItems' => "Podrás elegir una de estas recompensas",
'receiveItems' => "Recibirás",
'receiveAlso' => "También recibirás",
'spellCast' => "Te van a lanzar el siguiente hechizo",
'spellLearn' => "Aprenderás",
'rewardChoices' => "Podrás elegir una de estas recompensas:", // REWARD_CHOICES
'rewardItems' => "Recibirás:", // REWARD_ITEMS_ONLY
'rewardAlso' => "También recibirás:", // REWARD_ITEMS
'rewardSpell' => "Aprenderás:", // REWARD_SPELL
'rewardAura' => "Te van a lanzar el siguiente hechizo:", // REWARD_AURA
'rewardTradeSkill'=>"Aprenderás a crear:", // REWARD_TRADESKILL_SPELL
'rewardTitle' => 'Se te otorga el título de: "<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d |4punto:puntos; de talento",
'spellDisplayed'=> ' (mostrando <a href="?spell=%d">%s</a>)',
'questPoolDesc' => 'Solo %d |4misión:misiones; de esta pestaña estarán disponibles a la vez',
@@ -1444,8 +1445,8 @@ $lang = array(
'mailDelivery' => "Usted recibirá esta carta%s%s",
'mailBy' => ' del <a href="?npc=%d">%s</a>',
'mailIn' => " después de %s",
'delay' => "Retraso",
'sender' => "Remitente",
'delay' => "Retraso: %s",
'sender' => "Remitente: %s",
'untitled' => "Correo sin título #%d"
),
'pet' => array(

View File

@@ -330,7 +330,7 @@ $lang = array(
'mails' => "Mails",
'cooldown' => "%s de recharge",
'difficulty' => "Difficulté",
'difficulty' => "Difficulté : ",
'dispelType' => "Type de dissipation",
'duration' => "Durée",
'eventShort' => "Évènement : %s",
@@ -1135,8 +1135,8 @@ $lang = array(
),
'event' => array(
'notFound' => "Cet évènement mondial n'existe pas.",
'start' => "Début",
'end' => "Fin",
'start' => "Début : ",
'end' => "Fin : ",
'interval' => "Intervalle",
'inProgress' => "L'évènement est présentement en cours",
'category' => ["Non classés", "Vacances", "Récurrent", "Joueur ctr. Joueur"]
@@ -1272,22 +1272,22 @@ $lang = array(
'_transfer' => 'Cette quête sera converti en <a href="?quest=%d" class="q1">%s</a> si vous transférez en <span class="icon-%s">%s</span>.',
'questLevel' => "Niveau %s",
'requirements' => "Conditions",
'reqMoney' => "Argent requis",
'reqMoney' => "Argent requis : %s",
'money' => "Argent",
'additionalReq' => "Conditions additionnelles requises pour obtenir cette quête",
'reqRepWith' => 'Votre reputation avec <a href="?faction=%d">%s</a> doît être %s %s',
'reqRepMin' => "d'au moins",
'reqRepMax' => "moins que",
'progress' => "Progrès",
'provided' => "Fourni",
'provided' => "(Fourni)",
'providedItem' => "Objet fourni",
'completion' => "Achèvement",
'description' => "Description",
'playerSlain' => "Joueurs tués",
'profession' => "Métier",
'timer' => "Temps",
'loremaster' => "Maitre des traditions",
'suggestedPl' => "Joueurs suggérés",
'playerSlain' => "Joueurs tués&nbsp;(%d)",
'profession' => "Métier : ",
'timer' => "Temps : ",
'loremaster' => "Maitre des traditions : ",
'suggestedPl' => "Joueurs suggérés : %d",
'keepsPvpFlag' => "Vous garde en mode JvJ",
'daily' => "Journalière",
'weekly' => "Chaque semaine",
@@ -1308,16 +1308,17 @@ $lang = array(
'enabledByQ' => "Autorisée par",
'enabledByQDesc'=> "Vous pouvez faire cette quête seulement quand cette quête est active",
'gainsDesc' => "Lors de l'achèvement de cette quête vous gagnerez",
'theTitle' => '"%s"', // empty on purpose!
'unavailable' => "Cette quête est marquée comme obsolète et ne peut être obtenue ou accomplie.",
'experience' => "points d'expérience",
'expConvert' => "(ou %s si completé au niveau %d)",
'expConvert2' => "%s si completé au niveau %d",
'chooseItems' => "Vous pourrez choisir une de ces récompenses",
'receiveItems' => "Vous recevrez",
'receiveAlso' => "Vous recevrez également",
'spellCast' => "Vous allez être la cible du sort suivant",
'spellLearn' => "Vous apprendrez",
'rewardChoices' => "Vous pourrez choisir une de ces récompenses :", // REWARD_CHOICES
'rewardItems' => "Vous recevrez :", // REWARD_ITEMS_ONLY
'rewardAlso' => "Vous recevrez également :", // REWARD_ITEMS (Ainsi que :)
'rewardSpell' => "Vous apprendrez :", // REWARD_SPELL
'rewardAura' => "Vous allez être la cible du sort suivant :", // REWARD_AURA
'rewardTradeSkill'=>"Vous apprendrez comment créer :", // REWARD_TRADESKILL_SPELL
'rewardTitle' => 'Vous allez recevoir le titre suivant : "<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d |4point:points; de talent",
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> affichés)',
'questPoolDesc' => 'Only %d |4Quest:Quests; from this tab will be available at a time',
@@ -1444,8 +1445,8 @@ $lang = array(
'mailDelivery' => "Vous recevrez cette lettre%s%s",
'mailBy' => ' de <a href="?npc=%d">%s</a>',
'mailIn' => " après %s",
'delay' => "Delay",
'sender' => "Sender",
'delay' => "Delay : %s",
'sender' => "Sender : %s",
'untitled' => "Untitled Mail #%d"
),
'pet' => array(

View File

@@ -330,7 +330,7 @@ $lang = array(
'mails' => "Mails",
'cooldown' => "Восстановление: %s",
'difficulty' => "Сложность",
'difficulty' => "Сложность: ",
'dispelType' => "Тип рассеивания",
'duration' => "Длительность",
'eventShort' => "Игровое событие: %s",
@@ -1135,8 +1135,8 @@ $lang = array(
),
'event' => array(
'notFound' => "Это игровое событие не существует.",
'start' => "Начало",
'end' => "Конец",
'start' => "Начало: ",
'end' => "Конец: ",
'interval' => "[Interval]",
'inProgress' => "Событие активно в данный момент",
'category' => array("Разное", "Праздники", "Периодические", "PvP")
@@ -1272,22 +1272,22 @@ $lang = array(
'_transfer' => 'Этот предмет превратится в <a href="?quest=%d" class="q1">%s</a>, если вы перейдете за <span class="icon-%s">%s</span>.',
'questLevel' => "%s-го уровня",
'requirements' => "Требования",
'reqMoney' => "Требуется денег",
'reqMoney' => "Требуется денег: %s",
'money' => "Деньги",
'additionalReq' => "Дополнительные условия для получения данного задания",
'reqRepWith' => 'Ваша репутация с <a href="?faction=%d">%s</a> должна быть %s %s',
'reqRepMin' => "не менее",
'reqRepMax' => "меньше чем",
'progress' => "Прогресс",
'provided' => "Прилагается",
'provided' => "(Прилагается)",
'providedItem' => "Прилагается предмет",
'completion' => "Завершение",
'description' => "Описание",
'playerSlain' => "Убито игроков",
'profession' => "Профессия",
'timer' => "Таймер",
'loremaster' => "Хранитель мудрости",
'suggestedPl' => "Рекомендуемое количество игроков",
'playerSlain' => "Убито игроков&nbsp;(%d)",
'profession' => "Профессия: ",
'timer' => "Таймер: ",
'loremaster' => "Хранитель мудрости: ",
'suggestedPl' => "Рекомендуемое количество игроков: %d",
'keepsPvpFlag' => "Включает доступность PvP",
'daily' => "Ежедневно",
'weekly' => "Раз в неделю",
@@ -1308,16 +1308,17 @@ $lang = array(
'enabledByQ' => "Включена по",
'enabledByQDesc'=> "Вы можете получить это задание, только когда эти задания доступны",
'gainsDesc' => "По завершении этого задания, вы получите",
'theTitle' => '"%s"', // empty on purpose!
'unavailable' => "пометили это задание как устаревшее — его нельзя получить или выполнить.",
'experience' => "опыта",
'expConvert' => "(или %s на %d-м уровне)",
'expConvert2' => "%s на %d-м уровне",
'chooseItems' => "Вам дадут возможность выбрать одну из следующих наград",
'receiveItems' => "Вы получите",
'receiveAlso' => "Вы также получите",
'spellCast' => "Следующее заклинание будет наложено на вас",
'spellLearn' => "Вы изучите",
'rewardChoices' => "Вы сможете выбрать одну из наград:", // REWARD_CHOICES
'rewardItems' => "Вы получите:", // REWARD_ITEMS_ONLY
'rewardAlso' => "Вы также получите:", // REWARD_ITEMS
'rewardSpell' => "Вы узнаете:", // REWARD_SPELL
'rewardAura' => "На вас будет наложено заклинание:", // REWARD_AURA
'rewardTradeSkill'=>"Вы узнаете, как создавать:", // REWARD_TRADESKILL_SPELL
'rewardTitle' => 'Вам будет присвоено звание: "<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d |4очко талантов:очка талантов:очков талантов;",
'spellDisplayed'=> ' (показано: <a href="?spell=%d">%s</a>)',
'questPoolDesc' => 'Only %d |4Quest:Quests; from this tab will be available at a time',
@@ -1439,14 +1440,14 @@ $lang = array(
)
),
'mail' => array(
'notFound' => "This mail doesn't exist.",
'notFound' => "[This mail doesn't exist].",
'attachment' => "[Attachment]",
'mailDelivery' => "Вы получите это письмо%s%s",
'mailBy' => ' от <a href="?npc=%d">%s</a>',
'mailIn' => " через %s",
'delay' => "Delay",
'sender' => "Sender",
'untitled' => "Untitled Mail #%d"
'delay' => "[Delay]: %s",
'sender' => "[Sender]: %s",
'untitled' => "[Untitled Mail] #%d"
),
'pet' => array(
'notFound' => "Такой породы питомцев не существует.",

View File

@@ -329,7 +329,7 @@ $lang = array(
'mails' => "邮件",
'cooldown' => "%s冷却时间",
'difficulty' => "难度",
'difficulty' => "难度",
'dispelType' => "驱散类型",
'duration' => "持续时间",
'eventShort' => "事件:%s",
@@ -1134,8 +1134,8 @@ $lang = array(
),
'event' => array(
'notFound' => "这个世界事件不存在。",
'start' => "开始",
'end' => "结束",
'start' => "开始",
'end' => "结束",
'interval' => "间隔",
'inProgress' => "事件正在进行中",
'category' => ["未分类", "节日", "循环", "PvP"]
@@ -1271,22 +1271,22 @@ $lang = array(
'_transfer' => '这个任务将被转换到<a href="?quest=%d" class="q1">%s</a>,如果你转移到<span class="icon-%s">%s</span>。',
'questLevel' => "等级%s",
'requirements' => "要求",
'reqMoney' => "需要金钱",
'reqMoney' => "需要金钱%s",
'money' => "金钱",
'additionalReq' => "获得这个任务的额外要求",
'reqRepWith' => '你<a href="?faction=%d">%s</a>的声望需要%s %s',
'reqRepMin' => "至少",
'reqRepMax' => "低于",
'progress' => "进行",
'provided' => "提供的",
'provided' => "提供的",
'providedItem' => "提供的物品",
'completion' => "完成",
'description' => "描述",
'playerSlain' => "玩家被杀",
'profession' => "专业",
'timer' => "计时器",
'loremaster' => "博学者",
'suggestedPl' => "建议玩家数",
'playerSlain' => "玩家被杀%d",
'profession' => "专业",
'timer' => "计时器",
'loremaster' => "博学者",
'suggestedPl' => "建议玩家数%d",
'keepsPvpFlag' => "保持你的PvP标记",
'daily' => "每日",
'weekly' => "每周",
@@ -1307,16 +1307,17 @@ $lang = array(
'enabledByQ' => "启用自",
'enabledByQDesc'=> "只有当这些任务中的一个活跃时,这个任务才可用",
'gainsDesc' => "完成这个任务后,你将获得",
'theTitle' => '头衔 "%s"',
'unavailable' => "这项任务已被标记为过时,无法获得或完成。",
'experience' => "经验",
'expConvert' => "(或%s如果在等级%d完成",
'expConvert2' => "%s如果在等级%d完成",
'chooseItems' => "你可以从这些奖励品中选择一件",
'receiveItems' => "你将得到",
'receiveAlso' => "你还将得到",
'spellCast' => "该法术将被施放在你身上",
'spellLearn' => "你将学会",
'rewardChoices' => "你可以从这些奖励品中选择一件", // REWARD_CHOICES
'rewardItems' => "你将得到", // REWARD_ITEMS_ONLY
'rewardAlso' => "你还将得到", // REWARD_ITEMS
'rewardSpell' => "你将学会:", // REWARD_SPELL
'rewardAura' => "该法术将被施放在你身上:", // REWARD_AURA
'rewardTradeSkill'=>"你将学会如何制造:", // REWARD_TRADESKILL_SPELL
'rewardTitle' => '你将获得头衔:"<a href="?title=%d">%s</a>"', // REWARD_TITLE
'bonusTalents' => "%d天赋|4点数:点数;",
'spellDisplayed'=> ' (<a href="?spell=%d">%s</a> 已显示)',
'questPoolDesc' => '每次只能同时提供 %d 个任务',
@@ -1443,8 +1444,8 @@ $lang = array(
'mailDelivery' => '你将收到 <a href="?mail=%d">这封信</a>%s%s', // "你会收到这封信%s%s",
'mailBy' => '发件人:<a href="?npc=%d">%s</a>',
'mailIn' => "在 %s 后",
'delay' => "延迟",
'sender' => "寄件人",
'delay' => "延迟%s",
'sender' => "寄件人%s",
'untitled' => "无标题邮件 #%d"
),
'pet' => array(

View File

@@ -1,125 +0,0 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
// menuId 3: Quest g_initPath()
// tabId 0: Database g_initHeader()
class QuestsPage extends GenericPage
{
use TrListPage;
protected $type = Type::QUEST;
protected $tpl = 'quests';
protected $path = [0, 3];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $validCats = [];
protected $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected $_get = ['filter' => ['filter' => FILTER_UNSAFE_RAW]];
public function __construct($pageCall, $pageParam)
{
$this->validCats = Game::$questClasses; // not allowed to set this as default
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->filterObj = new QuestListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->name = Util::ucFirst(Lang::game('quests'));
$this->subCat = $pageParam ? '='.$pageParam : '';
}
protected function generateContent()
{
$conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if (isset($this->category[1]))
$conditions[] = ['zoneOrSort', $this->category[1]];
else if (isset($this->category[0]))
$conditions[] = ['zoneOrSort', $this->validCats[$this->category[0]]];
$this->filterObj->evalCriteria();
if ($_ = $this->filterObj->getConditions())
$conditions[] = $_;
$quests = new QuestList($conditions, ['extraOpts' => $this->filterObj->extraOpts, 'calcTotal' => true]);
$this->extendGlobalData($quests->getJSGlobals());
$tabData = ['data' => array_values($quests->getListviewData())];
if ($rCols = $this->filterObj->fiReputationCols) // never use pretty-print
$tabData['extraCols'] = '$fi_getReputationCols('.Util::toJSON($rCols, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE).')';
else if ($this->filterObj->fiExtraCols)
$tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
// create note if search limit was exceeded
if ($quests->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_questsfound', $quests->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
$tabData['_truncated'] = 1;
}
else if (isset($this->category[1]) && $this->category[1] > 0)
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_questgivers, '.$this->category[1].', g_zones['.$this->category[1].'], '.$this->category[1].')';
if ($this->filterObj->error)
$tabData['_errors'] = 1;
$this->lvTabs[] = [QuestList::$brickFile, $tabData];
}
protected function generateTitle()
{
array_unshift($this->title, $this->name);
if (isset($this->category[1]))
array_unshift($this->title, Lang::quest('cat', $this->category[0], $this->category[1]));
else if (isset($this->category[0]))
{
$c0 = Lang::quest('cat', $this->category[0]);
array_unshift($this->title, is_array($c0) ? $c0[0] : $c0);
}
}
protected function generatePath()
{
foreach ($this->category as $c)
$this->path[] = $c;
$hubs = array(
// Quest Hubs
3679 => 3519, 4024 => 3537, 25 => 46, 1769 => 361,
// Startzones: Horde
132 => 1, 9 => 12, 3431 => 3430, 154 => 85,
// Startzones: Alliance
3526 => 3524, 363 => 14, 220 => 215, 188 => 141,
// Group: Caverns of Time
2366 => 1941, 2367 => 1941, 4100 => 1941,
// Group: Hellfire Citadell
3562 => 3535, 3713 => 3535, 3714 => 3535,
// Group: Auchindoun
3789 => 3688, 3790 => 3688, 3791 => 3688, 3792 => 3688,
// Group: Tempest Keep
3847 => 3842, 3848 => 3842, 3849 => 3842,
// Group: Coilfang Reservoir
3715 => 3905, 3716 => 3905, 3717 => 3905,
// Group: Icecrown Citadel
4809 => 4522, 4813 => 4522, 4820 => 4522
);
if (isset($this->category[1]) && isset($hubs[$this->category[1]]))
array_splice($this->path, 3, 0, $hubs[$this->category[1]]);
}
}
?>

View File

@@ -592,7 +592,7 @@ class ZonePage extends GenericPage
{
$tabData = ['data' => array_values($questsLV)];
foreach (Game::$questClasses as $parent => $children)
foreach (Game::QUEST_CLASSES as $parent => $children)
{
if (!in_array($this->typeId, $children))
continue;

View File

@@ -63,7 +63,7 @@ CLISetup::registerSetup("build", new class extends SetupScript
[['specialFlags', QUEST_FLAG_SPECIAL_REPEATABLE | QUEST_FLAG_SPECIAL_DUNGEON_FINDER | QUEST_FLAG_SPECIAL_MONTHLY, '&'], 0]
];
foreach (Game::$questClasses as $cat2 => $cat)
foreach (Game::QUEST_CLASSES as $cat2 => $cat)
{
if ($cat2 < 0)
continue;

View File

@@ -1,7 +1,10 @@
<?php namespace Aowow; ?>
<?php
namespace Aowow\Template;
<?php $this->brick('header'); ?>
use \Aowow\Lang;
$this->brick('header');
?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
@@ -17,7 +20,7 @@
<div class="text">
<?php $this->brick('redButtons'); ?>
<h1><?=$this->name; ?></h1>
<h1><?=$this->h1; ?></h1>
<?php if ($this->unavailable): ?>
<div class="pad"></div>
<b style="color: red"><?=Lang::quest('unavailable'); ?></b>
@@ -35,80 +38,61 @@ elseif ($this->offerReward):
echo $this->offerReward."\n";
endif;
$iconOffset = 0;
if ($this->end || $this->objectiveList):
?>
<table class="iconlist">
<?php
foreach ($this->objectiveList as [$type, $data]):
switch ($type):
case 1: // just text line
echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.$data."</td></tr>\n";
break;
case 2: // proxy npc data
['id' => $id, 'text' => $text, 'qty' => $qty, 'proxy' => $proxies] = $data;
echo ' <tr><th><p style="height: 26px">&nbsp;</p></th><td><a href="javascript:;" onclick="g_disclose($WH.ge(\'npcgroup-'.$id.'\'), this)" class="disclosure-off">'.$text.'</a>'.($qty ? '&nbsp;('.$qty.')' : '').'<div id="npcgroup-'.$id."\" style=\"display: none\">\n";
foreach ($proxies as $block):
echo " <div style=\"float: left\"><table class=\"iconlist\">\n";
foreach ($block as $pId => $pName):
echo ' <tr><th><ul><li><var>&nbsp;</var></li></ul></th><td><a href="?npc='.$pId.'">'.$pName."</a></td></tr>\n";
endforeach;
echo " </table></div>\n";
endforeach;
echo " </div></td></tr>\n";
break;
default: // has icon set (spell / item / ...) or unordered linked list
echo $data->renderContainer(20, $iconOffset, true);
endswitch;
endforeach;
if ($this->end):
echo " <tr><th><p style=\"height: 26px; width: 30px;\">&nbsp;</p></th><td>".$this->end."</td></tr>\n";
endif;
if ($o = $this->objectiveList):
foreach ($o as $i => $ol):
if (isset($ol['text'])):
echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.$ol['text']."</td></tr>\n";
elseif (!empty($ol['proxy'])): // this implies creatures
echo ' <tr><th><p style="height: 26px">&nbsp;</p></th><td><a href="javascript:;" onclick="g_disclose($WH.ge(\'npcgroup-'.$ol['id'].'\'), this)" class="disclosure-off">'.$ol['name'].$ol['extraText'].'</a>'.($ol['qty'] > 1 ? '&nbsp;('.$ol['qty'].')' : null).'<div id="npcgroup-'.$ol['id']."\" style=\"display: none\">\n";
$block1 = array_slice($ol['proxy'], 0, ceil(count($ol['proxy']) / 2), true);
$block2 = array_slice($ol['proxy'], ceil(count($ol['proxy']) / 2), null, true);
echo " <div style=\"float: left\"><table class=\"iconlist\">\n";
foreach ($block1 as $pId => $name):
echo ' <tr><th><ul><li><var>&nbsp;</var></li></ul></th><td><a href="?npc='.$pId.'">'.$name."</a></td></tr>\n";
endforeach;
echo " </table></div>\n";
if ($block2): // may be empty
echo " <div style=\"float: left\"><table class=\"iconlist\">\n";
foreach ($block2 as $pId => $name):
echo ' <tr><th><ul><li><var>&nbsp;</var></li></ul></th><td><a href="?npc='.$pId.'">'.$name."</a></td></tr>\n";
endforeach;
echo " </table></div>\n";
endif;
echo " </div></td></tr>\n";
elseif (isset($ol['typeStr'])):
if (in_array($ol['typeStr'], ['item', 'spell'])):
echo ' <tr><th align="right" id="iconlist-icon-'.$i.'"></th>';
else /* if (in_array($ol['typeStr'], ['npc', 'object', 'faction'])) */:
echo ' <tr><th><ul><li><var>&nbsp;</var></li></ul></th>';
endif;
echo '<td><span class="q'.(isset($ol['quality']) ? $ol['quality'] : null).'"><a href="?'.$ol['typeStr'].'='.$ol['id'].'">'.$ol['name'].'</a></span>'.($ol['extraText']).(!empty($ol['qty']) ? '&nbsp;('.$ol['qty'].')' : null)."</td></tr>\n";
endif;
endforeach;
endif;
if ($this->suggestedPl):
echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.Lang::quest('suggestedPl').Lang::main('colon').$this->suggestedPl."</td></tr>\n";
echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.Lang::quest('suggestedPl', [$this->suggestedPl])."</td></tr>\n";
endif;
?>
</table>
<script type="text/javascript">//<![CDATA[
<?php
foreach ($o as $k => $i):
if (isset($i['typeStr']) && ($i['typeStr'] == 'item' || $i['typeStr'] == 'spell')):
echo " \$WH.ge('iconlist-icon-".$k."').appendChild(g_".$i['typeStr']."s.createIcon(".$i['id'].", 0, ".$i['qty']."));\n";
endif;
foreach (array_filter($this->objectiveList, fn($x) => $x[0] === 0) as $k => [, $data]):
echo $data->renderJS();
endforeach;
?>
//]]></script>
<?php
if ($p = $this->providedItem):
echo " <div class=\"pad\"></div>\n";
echo ' '.Lang::quest('providedItem').Lang::main('colon')."\n";
echo " <table class=\"iconlist\">\n";
echo ' <tr><th align="right" id="iconlist-icon-'.count($this->objectiveList).'"></th>';
echo '<td><span class="q'.$p['quality'].'"><a href="?item='.$p['id'].'">'.$p['name'].'</a></span>'.($p['qty'] ? '&nbsp;('.$ol['qty'].')' : null)."</td></tr>\n";
if ($this->providedItem):
?>
<div class="pad"></div>
<?=Lang::quest('providedItem').Lang::main('colon'); ?>
<table class="iconlist">
<?=$this->providedItem->renderContainer(20, $iconOffset, true); ?>
</table>
<script type="text/javascript">//<![CDATA[
<?php
echo " \$WH.ge('iconlist-icon-".count($this->objectiveList)."').appendChild(g_items.createIcon(".$p['id'].", 0, ".$p['qty']."));\n";
?>
<?=$this->providedItem->renderJS(); ?>
//]]></script>
<?php
endif;
@@ -134,76 +118,68 @@ if ($this->offerReward && ($this->requestItems || $this->objectives)):
<?php
endif;
$offset = 0;
if ($r = $this->rewards):
if ([$spells, $items, $choice, $money] = $this->rewards):
echo ' <h3>'.Lang::main('rewards')."</h3>\n";
if (!empty($r['choice'])):
$this->brick('rewards', ['rewTitle' => Lang::quest('chooseItems'), 'rewards' => $r['choice'], 'offset' => $offset]);
$offset += count($r['choice']);
if ($choice):
$this->brick('rewards', ['rewTitle' => Lang::quest('rewardChoices'), 'rewards' => $choice, 'offset' => $iconOffset]);
$iconOffset += count($choice);
endif;
if (!empty($r['spells'])):
if (!empty($r['choice'])):
if ($spells):
if ($choice):
echo " <div class=\"pad\"></div>\n";
endif;
if (!empty($r['spells']['learn'])):
$this->brick('rewards', ['rewTitle' => Lang::quest('spellLearn'), 'rewards' => $r['spells']['learn'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
$offset += count($r['spells']['learn']);
elseif (!empty($r['spells']['cast'])):
$this->brick('rewards', ['rewTitle' => Lang::quest('spellCast'), 'rewards' => $r['spells']['cast'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
$offset += count($r['spells']['cast']);
endif;
$this->brick('rewards', ['rewTitle' => $spells['title'], 'rewards' => $spells['cast'], 'offset' => $iconOffset, 'extra' => $spells['extra']]);
$iconOffset += count($spells['cast']);
endif;
if (!empty($r['items']) || !empty($r['money'])):
if (!empty($r['choice']) || !empty($r['spells'])):
if ($items || $money):
if ($choice || $spells):
echo " <div class=\"pad\"></div>\n";
endif;
$addData = ['rewards' => !empty($r['items']) ? $r['items'] : null, 'offset' => $offset, 'extra' => !empty($r['money']) ? $r['money'] : null];
$addData['rewTitle'] = empty($r['choice']) ? Lang::quest('receiveItems') : Lang::quest('receiveAlso');
$this->brick('rewards', $addData);
$this->brick('rewards', array(
'rewTitle' => $choice ? Lang::quest('rewardAlso') : Lang::quest('rewardItems'),
'rewards' => $items ?: null,
'offset' => $iconOffset,
'extra' => $money ?: null
));
endif;
endif;
if ($g = $this->gains):
echo ' <h3>'.Lang::main('gains')."</h3>\n";
echo ' '.Lang::quest('gainsDesc').Lang::main('colon')."\n";
echo " <ul>\n";
if (!empty($g['xp'])):
echo ' <li><div>'.Lang::nf($g['xp']).' '.Lang::quest('experience')."</div></li>\n";
if ([$xp, $rep, $title, $tp] = $this->gains):
?>
<h3><?=Lang::main('gains'); ?></h3>
<?=Lang::quest('gainsDesc').Lang::main('colon'); ?>
<ul>
<?php
if ($xp):
echo ' <li><div>'.Lang::nf($xp).' '.Lang::quest('experience')."</div></li>\n";
endif;
if (!empty($g['rep'])):
foreach ($g['rep'] as $r):
if ($r['qty'][1] && User::isInGroup(U_GROUP_EMPLOYEE))
$qty = $r['qty'][0] . sprintf(Util::$dfnString, Lang::faction('customRewRate'), ($r['qty'][1] > 0 ? '+' : '').$r['qty'][1]);
else
$qty = array_sum($r['qty']);
echo ' <li><div>'.($r['qty'][0] < 0 ? '<b class="q10">'.$qty.'</b>' : $qty).' '.Lang::npc('repWith').' <a href="?faction='.$r['id'].'">'.$r['name']."</a></div></li>\n";
if ($rep):
foreach ($rep as $r):
echo ' <li><div>'.sprintf($r['qty'][0] < 0 ? '<b class="q10">%s</b>' : '%s', $r['qty'][1]).' '.Lang::npc('repWith').' <a href="?faction='.$r['id'].'">'.$r['name']."</a></div></li>\n";
endforeach;
endif;
if (!empty($g['title'])):
echo ' <li><div>'.Lang::quest('theTitle', [$g['title']])."</div></li>\n";
if ($title):
echo ' <li><div>'.Lang::quest('rewardTitle', $title)."</div></li>\n";
endif;
if (!empty($g['tp'])):
echo ' <li><div>'.Lang::quest('bonusTalents', [$g['tp']])."</div></li>\n";
if ($tp):
echo ' <li><div>'.Lang::quest('bonusTalents', [$tp])."</div></li>\n";
endif;
echo " </ul>\n";
endif;
$this->brick('mail', ['offset' => ++$offset]);
$this->brickIf($this->mail, 'mail', ['offset' => ++$iconOffset]);
if (!empty($this->transfer)):
if ($this->transfer):
echo " <div style=\"clear: left\"></div>";
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
endif;
@@ -213,7 +189,7 @@ endif;
</div>
<?php
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('lvTabs');
$this->brick('contribute');
?>

View File

@@ -1,10 +1,11 @@
<?php namespace Aowow; ?>
<?php
$this->brick('header');
$f = $this->filterObj->values // shorthand
?>
namespace Aowow\Template;
use Aowow\Lang;
$this->brick('header');
$f = $this->filter->values; // shorthand
?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
@@ -12,41 +13,44 @@ $f = $this->filterObj->values // shorthand
<?php
$this->brick('announcement');
$this->brick('pageTemplate', ['fiQuery' => $this->filterObj->query, 'fiMenuItem' => [3]]);
$this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [3]]);
?>
<div id="fi" style="display: <?=($this->filterObj->query ? 'block' : 'none'); ?>;">
<div id="fi" style="display: <?=($this->filter->query ? 'block' : 'none'); ?>;">
<form action="?filter=quests<?=$this->subCat; ?>" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="text">
<?php
$this->brick('headIcons');
$this->brick('redButtons');
?>
<h1><?=$this->h1; ?></h1>
</div>
<div class="rightpanel">
<div style="float: left"><?=Lang::game('type').Lang::main('colon'); ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div>
<select name="ty[]" size="6" multiple="multiple" class="rightselect">
<?php
foreach (Lang::quest('questInfo') as $i => $str):
echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n";
endforeach;
?>
<?=$this->makeOptionsList(Lang::quest('questInfo'), $f['ty'], 28); ?>
</select>
</div>
<table>
<tr>
<td><?=Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td><?=$this->ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="3">
<table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?=(isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null); ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="quest-ex" <?=(isset($f['ex']) ? 'checked ' : null); ?>/></td>
<td>&nbsp;<input type="text" name="na" size="30" <?=($f['na'] ? 'value="'.$this->escHTML($f['na']).'" ' : ''); ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="quest-ex" <?=($f['ex'] ? 'checked ' : ''); ?>/></td>
<td><label for="quest-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedquestsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?=Lang::main('extSearch'); ?></span></label></td>
</tr></table>
</td>
</tr>
<tr>
<td class="padded"><?=Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?=(isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null); ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?=(isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null); ?>/></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?=($f['minle'] ? 'value="'.$f['minle'].'" ' : ''); ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?=($f['maxle'] ? 'value="'.$f['maxle'].'" ' : ''); ?>/></td>
<td class="padded" width="100%">
<table><tr>
<td>&nbsp;&nbsp;&nbsp;<?=Lang::main('_reqLevel').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?=(isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null); ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?=(isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null); ?>/></td>
<td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?=($f['minrl'] ? 'value="'.$f['minrl'].'" ' : ''); ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?=($f['maxrl'] ? 'value="'.$f['maxrl'].'" ' : ''); ?>/></td>
</tr></table>
</td>
</tr>
@@ -54,11 +58,7 @@ endforeach;
<td class="padded"><?=Lang::main('side').Lang::main('colon'); ?></td>
<td class="padded" colspan="3">&nbsp;<select name="si">
<option></option>
<?php
foreach (Lang::game('si') as $i => $str):
echo ' <option value="'.$i.'"'.(isset($f['si']) && $i == $f['si'] ? ' selected' : null).'>'.$str."</option>\n";
endforeach;
?>
<?=$this->makeOptionsList(Lang::game('si'), $f['si'], 36); ?>
</select></td>
</tr>
</table>
@@ -66,7 +66,7 @@ endforeach;
<div class="padded2 clear">
<div style="float: right"><?=Lang::main('refineSearch'); ?></div>
<?=Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!isset($f['ma']) ? 'checked="checked" ' : null); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=(isset($f['ma']) ? 'checked="checked" ' : null); ?> /><label for="ma-1"><?=Lang::main('oneFilter'); ?></label>
<?=Lang::main('match'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!$f['ma'] ? 'checked="checked" ' : ''); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=($f['ma'] ? 'checked="checked" ' : ''); ?> /><label for="ma-1"><?=Lang::main('oneFilter'); ?></label>
</div>
<div class="clear"></div>
@@ -80,7 +80,7 @@ endforeach;
<div class="pad"></div>
</div>
<?php $this->brick('filter'); ?>
<?=$this->renderFilter(12); ?>
<?php $this->brick('lvTabs'); ?>