Lang/Races

Hey Lang, what races does this thing have assigned?
  Yes!

   .. this will no longer happen
This commit is contained in:
Sarjuuk
2018-08-16 21:43:56 +02:00
parent ceedf3fbdd
commit 0fd0a66137
10 changed files with 17 additions and 30 deletions

View File

@@ -866,14 +866,13 @@ class ItemList extends BaseType
}
// required races
if ($races = Lang::getRaceString($this->curTpl['requiredRace'], $__, $jsg, $__))
if ($races = Lang::getRaceString($this->curTpl['requiredRace'], $jsg, $__))
{
foreach ($jsg as $js)
if (empty($this->jsGlobals[TYPE_RACE][$js]))
$this->jsGlobals[TYPE_RACE][$js] = $js;
if ($races != Lang::game('ra', 0)) // not "both", but display combinations like: troll, dwarf
$x .= Lang::game('races').Lang::main('colon').$races.'<br />';
$x .= Lang::game('races').Lang::main('colon').$races.'<br />';
}
// required honorRank (not used anymore)

View File

@@ -336,30 +336,21 @@ class Lang
return implode(', ', $tmp);
}
public static function getRaceString($raceMask, &$side = 0, &$ids = [], &$n = 0, $asHTML = true)
public static function getRaceString($raceMask, &$ids = [], &$n = 0, $asHTML = true)
{
$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;
if (!$raceMask)
return false;
$tmp = [];
$i = 1;
$base = $asHTML ? '<a href="?race=%d" class="q1">%s</a>' : '[race=%d]';
$br = $asHTML ? '' : '[br]';
if (!$raceMask)
{
$side |= SIDE_BOTH;
return self::game('ra', 0);
}
if ($raceMask & RACE_MASK_HORDE)
$side |= SIDE_HORDE;
if ($raceMask & RACE_MASK_ALLIANCE)
$side |= SIDE_ALLIANCE;
if ($raceMask == RACE_MASK_HORDE)
return self::game('ra', -2);

View File

@@ -298,7 +298,7 @@ $lang = array(
'sc' => ["Körperlich", "Heilig", "Feuer", "Natur", "Frost", "Schatten", "Arkan"],
'dt' => [null, "Magie", "Fluch", "Krankheit", "Gift", "Verstohlenheit", "Unsichtbarkeit", null, null, "Wut"],
'cl' => [null, "Krieger", "Paladin", "Jäger", "Schurke", "Priester", "Todesritter", "Schamane", "Magier", "Hexenmeister", null, "Druide"],
'ra' => [-2 => "Horde", -1 => "Allianz", "Beide", "Mensch", "Orc", "Zwerg", "Nachtelf", "Untoter", "Tauren", "Gnom", "Troll", null, "Blutelf", "Draenei"],
'ra' => [-2 => "Horde", -1 => "Allianz", null, "Mensch", "Orc", "Zwerg", "Nachtelf", "Untoter", "Tauren", "Gnom", "Troll", null, "Blutelf", "Draenei"],
'rep' => ["Hasserfüllt", "Feindselig", "Unfreundlich", "Neutral", "Freundlich", "Wohlwollend", "Respektvoll", "Ehrfürchtig"],
'st' => array(
"Vorgabe", "Katzengestalt", "Baum des Lebens", "Reisegestalt", "Wassergestalt", "Bärengestalt",

View File

@@ -298,7 +298,7 @@ $lang = array(
'dt' => [null, "Magic", "Curse", "Disease", "Poison", "Stealth", "Invisibility", null, null, "Enrage"], // SpellDispalType.dbc
'sc' => ["Physical", "Holy", "Fire", "Nature", "Frost", "Shadow", "Arcane"], // STRING_SCHOOL_*
'cl' => [null, "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", null, "Druid"], // ChrClasses.dbc
'ra' => [-2 => "Horde", -1 => "Alliance", "Both", "Human", "Orc", "Dwarf", "Night Elf", "Undead", "Tauren", "Gnome", "Troll", null, "Blood Elf", "Draenei"], // ChrRaces.dbc
'ra' => [-2 => "Horde", -1 => "Alliance", null, "Human", "Orc", "Dwarf", "Night Elf", "Undead", "Tauren", "Gnome", "Troll", null, "Blood Elf", "Draenei"], // ChrRaces.dbc
'rep' => ["Hated", "Hostile", "Unfriendly", "Neutral", "Friendly", "Honored", "Revered", "Exalted"], // FACTION_STANDING_LABEL*
'st' => array( // SpellShapeshiftForm.dbc // with minor deviations on 27, 28
"Default", "Cat Form", "Tree of Life", "Travel Form", "Aquatic Form", "Bear From",

View File

@@ -298,7 +298,7 @@ $lang = array(
'sc' => ["Física", "Sagrado", "Fuego", "Naturaleza", "Escarcha", "Sombras", "Arcano"],
'dt' => [null, "Magia", "Maldición", "Enfermedad", "Veneno", "Sigilo", "Invisibilidad", null, null, "Enfurecer"],
'cl' => [null, "Guerrero", "Paladín", "Cazador", "Pícaro", "Sacerdote", "Caballero de la Muerte", "Chamán", "Mago", "Brujo", null, "Druida"],
'ra' => [-2 => "Horda", -1 => "Alianza", "Ambos", "Humano", "Orco", "Enano", "Elfo de la noche", "No-muerto", "Tauren", "Gnomo", "Trol ", null, "Blood Elf", "Elfo de sangre"],
'ra' => [-2 => "Horda", -1 => "Alianza", null, "Humano", "Orco", "Enano", "Elfo de la noche", "No-muerto", "Tauren", "Gnomo", "Trol ", null, "Blood Elf", "Elfo de sangre"],
'rep' => ["Odiado", "Hostil", "Adverso", "Neutral", "Amistoso", "Honorable", "Reverenciado", "Exaltado"],
'st' => array(
"Defecto", "Forma felina", "Árbol de vida", "Forma de viaje", "Forma acuática", "Forma de oso",

View File

@@ -298,7 +298,7 @@ $lang = array(
'dt' => [null, "Magie", "Malédiction", "Maladie", "Poison", "Camouflage", "Invisibilité", null, null, "Enrager"],
'sc' => ["Physique", "Sacré", "Feu", "Nature", "Givre", "Ombre", "Arcane"],
'cl' => [null, "Guerrier", "Paladin", "Chasseur", "Voleur", "Prêtre", "DeathChevalier de la mort", "Chaman", "Mage", "Démoniste", null, "Druide"],
'ra' => [-2 => "Horde", -1 => "Alliance", "Les deux", "Humain", "Orc", "Nain", "Elfe de la nuit", "Mort-vivant", "Tauren", "Gnome", "Troll", null, "Elfe de sang", "Draeneï"],
'ra' => [-2 => "Horde", -1 => "Alliance", null, "Humain", "Orc", "Nain", "Elfe de la nuit", "Mort-vivant", "Tauren", "Gnome", "Troll", null, "Elfe de sang", "Draeneï"],
'rep' => ["Détesté", "Hostile", "Inamical", "Neutre", "Amical", "Honoré", "Révéré", "Exalté"],
'st' => array(
"Défaut", "Forme de félin", "Arbre de vie", "Forme de voyage", "Forme aquatique", "Forme d'ours",

View File

@@ -298,7 +298,7 @@ $lang = array(
'dt' => array(null, "Магия", "Проклятие", "Болезнь", "Яд", "Незаметность", "Невидимость", null, null, "Исступление"),
'sc' => array("Физический урон", "Свет", "Огонь", "природа", "Лед", "Тьма", "Тайная магия"),
'cl' => array(null, "Воин", "Паладин", "Охотник", "Разбойник", "Жрец", "Рыцарь смерти", "Шаман", "Маг", "Чернокнижник", null, "Друид"),
'ra' => array(-2 => "Орда", -1 => "Альянс", "Обе", "Человек", "Орк", "Дворф", "Ночной эльф", "Нежить", "Таурен", "Гном", "Тролль", null, "Эльф крови", "Дреней"),
'ra' => array(-2 => "Орда", -1 => "Альянс", null, "Человек", "Орк", "Дворф", "Ночной эльф", "Нежить", "Таурен", "Гном", "Тролль", null, "Эльф крови", "Дреней"),
'rep' => array("Ненависть", "Враждебность", "Неприязнь", "Равнодушие", "Дружелюбие", "Уважение", "Почтение", "Превознесение"),
'st' => array(
"По-умолчанию", "Облик кошки", "TОблик Древа жизни", "Походный облик", "Водный облик", "Облик медведя",

View File

@@ -299,7 +299,7 @@ $lang = array(
'dt' => [null, "魔法", "诅咒", "疾病", "中毒", "潜行", "隐形", null, null, "激怒"],
'sc' => ["物理", "神圣", "火焰", "自然", "冰霜", "暗影", "奥术"],
'cl' => [null, "战士", "圣骑士", "猎人", "潜行者", "牧师", "死亡骑士", "萨满祭司", "法师", "术士", null, "德鲁伊"],
'ra' => [-2 => "部落", -1 => "联盟", "双方", "人类", "兽人", "矮人", "暗夜精灵", "亡灵", "牛头人", "侏儒", "巨魔", null, "血精灵", "德莱尼"],
'ra' => [-2 => "部落", -1 => "联盟", null, "人类", "兽人", "矮人", "暗夜精灵", "亡灵", "牛头人", "侏儒", "巨魔", null, "血精灵", "德莱尼"],
'rep' => ["仇恨", "敌对", "冷淡", "中立", "友善", "尊敬", "崇敬", "崇拜"],
'st' => array(
"Default", "猎豹形态", "生命之树形态", "旅行形态", "水生形态", "熊形态",

View File

@@ -137,7 +137,7 @@ class QuestPage extends GenericPage
}
// races
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false))
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $jsg, $n, false))
{
$this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::game('race') : Lang::game('races');

View File

@@ -157,14 +157,11 @@ class SpellPage extends GenericPage
}
// races
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false))
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $jsg, $n, false))
{
if ($_ != Lang::game('ra', 0)) // omit: "both"
{
$this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::game('race') : Lang::game('races');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
}
$this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::game('race') : Lang::game('races');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
}
// classes