detail page for events (with not much in it)

detail and listview for NPCs (without spawns, spells and some filters)
forcing the template to be more generic

- noticed, that the loot display is off. It happens with different modes
  on a creature, that has the same loot but different chances or quantities
  ... analyzing
This commit is contained in:
Sarjuuk
2014-02-08 12:09:48 +01:00
parent 99642e4ea4
commit 819a46ae15
85 changed files with 2942 additions and 1934 deletions

279
localization/lang.class.php Normal file
View File

@@ -0,0 +1,279 @@
<?php
class Lang
{
public static $timeUnits;
public static $main;
public static $account;
public static $game;
public static $error;
public static $search;
public static $profiler;
public static $achievement;
public static $class;
public static $currency;
public static $event;
public static $faction;
public static $item;
public static $itemset;
public static $maps;
public static $npc;
public static $pet;
public static $quest;
public static $skill;
public static $spell;
public static $title;
public static $zone;
public static $colon;
public static $dateFmtLong;
public static $dateFmtShort;
public static function load($loc)
{
if (!file_exists('localization/locale_'.$loc.'.php'))
die('File for localization '.strToUpper($loc).' not found.');
else
require 'localization/locale_'.$loc.'.php';
foreach ($lang as $k => $v)
self::$$k = $v;
// *cough* .. reuse-hack
self::$item['cat'][2] = [self::$item['cat'][2], self::$spell['weaponSubClass']];
self::$item['cat'][2][1][14] .= ' ('.self::$item['cat'][2][0].')';
}
// todo: expand
public static function getInfoBoxForFlags($flags)
{
$tmp = [];
if ($flags & CUSTOM_DISABLED)
$tmp[] = '[tooltip name=disabledHint]'.Util::jsEscape(self::$main['disabledHint']).'[/tooltip][span class=tip tooltip=disabledHint]'.Util::jsEscape(self::$main['disabled']).'[/span]';
if ($flags & CUSTOM_SERVERSIDE)
$tmp[] = '[tooltip name=serversideHint]'.Util::jsEscape(self::$main['serversideHint']).'[/tooltip][span class=tip tooltip=serversideHint]'.Util::jsEscape(self::$main['serverside']).'[/span]';
if ($flags & CUSTOM_UNAVAILABLE)
$tmp[] = self::$main['unavailable'];
return $tmp;
}
public static function getLocks($lockId, $interactive = false)
{
$locks = [];
$lock = DB::Aowow()->selectRow('SELECT * FROM ?_lock WHERE id = ?d', $lockId);
if (!$lock)
return '';
for ($i = 1; $i <= 5; $i++)
{
$prop = $lock['properties'.$i];
$rank = $lock['reqSkill'.$i];
$name = '';
if ($lock['type'.$i] == 1) // opened by item
{
$name = ItemList::getName($prop);
if (!$name)
continue;
if ($interactive)
$name = '<a class="q1" href="?item='.$prop.'">'.$name.'</a>';
}
else if ($lock['type'.$i] == 2) // opened by skill
{
// exclude unusual stuff
if (!in_array($prop, [1, 2, 3, 4, 9, 16, 20]))
continue;
$txt = DB::Aowow()->selectRow('SELECT * FROM ?_locktype WHERE id = ?d', $prop); // todo (low): convert to static text
$name = Util::localizedString($txt, 'name');
if (!$name)
continue;
if ($interactive)
{
$skill = 0;
switch ($prop)
{
case 1: $skill = 633; break; // Lockpicking
case 2: $skill = 182; break; // Herbing
case 3: $skill = 186; break; // Mining
case 20: $skill = 773; break; // Scribing
}
if ($skill)
$name = '<a href="?skill='.$skill.'">'.$name.'</a>';
}
if ($rank > 0)
$name .= ' ('.$rank.')';
}
else
continue;
$locks[$lock['type'.$i] == 1 ? $i : -$i] = sprintf(Lang::$game['requires'], $name);
}
return $locks;
}
public static function getReputationLevelForPoints($pts)
{
if ($pts >= 41999)
return self::$game['rep'][REP_EXALTED];
else if ($pts >= 20999)
return self::$game['rep'][REP_REVERED];
else if ($pts >= 8999)
return self::$game['rep'][REP_HONORED];
else if ($pts >= 2999)
return self::$game['rep'][REP_FRIENDLY];
else /* if ($pts >= 1) */
return self::$game['rep'][REP_NEUTRAL];
}
public static function getRequiredItems($class, $mask, $short = true)
{
if (!in_array($class, [ITEM_CLASS_MISC, ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON]))
return '';
// not checking weapon / armor here. It's highly unlikely that they overlap
if ($short)
{
// misc - Mounts
if ($class == ITEM_CLASS_MISC)
return '';
// all basic armor classes
if ($class == ITEM_CLASS_ARMOR && ($mask & 0x1E) == 0x1E)
return '';
// all weapon classes
if ($class == ITEM_CLASS_WEAPON && ($mask & 0x1DE5FF) == 0x1DE5FF)
return '';
foreach (Lang::$spell['subClassMasks'] as $m => $str)
if ($mask == $m)
return $str;
}
if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me!
return Lang::$spell['cat'][-5];
$tmp = [];
$strs = Lang::$spell[$class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass'];
foreach ($strs as $k => $str)
if ($mask & (1 << $k) && $str)
$tmp[] = $str;
return implode(', ', $tmp);
}
public static function getStances($stanceMask)
{
$stanceMask &= 0xFC27909F; // clamp to available stances/forms..
$tmp = [];
$i = 1;
while ($stanceMask)
{
if ($stanceMask & (1 << ($i - 1)))
{
$tmp[] = self::$game['st'][$i];
$stanceMask &= ~(1 << ($i - 1));
}
$i++;
}
return implode(', ', $tmp);
}
public static function getMagicSchools($schoolMask)
{
$schoolMask &= SPELL_ALL_SCHOOLS; // clamp to available schools..
$tmp = [];
$i = 0;
while ($schoolMask)
{
if ($schoolMask & (1 << $i))
{
$tmp[] = self::$game['sc'][$i];
$schoolMask &= ~(1 << $i);
}
$i++;
}
return implode(', ', $tmp);
}
public static function getClassString($classMask)
{
$classMask &= CLASS_MASK_ALL; // clamp to available classes..
if ($classMask == CLASS_MASK_ALL) // available to all classes
return false;
$tmp = [];
$i = 1;
while ($classMask)
{
if ($classMask & (1 << ($i - 1)))
{
$tmp[] = '<a href="?class='.$i.'" class="c'.$i.'">'.self::$game['cl'][$i].'</a>';
$classMask &= ~(1 << ($i - 1));
}
$i++;
}
return implode(', ', $tmp);
}
public static function getRaceString($raceMask)
{
$raceMask &= RACE_MASK_ALL; // clamp to available races..
if ($raceMask == RACE_MASK_ALL) // available to all races (we don't display 'both factions')
return false;
$tmp = [];
$side = 0;
$i = 1;
if (!$raceMask)
return array('side' => SIDE_BOTH, 'name' => self::$game['ra'][0]);
if ($raceMask == RACE_MASK_HORDE)
return array('side' => SIDE_HORDE, 'name' => self::$game['ra'][-2]);
if ($raceMask == RACE_MASK_ALLIANCE)
return array('side' => SIDE_ALLIANCE, 'name' => self::$game['ra'][-1]);
if ($raceMask & RACE_MASK_HORDE)
$side |= SIDE_HORDE;
if ($raceMask & RACE_MASK_ALLIANCE)
$side |= SIDE_ALLIANCE;
while ($raceMask)
{
if ($raceMask & (1 << ($i - 1)))
{
$tmp[] = '<a href="?race='.$i.'" class="q1">'.self::$game['ra'][$i].'</a>';
$raceMask &= ~(1 << ($i - 1));
}
$i++;
}
return array ('side' => $side, 'name' => implode(', ', $tmp));
}
}
?>

View File

@@ -145,9 +145,9 @@ $lang = array(
'npcs' => "NPCs",
'pet' => "Begleiter",
'pets' => "Begleiter",
'requires' => "Benötigt %s",
'profile' => "",
'profiles' => "Profile",
'requires' => "Benötigt %s",
'requires2' => "Benötigt",
'reqLevel' => "Benötigt Stufe %s",
'reqLevelHlm' => "Benötigt Stufe %s",
@@ -203,7 +203,7 @@ $lang = array(
),
'ct' => array(
"Nicht kategorisiert", "Wildtier", "Drachkin", "Dämon", "Elementar", "Riese", "Untoter", "Humanoid",
"Tier", "Mechanisch", "Nicht spezifiziert", "Totem", "Haustier", "Gas Wolke"
"Tier", "Mechanisch", "Nicht spezifiziert", "Totem", "Haustier", "Gaswolke"
),
'fa' => array(
1 => "Wolf", 2 => "Katze", 3 => "Spinne", 4 => "Bär", 5 => "Eber", 6 => "Krokilisk", 7 => "Aasvogel", 8 => "Krebs",
@@ -261,9 +261,32 @@ $lang = array(
'viewPubDesc' => "Die Beschreibung in deinem <a href=\"?user=%s\">öffentlichen Profil</a> ansehen",
),
'npc' => array(
'rank' => ['Normal', 'Elite', 'Rar Elite', 'Boss', 'Rar']
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rar", 2 => "Rar Elite", 3 => "Boss"],
'classification'=> "Einstufung",
'petFamily' => "Tierart",
'react' => "Reaktion",
'worth' => "Wert",
'unkPosition' => "Der Aufenthaltsort dieses NPCs ist nicht bekannt.",
'difficultyPH' => "Dieser NPC ist ein Platzhalter für einen anderen Modus von",
'quotes' => "Zitate",
'gainsDesc' => "Nach dem Töten dieses NPCs erhaltet Ihr",
'repWith' => "Ruf mit der Fraktion",
'stopsAt' => "Stoppt bei %s",
'textTypes' => [null, "schreit", "sagt", "flüstert"],
'modes' => array(
1 => ["Normal", "Heroisch"],
2 => ["10-Spieler Normal", "25-Spieler Normal", "10-Spieler Heroisch", "25-Spieler Heroisch"]
),
'cat' => array(
"Nicht kategorisiert", "Wildtiere", "Drachkin", "Dämonen", "Elementare", "Riesen", "Untote", "Humanoide",
"Tiere", "Mechanisch", "Nicht spezifiziert", "Totems", "Haustiere", "Gaswolken"
)
),
'event' => array(
'start' => "Anfang",
'end' => "Ende",
'interval' => "Intervall",
'inProgress' => "Ereignis findet gerade statt",
'category' => array("Nicht kategorisiert", "Feiertage", "Wiederkehrend", "Spieler vs. Spieler")
),
'achievement' => array(
@@ -275,6 +298,7 @@ $lang = array(
'itemReward' => "Ihr bekommt:",
'titleReward' => "Euch wird der Titel \"<a href=\"?title=%d\">%s</a>\" verliehen",
'slain' => "getötet",
'reqNumCrt' => "Benötigt"
),
'class' => array(
'racialLeader' => "Volksanführer",
@@ -322,6 +346,7 @@ $lang = array(
)
),
'currency' => array(
'cap' => "Obergrenze",
'cat' => array(
1 => "Verschiedenes", 2 => "Spieler gegen Spieler", 4 => "Classic", 21 => "Wrath of the Lich King", 22 => "Dungeon und Schlachtzug", 23 => "Burning Crusade", 41 => "Test", 3 => "Unbenutzt"
)
@@ -344,7 +369,7 @@ $lang = array(
'_pieces' => "Teile",
'_unavailable' => "Dieses Ausrüstungsset ist nicht für Spieler verfügbar.",
'_tag' => "Tag",
'summary' => "Zusammenfassung",
'notes' => array(
null, "Dungeon-Set 1", "Dungeon-Set 2", "Tier 1 Raid-Set",
"Tier 2 Raid-Set", "Tier 3 Raid-Set", "Level 60 PvP-Set (Rar)", "Level 60 PvP-Set (Rar, alt)",
@@ -698,7 +723,9 @@ $lang = array(
"Unbekannter Bonus #%d (%d)",
)
),
'colon' => ': '
'colon' => ': ',
'dateFmtShort' => "d.m.Y",
'dateFmtLong' => "d.m.Y \u\m H:i"
);
?>

View File

@@ -248,9 +248,32 @@ $lang = array(
'viewPubDesc' => "View your Public Description in your <a href=\"?user=%s\">Profile Page</a>",
),
'npc' => array(
'rank' => ['Normal', 'Elite', 'Rare Elite', 'Boss', 'Rare']
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rare", 2 => "Rare Elite", 3 => "Boss"],
'classification'=> "Classification",
'petFamily' => "Pet familiy",
'react' => "React",
'worth' => "Worth",
'unkPosition' => "The location of this NPC is unknown.",
'difficultyPH' => "This NPC is a placeholder for a different mode of",
'quotes' => "Quotes",
'gainsDesc' => "After killing this NPC you will gain",
'repWith' => "reputation with",
'stopsAt' => "stops at %s",
'textTypes' => [null, "yells", "says", "whispers"],
'modes' => array(
1 => ["Normal", "Heroic"],
2 => ["10-player Normal", "25-player Normal", "10-player Heroic", "25-player Heroic"]
),
'cat' => array(
"Uncategorized", "Beasts", "Dragonkins", "Demons", "Elementals", "Giants", "Undead", "Humanoids",
"Critters", "Mechanicals", "Not specified", "Totems", "Non-combat Pets", "Gas Clouds"
),
),
'event' => array(
'start' => "Start",
'end' => "End",
'interval' => "Interval",
'inProgress' => "Event is currently in progress",
'category' => array("Uncategorized", "Holidays", "Recurring", "Player vs. Player")
),
'achievement' => array(
@@ -262,6 +285,7 @@ $lang = array(
'itemReward' => "You will receive:",
'titleReward' => "You shall be granted the title \"<a href=\"?title=%d\">%s</a>\"",
'slain' => "slain",
'reqNumCrt' => "Requires"
),
'class' => array(
'racialLeader' => "Racial leader",
@@ -309,6 +333,7 @@ $lang = array(
)
),
'currency' => array(
'cap' => "Total cap",
'cat' => array(
1 => "Miscellaneous", 2 => "Player vs. Player", 4 => "Classic", 21 => "Wrath of the Lich King", 22 => "Dungeon and Raid", 23 => "Burning Crusade", 41 => "Test", 3 => "Unused"
)
@@ -331,7 +356,7 @@ $lang = array(
'_pieces' => "pieces",
'_unavailable' => "This item set is not available to players.",
'_tag' => "Tag",
'summary' => "Summary",
'notes' => array(
null, "Dungeon Set 1", "Dungeon Set 2", "Tier 1 Raid Set",
"Tier 2 Raid Set", "Tier 3 Raid Set", "Level 60 PvP Rare Set", "Level 60 PvP Rare Set (Old)",
@@ -685,7 +710,9 @@ $lang = array(
"Unknown Bonus #%d (%d)",
)
),
'colon' => ': '
'colon' => ': ',
'dateFmtShort' => "Y/m/d",
'dateFmtLong' => "Y/m/d \a\\t H:i"
);
?>

View File

@@ -219,9 +219,32 @@ $lang = array(
),
'account' => [],
'npc' => array(
'rank' => ['Normal', 'Élite', 'Élite raro', 'Jefe', 'Raro']
'rank' => [0 => "Normal", 1 => "Élite", 4 => "Raro", 2 => "Élite raro", 3 => "Jefe"],
'classification'=> "Clasificación",
'petFamily' => "Familia de mascota",
'react' => "Reacción",
'worth' => "Valor",
'unkPosition' => "No se conoce la ubicación de este PNJ.",
'difficultyPH' => "[Este PNJ es un marcador de posición para un modo diferente de]",
'quotes' => "Citas",
'gainsDesc' => "Tras acabar con este PNJ ganarás",
'repWith' => "reputación con",
'stopsAt' => "se detiene en %s",
'textTypes' => [null, "grita", "dice", "susurra"],
'modes' => array(
1 => ["Normal", "Heroico"],
2 => ["10 jugadores Normal", "25 jugadores Normal", "10 jugadores Heroico", "25 jugadores Heroico"]
),
'cat' => array(
"Sin categoría", "Bestia", "Dragonante", "Demonio", "Elemental", "Gigante", "No-muerto", "Humanoide",
"Alimaña", "Mecánico", "Sin especificar", "Tótem", "Mascota mansa", "Nube de gas"
)
),
'event' => array(
'start' => "Empieza",
'end' => "Termina",
'interval' => "Intervalo",
'inProgress' => "El evento está en progreso actualmente",
'category' => array("Sin categoría", "Vacacionales", "Periódicos", "Jugador contra Jugador")
),
'achievement' => array(
@@ -233,6 +256,7 @@ $lang = array(
'itemReward' => "Recibirás:",
'titleReward' => "Deberías obtener el título \"<a href=\"?title=%d\">%s</a>\"",
'slain' => "matado",
'reqNumCrt' => "Requiere"
),
'class' => array(
'racialLeader' => "Lider racial",
@@ -280,6 +304,7 @@ $lang = array(
)
),
'currency' => array(
'cap' => "Límite total",
'cat' => array(
1 => "Miscelánea", 2 => "Jugador contra Jugador", 4 => "Clásico", 21 => "Wrath of the Lich King", 22 => "Mazmorra y banda", 23 => "Burning Crusade", 41 => "Prueba", 3 => "No las uso"
)
@@ -302,7 +327,7 @@ $lang = array(
'_pieces' => "piezas",
'_unavailable' => "Este conjunto de objetos no está disponible para jugadores.",
'_tag' => "Etiqueta",
'summary' => "Resúmen",
'notes' => array(
null, "Set de mazmorra 1", "Set de mazmorra 2", "Set de banda tier 1",
"Set de banda tier 2", "Set de banda tier 3", "Set JcJ nivel 60 superior", "Set JcJ nivel 60 superior (obsoleto)",
@@ -656,7 +681,9 @@ $lang = array(
"Estadística no utilizada #%d (%d)",
)
),
'colon' => ': '
'colon' => ': ',
'dateFmtShort' => "d/m/Y",
'dateFmtLong' => "d/m/Y \a \l\a\s H:i"
);
?>

View File

@@ -219,9 +219,32 @@ $lang = array(
),
'account' => [],
'npc' => array(
'rank' => ['Standard', 'Élite', 'Élite rare', 'Boss', 'Rare']
'rank' => [0 => "Standard", 1 => "Élite", 4 => "Rare", 2 => "Élite rare", 3 =>"Boss"],
'classification'=> "Classification",
'petFamily' => "Familier",
'react' => "Réaction",
'worth' => "Vaut",
'unkPosition' => "L'emplacement de ce PNJ est inconnu.",
'difficultyPH' => "[Ce PNJ est un espace réservé pour un autre mode de]",
'quotes' => "Citations",
'gainsDesc' => "Après avoir tué ce PNJ vous allez obtenir",
'repWith' => "points de réputation avec",
'stopsAt' => "arrête à %s",
'textTypes' => [null, "crie", "dit", "chuchote"],
'modes' => array(
1 => ["Normal", "Héroïque"],
2 => ["10-joueurs Normal", "25-joueurs Normal", "10-joueurs Héroïque", "25-joueurs Héroïque"]
),
'cat' => array(
"Non classés", "Bêtes", "Draconien", "Démons", "Élémentaires", "Géants", "Mort-vivant", "Humanoïdes",
"Bestioles", "Mécaniques", "Non spécifié", "Totems", "Familier pacifique", "Nuages de gaz"
)
),
'event' => array(
'start' => "Début",
'end' => "Fin",
'interval' => "Intervalle",
'inProgress' => "L'évènement est présentement en cours",
'category' => array("Non classés", "Vacances", "Récurrent", "Joueur ctr. Joueur")
),
'achievement' => array(
@@ -233,6 +256,7 @@ $lang = array(
'itemReward' => "Vous recevrez :",
'titleReward' => "Vous devriez recevoir le titre \"<a href=\"?title=%d\">%s</a>\"",
'slain' => "tué",
'reqNumCrt' => "Nécessite"
),
'class' => array(
'racialLeader' => "Leader racial",
@@ -280,6 +304,7 @@ $lang = array(
)
),
'currency' => array(
'cap' => "Maximum total",
'cat' => array(
1 => "Divers", 2 => "JcJ", 4 => "Classique", 21 => "Wrath of the Lich King", 22 => "Raid", 23 => "Burning Crusade", 41 => "Test", 3 => "Inutilisées"
)
@@ -302,7 +327,7 @@ $lang = array(
'_pieces' => "pièces",
'_unavailable' => "Cet objet n'est plus disponible aux joueurs.",
'_tag' => "Étiquette",
'summary' => "Résumé",
'notes' => array(
null, "Ensemble de donjon 1", "Ensemble de donjon 2", "Ensemble de raid palier 1",
"Ensemble de raid palier 2", "Ensemble de raid palier 3", "Ensemble JcJ niveau 60 supérieur", "Ensemble JcJ niveau 60 supérieur (désuet)",
@@ -606,7 +631,7 @@ $lang = array(
12 => "Quest",
13 => "Keys",
),
'statType' => array(
'statType' => array(
"Augmente vos points de mana de %d.",
"Augmente vos points de vie de %d.",
null,
@@ -656,7 +681,9 @@ $lang = array(
"Stat Inutilisée #%d (%d)",
)
),
'colon' => ' : '
'colon' => ' : ',
'dateFmtShort' => "Y-m-d",
'dateFmtLong' => "Y-m-d à H:i"
);
?>

View File

@@ -219,9 +219,32 @@ $lang = array(
),
'account' => [],
'npc' => array(
'rank' => ['Обычный', 'Элитный', 'Редкий элитный', 'Босс', 'Редкий']
'rank' => [0 => "Обычный", 1 => "Элитный", 4 => "Редкий", 2 => "Редкий элитный", 3 =>"Босс"],
'classification'=> "Классификация",
'petFamily' => "Семейство питомца",
'react' => "Реакция",
'worth' => "Деньги",
'unkPosition' => "Местоположение этого НИП неизвестно.",
'difficultyPH' => "[Этот НИП является прототипом для другого режима]",
'quotes' => "Цитаты",
'gainsDesc' => "В награду за убийство этого НИПа вы получите",
'repWith' => "репутации с",
'stopsAt' => 'останавливается на уровне "%s"',
'textTypes' => [null, "кричит", "говорит", "шепчет"],
'modes' => array(
1 => ["Обычный", "Героический"],
2 => ["10 нормал.", "25 нормал.", "10 героич.", "25 героич."]
),
'cat' => array(
"Разное", "Животные", "Дракон", "Демоны", "Элементали", "Великаны", "Нежить", "Гуманоиды",
"Существа", "Механизмы", "Не указано", "Тотемы", "Спутники", "Облака газа"
)
),
'event' => array(
'start' => "Начало",
'end' => "Конец",
'interval' => "[Interval]",
'inProgress' => "Событие активно в данный момент",
'category' => array("Разное", "Праздники", "Периодические", "PvP")
),
'achievement' => array(
@@ -233,6 +256,7 @@ $lang = array(
'itemReward' => "Вы получите:",
'titleReward' => "Наградное звание: \"<a href=\"?title=%d\">%s</a>\"",
'slain' => "убито",
'reqNumCrt' => "Требуется"
),
'class' => array(
'racialLeader' => "Лидер расы",
@@ -280,6 +304,7 @@ $lang = array(
)
),
'currency' => array(
'cap' => "Максимум всего",
'cat' => array(
1 => "Разное", 2 => "PvP", 4 => "World of Warcraft", 21 => "Wrath of the Lich King", 22 => "Подземелья и рейды", 23 => "Burning Crusade", 41 => "Test", 3 => "Неактивно"
)
@@ -302,7 +327,7 @@ $lang = array(
'_pieces' => "частей",
'_unavailable' => "Этот набор предметов не доступен игрокам.",
'_tag' => "Тэг",
'summary' => "Сводка",
'notes' => array(
null, "Комплект подземелий 1", "Комплект подземелий 2", "Рейдовый комплект Tier 1",
"Рейдовый комплект Tier 2", "Рейдовый комплект Tier 3", "PvP Комплект для 60 уровня", "PvP Комплект для 60 уровня (старая версия)",
@@ -656,7 +681,9 @@ $lang = array(
"Unknown Bonus #%d (%d)",
)
),
'colon' => ': '
'colon' => ': ',
'dateFmtShort' => "Y-m-d",
'dateFmtLong' => "Y-m-d в H:i"
);
?>