diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 77552380..7cdb61a0 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -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.'
'; + $x .= Lang::game('races').Lang::main('colon').$races.'
'; } // required honorRank (not used anymore) diff --git a/localization/lang.class.php b/localization/lang.class.php index 58374684..13ec162b 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -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 ? '%s' : '[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); diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 54a1edc4..3b91599a 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -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", diff --git a/localization/locale_enus.php b/localization/locale_enus.php index 2328c3a4..3197bf4c 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -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", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 3e606250..8b7f1adb 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -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", diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index ae7a771f..01cf16f4 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -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", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index 8d530178..aae5f526 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -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Облик Древа жизни", "Походный облик", "Водный облик", "Облик медведя", diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php index aebaaf93..6898c754 100644 --- a/localization/locale_zhcn.php +++ b/localization/locale_zhcn.php @@ -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", "猎豹形态", "生命之树形态", "旅行形态", "水生形态", "熊形态", diff --git a/pages/quest.php b/pages/quest.php index 67acdeaf..36124c8b 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -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'); diff --git a/pages/spell.php b/pages/spell.php index c7c368ce..a11612e0 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -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