Template/Update (Part 29)

* convert dbtype 'npc'
This commit is contained in:
Sarjuuk
2025-08-11 22:58:16 +02:00
parent a824bb106c
commit f17b4f58bf
13 changed files with 848 additions and 667 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 NpcPowerResponse extends TextResponse implements ICache
{
use TrCache, TrTooltip;
private const /* string */ POWER_TEMPLATE = '$WowheadPower.registerNpc(%d, %d, %s);';
protected int $type = Type::NPC;
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
{
$creature = new CreatureList(array(['id', $this->typeId]));
if ($creature->error)
$this->cacheType = CACHE_TYPE_NONE;
else
$opts = array(
'name' => $creature->getField('name', true),
'tooltip' => $creature->renderTooltip(),
'map' => $creature->getSpawns(SPAWNINFO_SHORT)
);
$this->result = new Tooltip(self::POWER_TEMPLATE, $this->typeId, $opts ?? []);
}
}
?>

133
endpoints/npcs/npcs.php Normal file
View File

@@ -0,0 +1,133 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
class NpcsBaseResponse extends TemplateResponse implements ICache
{
use TrListPage, TrCache;
protected int $type = Type::NPC;
protected int $cacheType = CACHE_TYPE_PAGE;
protected string $template = 'npcs';
protected string $pageName = 'npcs';
protected ?int $activeTab = parent::TAB_DATABASE;
protected array $breadcrumb = [0, 4];
protected array $dataLoader = ['zones'];
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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
public bool $petFamPanel = false;
public function __construct(string $pageParam)
{
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageParam);
$this->subCat = $pageParam !== '' ? '='.$pageParam : '';
$this->filter = new CreatureListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->filterError = $this->filter->error;
}
protected function generate() : void
{
$this->h1 = Lang::game('npcs');
$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 ($this->category)
{
$conditions[] = ['type', $this->category[0]];
$this->petFamPanel = $this->category[0] == 1;
}
$fiForm = $this->filter->values;
$fiRepCols = $this->filter->fiReputationCols;
/*************/
/* Menu Path */
/*************/
if ($this->category)
$this->breadcrumb[] = $this->category[0];
if (count($fiForm['fa']) == 1)
$this->breadcrumb[] = $fiForm['fa'][0];
/**************/
/* Page Title */
/**************/
array_unshift($this->title, $this->h1);
if ($this->category)
array_unshift($this->title, Lang::npc('cat', $this->category[0]));
if (count($fiForm['fa']) == 1)
array_unshift($this->title, Lang::game('fa', $fiForm['fa'][0]));
/****************/
/* Main Content */
/****************/
$this->redButtons[BUTTON_WOWHEAD] = true;
// beast subtypes are selected via filter
$tabData = ['data' => []];
$npcs = new CreatureList($conditions, ['extraOpts' => $this->filter->extraOpts, 'calcTotal' => true]);
if (!$npcs->error)
{
$tabData['data'] = $npcs->getListviewData($fiRepCols ? NPCINFO_REP : 0x0);
if ($fiRepCols) // never use pretty-print
$tabData['extraCols'] = '$fi_getReputationCols('.Util::toJSON($fiRepCols, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE).')';
else if ($this->filter->fiExtraCols)
$tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
if ($this->category)
$tabData['hiddenCols'] = ['type'];
// create note if search limit was exceeded
if ($npcs->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_npcsfound', $npcs->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
$tabData['_truncated'] = 1;
}
}
$this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"]);
$this->lvTabs->addListviewTab(new Listview($tabData, CreatureList::$brickFile));
parent::generate();
$this->setOnCacheLoaded([self::class, 'onBeforeDisplay']);
}
public static function onBeforeDisplay() : void
{
// sort for dropdown-menus
Lang::sort('game', 'fa');
}
}
?>

View File

