From d317ca917ca8446752d3fbce58b1d266082f0102 Mon Sep 17 00:00:00 2001 From: Shadez Date: Sun, 28 Feb 2010 11:26:41 +0800 Subject: [PATCH] [95] Use $armory->_locale instead of in-functions checks --- character-sheet.php | 4 +- includes/armory_loader.php | 5 +- includes/classes/class.achievements.php | 72 ++----------------- includes/classes/class.characters.php | 72 ++++--------------- includes/classes/class.connector.php | 43 ++--------- includes/classes/class.items.php | 50 ++++++------- includes/classes/class.mangos.php | 23 +++--- includes/classes/class.search.php | 9 +-- includes/classes/class.utils.php | 34 ++++----- .../armory_r95_armory_talent_icons.sql | 39 ++++++++++ 10 files changed, 113 insertions(+), 238 deletions(-) create mode 100644 sql/updates/armory_r95_armory_talent_icons.sql diff --git a/character-sheet.php b/character-sheet.php index fd29bc99b..5dc525981 100644 --- a/character-sheet.php +++ b/character-sheet.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 75 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -108,7 +108,7 @@ } $tp .= $characters->talentCounting($characters->getTabOrBuild($characters->class, 'tab', $i)); } - if($tp == ' / / ') { + if($tp == ' / / ' || $tp == '0 / 0 / 0') { // No talents $armory->tpl->assign('talents_builds', ''); $armory->tpl->assign('treeName', $armory->tpl->get_config_vars('armory_character_sheet_na_dualspec')); diff --git a/includes/armory_loader.php b/includes/armory_loader.php index dd4d1749b..5353221b3 100644 --- a/includes/armory_loader.php +++ b/includes/armory_loader.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 94 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -31,7 +31,7 @@ die('Error: can not load connector class!'); } -define('DB_VERSION', 'armory_r94'); +define('DB_VERSION', 'armory_r95'); $armory = new Connector; $armory->tpl->template_dir = 'includes/template/'; $armory->tpl->compile_dir = 'includes/cache/'; @@ -109,7 +109,6 @@ header('Location: '.$returnUrl); } $_locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $armory->armoryconfig['defaultLocale']; -$armory->_locale = $_locale; $armory->tpl->assign('menu_file', 'overall_menu_'.$_locale); $armory->tpl->config_load($_locale . '.conf'); diff --git a/includes/classes/class.achievements.php b/includes/classes/class.achievements.php index 59bc51e98..f5653449a 100644 --- a/includes/classes/class.achievements.php +++ b/includes/classes/class.achievements.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 65 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -172,7 +172,6 @@ public function GetLastAchievements() { if(!$this->guid) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $achievements = $this->cDB->select("SELECT `achievement`, `date` FROM `character_achievement` WHERE `guid`=? ORDER BY `date` DESC LIMIT 5", $this->guid); $aCount = count($achievements); for($i=0;$i<$aCount;$i++) { @@ -305,8 +304,7 @@ public function AchievementProgress() { if($i%2) { $tmp_str .= " style='float:left;'"; } - $_locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $tmp_str .= '>'.$criteria['name_'.$_locale].''; + $tmp_str .= '>'.$criteria['name_'.$this->_locale].''; $i++; } $string_return = str_replace("{CRITERIA_LIST}", $tmp_str, $progress_list_string); @@ -365,18 +363,17 @@ public function CountAchievementPercent($sum, $achType) { * @return string **/ public function buildAchievementsTree() { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $categoryIds = $this->aDB->select("SELECT `id`, `name_".$locale."` FROM `armory_achievement_category` WHERE `parentCategory`=-1"); + $categoryIds = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` FROM `armory_achievement_category` WHERE `parentCategory`=-1"); $achievementTree = ''; foreach($categoryIds as $cat) { $i = 0; $achievementTree .= '
- '.$cat['name_'.$locale].''; - $child = $this->aDB->select("SELECT `id`, `name_".$locale."` FROM `armory_achievement_category` WHERE `parentCategory`=?", $cat['id']); + '.$cat['name_'.$this->_locale].''; + $child = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` FROM `armory_achievement_category` WHERE `parentCategory`=?", $cat['id']); if($child) { $achievementTree .= '
'; foreach($child as $childcat) { - $achievementTree .= ''; + $achievementTree .= ''; $i++; } $achievementTree .= '
'; @@ -397,8 +394,7 @@ public function GetAchievementInfo(&$achievementData) { if(!is_array($achievementData)) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $achievementinfo = $this->aDB->selectRow("SELECT `id`, `name_".$locale."` AS `name`, `description_".$locale."` AS `description`, `points` FROM `armory_achievement` WHERE `id`=? LIMIT 1", $achievementData['achievement']); + $achievementinfo = $this->aDB->selectRow("SELECT `id`, `name_".$this->_locale."` AS `name`, `description_".$this->_locale."` AS `description`, `points` FROM `armory_achievement` WHERE `id`=? LIMIT 1", $achievementData['achievement']); if(!$achievementinfo) { return false; } @@ -437,59 +433,5 @@ public function IsAchievementExists($achId) { } return false; } - /* - public function MergeCompletedAchievements($check = false) { - if(!$this->guid || !$this->achId) { - return false; - } - if($check == true) { - $tmp_data = $this->aDB->selectCell("SELECT `parentAchievement` FROM `armory_achievement` WHERE `id`=?", $achId); - if($tmp_data) { - if($this->IsAchievementCompleted($tmp_data)) { - return true; - } - return false; - } - } - $loop = true; - $achievementsArray = array(); - $i = 0; - $achId = $this->achId; - $macro = false; - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - while($loop == true) { - $tmp_data = $this->aDB->selectCell("SELECT `parentAchievement` FROM `armory_achievement` WHERE `id`=?", $achId); - if($tmp_data) { - if($this->IsAchievementCompleted($tmp_data)) { - $achievementsArray[$i] = $this->cDB->selectRow("SELECT `id`, `name_".$locale."` AS `name`, `points` FROM `armory_achievement` WHERE `id`=?", $tmp_data); - $achId = $tmp_data; - $macro = true; - } - } - else { - $loop = false; - } - $i++; - } - if($macro == true) { - $returnString = "'; - return $achievementsArray; - } - return false; - } - */ } ?> \ No newline at end of file diff --git a/includes/classes/class.characters.php b/includes/classes/class.characters.php index 00ae8f2f8..723392263 100644 --- a/includes/classes/class.characters.php +++ b/includes/classes/class.characters.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 86 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -185,16 +185,15 @@ public function GetCharacterTitle($guid=false) { $this->guid = $guid; } $this->GetCharacterGender(); - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $title = $this->aDB->selectRow("SELECT * FROM `armory_titles` WHERE `id`=?", $this->cDB->selectCell("SELECT `chosenTitle` FROM `characters` WHERE `guid`=? LIMIT 1", $this->guid)); $data = array(); if($title) { switch($this->gender) { case 1: - $data['title'] = $title['title_F_'.$locale]; + $data['title'] = $title['title_F_'.$this->_locale]; break; case 0: - $data['title'] = $title['title_M_'.$locale]; + $data['title'] = $title['title_M_'.$this->_locale]; break; } $data['place'] = $title['place']; @@ -300,7 +299,7 @@ public function returnClassText($class='') { $class = $this->class; } $text = $this->aDB->selectCell(" - SELECT `name_" . (isset($_SESSION['armoryLocale']) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']) . "` + SELECT `name_" . $this->_locale . "` FROM `armory_classes` WHERE `id`=?", $class); return $text; @@ -320,7 +319,7 @@ public function returnRaceText($race='') { $race = $this->race; } $text = $this->aDB->selectCell(" - SELECT `name_" . (isset($_SESSION['armoryLocale']) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']) . "` + SELECT `name_" . $this->_locale . "` FROM `armory_races` WHERE `id`=?", $race); return $text; @@ -592,8 +591,7 @@ public function getCharacterEnchant($slot, $guid='') { //get a tab from TalentTab public function getTabOrBuild($class, $type, $tabnum) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - if($type == "tab") { + if($type == "tab") { $field = $this->aDB->selectCell(" SELECT `id` FROM `armory_talenttab` @@ -601,7 +599,7 @@ public function getTabOrBuild($class, $type, $tabnum) { } else { $field = $this->aDB->selectCell(" - SELECT `name_" . $locale . "` + SELECT `name_" . $this->_locale . "` FROM `armory_talenttab` WHERE `refmask_chrclasses` = ? AND `tab_number` = ? LIMIT 1", pow(2,($class-1)), $tabnum); } @@ -682,7 +680,6 @@ public function extractCharacterGlyphs() { if(!$this->guid) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $glyphData = array(); $glyphData['big'] = array(); $glyphData['small'] = array(); @@ -690,7 +687,7 @@ public function extractCharacterGlyphs() { for($i=0;$i<6;$i++) { $glyph_id = $this->GetDataField($glyphFields[$i]); $glyph_info = $this->aDB->selectRow(" - SELECT `type`, `name_".$locale."` AS `name`, `description_".$locale."` AS `description` + SELECT `type`, `name_".$this->_locale."` AS `name`, `description_".$this->_locale."` AS `description` FROM `armory_glyphproperties` WHERE `id`=?", $glyph_id); if(!$glyph_info) { continue; @@ -709,50 +706,10 @@ public function extractCharacterGlyphs() { * Returns talent tree name for selected class * @category Character class * @example Characters::ReturnTalentTreeNames(6, 2) - * @todo Move this function to Utils class & store trees names in DB * @return string **/ - public function ReturnTalentTreesNames($class, $key) { - switch($class) { - case 1: - $trees = array('Оружие|Arms', 'Неистовство|Fury', 'Защита|Protection'); - break; - case 2: - $trees = array('Свет|Holy', 'Защита|Protection', 'Воздаяние|Retribution'); - break; - case 3: - $trees = array('Чувство зверя|Beast mastery', 'Стрельба|Marksmanship', 'Выживание|Survival'); - break; - case 4: - $trees = array('Ликвидация|Assassination', 'Бой|Combat', 'Скрытность|Subletly'); - break; - case 5: - $trees = array('Послушание|Discipline', 'Свет|Holy', 'Тьма|Shadow'); - break; - case 6: - $trees = array('Кровь|Blood', 'Лед|Frost', 'Нечестивость|Unholy'); - break; - case 7: - $trees = array('Стихии|Elemental', 'Совершенствование|Enhancement', 'Исцеление|Restoration'); - break; - case 8: - $trees = array('Тайная магия|Arcane', 'Огонь|Fire', 'Лед|Frost'); - break; - case 9: - $trees = array('Колдовство|Affliction', 'Демонология|Demonology', 'Разрушение|Destruction'); - break; - case 11: - $trees = array('Баланс|Balance', 'Сила зверя|Feral Combat', 'Исцеление|Restoration'); - break; - default: - $trees = array('Неизвестно|Unknown'); - break; - } - $name_locales = array ('en_gb' => 1, 'ru_ru' => 0); - $name = $trees[$key]; - $name_exp = explode('|', $name); - $tree = (isset($_SESSION['armoryLocale'])) ? $name_exp[$name_locales[$_SESSION['armoryLocale']]] : $name_exp[$name_locales[$this->armoryconfig['defaultLocale']]]; - return $tree; + public function ReturnTalentTreesNames($class, $spec) { + return $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_talent_icons` WHERE `class`=? AND `spec`=?", $class, $spec); } /** @@ -787,7 +744,6 @@ public function getCharacterHonorKills() { * @return array **/ public function extractCharacterProfessions() { - // Извлекаем только 2 основные профессии. Первая помощь, кулинария и пр. сюда не входят $professions = $this->cDB->select(" SELECT * FROM `character_skills` WHERE `skill` IN (164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773) @@ -795,12 +751,11 @@ public function extractCharacterProfessions() { if(!$professions) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $p = array(); $i = 0; foreach($professions as $prof) { $p[$i] = array( - 'name' => $this->aDB->selectCell("SELECT `name_" . $locale . "` FROM `armory_professions` WHERE `id`=? LIMIT 1", $prof['skill']), + 'name' => $this->aDB->selectCell("SELECT `name_" . $this->_locale . "` FROM `armory_professions` WHERE `id`=? LIMIT 1", $prof['skill']), 'icon' => $this->aDB->selectCell("SELECT `icon` FROM `armory_professions` WHERE `id`=? LIMIT 1", $prof['skill']), 'value' => $prof['value'] ); @@ -821,7 +776,6 @@ public function getCharacterReputation() { if(!$this->guid) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $repData = $this->cDB->select("SELECT `faction`, `standing`, `flags` FROM `character_reputation` WHERE `guid`=?", $this->guid); if(!$repData) { return false; @@ -832,8 +786,8 @@ public function getCharacterReputation() { continue; } $factionReputation[$i] = array( - 'name' => $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_faction` WHERE `id`=?", $faction['faction']), - 'descr' => $this->aDB->selectCell("SELECT `description_".$locale."` FROM `armory_faction` WHERE `id`=?", $faction['faction']), + 'name' => $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_faction` WHERE `id`=?", $faction['faction']), + 'descr' => $this->aDB->selectCell("SELECT `description_".$this->_locale."` FROM `armory_faction` WHERE `id`=?", $faction['faction']), 'standings' => Utils::getReputation($faction['standing']), 'standing' => $faction['standing'] ); diff --git a/includes/classes/class.connector.php b/includes/classes/class.connector.php index 39278ea62..243816a2b 100644 --- a/includes/classes/class.connector.php +++ b/includes/classes/class.connector.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 60 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -70,32 +70,17 @@ public function __construct() { $this->cDB = DbSimple_Generic::connect('mysql://'.$this->mysqlconfig['user_characters'].':'.$this->mysqlconfig['pass_characters'].'@'.$this->mysqlconfig['host_characters'].'/'.$this->mysqlconfig['name_characters']); $this->rDB = DbSimple_Generic::connect('mysql://'.$this->mysqlconfig['user_realmd'].':'.$this->mysqlconfig['pass_realmd'].'@'.$this->mysqlconfig['host_realmd'].'/'.$this->mysqlconfig['name_realmd']); $this->wDB = DbSimple_Generic::connect('mysql://'.$this->mysqlconfig['user_mangos'].':'.$this->mysqlconfig['pass_mangos'].'@'.$this->mysqlconfig['host_mangos'].'/'.$this->mysqlconfig['name_mangos']); - - /* - temporary disabled - // Test connection - if(!$this->aDB->selectCell("SELECT `id` FROM `classes` LIMIT 1")) { - $this->databaseError('Can not execute query to armory database ("%s")!
Check you configuration.php for correct values.', $this->mysqlconfig['name_armory']); - } - if(!$this->cDB->selectCell("SELECT `guid` FROM `characters` LIMIT 1")) { - $this->databaseError('Can not execute query to characters database ("%s")!
Check you configuration.php for correct values.', $this->mysqlconfig['name_characters']); - } - if(!$this->rDB->selectCell("SELECT `name` FROM `realmlist` LIMIT 1")) { - $this->databaseError('Can not execute query to realmd database ("%s")!
Check you configuration.php for correct values.', $this->mysqlconfig['name_realmd']); - } - if(!$this->wDB->selectCell("SELECT `entry` FROM `item_template` LIMIT 1")) { - $this->databaseError('Can not execute query to mangos database ("%s")!
Check you configuration.php for correct values.', $this->mysqlconfig['name_mangos']); - } - */ + $this->aDB->query("SET NAMES ?", $this->mysqlconfig['charset_armory']); $this->cDB->query("SET NAMES ?", $this->mysqlconfig['charset_characters']); $this->rDB->query("SET NAMES ?", $this->mysqlconfig['charset_realmd']); $this->wDB->query("SET NAMES ?", $this->mysqlconfig['charset_mangos']); $this->tpl = new Smarty; + $this->_locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $armory->armoryconfig['defaultLocale']; return true; } - + /** * Shows error. If $Error == true, function will show black list with 'Error encountered' text. * @category Main system functions @@ -117,25 +102,5 @@ public function ArmoryError($title, $text, $Error=false) { $this->tpl->display('overall_footer.tpl'); exit(); } - - /** - * Shows database error - * @category Main system functions - * @example Connector::databaseError() - * @return none - **/ - - /* - public function databaseError() { - $args = func_get_args(); - $tmpl =& $args[0]; - for ($i=$c=count($args)-1; $i<$c+20; $i++) { - $args[$i+1] = ''; // if placeholder not defined - } - $errorInfo = 'Wowarmory :: Database Error'; - $errorInfo .= '

Database Error:

'; - $errorInfo .= '

'.call_user_func_array('sprintf', $args).'

'; - die($errorInfo); - }*/ } ?> \ No newline at end of file diff --git a/includes/classes/class.items.php b/includes/classes/class.items.php index 4c6c1de4d..77935842d 100644 --- a/includes/classes/class.items.php +++ b/includes/classes/class.items.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 93 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -42,8 +42,7 @@ * @return string **/ public function getItemName($itemID) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - switch(strtolower($locale)) { + switch(strtolower($this->_locale)) { case 'en_gb': $itemName = $this->wDB->selectCell("SELECT `name` FROM `item_template` WHERE `entry`=? LIMIT 1", $itemID); break; @@ -80,8 +79,7 @@ public function getItemIcon($itemID) { * @return string **/ public function getItemDescription($itemID) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - switch(strtolower($locale)) { + switch(strtolower($this->_locale)) { case 'en_gb': $itemDescription = $this->wDB->selectCell("SELECT `description` FROM `item_template` WHERE `entry`=? LIMIT 1", $itemID); break; @@ -112,11 +110,10 @@ public function AllowableRaces($mask) { if ($mask == 0x7FF OR $mask == 0) { return 0; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $i=1; + $i=1; while($mask) { if($mask & 1) { - $name = $this->aDB->selectCell("SELECT `name_" . $locale . "` FROM `armory_races` WHERE `id`=?", $i); + $name = $this->aDB->selectCell("SELECT `name_" . $this->_locale . "` FROM `armory_races` WHERE `id`=?", $i); $data = @$name; if ($data == "") $data = $i; $text.=$data; if($mask!=1) { @@ -142,12 +139,11 @@ public function AllowableClasses($mask) { if($mask==0x5DF || $mask==0) { return 0; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $i=1; + $i=1; while($mask) { if($mask & 1) { - $name = $this->aDB->selectCell("SELECT `name_" . $locale . "` FROM `armory_classes` WHERE `id`=?", $i); + $name = $this->aDB->selectCell("SELECT `name_" . $this->_locale . "` FROM `armory_classes` WHERE `id`=?", $i); $data = @$name; if($data == "") $data = $i; $text.=$data; if ($mask!=1) { @@ -167,8 +163,7 @@ public function AllowableClasses($mask) { * @return string **/ public function GetItemSource($item) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $returnString = false; + $returnString = false; $vendorLoot = $this->wDB->selectCell(" SELECT `entry` FROM `npc_vendor` @@ -280,7 +275,6 @@ public function lootInfo($itemID) { * @return string **/ public function BuildItemSetInfo($itemset) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $itemSetBonuses = ''; $itemsName=''; $query = $this->aDB->selectRow(" @@ -290,13 +284,13 @@ public function BuildItemSetInfo($itemset) { if(!$query) { return false; } - $itemSetName = $query['name_'.$locale]; + $itemSetName = $query['name_'.$this->_locale]; $itemsCount = 0; for($i=1; $i !=9; $i++) { if($query['item'.$i] > 0) { $itemsCount++; $curName = $this->getItemName($query['item'.$i]); - if($curName) { // TODO: разобраться с сетами гладиаторов + if($curName) { $itemsName .= ''.$curName.'
'; } } @@ -307,11 +301,11 @@ public function BuildItemSetInfo($itemset) { $spell_tmp = array(); $spell_tmp = $this->aDB->selectRow("SELECT * FROM `armory_spell` WHERE `id`=?", $query['bonus'.$i]); $itemSetBonuses .= '('.$i.') '; - $itemSetBonuses .= ($locale == 'ru_ru') ? 'Комплект' : 'Set'; - if(!isset($spell_tmp['Description_'.$locale])) { - $spell_tmp['Description_'.$locale] = ''; + $itemSetBonuses .= ($this->_locale == 'ru_ru') ? 'Комплект' : 'Set'; + if(!isset($spell_tmp['Description_'.$this->_locale])) { + $spell_tmp['Description_'.$this->_locale] = ''; } - $itemSetBonuses .= ': '.$this->spellReplace($spell_tmp, Utils::validateText($spell_tmp['Description_'.$locale])).'
'; + $itemSetBonuses .= ': '.$this->spellReplace($spell_tmp, Utils::validateText($spell_tmp['Description_'.$this->_locale])).'
'; } } $fullItemInfoString = sprintf('%s (0/%s)

%s
%s
', $itemSetName, $itemsCount, $itemsName, $itemSetBonuses); @@ -327,7 +321,6 @@ public function BuildItemSetInfo($itemset) { **/ public function BuildLootTable($item, $vendor, $data=false) { $lootTable = array(); - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; switch($vendor) { case 'vendor': $VendorLoot = $this->wDB->select(" @@ -489,7 +482,7 @@ public function BuildLootTable($item, $vendor, $data=false) { SELECT `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`, `ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`, `ReagentCount_7`, `ReagentCount_8`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`, - `SpellName_".$locale."` + `SpellName_".$this->_locale."` FROM `armory_spell` WHERE `EffectItemType_1` =? OR `EffectItemType_2`=? OR `EffectItemType_3`=?", $item, $item, $item); if(!empty($CraftLoot)) { @@ -525,7 +518,7 @@ public function BuildLootTable($item, $vendor, $data=false) { SELECT `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`, `ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`, `ReagentCount_7`, `ReagentCount_8`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`, - `SpellName_".$locale."` AS `SpellName` + `SpellName_".$this->_locale."` AS `SpellName` FROM `armory_spell` WHERE `Reagent_1`=? OR `Reagent_2`=? OR `Reagent_3`=? OR `Reagent_4`=? OR `Reagent_5`=? OR `Reagent_6`=? OR `Reagent_7`=? OR `Reagent_8`=?", $item, $item, $item, $item, $item, $item, $item, $item); @@ -580,7 +573,6 @@ public function GetItemInfo($itemID, $type) { * @return array **/ public function extractSocketInfo($guid, $item, $socketNum) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $data = array(); $socketfield = array( 1 => ITEM_FIELD_ENCHANTMENT_3_2, @@ -594,7 +586,7 @@ public function extractSocketInfo($guid, $item, $socketNum) { if($socketInfo > 0) { $data['item'] = $this->aDB->selectCell("SELECT `gem` FROM `armory_enchantment` WHERE `id`=?", $socketInfo); $data['icon'] = $this->getItemIcon($data['item']); - $data['enchant'] = $this->aDB->selectCell("SELECT `text_".$locale."` FROM `armory_enchantment` WHERE `id`=?", $socketInfo); + $data['enchant'] = $this->aDB->selectCell("SELECT `text_".$this->_locale."` FROM `armory_enchantment` WHERE `id`=?", $socketInfo); $data['enchant_id'] = $socketInfo; return $data; } @@ -787,8 +779,7 @@ public function my_replace($matches) { // End of CSWOWD functions public function GetItemSourceByKey($key) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $name = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_instance_template` WHERE `id` IN (SELECT `instance_id` FROM `armory_instance_data` WHERE `key`=?)", $key); + $name = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_instance_template` WHERE `id` IN (SELECT `instance_id` FROM `armory_instance_data` WHERE `key`=?)", $key); if($name) { return $name; } @@ -797,14 +788,13 @@ public function GetItemSourceByKey($key) { public function GetImprovedItemSource($itemID, $bossID) { $data = array(); - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $data['percent'] = Mangos::DropPercent($this->wDB->selectCell("SELECT `ChanceOrQuestChance` FROM `creature_loot_template` WHERE `item`=? AND `entry`=? LIMIT 1", $itemID, $bossID)); - $dungeonData = $this->aDB->selectRow("SELECT `instance_id`, `name_".$locale."` AS `name` FROM `armory_instance_data` WHERE `id`=? OR `lootid_1`=? OR `lootid_2`=? OR `lootid_3`=? OR `lootid_4`=? OR `name_id`=? LIMIT 1", $bossID, $bossID, $bossID, $bossID, $bossID, $bossID); + $dungeonData = $this->aDB->selectRow("SELECT `instance_id`, `name_".$this->_locale."` AS `name` FROM `armory_instance_data` WHERE `id`=? OR `lootid_1`=? OR `lootid_2`=? OR `lootid_3`=? OR `lootid_4`=? OR `name_id`=? LIMIT 1", $bossID, $bossID, $bossID, $bossID, $bossID, $bossID); if(!$dungeonData) { return false; } $data['boss'] = $dungeonData['name']; - $data['dungeon'] = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_instance_template` WHERE `id`=?", $dungeonData['instance_id']); + $data['dungeon'] = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_instance_template` WHERE `id`=?", $dungeonData['instance_id']); $data['dungeon_key'] = $this->aDB->selectCell("SELECT `key` FROM `armory_instance_template` WHERE `id`=?", $dungeonData['instance_id']); $data['boss_id'] = $this->aDB->selectCell("SELECT `key` FROM `armory_instance_data` WHERE `id`=? OR `lootid_1`=? OR `lootid_2`=? OR `lootid_3`=? OR `lootid_4`=? OR `name_id`=? LIMIT 1", $bossID, $bossID, $bossID, $bossID, $bossID, $bossID); return $data; diff --git a/includes/classes/class.mangos.php b/includes/classes/class.mangos.php index 696932f73..afa8d0bde 100644 --- a/includes/classes/class.mangos.php +++ b/includes/classes/class.mangos.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 93 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -67,10 +67,9 @@ public function getSkillFromItemID($id) { * @return int/string **/ public function QuestInfo($quest, $infoType) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; switch($infoType) { case 'title': - switch($locale) { + switch($this->_locale) { case 'en_gb': $info = $this->wDB->selectCell("SELECT `Title` FROM `quest_template` WHERE `entry`=?", $quest); break; @@ -88,7 +87,7 @@ public function QuestInfo($quest, $infoType) { case 'map': $quester = $this->wDB->selectCell("SELECT `id` FROM `creature_involvedrelation` WHERE `quest`=?", $quest); $mapID = $this->wDB->selectCell("SELECT `map` FROM `creature` WHERE `id`=?", $quester); - $info = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_maps` WHERE `id`=?", $mapID); + $info = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_maps` WHERE `id`=?", $mapID); break; } return $info; @@ -101,9 +100,8 @@ public function QuestInfo($quest, $infoType) { * @return string **/ public function DropPercent($percent) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $string = ''; - switch($locale) { + switch($this->_locale) { case 'en_gb': if($percent > 51) { $string = 'High (100%)'; @@ -155,10 +153,9 @@ public function DropPercent($percent) { * @return string **/ public function GameobjectInfo($entry, $infoType) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; switch($infoType) { case 'name': - switch($locale) { + switch($this->_locale) { case 'ru_ru': $info = $this->wDB->selectCell(" SELECT `name_loc8` @@ -181,7 +178,7 @@ public function GameobjectInfo($entry, $infoType) { case 'map': $mapID = $this->wDB->selectCell("SELECT `map` FROM `gameobject` WHERE `id`=?", $entry); - $info = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_maps` WHERE `id`=?", $mapID); + $info = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_maps` WHERE `id`=?", $mapID); break; } return $info; @@ -194,8 +191,7 @@ public function GameobjectInfo($entry, $infoType) { * @return string **/ public function GetNPCName($npc) { - $_locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - switch($_locale) { + switch($this->_locale) { case 'en_gb': $name = $this->wDB->selectCell("SELECT `name` FROM `creature_template` WHERE `entry`=? LIMIT 1", $npc); break; @@ -234,15 +230,14 @@ public function GetNPCName($npc) { **/ public function GetNpcInfo($npc, $infoType) { $info = ''; - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - switch($infoType) { + switch($infoType) { case 'level': $info = $this->wDB->selectCell("SELECT `maxlevel` FROM `creature_template` WHERE `entry`=?", $npc); break; case 'map': $mapID = $this->wDB->selectCell("SELECT `map` FROM `creature` WHERE `id`=? LIMIT 1", $npc); - $info = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_maps` WHERE `id`=?", $mapID); + $info = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_maps` WHERE `id`=?", $mapID); break; case 'mapID': diff --git a/includes/classes/class.search.php b/includes/classes/class.search.php index 3eeeab081..e1aa48c50 100644 --- a/includes/classes/class.search.php +++ b/includes/classes/class.search.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 89 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -33,7 +33,6 @@ public function AdvancedItemSearch($count=false) { echo 'get_array fail'; return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $bosses_array = array(); $bosses_keys = array(); $extended_array = array(); // Extended costs for badges @@ -391,8 +390,7 @@ public function GetItemSourceByKey() { if(!$this->bossSearchKey) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - return $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_instance_template` WHERE `id` IN (SELECT `instance_id` FROM `armory_instance_data` WHERE `key`=?) LIMIT 1", $this->bossSearchKey); + return $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_instance_template` WHERE `id` IN (SELECT `instance_id` FROM `armory_instance_data` WHERE `key`=?) LIMIT 1", $this->bossSearchKey); } public function GetBossKeyById() { @@ -407,8 +405,7 @@ public function GetItemSourceByInstanceKey() { if(!$this->instanceSearchKey) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - return $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_instance_template` WHERE `key`=? LIMIT 1", $this->instanceSearchKey); + return $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_instance_template` WHERE `key`=? LIMIT 1", $this->instanceSearchKey); } public function MakeUniqueArray($array, $preserveKeys=false) { diff --git a/includes/classes/class.utils.php b/includes/classes/class.utils.php index f27e6015e..bb6164df6 100644 --- a/includes/classes/class.utils.php +++ b/includes/classes/class.utils.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 87 + * @revision 95 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -254,7 +254,6 @@ public function GetSpellBonusDamage($school, $guid) { } public function getReputation($rep) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $gBaseRep = -42000; $gRepStep = array(36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000); $current = $gBaseRep; @@ -263,7 +262,7 @@ public function getReputation($rep) { $value = $rep - $current; $repData = array ( 'rank'=>$i, - 'rank_name' => $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_reputation_ranks` WHERE `id`=?", $i+1), + 'rank_name' => $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_reputation_ranks` WHERE `id`=?", $i+1), 'rep'=>$value, 'max'=>$gRepStep[$i], 'percent'=>Utils::getPercent($gRepStep[$i], $value), @@ -271,7 +270,7 @@ public function getReputation($rep) { return $repData; } } - return array('rank'=>7, 'rank_name'=>$this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_reputation_ranks` WHERE `id`=7"), 'rep'=>$gRepStep[7], 'max'=>$gRepStep[7]); + return array('rank'=>7, 'rank_name'=>$this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_reputation_ranks` WHERE `id`=7"), 'rep'=>$gRepStep[7], 'max'=>$gRepStep[7]); } /** @@ -282,7 +281,6 @@ public function getReputation($rep) { * @return array **/ public function realmFirsts() { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; $achievements_data = $this->cDB->select(" SELECT `character_achievement`.`achievement`, @@ -311,8 +309,8 @@ public function realmFirsts() { } $countAch = count($achievements_data); for($i=0;$i<$countAch;$i++) { - $achievements_data[$i]['name'] = $this->aDB->selectCell("SELECT `name_".$locale."` FROM `armory_achievement` WHERE `id`=? LIMIT 1", $achievements_data[$i]['achievement']); - $achievements_data[$i]['description'] = $this->aDB->selectCell("SELECT `description_".$locale."` FROM `armory_achievement` WHERE `id`=?", $achievements_data[$i]['achievement']); + $achievements_data[$i]['name'] = $this->aDB->selectCell("SELECT `name_".$this->_locale."` FROM `armory_achievement` WHERE `id`=? LIMIT 1", $achievements_data[$i]['achievement']); + $achievements_data[$i]['description'] = $this->aDB->selectCell("SELECT `description_".$this->_locale."` FROM `armory_achievement` WHERE `id`=?", $achievements_data[$i]['achievement']); $achievements_data[$i]['icon'] = $this->aDB->selectCell("SELECT `iconname` FROM `armory_achievement` WHERE `id`=?", $achievements_data[$i]['achievement']); $achievements_data[$i]['timestamp'] = date('Y-m-d\TH:i:s:+00:00', $achievements_data[$i]['date']); } @@ -433,11 +431,10 @@ public function getCache($itemID, $guid) { if($this->armoryconfig['useCache'] != true) { return false; } - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; return $this->aDB->selectCell(" SELECT `tooltip_html` FROM `armory_cache` - WHERE `id`=? AND `guid`=? AND `locale`=? AND TO_DAYS(NOW()) - TO_DAYS(`date`) <= ?", $itemID, $guid, $locale, $this->armoryconfig['cache_lifetime']); + WHERE `id`=? AND `guid`=? AND `locale`=? AND TO_DAYS(NOW()) - TO_DAYS(`date`) <= ?", $itemID, $guid, $this->_locale, $this->armoryconfig['cache_lifetime']); } public function writeCache($itemID, $guid, $tooltip, $locale) { @@ -569,53 +566,51 @@ public function GetDeclinedString(&$string) { public function GetDungeonList($expansion) { $data = array(); - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; switch($expansion) { case 0: // WoW Classic $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` + SELECT `id`, `name_".$this->_locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` FROM `armory_instance_template` WHERE `expansion`=0"); break; case 1: // WoW TBC $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` + SELECT `id`, `name_".$this->_locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` FROM `armory_instance_template` WHERE `expansion`=1"); break; case 2: // WoW WotLK $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` + SELECT `id`, `name_".$this->_locale."` AS `name`, `boss_num`, `key`, `levelMin`, `levelMax`, `partySize`, `raid` FROM `armory_instance_template` WHERE `expansion`=2"); break; } $count = count($data); for($i=0;$i<$count;$i++) { - $data[$i]['bosses'] = $this->aDB->select("SELECT `id`, `name_".$locale."` AS `bossname` FROM `armory_instance_data` WHERE `instance_id`=?", $data[$i]['id']); + $data[$i]['bosses'] = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` AS `bossname` FROM `armory_instance_data` WHERE `instance_id`=?", $data[$i]['id']); } return $data; } public function GetFactionList($expansion) { $data = array(); - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; switch($expansion) { case 0: // WoW Classic $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `friendlyTo` AS `side` + SELECT `id`, `name_".$this->_locale."` AS `name`, `friendlyTo` AS `side` FROM `armory_faction` WHERE `expansion`=0 AND `hasRewards`=1"); break; case 1: // WoW TBC $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `friendlyTo` AS `side` + SELECT `id`, `name_".$this->_locale."` AS `name`, `friendlyTo` AS `side` FROM `armory_faction` WHERE `expansion`=1 AND `hasRewards`=1"); break; case 2: // WoW WotLK $data = $this->aDB->select(" - SELECT `id`, `name_".$locale."` AS `name`, `friendlyTo` AS `side` + SELECT `id`, `name_".$this->_locale."` AS `name`, `friendlyTo` AS `side` FROM `armory_faction` WHERE `expansion`=2 AND `hasRewards`=1"); break; @@ -624,8 +619,7 @@ public function GetFactionList($expansion) { } public function GetArmoryString($id) { - $locale = (isset($_SESSION['armoryLocale'])) ? $_SESSION['armoryLocale'] : $this->armoryconfig['defaultLocale']; - $str = $this->aDB->selectCell("SELECT `string_".$locale."` FROM `armory_string` WHERE `id`=?", $id); + $str = $this->aDB->selectCell("SELECT `string_".$this->_locale."` FROM `armory_string` WHERE `id`=?", $id); return $str; } } diff --git a/sql/updates/armory_r95_armory_talent_icons.sql b/sql/updates/armory_r95_armory_talent_icons.sql new file mode 100644 index 000000000..20407e6df --- /dev/null +++ b/sql/updates/armory_r95_armory_talent_icons.sql @@ -0,0 +1,39 @@ +/*!40101 SET NAMES utf8 */; +/*!40101 SET SQL_MODE=''*/; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + +UPDATE `armory_db_version` SET `version` = 'armory_r95'; +ALTER TABLE `armory_talent_icons` ADD `name_ru_ru` VARCHAR( 100 ) NOT NULL , +ADD `name_en_gb` VARCHAR( 100 ) NOT NULL ; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Оружие', `name_en_gb`='Arms' WHERE `class`=1 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Неистовство', `name_en_gb`='Fury' WHERE `class`=1 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Защита', `name_en_gb`='Protection' WHERE `class`=1 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Свет', `name_en_gb`='Holy' WHERE `class`=2 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Защита', `name_en_gb`='Protection' WHERE `class`=2 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Воздаяние', `name_en_gb`='Retribution' WHERE `class`=2 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Чувство зверя', `name_en_gb`='Beast mastery' WHERE `class`=3 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Стрельба', `name_en_gb`='Marksmanship' WHERE `class`=3 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Выживание', `name_en_gb`='Survival' WHERE `class`=3 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Ликвидация', `name_en_gb`='Assassination' WHERE `class`=4 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Бой', `name_en_gb`='Combat' WHERE `class`=4 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Скрытность', `name_en_gb`='Subletly' WHERE `class`=4 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Послушание', `name_en_gb`='Discipline' WHERE `class`=5 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Свет', `name_en_gb`='Holy' WHERE `class`=5 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Тьма', `name_en_gb`='Shadow' WHERE `class`=5 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Кровь', `name_en_gb`='Blood' WHERE `class`=6 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Лед', `name_en_gb`='Frost' WHERE `class`=6 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Нечестивость', `name_en_gb`='Unholy' WHERE `class`=6 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Стихии', `name_en_gb`='Elemental' WHERE `class`=7 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Совершенствование', `name_en_gb`='Enhancement' WHERE `class`=7 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Исцеление', `name_en_gb`='Restoration' WHERE `class`=7 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Тайная магия', `name_en_gb`='Arcane' WHERE `class`=8 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Огонь', `name_en_gb`='Fire' WHERE `class`=8 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Лед', `name_en_gb`='Frost' WHERE `class`=8 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Колдовство', `name_en_gb`='Affliction' WHERE `class`=9 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Демонология', `name_en_gb`='Demonology' WHERE `class`=9 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Разрушение', `name_en_gb`='Destruction' WHERE `class`=9 AND `spec`=2; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Баланс', `name_en_gb`='Balance' WHERE `class`=11 AND `spec`=0; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Сила зверя', `name_en_gb`='Feral Combat' WHERE `class`=11 AND `spec`=1; +UPDATE `armory_talent_icons` SET `name_ru_ru`='Исцеление', `name_en_gb`='Restoration' WHERE `class`=11 AND `spec`=2; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; \ No newline at end of file