@@ -1040,35 +1040,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "Dieser NPC existiert nicht.",
'classification'=> "Einstufung",
'petFamily' => "Tierart",
'react' => "Reaktion",
'worth' => "Wert",
'classification'=> "Einstufung: %s",
'petFamily' => "Tierart: ",
'react' => "Reaktion: %s",
'worth' => "Wert: %s",
'unkPosition' => "Der Aufenthaltsort dieses NPCs ist nicht bekannt.",
'difficultyPH' => 'Dieser NPC ist ein Platzhalter für einen anderen Modus von <a href="?npc=%1$d">%2$s</a>.',
'seat' => "Sitz",
'accessory' => "Zusätze",
'accessoryFor' => "Dieser NPC ist Zusatz für Fahrzeug",
'quotes' => "Zitate",
'gainsDesc' => "Nach dem Töten dieses NPCs erhaltet Ihr",
'quotes' => "Zitate&nbsp;(%d)",
'gainsDesc' => "Nach dem Töten dieses NPCs erhaltet Ihr: ",
'repWith' => "Ruf mit der Fraktion",
'stopsAt' => "Endet bei %s",
'vehicle' => "Fahrzeug",
'stats' => "Werte",
'melee' => "Nahkampf",
'ranged' => "Fernkampf",
'armor' => "Rüstung",
'resistances' => "Widerstände",
'melee' => "Nahkampf: ",
'ranged' => "Fernkampf: ",
'armor' => "Rüstung: ",
'resistances' => "Widerstände: ",
'foundIn' => "Dieser NPC befindet sich in",
'tameable' => "Zähmbar (%s)",
'spirit' => "[tooltip name=spirit]Nur für tote Spieler sichtbar[/tooltip][span class=tip tooltip=spirit]Geist[/span]",
'waypoint' => "Wegpunkt",
'wait' => "Wartezeit",
'respawnIn' => "Respawn in: %s",
'despawnAfter' => "Gespawnt durch Script<br>Despawn nach: %s",
'despawnAfter' => "Gespawnt durch Script<br />Despawn nach: %s",
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rar", 2 => "Rar Elite", 3 => "Boss"],
'textRanges' => [null, "an das Gebiet gesendet", "an die Zone gesendet", "an die Map gesendet", "an die Welt gesendet"],
'textTypes' => [null, "schreit", "sagt", "flüstert"],
'mechanicimmune'=> 'Nicht anfällig für Mechanik: %s',
'_extraFlags' => 'Extra Flags: ',
'versions' => 'Schwierigkeitsgrade: ',
'modes' => array(
1 => ["Normal", "Heroisch"],
2 => ["10-Spieler Normal", "25-Spieler Normal", "10-Spieler Heroisch", "25-Spieler Heroisch"]
@@ -1102,6 +1104,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => 'Gildenbank',
NPC_FLAG_SPELLCLICK => 'Zauber-Klick',
NPC_FLAG_MAILBOX => 'Briefkasten'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Bindet Angreifer im Tod an die Instanz',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- hat keine Aggro\n- Tod kostet Ehre[/tooltip][span class=tip tooltip=civilian]Zivilist[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'Kann nicht [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'Erhält keine Eile nach [spell=3127]',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'Kann nicht [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'Kann keine schmetternden Schläge verursachen',
CREATURE_FLAG_EXTRA_NO_XP => 'Belohnt keine Erfahrung',
CREATURE_FLAG_EXTRA_TRIGGER => 'Auslöser NPC',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Immun gegen Spott',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Nur für tote Spieler sichtbar[/tooltip][span class=tip tooltip=spirit]Geist[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Benutzt [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'Händler kauft nicht vom Spieler',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'Kann nicht in einen Kampf verwickelt werden',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Gehört zu Weltereignis',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- greift PvP-Angreifer an\n- ignoriert Unsichtbarkeit, Verstohlenheit und [spell=5384][/tooltip][span class=tip tooltip=guard]Wache[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignoriert [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'Kann keine kritischen Treffer verursachen',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'Angreifer erhält keine Waffenfertigkeit',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Spott hat abnehmende Wirkung',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Alle Mechaniken haben abnehmende Wirkung',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Angreifender Spieler ist immer lootberechtigt',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignoriert Wegfindung',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Immung gegen Rückstoß'
)
),
'event' => array(

View File

@@ -1040,35 +1040,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "This NPC doesn't exist.",
'classification'=> "Classification",
'petFamily' => "Pet familiy",
'react' => "React",
'worth' => "Worth",
'classification'=> "Classification: %s",
'petFamily' => "Pet familiy: ",
'react' => "React: %s",
'worth' => "Worth: %s",
'unkPosition' => "The location of this NPC is unknown.",
'difficultyPH' => 'This NPC is a placeholder for a different mode of <a href="?npc=%1$d">%2$s</a>.',
'seat' => "Seat",
'accessory' => "Accessories",
'accessoryFor' => "This NPC is an accessory for vehicle",
'quotes' => "Quotes",
'gainsDesc' => "After killing this NPC you will gain",
'quotes' => "Quotes&nbsp;(%d)",
'gainsDesc' => "After killing this NPC you will gain: ",
'repWith' => "reputation with",
'stopsAt' => "stops at %s",
'vehicle' => "Vehicle",
'stats' => "Stats",
'melee' => "Melee",
'ranged' => "Ranged",
'armor' => "Armor",
'resistances' => "Resistances",
'melee' => "Melee: ",
'ranged' => "Ranged: ",
'armor' => "Armor: ",
'resistances' => "Resistances: ",
'foundIn' => "This NPC can be found in",
'tameable' => "Tameable (%s)",
'spirit' => "[tooltip name=spirit]Only visible to dead players[/tooltip][span class=tip tooltip=spirit]Spirit[/span]",
'waypoint' => "Waypoint",
'wait' => "Wait",
'respawnIn' => "Respawn in: %s",
'despawnAfter' => "Spawned by Script<br>Despawn after: %s",
'despawnAfter' => "Spawned by Script<br />Despawn after: %s",
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rare", 2 => "Rare Elite", 3 => "Boss"],
'textRanges' => [null, "sent to area", "sent to zone", "sent to map", "sent to world"],
'textTypes' => [null, "yells", "says", "whispers"],
'mechanicimmune'=> 'Not affected by mechanic: %s',
'_extraFlags' => 'Extra Flags: ',
'versions' => 'Difficulty Versions: ',
'modes' => array(
1 => ["Normal", "Heroic"],
2 => ["10-player Normal", "25-player Normal", "10-player Heroic", "25-player Heroic"]
@@ -1102,6 +1104,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => 'Guild Bank',
NPC_FLAG_SPELLCLICK => 'Spellclick',
NPC_FLAG_MAILBOX => 'Mailbox'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Binds attacker to instance on death',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- does not aggro\n- death costs Honor[/tooltip][span class=tip tooltip=civilian]Civilian[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'Cannot use [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'Does not gain Parry Haste',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'Cannot use [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'Cannot deal Crushing Blows',
CREATURE_FLAG_EXTRA_NO_XP => 'Rewards no experience',
CREATURE_FLAG_EXTRA_TRIGGER => 'Trigger Creature',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Immune to Taunt',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Only visible to dead players[/tooltip][span class=tip tooltip=spirit]Spirit[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Uses [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'Vendor does not buy from player',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'Does not enter combat',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Related to World Event',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- engages PvP attackers\n- ignores enemy stealth, invisibility and Feign Death[/tooltip][span class=tip tooltip=guard]Guard[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignores [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'Cannot deal critical hits',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'Attacker does not gain weapon skill',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Taunt has diminishing returns',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Is subject to diminishing returns',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Attacking players are always eligible for loot',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignores pathfinding',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Immune to knockback'
)
),
'event' => array(

View File

@@ -1040,35 +1040,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "Este PNJ no existe.",
'classification'=> "Clasificación",
'petFamily' => "Familia de mascota",
'react' => "Reacción",
'worth' => "Valor",
'classification'=> "Clasificación: %s",
'petFamily' => "Familia de mascota: ",
'react' => "Reacción: %s",
'worth' => "Valor: %s",
'unkPosition' => "No se conoce la ubicación de este PNJ.",
'difficultyPH' => 'Este PNJ es un marcador de posición para un modo diferente de <a href="?npc=%1$d">%2$s</a>.',
'seat' => "Asiento",
'accessory' => "Accesorio",
'accessoryFor' => "Esta criatura es un accesorio para vehículo",
'quotes' => "Citas",
'gainsDesc' => "Tras acabar con este PNJ ganarás",
'quotes' => "Citas&nbsp;(%d)",
'gainsDesc' => "Tras acabar con este PNJ ganarás: ",
'repWith' => "reputación con",
'stopsAt' => "se detiene en %s",
'vehicle' => "Vehículo",
'stats' => "Estadísticas",
'melee' => "Cuerpo a cuerpo",
'ranged' => "Ataque a distancia",
'armor' => "Armadura",
'resistances' => "Resistencias",
'melee' => "Cuerpo a cuerpo: ",
'ranged' => "Ataque a distancia: ",
'armor' => "Armadura: ",
'resistances' => "Resistencias: ",
'foundIn' => "Este PNJ se puede encontrar en",
'tameable' => "Domesticable (%s)",
'spirit' => "[tooltip name=spirit]Solo visible para jugadores muertos[/tooltip][span class=tip tooltip=spirit]Espíritu[/span]",
'waypoint' => "punto de recorrido",
'wait' => "Tiempo de espera",
'respawnIn' => "Reingreso en: %s",
'despawnAfter' => "Generado por script<br>Desaparece después: %s",
'despawnAfter' => "Generado por script<br />Desaparece después: %s",
'rank' => [0 => "Normal", 1 => "Élite", 4 => "Raro", 2 => "Élite raro", 3 => "Jefe"],
'textRanges' => [null, "Mandar al área", "Mandar a zona", "Mandar al mapa", "Mandar al mundo"],
'textTypes' => [null, "grita", "dice", "susurra"],
'mechanicimmune'=> 'No afectado por la mecánica: %s',
'_extraFlags' => 'Banderas extra: ',
'versions' => 'Versiones de dificultad: ',
'modes' => array(
1 => ["Normal", "Heroico"],
2 => ["10 jugadores Normal", "25 jugadores Normal", "10 jugadores Heroico", "25 jugadores Heroico"]
@@ -1102,6 +1104,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => 'Banco de hermandad',
NPC_FLAG_SPELLCLICK => 'Hechizoclic',
NPC_FLAG_MAILBOX => 'Buzón'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Vincula al atacante a la instancia al morir',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- no agrede\n- su muerte cuesta Honor[/tooltip][span class=tip tooltip=civilian]Civil[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'No puede usar [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'No tiene Parry Haste',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'No puede usar [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'No puede infligir golpes aplastantes',
CREATURE_FLAG_EXTRA_NO_XP => 'No otorga experiencia',
CREATURE_FLAG_EXTRA_TRIGGER => 'Criatura disparadora',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Inmune a provocación',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Solo visible para jugadores muertos[/tooltip][span class=tip tooltip=spirit]Espíritu[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Usa [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'El vendedor no compra al jugador',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'No entra en combate',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Relacionado con Evento Mundial',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- ataca a jugadores PvP\n- ignora sigilo, invisibilidad y Fingir Muerte enemigos[/tooltip][span class=tip tooltip=guard]Guardia[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignora [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'No puede infligir golpes críticos',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'El atacante no gana habilidad de arma',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Provocación tiene rendimientos decrecientes',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Está sujeto a rendimientos decrecientes',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Los jugadores atacantes siempre son elegibles para botín',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignora búsqueda de caminos',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Inmune a retroceso'
)
),
'event' => array(

View File

@@ -1040,35 +1040,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "Ce PNJ n'existe pas.",
'classification'=> "Classification",
'petFamily' => "Familier",
'react' => "Réaction",
'worth' => "Vaut",
'classification'=> "Classification : %s",
'petFamily' => "Familier : ",
'react' => "Réaction : %s",
'worth' => "Vaut : %s",
'unkPosition' => "L'emplacement de ce PNJ est inconnu.",
'difficultyPH' => 'Ce PNJ est un espace réservé pour un autre mode de difficulté <a href="?npc=%1$d">%2$s</a>.',
'seat' => "Siège",
'accessory' => "Passager",
'accessoryFor' => "Ce PNJ est un passager pour un véhicule.",
'quotes' => "Citations",
'gainsDesc' => "Après avoir tué ce PNJ vous allez obtenir",
'quotes' => "Citations&nbsp;(%d)",
'gainsDesc' => "Après avoir tué ce PNJ vous allez obtenir : ",
'repWith' => "points de réputation avec",
'stopsAt' => "arrête à %s",
'vehicle' => "Véhicule",
'stats' => "Statistiques",
'melee' => "de mêlée",
'ranged' => "à distance",
'armor' => "Armure",
'resistances' => "Résistances",
'melee' => "de mêlée : ",
'ranged' => "à distance : ",
'armor' => "Armure : ",
'resistances' => "Résistances : ",
'foundIn' => "Ce PNJ se trouve dans",
'tameable' => "Domptable (%s)",
'spirit' => "[tooltip name=spirit][Only visible to dead players][/tooltip][span class=tip tooltip=spirit][Spirit][/span]",
'waypoint' => "Point de route",
'wait' => "Période d'attente",
'respawnIn' => "Rentrée en : %s",
'despawnAfter' => "[Spawned by Script<br>Despawn after] : %s",
'despawnAfter' => "[Spawned by Script<br />Despawn after] : %s",
'rank' => [0 => "Standard", 1 => "Élite", 4 => "Rare", 2 => "Élite rare", 3 =>"Boss"],
'textRanges' => [null, "[sent to area]", "[sent to zone]", "[sent to map]", "[sent to world]"],
'textTypes' => [null, "crie", "dit", "chuchote"],
'mechanicimmune'=> '[Not affected by mechanic] : %s',
'_extraFlags' => '[Extra Flags] : ',
'versions' => '[Difficulty Versions] : ',
'modes' => array(
1 => ["Normal", "Héroïque"],
2 => ["10-joueurs Normal", "25-joueurs Normal", "10-joueurs Héroïque", "25-joueurs Héroïque"]
@@ -1102,6 +1104,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => 'Guild Bank',
NPC_FLAG_SPELLCLICK => 'Spellclick',
NPC_FLAG_MAILBOX => 'Mailbox'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Binds attacker to instance on death',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- does not aggro\n- death costs Honor[/tooltip][span class=tip tooltip=civilian]Civilian[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'Cannot use [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'Does not gain Parry Haste',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'Cannot use [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'Cannot deal Crushing Blows',
CREATURE_FLAG_EXTRA_NO_XP => 'Rewards no experience',
CREATURE_FLAG_EXTRA_TRIGGER => 'Trigger Creature',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Immune to Taunt',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Only visible to dead players[/tooltip][span class=tip tooltip=spirit]Spirit[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Uses [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'Vendor does not buy from player',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'Does not enter combat',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Related to World Event',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- engages PvP attackers\n- ignores enemy stealth, invisibility and Feign Death[/tooltip][span class=tip tooltip=guard]Guard[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignores [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'Cannot deal critical hits',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'Attacker does not gain weapon skill',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Taunt has diminishing returns',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Is subject to diminishing returns',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Attacking players are always eligible for loot',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignores pathfinding',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Immune to knockback'
)
),
'event' => array(

View File

@@ -1040,35 +1040,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "Такой НИП не существует.",
'classification'=> "Классификация",
'petFamily' => "Семейство питомца",
'react' => "Реакция",
'worth' => "Деньги",
'classification'=> "Классификация: %s",
'petFamily' => "Семейство питомца: ",
'react' => "Реакция: %s",
'worth' => "Деньги: %s",
'unkPosition' => "Местоположение этого НИП неизвестно.",
'difficultyPH' => '[Этот НИП является прототипом для другого режима <a href="?npc=%1$d">%2$s</a>.]',
'seat' => "[Seat]",
'accessory' => "[Accessory]",
'accessoryFor' => "[This creature is an accessory for vehicle]",
'quotes' => "Цитаты",
'gainsDesc' => "В награду за убийство этого НИПа вы получите",
'quotes' => "Цитаты&nbsp;(%d)",
'gainsDesc' => "В награду за убийство этого НИПа вы получите: ",
'repWith' => "репутации с",
'stopsAt' => 'останавливается на уровне "%s"',
'vehicle' => "Автомобиль",
'stats' => "Характеристики",
'melee' => "Ближнего боя",
'ranged' => "Дальнего боя",
'armor' => "Броня",
'resistances' => "Сопротивление",
'melee' => "Ближнего боя: ",
'ranged' => "Дальнего боя: ",
'armor' => "Броня: ",
'resistances' => "Сопротивление: ",
'foundIn' => "Этот объект может быть найден в следующих зонах:",
'tameable' => "Можно приручить (%s)",
'spirit' => "[tooltip name=spirit][Only visible to dead players][/tooltip][span class=tip tooltip=spirit][Spirit][/span]",
'waypoint' => "Путевой точки",
'wait' => "Период ожидания",
'respawnIn' => "Reentry in: %s",
'despawnAfter' => "[Spawned by Script<br>Despawn after]: %s",
'despawnAfter' => "[Spawned by Script<br />Despawn after]: %s",
'rank' => [0 => "Обычный", 1 => "Элитный", 4 => "Редкий", 2 => "Редкий элитный", 3 =>"Босс"],
'textRanges' => [null, "[sent to area]", "[sent to zone]", "[sent to map]", "[sent to world]"],
'textTypes' => [null, "кричит", "говорит", "шепчет"],
'mechanicimmune'=> '[Not affected by mechanic]: %s',
'_extraFlags' => '[Extra Flags]: ',
'versions' => '[Difficulty Versions]: ',
'modes' => array(
1 => ["Обычный", "Героический"],
2 => ["10 нормал.", "25 нормал.", "10 героич.", "25 героич."]
@@ -1102,6 +1104,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => 'Guild Bank',
NPC_FLAG_SPELLCLICK => 'Spellclick',
NPC_FLAG_MAILBOX => 'Mailbox'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Binds attacker to instance on death',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- does not aggro\n- death costs Honor[/tooltip][span class=tip tooltip=civilian]Civilian[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'Cannot use [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'Does not gain Parry Haste',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'Cannot use [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'Cannot deal Crushing Blows',
CREATURE_FLAG_EXTRA_NO_XP => 'Rewards no experience',
CREATURE_FLAG_EXTRA_TRIGGER => 'Trigger Creature',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Immune to Taunt',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Only visible to dead players[/tooltip][span class=tip tooltip=spirit]Spirit[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Uses [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'Vendor does not buy from player',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'Does not enter combat',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Related to World Event',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- engages PvP attackers\n- ignores enemy stealth, invisibility and Feign Death[/tooltip][span class=tip tooltip=guard]Guard[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignores [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'Cannot deal critical hits',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'Attacker does not gain weapon skill',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Taunt has diminishing returns',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Is subject to diminishing returns',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Attacking players are always eligible for loot',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignores pathfinding',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Immune to knockback'
)
),
'event' => array(

View File

@@ -1039,35 +1039,37 @@ $lang = array(
),
'npc' => array(
'notFound' => "这个NPC不存在。",
'classification'=> "分类",
'petFamily' => "宠物家族",
'react' => "反应",
'worth' => "价值",
'classification'=> "分类%s",
'petFamily' => "宠物家族",
'react' => "反应%s",
'worth' => "价值%s",
'unkPosition' => "这个NPC的位置未知。",
'difficultyPH' => '这个NPC是不同模式下的占位符是 <a href="?npc=%1$d">%2$s</a>.',
'seat' => "Seat",
'accessory' => "附件",
'accessoryFor' => "这个NPC是载具的附件",
'quotes' => "引用",
'gainsDesc' => "杀死这个NPC后你将得到",
'quotes' => "引用%d",
'gainsDesc' => "杀死这个NPC后你将得到",
'repWith' => "点声望点数在",
'stopsAt' => "在%s停止",
'vehicle' => "载具",
'stats' => "状态",
'melee' => "近战",
'ranged' => "远程",
'armor' => "护甲",
'resistances' => "韧性",
'melee' => "近战",
'ranged' => "远程",
'armor' => "护甲",
'resistances' => "韧性",
'foundIn' => "这个NPC能在以下地区找到",
'tameable' => "可驯服的(%s)",
'spirit' => "[tooltip name=spirit][Only visible to dead players][/tooltip][span class=tip tooltip=spirit][Spirit][/span]",
'waypoint' => "路径点",
'wait' => "等待",
'respawnIn' => "重生:%s",
'despawnAfter' => "[Spawned by Script<br>Despawn after]%s",
'despawnAfter' => "[Spawned by Script<br />Despawn after]%s",
'rank' => [0 => "普通", 1 => "稀有", 4 => "精英", 2 => "稀有精英", 3 => "首领"],
'textRanges' => [null, "发送到地区", "发送到区域", "发送到地图", "发送到世界"],
'textTypes' => [null, "喊道", "", "悄悄地说"],
'mechanicimmune'=> '[Not affected by mechanic]%s',
'_extraFlags' => '[Extra Flags]',
'versions' => '[Difficulty Versions]',
'modes' => array(
1 => ["普通", "英雄"],
2 => ["10人普通", "25人普通", "10人英雄", "25人英雄"]
@@ -1101,6 +1103,33 @@ $lang = array(
NPC_FLAG_GUILD_BANK => '公会银行',
NPC_FLAG_SPELLCLICK => 'Spellclick',
NPC_FLAG_MAILBOX => '邮箱'
),
'extraFlags' => array(
CREATURE_FLAG_EXTRA_INSTANCE_BIND => 'Binds attacker to instance on death',
CREATURE_FLAG_EXTRA_CIVILIAN => "[tooltip name=civilian]- does not aggro\n- death costs Honor[/tooltip][span class=tip tooltip=civilian]Civilian[/span]",
CREATURE_FLAG_EXTRA_NO_PARRY => 'Cannot use [spell=3127]',
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN => 'Does not gain Parry Haste',
CREATURE_FLAG_EXTRA_NO_BLOCK => 'Cannot use [spell=107]',
CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS => 'Cannot deal Crushing Blows',
CREATURE_FLAG_EXTRA_NO_XP => 'Rewards no experience',
CREATURE_FLAG_EXTRA_TRIGGER => 'Trigger Creature',
CREATURE_FLAG_EXTRA_NO_TAUNT => 'Immune to Taunt',
// CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE => '', // ??
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY => '[tooltip name=spirit]Only visible to dead players[/tooltip][span class=tip tooltip=spirit]Spirit[/span]',
CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK => 'Uses [spell=674]',
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR => 'Vendor does not buy from player',
CREATURE_FLAG_EXTRA_IGNORE_COMBAT => 'Does not enter combat',
CREATURE_FLAG_EXTRA_WORLDEVENT => 'Related to World Event',
CREATURE_FLAG_EXTRA_GUARD => "[tooltip name=guard]- engages PvP attackers\n- ignores enemy stealth, invisibility and Feign Death[/tooltip][span class=tip tooltip=guard]Guard[/span]",
CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH => 'Ignores [spell=5384]',
CREATURE_FLAG_EXTRA_NO_CRIT => 'Cannot deal critical hits',
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS => 'Attacker does not gain weapon skill',
CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS => 'Taunt has diminishing returns',
CREATURE_FLAG_EXTRA_ALL_DIMINISH => 'Is subject to diminishing returns',
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ => 'Attacking players are always eligible for loot',
// CREATURE_FLAG_EXTRA_DUNGEON_BOSS => '', // set during runtime
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING => 'Ignores pathfinding',
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK => 'Immune to knockback'
)
),
'event' => array(

View File

@@ -1,115 +0,0 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
// menuId 4: NPC g_initPath()
// tabId 0: Database g_initHeader()
class NpcsPage extends GenericPage
{
use TrListPage;
protected $petFamPanel = false;
protected $type = Type::NPC;
protected $tpl = 'npcs';
protected $path = [0, 4];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $validCats = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
protected $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected $_get = ['filter' => ['filter' => FILTER_UNSAFE_RAW]];
public function __construct($pageCall, $pageParam)
{
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->filterObj = new CreatureListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->name = Util::ucFirst(Lang::game('npcs'));
$this->subCat = $pageParam ? '='.$pageParam : '';
}
protected function generateContent()
{
$this->addScript([SC_JS_FILE, '?data=zones']);
$conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category)
{
$conditions[] = ['type', $this->category[0]];
$this->petFamPanel = $this->category[0] == 1;
}
$this->filterObj->evalCriteria();
if ($_ = $this->filterObj->getConditions())
$conditions[] = $_;
// beast subtypes are selected via filter
$npcs = new CreatureList($conditions, ['extraOpts' => $this->filterObj->extraOpts, 'calcTotal' => true]);
$rCols = $this->filterObj->fiReputationCols;
$tabData = ['data' => array_values($npcs->getListviewData($rCols ? NPCINFO_REP : 0x0))];
if ($rCols) // 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)';
if ($this->category)
$tabData['hiddenCols'] = ['type'];
// create note if search limit was exceeded
if ($npcs->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_npcsfound', $npcs->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
$tabData['_truncated'] = 1;
}
if ($this->filterObj->error)
$tabData['_errors'] = 1;
$this->lvTabs[] = [CreatureList::$brickFile, $tabData];
}
protected function postCache()
{
// sort for dropdown-menus
Lang::sort('game', 'fa');
}
protected function generateTitle()
{
array_unshift($this->title, $this->name);
if ($this->category)
array_unshift($this->title, Lang::npc('cat', $this->category[0]));
$form = $this->filterObj->values;
if (count($form['fa']) == 1)
array_unshift($this->title, Lang::game('fa', $form['fa'][0]));
}
protected function generatePath()
{
if ($this->category)
$this->path[] = $this->category[0];
$form = $this->filterObj->values;
if (count($form['fa']))
$this->path[] = $form['fa'][0];
}
}
?>

View File

@@ -1,30 +1,24 @@
<?php namespace Aowow; ?>
<?php
if (isset($this->map) && empty($this->map)):
echo Lang::zone('noMap');
elseif (!empty($this->map['data'])):
if ($this->type == Type::QUEST) :
echo " <div id=\"mapper-zone-generic\"></div>\n";
elseif ($this->map['mapperData']):
echo ' <div>';
namespace Aowow\Template;
echo $this->map['foundIn'];
use \Aowow\Lang;
echo ' <span id="mapper-zone-generic">';
echo Lang::concat($this->map['mapperData'], true, function ($areaData, $areaId) {
return '<a href="javascript:;" onclick="myMapper.update({zone: '.$areaId.'}); g_setSelectedLink(this, \'mapper\'); return false" onmousedown="return false">'.$this->map['extra'][$areaId].'</a>&nbsp;('.array_sum(array_column($areaData, 'count')).')';
if ([$mapper, $mapperData, $som, $foundIn] = $this->map):
if ($foundIn):
echo ' <div>'.$foundIn[0].' <span id="mapper-zone-generic">';
echo Lang::concat($mapperData, true, function ($areaData, $areaId) use ($foundIn) {
return '<a href="javascript:;" onclick="myMapper.update({zone: '.$areaId.'}); g_setSelectedLink(this, \'mapper\'); return false" onmousedown="return false">'.$foundIn[$areaId].'</a>&nbsp;('.array_sum(array_column($areaData, 'count')).')';
});
echo ".</span></div>\n";
else:
echo " <div id=\"mapper-zone-generic\"></div>\n";
endif;
if (!empty($this->map['data']['zone']) && $this->map['data']['zone'] < 0):
if (isset($mapper['zone']) && $mapper['zone'] < 0):
?>
<div id="mapper" style="width: 778px; margin: 0 auto">
<?php
if (isset($this->map['som'])):
if ($som):
?>
<div id="som-generic"></div>
<?php
@@ -34,10 +28,8 @@ elseif (!empty($this->map['data'])):
<div class="pad clear"></div>
</div>
<?php
else:
?>
<?php
if (isset($this->map['som'])):
elseif ($mapper):
if ($som):
?>
<div class="pad"></div>
<div id="som-generic"></div>
@@ -47,48 +39,45 @@ elseif (!empty($this->map['data'])):
<div id="mapper-generic"></div>
<div style="clear: left"></div>
<?php
endif;
else:
?>
<script type="text/javascript">//<![CDATA[
<?=Lang::zone('noMap');?>
<div class="pad"></div>
<?php
if (!empty($this->map['data']['zone'])):
echo " ".(!empty($this->gPageInfo) ? "$.extend(g_pageInfo, {id: ".$this->map['data']['zone']."})" : "var g_pageInfo = {id: ".$this->map['data']['zone']."}").";\n";
elseif (isset($this->map['mapperData'])):
echo " var g_mapperData = ".Util::toJSON($this->map['mapperData'], empty($this->map['mapperData']) ? JSON_FORCE_OBJECT : 0).";\n";
endif;
// dont forget to set "parent: 'mapper-generic'"
echo " var myMapper = new Mapper(".Util::toJSON($this->map['data']).");\n";
if (isset($this->map['som'])):
echo " new ShowOnMap(".Util::toJSON($this->map['som']).");\n";
endif;
if ($this->type != Type::ZONE && $this->type != Type::QUEST):
echo " \$WH.gE(\$WH.ge('mapper-zone-generic'), 'a')[0].onclick();\n";
endif;
if (User::isIngroup(U_GROUP_MODERATOR)):
?>
<script type="text/javascript">//<![CDATA[
<?php if (isset($mapper['zone']) && $this->gPageInfo): ?>
$.extend(g_pageInfo, {id: <?=$mapper['zone'];?>});
<?php elseif (isset($mapper['zone'])): ?>
var g_pageInfo = {id: <?=$mapper['zone'];?>};
<?php elseif ($mapperData): ?>
var g_mapperData = <?=$this->json($mapperData);?>;
<?php endif; ?>
var myMapper = new Mapper(<?=$this->json($mapper);?>);
<?php if ($som): ?>
new ShowOnMap(<?=$this->json($som);?>);
<?php endif;
if ($foundIn): ?>
$WH.gE($WH.ge('mapper-zone-generic'), 'a')[0].onclick();
<?php endif;
if ($this->user::isInGroup(U_GROUP_MODERATOR)): ?>
function spawnposfix(type, typeguid, area, floor)
{
$.ajax({
type: 'GET',
url: '?admin=spawn-override',
data: { type: type, guid: typeguid, area : area, floor: floor, action: 1 },
data: { type: type, guid: typeguid, area : area, floor: floor },
dataType: 'json',
success: function (rsp) {
if (rsp > 0)
location.reload(true);
else if (rsp /* == x */)
if (rsp /* == x */)
alert('move failed. details tbd');
else
location.reload(true);
},
});
}
<?php
endif;
?>
<?php endif; ?>
//]]></script>
<?php endif; ?>

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,49 +20,43 @@
<div class="text">
<?php $this->brick('redButtons'); ?>
<h1><?=$this->name.($this->subname ? ' &lt;'.$this->subname.'&gt;' : null); ?></h1>
<h1><?=$this->h1.($this->subname ? ' &lt;'.$this->subname.'&gt;' : ''); ?></h1>
<?php
$this->brick('article');
$this->brick('markup', ['markup' => $this->article]);
if ($this->accessory):
echo ' <div>'.Lang::npc('accessoryFor').' ';
echo Lang::concat($this->accessory, true, function ($v, $k) { return '<a href="?npc='.$v[0].'">'.$v[1].'</a>'; });
echo Lang::concat($this->accessory, true, fn ($v) => '<a href="?npc='.$v[0].'">'.$v[1].'</a>');
echo ".</div>\n";
endif;
if ($this->placeholder):
echo ' <div>'.Lang::npc('difficultyPH', $this->placeholder)."</div>\n";
?>
<div><?=Lang::npc('difficultyPH', $this->placeholder);?></div>
<div class="pad"></div>
<?php
elseif (!empty($this->map)):
elseif ($this->map):
$this->brick('mapper');
else:
echo ' '.Lang::npc('unkPosition')."\n";
endif;
if ($this->quotes[0]):
if ([$quoteGroups, $count] = $this->quotes):
?>
<h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?=Lang::npc('quotes').'&nbsp;('.$this->quotes[1]; ?>)</a></h3>
<h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?=Lang::npc('quotes', [$count]); ?></a></h3>
<div id="quotes-generic" style="display: none"><ul>
<?php
foreach ($this->quotes[0] as $group):
if (count($group) > 1 && count($this->quotes[0]) > 1):
foreach ($quoteGroups as $group):
if (count($group) > 1 && count($quoteGroups) > 1):
echo "<ul>\n";
endif;
echo '<li>';
$last = end($group);
foreach ($group as $itr):
echo sprintf(sprintf($itr['text'], $itr['prefix']), $this->name);
echo ($itr == $last) ? null : "</li>\n<li>";
echo '<li>'.sprintf($itr['text'], $this->h1)."</li>\n";
endforeach;
echo "</li>\n";
if (count($group) > 1 && count($this->quotes[0]) > 1):
if (count($group) > 1 && count($quoteGroups) > 1):
echo "</ul>\n";
endif;
@@ -75,21 +72,16 @@ if ($this->reputation):
<?php
echo Lang::npc('gainsDesc').Lang::main('colon');
foreach ($this->reputation as $set):
foreach ($this->reputation as [$mode, $data]):
if (count($this->reputation) > 1):
echo '<ul><li><span class="rep-difficulty">'.$set[0].'</span></li>';
echo '<ul><li><span class="rep-difficulty">'.$mode.'</span></li>';
endif;
echo '<ul>';
foreach ($set[1] as $itr):
if ($itr['qty'][1] && User::isInGroup(U_GROUP_EMPLOYEE))
$qty = intVal($itr['qty'][0]) . sprintf(Util::$dfnString, Lang::faction('customRewRate'), ($itr['qty'][1] > 0 ? '+' : '').intVal($itr['qty'][1]));
else
$qty = intVal(array_sum($itr['qty']));
echo '<li><div'.($itr['qty'][0] < 0 ? ' class="reputation-negative-amount"' : null).'><span>'.$qty.'</span> '.Lang::npc('repWith') .
' <a href="?faction='.$itr['id'].'">'.$itr['name'].'</a>'.($itr['cap'] && $itr['qty'][0] > 0 ? '&nbsp;('.sprintf(Lang::npc('stopsAt'), $itr['cap']).')' : null).'</div></li>';
foreach ($data as [$id, $qty, $name, $cap]):
echo '<li><div'.($qty[0] < 0 ? ' class="reputation-negative-amount"' : '').'><span>'.($qty[1] ?: $qty[0]).'</span> '.Lang::npc('repWith') .
' <a href="?faction='.$id.'">'.$name.'</a>'.($cap && $qty[0] > 0 ? '&nbsp;('.Lang::npc('stopsAt', [$cap]).')' : '').'</div></li>';
endforeach;
echo '</ul>';
@@ -100,25 +92,14 @@ if ($this->reputation):
endforeach;
endif;
if (isset($this->smartAI)):
?>
<div id="text-generic" class="left"></div>
<script type="text/javascript">//<![CDATA[
Markup.printHtml("<?=$this->smartAI; ?>", "text-generic", {
allow: Markup.CLASS_ADMIN,
dbpage: true
});
//]]></script>
$this->brick('markup', ['markup' => $this->smartAI]);
<div class="pad2"></div>
<?php
endif;
?>
<h2 class="clear"><?=Lang::main('related'); ?></h2>
</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,67 +13,62 @@ $f = $this->filterObj->values // shorthand
<?php
$this->brick('announcement');
$this->brick('pageTemplate', ['fiQuery' => $this->filterObj->query, 'fiMenuItem' => [4]]);
$this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [4]]);
?>
<div id="fi" style="display: <?=($this->filterObj->query ? 'block' : 'none'); ?>;">
<div id="fi" style="display: <?=($this->filter->query ? 'block' : 'none'); ?>;">
<form action="?filter=npcs<?=$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::npc('classification').Lang::main('colon'); ?></div>
<div style="float: left"><?=Lang::npc('classification', ['']); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div>
<select name="cl[]" size="5" multiple="multiple" class="rightselect" style="width: 9.5em">
<?php
foreach (Lang::npc('rank') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
<?=$this->makeOptionsList(Lang::npc('rank'), $f['cl'], 28); ?>
</select>
</div>
<?php if ($this->petFamPanel): ?>
<div class="rightpanel2">
<div style="float: left"><?=Lang::npc('petFamily').Lang::main('colon'); ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['fa[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div style="float: left"><?=Lang::npc('petFamily'); ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['fa[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div>
<select name="fa[]" size="7" multiple="multiple" class="rightselect">
<?php
foreach (Lang::game('fa') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['fa']) && in_array($i, (array)$f['fa']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
<?=$this->makeOptionsList(Lang::game('fa'), $f['fa'], 28); ?>
</select>
</div>
<?php endif; ?>
<table>
<tr>
<td><?=Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td><?=$this->ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2">
<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="npc-ex" <?=(isset($f['ex']) ? 'checked="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="npc-ex" <?=($f['ex'] ? 'checked="checked" ' : ''); ?>/></td>
<td><label for="npc-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendednpcsearch, 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::npc('react').Lang::main('colon'); ?></td>
<td>&nbsp;<select name="ra" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?=(isset($f['ra']) ? ' class="q'.($f['ra'] == 1 ? '2' : ($f['ra'] == -1 ? '10' : null)).'"' : null); ?>>
<td>&nbsp;&nbsp;&nbsp;<?=Lang::npc('react', ['']); ?></td>
<td>&nbsp;<select name="ra" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?=($f['ra'] ? ' class="q'.($f['ra'] == 1 ? '2' : ($f['ra'] == -1 ? '10' : '')).'"' : ''); ?>>
<option></option>
<option value="1" class="q2"<?=(isset($f['ra']) && $f['ra'] == 1 ? ' selected' : null); ?>>A</option>
<option value="0" class="q"<?=(isset($f['ra']) && $f['ra'] == 0 ? ' selected' : null); ?>>A</option>
<option value="-1" class="q10"<?=(isset($f['ra']) && $f['ra'] == -1 ? ' selected' : null); ?>>A</option>
<option value="1" class="q2"<?=( $f['ra'] == 1 ? ' selected' : ''); ?>>A</option>
<option value="0" class="q"<?=( $f['ra'] == 0 ? ' selected' : ''); ?>>A</option>
<option value="-1" class="q10"<?=($f['ra'] == -1 ? ' selected' : ''); ?>>A</option>
</select>
<select name="rh" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?=(isset($f['rh']) ? ' class="q'.($f['rh'] == 1 ? '2' : ($f['rh'] == -1 ? '10' : null)).'"' : null); ?>>
<select name="rh" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?=($f['rh'] ? ' class="q'.($f['rh'] == 1 ? '2' : ($f['rh'] == -1 ? '10' : '')).'"' : ''); ?>>
<option></option>
<option value="1" class="q2"<?=(isset($f['rh']) && $f['rh'] == 1 ? ' selected' : null); ?>>H</option>
<option value="0" class="q"<?=(isset($f['rh']) && $f['rh'] == 0 ? ' selected' : null); ?>>H</option>
<option value="-1" class="q10"<?=(isset($f['rh']) && $f['rh'] == -1 ? ' selected' : null); ?>>H</option>
<option value="1" class="q2"<?=( $f['rh'] == 1 ? ' selected' : ''); ?>>H</option>
<option value="0" class="q"<?=( $f['rh'] == 0 ? ' selected' : ''); ?>>H</option>
<option value="-1" class="q10"<?=($f['rh'] == -1 ? ' selected' : ''); ?>>H</option>
</select>
</td>
</tr></table>
@@ -84,7 +80,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>
@@ -98,7 +94,7 @@ endforeach;
<div class="pad"></div>
</div>
<?php $this->brick('filter'); ?>
<?=$this->renderFilter(12); ?>
<?php $this->brick('lvTabs'); ?>