diff --git a/includes/class.zone.php b/includes/class.zone.php new file mode 100644 index 00000000..362bf84a --- /dev/null +++ b/includes/class.zone.php @@ -0,0 +1,164 @@ +iterate()) + // { + // // preparse sources + // if (!empty($this->curTpl['source'])) + // { + // $sources = explode(' ', $this->curTpl['source']); + // foreach ($sources as $src) + // { + // $src = explode(':', $src); + // $this->sources[$this->id][$src[0]][] = $src[1]; + // } + // } + // } + // $this->reset(); // push first element back for instant use + // } + + public function getListviewData() + { + $data = []; +/* + LFG_TYPE_NONE = 0, // Internal use only + LFG_TYPE_DUNGEON = 1, + LFG_TYPE_RAID = 2, + LFG_TYPE_QUEST = 3, + LFG_TYPE_ZONE = 4, + LFG_TYPE_HEROIC = 5, + LFG_TYPE_RANDOM = 6 + +CREATE TABLE `aowow_zones` ( + `id` mediumint(8) UNSIGNED NOT NULL COMMENT 'Zone Id' , + `mapId` mediumint(8) UNSIGNED NOT NULL COMMENT 'Map Identifier' , + `category` smallint(6) NOT NULL , + `flags` int(11) NOT NULL , + `faction` tinyint(2) NOT NULL , + `expansion` tinyint(2) NOT NULL , + `type` tinyint(2) UNSIGNED NOT NULL , + `maxPlayer` smallint(6) NOT NULL , + `levelReq` smallint(6) NOT NULL , + `levelReqLFG` smallint(6) NOT NULL , + `levelHeroic` smallint(6) NOT NULL , + `levelMax` smallint(6) NOT NULL , + `levelMin` smallint(6) NOT NULL , + `name_loc0` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + `name_loc2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + `name_loc3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + `name_loc6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + `name_loc8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci; + +var g_zone_categories = { + 0: "Eastern Kingdoms", // areaTable.map == 0 AND + 1: "Kalimdor", // areaTable.map == 1 AND + 2: "Dungeons", // map.areaType == 1 + 3: "Raids", // map.areaType == 2 + 6: "Battlegrounds", // map.areaType == 3 + 8: "Outland", // areaTable.map == 530 AND + 9: "Arenas" // map.areaType == 4 + 10: "Northrend", // areaTable.map == 571 AND +}; + +var g_zone_instancetypes = { + 1: "Transit", // [manual] + 2: "Dungeon", + 3: "Raid", // Classic + 4: "Battleground", // map.isBattleground + 5: "Dungeon", // Heroic + 6: "Arena", // map.areaType == 4 + 7: "Raid", // 10-25 + 8: "Raid" // 10-25 Heroic +}; + +var g_zone_territories = { + 0: "Alliance", // areaTable.factionGroupMask == 2 + 1: "Horde", // areaTable.factionGroupMask == 4 + 2: "Contested", // areaTable.factionGroupMask == 6 + 3: "Sanctuary", // areaTable.flags & AREA_FLAG_SANCTUARY + 4: "PvP", // map.areaType IN [3, 4] + 5: "World PvP" // areaTable.flags & AREA_FLAG_WINTERGRASP +}; + +visibleCols: ['heroiclevel', 'players'] + + "id":5004, // areaTable.Id + "category":2, // s.o + "expansion":3, // lfgDungeons.expansion || map.expansion + "territory":2, // s.o. + "instance":5, // s.o. + "nplayers":5, // map.maxPlayers + "reqlevel":77, // access_requirement.level_min + "heroicLevel":85, // access_requirement.level_min + "lfgReqLevel":80, // lfgDungeons.targetLevel + "maxlevel":82, // lfgDungeons.levelMin + "minlevel":80, // lfgDungeons.levelMax + "name":"Abyssal Maw: Throne of the Tides", // areaTable.name_X +*/ + while ($this->iterate()) + { + $data[$this->id] = array( + 'id' => $this->id, + 'category' => $this->curTpl['category'], + 'territory' => $this->curTpl['faction'], + 'minlevel' => $this->curTpl['levelMin'], + 'maxlevel' => $this->curTpl['levelMax'], + 'name' => $this->getField('name', true) + ); + + if ($_ = $this->curTpl['expansion']) + $data[$this->id]['expansion'] = $_; + + if ($_ = $this->curTpl['type']) + $data[$this->id]['instance'] = $_; + + if ($_ = $this->curTpl['maxPlayer']) + $data[$this->id]['nplayers'] = $_; + + if ($_ = $this->curTpl['levelReq']) + $data[$this->id]['reqlevel'] = $_; + + if ($_ = $this->curTpl['levelReqLFG']) + $data[$this->id]['lfgReqLevel'] = $_; + + if ($_ = $this->curTpl['levelHeroic']) + $data[$this->id]['heroicLevel'] = $_; + } + + return $data; + } + + public function addGlobalsToJscript(&$refs) + { + if (!isset($refs['gZones'])) + $refs['gZones'] = []; + + while ($this->iterate()) + $refs['gZones'][$this->id]['name'] = Util::jsEscape($this->getField('name', true)); + } + + public function addRewardsToJScript(&$ref) { } + public function renderTooltip() { } +} + +?> diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 5c86c9cf..e877de4c 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -115,6 +115,9 @@ $lang = array( 'spell' => "Zauber", 'spells' => "Zauber", 'valueDelim' => " - ", // " bis " + 'zone' => "Zone", + 'zones' => "Gebiete", + 'expansions' => array("Classic", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"), 'languages' => array( 1 => "Orcisch", 2 => "Darnassisch", 3 => "Taurisch", 6 => "Zwergisch", 7 => "Gemeinsprache", 8 => "Dämonisch", 9 => "Titanisch", 10 => "Thalassisch", @@ -249,8 +252,12 @@ $lang = array( 'CosmicMap' => "Kosmische Karte", ), 'zone' => array( - 'zone' => "Zone", - 'zonePartOf' => "Diese Zone ist Teil der Zone", + // 'zone' => "Zone", + // 'zonePartOf' => "Diese Zone ist Teil der Zone", + 'cat' => array( + "Östliche Königreiche", "Kalimdor", "Dungeons", "Schlachtzüge", "Unbenutzt", null, + "Schlachtfelder", null, "Scherbenwelt", "Arenen", "Nordend" + ) ), 'title' => array( 'cat' => array( diff --git a/localization/locale_enus.php b/localization/locale_enus.php index ecb801f3..17faf7b7 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -110,6 +110,9 @@ $lang = array( 'spell' => "spell", 'spells' => "Spells", 'valueDelim' => " to ", + 'zone' => "zone", + 'zones' => "Zones", + 'expansions' => array("Classic", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("Strength", "Agility", "Stamina", "Intellect", "Spirit"), 'languages' => array( 1 => "Orcish", 2 => "Darnassian", 3 => "Taurahe", 6 => "Dwarvish", 7 => "Common", 8 => "Demonic", 9 => "Titan", 10 => "Thalassian", @@ -240,8 +243,12 @@ $lang = array( 'CosmicMap' => "Cosmic Map", ), 'zone' => array( - 'zone' => "Zone", - 'zonePartOf' => "This zone is part of", + // 'zone' => "Zone", + // 'zonePartOf' => "This zone is part of", + 'cat' => array( + "Eastern Kingdoms", "Kalimdor", "Dungeons", "Raids", "Unused", null, + "Battlegrounds", null, "Outland", "Arenas", "Northrend" + ) ), 'title' => array( 'cat' => array( diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 7b70094b..7c113e37 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -107,6 +107,9 @@ $lang = array( 'spell' => "hechizo", 'spells' => "Hechizos", 'valueDelim' => " - ", + 'zone' => "zona", + 'zones' => "Zonas", + 'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"), 'languages' => array( 1 => "Orco", 2 => "Darnassiano", 3 => "Taurahe", 6 => "Enánico", 7 => "Lengua común", 8 => "Demoníaco", 9 => "Titánico", 10 => "Thalassiano", @@ -201,8 +204,12 @@ $lang = array( 'CosmicMap' => "Mapa cósmico", ), 'zone' => array( - 'zone' => "Zone", - 'zonePartOf' => "Cette zone fait partie de la zone", + // 'zone' => "Zone", + // 'zonePartOf' => "Cette zone fait partie de la zone", + 'cat' => array( + "Reinos del Este", "Kalimdor", "Mazmorras", "Bandas", "No las uso", null, + "Campos de batalla", null, "Terrallende", "Arenas", "Rasganorte" + ) ), 'title' => array( 'cat' => array( diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index b15ecf69..21fb30c1 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -107,6 +107,9 @@ $lang = array( 'spell' => "sort", 'spells' => "Sorts", 'valueDelim' => " - ", + 'zone' => "zone", + 'zones' => "Zones", + 'expansions' => array("Classique", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("Force", "Agilité", "Endurance", "Intelligence", "Esprit"), 'languages' => array( 1 => "Orc", 2 => "Darnassien", 3 => "Taurahe", 6 => "Nain", 7 => "Commun", 8 => "Démoniaque", 9 => "Titan", 10 => "Thalassien", @@ -201,8 +204,12 @@ $lang = array( 'CosmicMap' => "Carte cosmique", ), 'zone' => array( - 'zone' => "Zone", - 'zonePartOf' => "Cette zone fait partie de la zone", + // 'zone' => "Zone", + // 'zonePartOf' => "Cette zone fait partie de la zone", + 'cat' => array( + "Royaumes de l'est", "Kalimdor", "Donjons", "Raids", "Inutilisées", null, + "Champs de bataille", null, "Outreterre", "Arènes", "Norfendre" + ) ), 'title' => array( 'cat' => array( diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index 9ed514c6..6aa9aa28 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -107,6 +107,9 @@ $lang = array( 'spell' => "заклинание", 'spells' => "Заклинания", 'valueDelim' => " - ", + 'zone' => "игровая зона", + 'zones' => "Местности", + 'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("к силе", "к ловкости", "к выносливости", "к интеллекту", "к духу"), 'languages' => array( 1 => "орочий", 2 => "дарнасский", 3 => "таурахэ", 6 => "дворфийский", 7 => "всеобщий", 8 => "язык демонов", 9 => "язык титанов", 10 => "талассийский", @@ -201,8 +204,12 @@ $lang = array( 'CosmicMap' => "Звёздная карта", ), 'zone' => array( - 'zone' => "Игровая зона", - 'zonePartOf' => "Эта игровая локация является частью локации", + // 'zone' => "Игровая зона", + // 'zonePartOf' => "Эта игровая локация является частью локации", + 'cat' => array( + "Восточные королевства", "Калимдор", "Подземелья", "Рейды", "Неактивно", null, + "Поля боя", null, "Запределье", "Арены", "Нордскол" + ) ), 'title' => array( 'cat' => array( diff --git a/pages/zones.php b/pages/zones.php new file mode 100644 index 00000000..bf6925b7 --- /dev/null +++ b/pages/zones.php @@ -0,0 +1,96 @@ + true, + 1 => true, + 2 => [0, 1, 2], + 3 => [0, 1, 2], + 6 => true, + 8 => true, + 9 => true, + 10 => true +); + +if (!Util::isValidPage($validCats, $cats)) + $smarty->error(); + +if (isset($cats[0])) +{ + if (isset($cats[1])) + array_unshift($title, Lang::$game['expansions'][$cats[1]]); + + $path = array_merge($path, $cats); + array_unshift($title, Lang::$zone['cat'][$cats[0]]); +} + + +if (!$smarty->loadCache($cacheKey, $pageData)) +{ + $conditions = []; + $visibleCols = []; + $hiddenCols = []; + + if (isset($cats[0])) + $conditions[] = ['z.category', $cats[0]]; + + if (isset($cats[1]) && in_array($cats[0], [2, 3])) + $conditions[] = ['z.expansion', $cats[1]]; + + $zones = new ZoneList($conditions); + +$somData = "{flightmaster: [{ coords: [[59.3,48.0]], level: 0, name: 'Thrallmar, Hellfire Peninsula', type: 1, id: 16587, reacthorde: 1, reactalliance: -1, paths: [[50.9,55.0],[49.1,72.1],[68.5,51.5],[60.9,61.3],[44.1,65.8]] },{ coords: [[58.9,55.8]], level: 0, name: 'Honor Hold, Hellfire Peninsula', type: 1, id: 16822, reacthorde: -1, reactalliance: 1, paths: [[50.1,48.3],[52.2,75.7],[68.6,52.8],[65.9,47.6],[44.1,65.8]] },{ coords: [[50.1,48.3]], level: 0, name: 'Temple of Telhamat, Hellfire Peninsula', type: 1, id: 18785, reacthorde: -1, reactalliance: 1, paths: [[39.7,48.2],[68.6,52.8]] },{ coords: [[50.9,55.0]], level: 0, name: 'Falcon Watch, Hellfire Peninsula', type: 1, id: 18942, reacthorde: 1, reactalliance: -1, paths: [[29.7,48.1],[33.6,60.8],[44.1,65.8],[68.5,51.5],[44.6,49.2]] },{ coords: [[39.7,48.2]], level: 0, name: 'Telredor, Zangarmarsh', type: 1, id: 18788, reacthorde: -1, reactalliance: 1, paths: [[32.6,73.4],[44.1,65.8],[35.5,31.2],[32.0,41.7],[42.7,34.0]] },{ coords: [[29.7,48.1]], level: 0, name: 'Zabra\'jin, Zangarmarsh', type: 1, id: 18791, reacthorde: 1, reactalliance: -1, paths: [[33.6,60.8],[44.1,65.8],[39.9,29.0],[44.6,49.2]] },{ coords: [[32.6,73.4]], level: 0, name: 'Telaar, Nagrand', type: 1, id: 18789, reacthorde: -1, reactalliance: 1, paths: [[52.2,75.7],[44.1,65.8]] },{ coords: [[33.6,60.8]], level: 0, name: 'Garadar, Nagrand', type: 1, id: 18808, reacthorde: 1, reactalliance: -1, paths: [[44.1,65.8]] },{ coords: [[52.2,75.7]], level: 0, name: 'Allerian Stronghold, Terokkar Forest', type: 1, id: 18809, reacthorde: -1, reactalliance: 1, paths: [[62.1,84.2],[44.1,65.8]] },{ coords: [[53.8,23.5]], level: 0, name: 'Area 52, Netherstorm', type: 1, id: 18938, reacthorde: 1, reactalliance: 1, paths: [[63.8,24.4],[57.5,14.3],[42.9,24.4]] },{ coords: [[59.8,75.9]], level: 0, name: 'Shadowmoon Village, Shadowmoon Valley', type: 1, id: 19317, reacthorde: 1, reactalliance: -1, paths: [[49.1,72.1],[70.1,76.3],[68.0,85.0]] },{ coords: [[62.1,84.2]], level: 0, name: 'Wildhammer Stronghold, Shadowmoon Valley', type: 1, id: 18939, reacthorde: -1, reactalliance: 1, paths: [[70.1,76.3],[68.0,85.0]] },{ coords: [[35.5,31.2]], level: 0, name: 'Sylvanaar, Blade\'s Edge Mountains', type: 1, id: 18937, reacthorde: -1, reactalliance: 1, paths: [[53.8,23.5],[57.5,14.3],[42.7,34.0],[42.9,24.4],[32.0,41.7]] },{ coords: [[39.9,29.0]], level: 0, name: 'Thunderlord Stronghold, Blade\'s Edge Mountains', type: 1, id: 18953, reacthorde: 1, reactalliance: -1, paths: [[53.8,23.5],[57.5,14.3],[44.6,49.2],[42.9,24.4],[47.5,32.6]] },{ coords: [[49.1,72.1]], level: 0, name: 'Stonebreaker Hold, Terokkar Forest', type: 1, id: 18807, reacthorde: 1, reactalliance: -1, paths: [[44.1,65.8]] },{ coords: [[44.1,65.8]], level: 0, name: 'Shattrath, Terokkar Forest', type: 1, id: 18940, reacthorde: 1, reactalliance: 1 },{ coords: [[68.6,52.8]], level: 0, name: 'Hellfire Peninsula, The Dark Portal', type: 1, id: 18931, reacthorde: -1, reactalliance: 1, paths: [[65.9,47.6]] },{ coords: [[68.5,51.5]], level: 0, name: 'Hellfire Peninsula, The Dark Portal', type: 1, id: 18930, reacthorde: 1, reactalliance: -1 },{ coords: [[57.5,14.3]], level: 0, name: 'The Stormspire, Netherstorm', type: 1, id: 19583, reacthorde: 1, reactalliance: 1, paths: [[63.8,24.4]] },{ coords: [[70.1,76.3]], level: 0, name: 'Altar of Sha\'tar, Shadowmoon Valley', type: 1, id: 19581, reacthorde: 1, reactalliance: 1 },{ coords: [[60.9,61.3]], level: 0, name: 'Spinebreaker Ridge, Hellfire Peninsula', type: 1, id: 19558, reacthorde: 1, reactalliance: -1 },{ coords: [[65.9,47.6]], level: 0, name: 'Shatter Point, Hellfire Peninsula', type: 1, id: 20234, reacthorde: -1, reactalliance: 1 },{ coords: [[63.8,24.4]], level: 0, name: 'Cosmowrench, Netherstorm', type: 1, id: 20515, reacthorde: 1, reactalliance: 1 },{ coords: [[44.6,49.2]], level: 0, name: 'Swamprat Post, Zangarmarsh', type: 1, id: 20762, reacthorde: 1, reactalliance: -1, paths: [[44.1,65.8],[47.5,32.6]] },{ coords: [[42.7,34.0]], level: 0, name: 'Toshley\'s Station, Blade\'s Edge Mountains', type: 1, id: 21107, reacthorde: -1, reactalliance: 1, paths: [[53.8,23.5],[42.9,24.4]] },{ coords: [[68.0,85.0]], level: 0, name: 'Sanctum of the Stars, Shadowmoon Valley', type: 1, id: 21766, reacthorde: 1, reactalliance: 1 },{ coords: [[42.9,24.4]], level: 0, name: 'Evergrove, Blade\'s Edge Mountains', type: 1, id: 22216, reacthorde: 1, reactalliance: 1 },{ coords: [[47.5,32.6]], level: 0, name: 'Mok\'Nathal Village, Blade\'s Edge Mountains', type: 1, id: 22455, reacthorde: 1, reactalliance: -1, paths: [[53.8,23.5]] },{ coords: [[32.0,41.7]], level: 0, name: 'Orebor Harborage, Zangarmarsh', type: 1, id: 22485, reacthorde: -1, reactalliance: 1 }]}"; + + $pageData = array( + 'file' => 'zone', + 'data' => $zones->getListviewData(), + 'som' => $somData, + 'map' => array( + 'zone' => -2, + 'zoom' => 1, + 'overlay' => 'true', + 'zoomable' => 'false', + ), + 'params' => [] + ); + + $smarty->saveCache($cacheKey, $pageData); +} + +/* + filters.js + Mapper.js + ShowOnMap.js + + new ShowOnMap(); + +*/ + +$page = array( + 'tab' => 0, // for g_initHeader($tab) + 'title' => implode(' - ', $title), + 'path' => json_encode($path, JSON_NUMERIC_CHECK), + 'reqJS' => array( + array('path' => 'template/js/Mapper.js', 'conditional' => false), + array('path' => 'template/js/ShowOnMap.js', 'conditional' => false), + ), + 'reqCSS' => array( + array('path' => 'template/css/Mapper.css', 'condition' => false), + array('path' => 'template/css/Mapper_ie6.css', 'condition' => 'lte IE 6'), + ), +); + +$smarty->updatePageVars($page); +$smarty->assign('lang', Lang::$main); +$smarty->assign('mysql', DB::Aowow()->getStatistics()); +$smarty->assign('lvData', $pageData); +$smarty->display('generic-no-filter.tpl'); + +?> diff --git a/setup/aowow_zones.sql b/setup/aowow_zones.sql new file mode 100644 index 00000000..5dc1a41e --- /dev/null +++ b/setup/aowow_zones.sql @@ -0,0 +1,67 @@ +-- MySQL dump 10.13 Distrib 5.5.27, for Win32 (x86) +-- +-- Host: localhost Database: world +-- ------------------------------------------------------ +-- Server version 5.5.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `aowow_zones` +-- + +DROP TABLE IF EXISTS `aowow_zones`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `aowow_zones` ( + `id` mediumint(8) unsigned NOT NULL COMMENT 'Zone Id', + `mapId` mediumint(8) unsigned NOT NULL COMMENT 'Map Identifier', + `category` smallint(6) NOT NULL, + `flags` int(11) NOT NULL, + `faction` tinyint(2) NOT NULL, + `expansion` tinyint(2) NOT NULL, + `type` tinyint(2) unsigned NOT NULL, + `maxPlayer` smallint(6) NOT NULL, + `levelReq` smallint(6) NOT NULL, + `levelReqLFG` smallint(6) NOT NULL, + `levelHeroic` smallint(6) NOT NULL, + `levelMax` smallint(6) NOT NULL, + `levelMin` smallint(6) NOT NULL, + `name_loc0` varchar(255) NOT NULL COMMENT 'Map Name', + `name_loc2` varchar(255) NOT NULL, + `name_loc3` varchar(255) NOT NULL, + `name_loc6` varchar(255) NOT NULL, + `name_loc8` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `aowow_zones` +-- + +LOCK TABLES `aowow_zones` WRITE; +/*!40000 ALTER TABLE `aowow_zones` DISABLE KEYS */; +INSERT INTO `aowow_zones` VALUES (1,0,0,65,0,0,0,0,0,-1,0,-1,-1,'Dun Morogh','Dun Morogh','Dun Morogh','Dun Morogh','Дун Морог'),(3,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Badlands','Terres ingrates','Ödland','Tierras Inhóspitas','Бесплодные земли'),(4,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Blasted Lands','Terres foudroyées','Verwüstete Lande','Las Tierras Devastadas','Выжженные земли'),(8,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Swamp of Sorrows','Marais des Chagrins','Sümpfe des Elends','Pantano de las Penas','Болото Печали'),(10,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Duskwood','Bois de la Pénombre','Dämmerwald','Bosque del Ocaso','Сумеречный лес'),(11,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Wetlands','Les Paluns','Sumpfland','Los Humedales','Болотина'),(12,0,0,64,0,0,0,0,0,-1,0,-1,-1,'Elwynn Forest','Forêt d\'Elwynn','Wald von Elwynn','Bosque de Elwynn','Элвиннский лес'),(14,1,1,64,1,0,0,0,0,-1,0,-1,-1,'Durotar','Durotar','Durotar','Durotar','Дуротар'),(15,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Dustwallow Marsh','Marécage d\'Âprefange','Düstermarschen','Marjal Revolcafango','Пылевые топи'),(16,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Azshara','Azshara','Azshara','Azshara','Азшара'),(17,1,1,64,1,0,0,0,0,-1,0,-1,-1,'The Barrens','Les Tarides','Brachland','Los Baldíos','Степи'),(21,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Kul Tiras','Kul Tiras','Kul Tiras','Kul Tiras','Кул-Тирас'),(22,451,451,17472,2,2,0,0,0,-1,0,-1,-1,'Programmer Isle','Île des programmeurs','Programmierer-Insel','Isla del Programador','Остров Программиста'),(25,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Blackrock Mountain','Mont Rochenoire','Der Schwarzfels','Montaña Roca Negra','Черная гора'),(28,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Western Plaguelands','Maleterres de l\'ouest','Westliche Pestländer','Tierras de la Peste del Oeste','Западные Чумные земли'),(33,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Stranglethorn Vale','Vallée de Strangleronce','Schlingendorntal','Vega de Tuercespina','Тернистая долина'),(36,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Alterac Mountains','Montagnes d\'Alterac','Alteracgebirge','Montañas de Alterac','Альтеракские горы'),(38,0,0,64,0,0,0,0,0,-1,0,-1,-1,'Loch Modan','Loch Modan','Loch Modan','Loch Modan','Лок Модан'),(40,0,0,64,0,0,0,0,0,-1,0,-1,-1,'Westfall','Marche de l\'Ouest','Westfall','Páramos de Poniente','Западный Край'),(41,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Deadwind Pass','Défilé de Deuillevent','Gebirgspass der Totenwinde','Paso de la Muerte','Перевал Мертвого Ветра'),(44,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Redridge Mountains','Les Carmines','Rotkammgebirge','Montañas Crestagrana','Красногорье'),(45,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Arathi Highlands','Hautes-terres d\'Arathi','Arathihochland','Tierras Altas de Arathi','Нагорье Арати'),(46,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Burning Steppes','Steppes ardentes','Brennende Steppe','Las Estepas Ardientes','Пылающие степи'),(47,0,0,64,2,0,0,0,0,-1,0,-1,-1,'The Hinterlands','Les Hinterlands','Hinterland','Tierras del Interior','Внутренние земли'),(51,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Searing Gorge','Gorge des Vents brûlants','Sengende Schlucht','La Garganta de Fuego','Тлеющее ущелье'),(65,571,10,17476,2,2,0,0,0,-1,0,-1,-1,'Dragonblight','Désolation des dragons','Drachenöde','Cementerio de Dragones','Драконий Погост'),(66,571,10,17476,2,2,0,0,0,-1,0,-1,-1,'Zul\'Drak','Zul\'Drak','Zul\'Drak','Zul\'Drak','Зул\'Драк'),(67,571,10,17473,2,2,0,0,0,-1,0,-1,-1,'The Storm Peaks','Les pics Foudroyés','Die Sturmgipfel','Las Cumbres Tormentosas','Грозовая Гряда'),(85,0,0,64,1,0,0,0,0,-1,0,-1,-1,'Tirisfal Glades','Clairières de Tirisfal','Tirisfal','Claros de Tirisfal','Тирисфальские леса'),(130,0,0,64,1,0,0,0,0,-1,0,-1,-1,'Silverpine Forest','Forêt des Pins argentés','Silberwald','Bosque de Argénteos','Серебряный бор'),(139,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Eastern Plaguelands','Maleterres de l\'est','Östliche Pestländer','Tierras de la Peste del Este','Восточные Чумные земли'),(141,1,1,64,0,0,0,0,0,-1,0,-1,-1,'Teldrassil','Teldrassil','Teldrassil','Teldrassil','Тельдрассил'),(148,1,1,64,0,0,0,0,0,-1,0,-1,-1,'Darkshore','Sombrivage','Dunkelküste','Costa Oscura','Темные берега'),(151,451,451,17472,2,2,0,0,0,-1,0,-1,-1,'Designer Island','Île des concepteurs','Designer-Insel','Isla del Diseñador','Остров Дизайнера'),(170,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Lordamere Lake','Lac Lordamere','Der Lordameresee','Lago Lordamere','Озеро Лордамер'),(206,574,2,0,2,2,0,5,65,-1,80,-1,-1,'Utgarde Keep','Donjon d\'Utgarde','Burg Utgarde','Fortaleza de Utgarde','Крепость Утгард'),(207,36,2,64,2,0,0,10,10,-1,0,-1,-1,'The Great Sea','La Grande mer','Das große Meer','Mare Magnum','Великое море'),(209,33,2,0,1,0,0,10,14,-1,0,-1,-1,'Shadowfang Keep','Donjon d\'Ombrecroc','Burg Schattenfang','Castillo de Colmillo Oscuro','Крепость Темного Клыка'),(210,571,10,1093,2,2,0,0,0,-1,0,-1,-1,'Icecrown','La Couronne de glace','Eiskrone','Corona de Hielo','Ледяная Корона'),(214,0,0,64,2,0,0,0,0,-1,0,-1,-1,'The Great Sea','La Grande mer','Das große Meer','Mare Magnum','Великое море'),(215,1,1,64,1,0,0,0,0,-1,0,-1,-1,'Mulgore','Mulgore','Mulgore','Mulgore','Мулгор'),(267,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Hillsbrad Foothills','Contreforts de Hautebrande','Vorgebirge des Hügellands','Laderas de Trabalomas','Предгорья Хилсбрада'),(268,37,6,64,4,0,4,0,0,-1,0,-1,-1,'Azshara Crater','Cratère d\'Azshara','Krater von Azshara','Cráter de Azshara','Кратер Азшары'),(269,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Dun Algaz','Dun Algaz','Dun Algaz','Dun Algaz','Дун Альгаз'),(293,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Thoradin\'s Wall','Mur de Thoradin','Thoradinswall','Muralla de Thoradin','Стена Торадина'),(308,0,0,64,2,0,0,0,0,-1,0,-1,-1,'The Forbidding Sea','La Mer interdite','Das verbotene Meer','Mar Adusto','Зловещее море'),(330,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Thandol Span','Viaduc de Thandol','Thandolübergang','Puente Thandol','Мост Тандола'),(331,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Ashenvale','Orneval','Eschental','Vallefresno','Ясеневый лес'),(332,1,1,64,2,0,0,0,0,-1,0,-1,-1,'The Great Sea','La Grande mer','Das große Meer','Mare Magnum','Великое море'),(357,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Feralas','Féralas','Feralas','Feralas','Фералас'),(361,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Felwood','Gangrebois','Teufelswald','Frondavil','Оскверненный лес'),(377,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Southfury River','La Furie-du-Sud','Der Südstrom','Río Furia del Sur','Река Строптивая'),(394,571,10,17472,2,2,0,0,0,-1,0,-1,-1,'Grizzly Hills','Les Grisonnes','Grizzlyhügel','Colinas Pardas','Седые холмы'),(400,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Thousand Needles','Mille pointes','Tausend Nadeln','Las Mil Agujas','Тысяча Игл'),(405,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Desolace','Désolace','Desolace','Desolace','Пустоши'),(406,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Stonetalon Mountains','Les Serres-Rocheuses','Steinkrallengebirge','Sierra Espolón','Когтистые горы'),(408,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Gillijim\'s Isle','Île de Gillijim','Gillijims Insel','Isla de Gillijim','Остров Гиллиджима'),(409,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Island of Doctor Lapidis','Île du docteur Lapidis','Insel des Doktor Lapidis','Isla del Doctor Lapidis','Остров доктора Лапидиса'),(440,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Tanaris','Tanaris','Tanaris','Tanaris','Танарис'),(457,1,1,64,2,0,0,0,0,-1,0,-1,-1,'The Veiled Sea','La Mer voilée','Das verhüllte Meer','Mar de la Bruma','Сокрытое море'),(490,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Un\'Goro Crater','Cratère d\'Un\'Goro','Krater von Un\'Goro','Cráter de Un\'Goro','Кратер Ун\'Горо'),(491,47,2,0,1,0,0,10,17,-1,0,-1,-1,'Razorfen Kraul','Kraal de Tranchebauge','Kral der Klingenhauer','Horado Rajacieno','Лабиринты Иглошкурых'),(493,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Moonglade','Reflet-de-Lune','Mondlichtung','Claro de la Luna','Лунная поляна'),(495,571,10,1089,2,2,0,0,0,-1,0,-1,-1,'Howling Fjord','Fjord Hurlant','Der heulende Fjord','Fiordo Aquilonal','Ревущий фьорд'),(616,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Hyjal','Hyjal','Hyjal','Hyjal','Хиджал'),(618,1,1,65,2,0,0,0,0,-1,0,-1,-1,'Winterspring','Berceau-de-l\'Hiver','Winterquell','Cuna del Invierno','Зимние Ключи'),(717,34,2,0,0,0,0,10,15,-1,0,-1,-1,'The Stockade','La Prison','Das Verlies','Las Mazmorras','Тюрьма'),(718,43,2,0,1,0,0,10,10,-1,0,-1,-1,'Wailing Caverns','Cavernes des lamentations','Die Höhlen des Wehklagens','Cuevas de los Lamentos','Пещеры Стенаний'),(719,48,2,0,2,0,0,10,19,-1,0,-1,-1,'Blackfathom Deeps','Profondeurs de Brassenoire','Tiefschwarze Grotte','Cavernas de Brazanegra','Непроглядная Пучина'),(721,90,2,0,0,0,0,10,15,-1,0,-1,-1,'Gnomeregan','Gnomeregan','Gnomeregan','Gnomeregan','Гномреган'),(722,129,2,3,1,0,0,10,25,-1,0,-1,-1,'Razorfen Downs','Souilles de Tranchebauge','Hügel der Klingenhauer','Zahúrda Rajacieno','Курганы Иглошкурых'),(796,189,2,0,1,0,0,10,20,-1,0,-1,-1,'Scarlet Monastery','Monastère écarlate','Das Scharlachrote Kloster','Monasterio Escarlata','Монастырь Алого ордена'),(876,1,1,64,2,0,0,0,0,-1,0,-1,-1,'GM Island','Île des MJ','GM-Insel','Isla de los MJ','Остров ГМ'),(956,169,3,64,2,0,0,40,0,-1,0,-1,-1,'The Verdant Fields','Les Champs verdoyants','Die saftgrünen Felder','Los Verdegales','Зеленеющие поля'),(1176,209,2,0,2,0,0,10,35,-1,0,-1,-1,'Zul\'Farrak','Zul\'Farrak','Zul\'Farrak','Zul\'Farrak','Зул\'Фаррак'),(1196,575,2,0,2,2,0,5,75,-1,80,-1,-1,'Utgarde Pinnacle','Cime d\'Utgarde','Turm Utgarde','Pináculo de Utgarde','Вершина Утгард'),(1337,70,2,0,2,0,0,10,30,-1,0,-1,-1,'Uldaman','Uldaman','Uldaman','Uldaman','Ульдаман'),(1377,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Silithus','Silithus','Silithus','Silithus','Силитус'),(1397,169,3,64,2,0,0,40,0,-1,0,-1,-1,'Emerald Forest','Forêt d\'émeraude','Smaragdwald','Bosque Esmeralda','Изумрудный лес'),(1417,109,2,0,2,0,0,10,35,-1,0,-1,-1,'Sunken Temple','Temple englouti','Versunkener Tempel','Templo Sumergido','Затонувший храм'),(1477,109,2,0,2,0,0,10,35,-1,0,-1,-1,'The Temple of Atal\'Hakkar','Le temple d\'Atal\'Hakkar','Der Tempel von Atal\'Hakkar','El Templo de Atal\'Hakkar','Храм Атал\'Хаккара'),(1497,0,0,69206328,1,0,0,0,0,-1,0,-1,-1,'Undercity','Fossoyeuse','Unterstadt','Entrañas','Подгород'),(1519,0,0,2097464,0,0,0,0,0,-1,0,-1,-1,'Stormwind City','Hurlevent','Sturmwind','Ciudad de Ventormenta','Штормград'),(1537,0,0,2097464,0,0,0,0,0,-1,0,-1,-1,'Ironforge','Forgefer','Eisenschmiede','Forjaz','Стальгорн'),(1581,36,2,0,0,0,0,10,10,-1,0,-1,-1,'The Deadmines','Les Mortemines','Die Todesminen','Las Minas de la Muerte','Мертвые копи'),(1583,229,2,0,2,0,0,10,45,-1,0,-1,-1,'Blackrock Spire','Pic Rochenoire','Schwarzfelsspitze','Cumbre de Roca Negra','Пик Черной горы'),(1584,230,2,0,2,0,0,5,40,-1,0,-1,-1,'Blackrock Depths','Profondeurs de Rochenoire','Schwarzfelstiefen','Profundidades de Roca Negra','Глубины Черной горы'),(1637,1,1,2097464,1,0,0,0,0,-1,0,-1,-1,'Orgrimmar','Orgrimmar','Orgrimmar','Orgrimmar','Оргриммар'),(1638,1,1,2097464,1,0,0,0,0,-1,0,-1,-1,'Thunder Bluff','Les Pitons du Tonnerre','Donnerfels','Cima del Trueno','Громовой Утес'),(1657,1,1,2097464,0,0,0,0,0,-1,0,-1,-1,'Darnassus','Darnassus','Darnassus','Darnassus','Дарнас'),(1941,1,1,64,2,0,0,0,0,-1,0,-1,-1,'Caverns of Time','Grottes du temps','Höhlen der Zeit','Cavernas del Tiempo','Пещеры Времени'),(1977,309,3,0,2,0,0,20,50,-1,0,-1,-1,'Zul\'Gurub','Zul\'Gurub','Zul\'Gurub','Zul\'Gurub','Зул\'Гуруб'),(2017,329,2,0,2,0,0,5,45,-1,0,-1,-1,'Stratholme','Stratholme','Stratholme','Stratholme','Стратхольм'),(2037,0,0,64,2,0,0,0,0,-1,0,-1,-1,'Quel\'thalas','Quel\'thalas','Quel\'Thalas','Quel\'thalas','Кель\'Талас'),(2057,289,2,0,2,0,0,5,45,-1,0,-1,-1,'Scholomance','Scholomance','Scholomance','Scholomance','Некроситет'),(2100,349,2,0,2,0,0,10,30,-1,0,-1,-1,'Maraudon','Maraudon','Maraudon','Maraudon','Мародон'),(2159,1,1,0,2,0,0,0,0,-1,0,-1,-1,'Onyxia\'s Lair','Repaire d\'Onyxia','Onyxias Hort','Guarida de Onyxia','Логово Ониксии'),(2257,369,369,0,0,0,0,0,0,-1,0,-1,-1,'Deeprun Tram','Tram des profondeurs','Die Tiefenbahn','Tranvía Subterráneo','Подземный поезд'),(2366,269,2,0,2,1,0,5,66,-1,70,-1,-1,'The Black Morass','Le Noir Marécage','Der schwarze Morast','La Ciénaga Negra','Черные топи'),(2367,560,2,0,2,1,0,5,66,-1,70,-1,-1,'Old Hillsbrad Foothills','Contreforts de Hautebrande d\'antan','Vorgebirge des Alten Hügellands','Antiguas Laderas de Trabalomas','Старые предгорья Хилсбрада'),(2437,389,2,0,1,0,0,10,8,-1,0,-1,-1,'Ragefire Chasm','Gouffre de Ragefeu','Der Flammenschlund','Sima Ígnea','Огненная пропасть'),(2557,429,2,0,2,0,0,5,45,-1,0,-1,-1,'Dire Maul','Hache-tripes','Düsterbruch','La Masacre','Забытый Город'),(2597,30,6,16384,4,0,4,0,0,-1,0,-1,-1,'Alterac Valley','Vallée d\'Alterac','Alteractal','Valle de Alterac','Альтеракская долина'),(2677,469,3,0,2,0,0,40,60,-1,0,-1,-1,'Blackwing Lair','Repaire de l\'Aile noire','Pechschwingenhort','Guarida de Alanegra','Логово Крыла Тьмы'),(2717,409,3,0,2,0,0,40,50,-1,0,-1,-1,'Molten Core','Cœur du Magma','Geschmolzener Kern','Núcleo de Magma','Огненные Недра'),(2817,571,10,17476,2,2,0,0,0,-1,0,-1,-1,'Crystalsong Forest','Forêt du Chant de cristal','Kristallsangwald','Bosque Canto de Cristal','Лес Хрустальной Песни'),(2917,1,1,32,1,0,0,0,0,-1,0,-1,-1,'Hall of Legends','Hall des Légendes','Halle der Legenden','Sala de las Leyendas','Зал Легенд'),(2918,449,449,32,0,0,0,0,0,-1,0,-1,-1,'Champions\' Hall','Hall des Champions','Halle der Champions','Sala de los Campeones','Зал Защитника'),(3277,489,6,16384,4,0,4,0,0,-1,0,-1,-1,'Warsong Gulch','Goulet des Chanteguerres','Kriegshymnenschlucht','Garganta Grito de Guerra','Ущелье Песни Войны'),(3358,529,6,16384,4,0,4,0,0,-1,0,-1,-1,'Arathi Basin','Bassin d\'Arathi','Arathibecken','Cuenca de Arathi','Низина Арати'),(3428,531,3,67108864,2,0,0,40,50,-1,0,-1,-1,'Ahn\'Qiraj','Ahn\'Qiraj','Ahn\'Qiraj','Ahn\'Qiraj','Ан\'Кираж'),(3429,509,3,0,2,0,0,20,50,-1,0,-1,-1,'Ruins of Ahn\'Qiraj','Ruines d\'Ahn\'Qiraj','Ruinen von Ahn\'Qiraj','Ruinas de Ahn\'Qiraj','Руины Ан\'Киража'),(3430,530,8,64,1,1,0,0,0,-1,0,-1,-1,'Eversong Woods','Bois des Chants éternels','Immersangwald','Bosque Canción Eterna','Леса Вечной Песни'),(3433,530,8,64,1,1,0,0,0,-1,0,-1,-1,'Ghostlands','Les Terres fantômes','Geisterlande','Tierras Fantasma','Призрачные земли'),(3455,530,8,64,1,1,0,0,0,-1,0,-1,-1,'The North Sea','La mer Boréale','Das Nordmeer','El Mar del Norte','Северное море'),(3456,533,3,4099,2,2,0,25,80,-1,80,-1,-1,'Naxxramas','Naxxramas','Naxxramas','Naxxramas','Наксрамас'),(3457,532,3,0,2,1,0,10,68,-1,0,-1,-1,'Karazhan','Karazhan','Karazhan','Karazhan','Каражан'),(3477,571,10,17408,2,2,0,0,0,-1,0,-1,-1,'Azjol-Nerub','Azjol-Nérub','Azjol-Nerub','Azjol-Nerub','Азжол-Неруб'),(3478,1,1,0,2,0,0,0,0,-1,0,-1,-1,'Gates of Ahn\'Qiraj','Portes d\'Ahn\'Qiraj','Tore von Ahn\'Qiraj','Puerta de Ahn\'Qiraj','Врата Ан\'Киража'),(3479,530,8,64,0,1,0,0,0,-1,0,-1,-1,'The Veiled Sea','La Mer voilée','Das verhüllte Meer','Mar de la Bruma','Сокрытое море'),(3483,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Hellfire Peninsula','Péninsule des Flammes infernales','Höllenfeuerhalbinsel','Península del Fuego Infernal','Полуостров Адского Пламени'),(3487,530,8,2097464,1,1,0,0,0,-1,0,-1,-1,'Silvermoon City','Lune-d\'argent','Silbermond','Ciudad de Lunargenta','Луносвет'),(3518,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Nagrand','Nagrand','Nagrand','Nagrand','Награнд'),(3519,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Terokkar Forest','Forêt de Terokkar','Wälder von Terokkar','Bosque de Terokkar','Лес Тероккар'),(3520,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Shadowmoon Valley','Vallée d\'Ombrelune','Schattenmondtal','Valle Sombraluna','Долина Призрачной Луны'),(3521,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Zangarmarsh','Marécage de Zangar','Zangarmarschen','Marisma de Zangar','Зангартопь'),(3522,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Blade\'s Edge Mountains','Les Tranchantes','Schergrat','Montañas Filospada','Острогорье'),(3523,530,8,17472,2,1,0,0,0,-1,0,-1,-1,'Netherstorm','Raz-de-Néant','Nethersturm','Tormenta Abisal','Пустоверть'),(3524,530,8,64,0,1,0,0,0,-1,0,-1,-1,'Azuremyst Isle','Île de Brume-azur','Azurmythosinsel','Isla Bruma Azur','Остров Лазурной Дымки'),(3525,530,8,64,0,1,0,0,0,-1,0,-1,-1,'Bloodmyst Isle','Île de Brume-sang','Blutmythosinsel','Isla Bruma de Sangre','Остров Кровавой Дымки'),(3535,540,2,0,2,1,0,5,55,-1,70,-1,-1,'Hellfire Citadel','Citadelle des Flammes infernales','Höllenfeuerzitadelle','Ciudadela del Fuego Infernal','Цитадель Адского Пламени'),(3537,571,10,17473,2,2,0,0,0,-1,0,-1,-1,'Borean Tundra','Toundra Boréenne','Boreanische Tundra','Tundra Boreal','Борейская тундра'),(3540,530,8,17408,2,1,0,0,0,-1,0,-1,-1,'Twisting Nether','Le Néant distordu','Wirbelnder Nether','El Vacío Abisal','Круговерть Пустоты'),(3557,530,8,2097464,0,1,0,0,0,-1,0,-1,-1,'The Exodar','L\'Exodar','Die Exodar','El Exodar','Экзодар'),(3562,543,2,0,2,1,0,5,55,-1,70,-1,-1,'Hellfire Ramparts','Remparts des Flammes infernales','Höllenfeuerbollwerk','Murallas del Fuego Infernal','Бастионы Адского Пламени'),(3605,560,2,64,2,1,0,5,66,-1,70,-1,-1,'Hyjal Past','Passé d\'Hyjal','Hyjal der Vergangenheit','El Pasado Hyjal','Прошлое Хиджала'),(3606,534,3,0,2,1,0,25,70,-1,0,-1,-1,'Hyjal Summit','Sommet d\'Hyjal','Hyjalgipfel','La Cima Hyjal','Вершина Хиджала'),(3607,548,3,0,2,1,0,25,68,-1,0,-1,-1,'Serpentshrine Cavern','Caverne du sanctuaire du Serpent','Höhle des Schlangenschreins','Caverna Santuario Serpiente','Змеиное святилище'),(3698,559,9,65664,4,0,6,0,0,-1,0,-1,-1,'Nagrand Arena','Arène de Nagrand','Arena von Nagrand','Arena de Nagrand','Арена Награнда'),(3702,562,9,65664,4,0,6,0,0,-1,0,-1,-1,'Blade\'s Edge Arena','Arène des Tranchantes','Arena des Schergrats','Arena Filospada','Арена Острогорья'),(3703,530,8,19752,3,1,0,0,0,-1,0,-1,-1,'Shattrath City','Shattrath','Shattrath','Ciudad de Shattrath','Шаттрат'),(3711,571,10,17472,2,2,0,0,0,-1,0,-1,-1,'Sholazar Basin','Bassin de Sholazar','Sholazarbecken','Cuenca de Sholazar','Низина Шолазар'),(3713,542,2,0,2,1,0,5,55,-1,70,-1,-1,'The Blood Furnace','La Fournaise du sang','Der Blutkessel','El Horno de Sangre','Кузня Крови'),(3714,540,2,0,2,1,0,5,55,-1,70,-1,-1,'The Shattered Halls','Les Salles brisées','Die zerschmetterten Hallen','Las Salas Arrasadas','Разрушенные залы'),(3715,545,2,0,2,1,0,5,55,-1,70,-1,-1,'The Steamvault','Le Caveau de la vapeur','Die Dampfkammer','La Cámara de Vapor','Паровое подземелье'),(3716,546,2,0,2,1,0,5,55,-1,70,-1,-1,'The Underbog','La Basse-tourbière','Der Tiefensumpf','La Sotiénaga','Нижетопь'),(3717,547,2,0,2,1,0,5,55,-1,70,-1,-1,'The Slave Pens','Les enclos aux esclaves','Die Sklavenunterkünfte','Recinto de los Esclavos','Узилище'),(3789,555,2,0,2,1,0,5,65,-1,70,-1,-1,'Shadow Labyrinth','Labyrinthe des ombres','Schattenlabyrinth','Laberinto de las Sombras','Темный лабиринт'),(3790,558,2,0,2,1,0,5,55,-1,70,-1,-1,'Auchenai Crypts','Cryptes Auchenaï','Auchenaikrypta','Criptas Auchenai','Аукенайские гробницы'),(3791,556,2,0,2,1,0,5,55,-1,70,-1,-1,'Sethekk Halls','Les salles des Sethekk','Sethekkhallen','Salas Sethekk','Сетеккские залы'),(3792,557,2,0,2,1,0,5,55,-1,70,-1,-1,'Mana-Tombs','Tombes-mana','Managruft','Tumbas de Maná','Гробницы Маны'),(3805,568,3,0,2,1,0,10,70,-1,0,-1,-1,'Zul\'Aman','Zul\'Aman','Zul\'Aman','Zul\'Aman','Зул\'Аман'),(3820,566,6,16384,4,1,4,0,0,-1,0,-1,-1,'Eye of the Storm','L\'Œil du cyclone','Auge des Sturms','Ojo de la Tormenta','Око Бури'),(3836,544,3,0,2,1,0,25,65,-1,0,-1,-1,'Magtheridon\'s Lair','Le repaire de Magtheridon','Magtheridons Kammer','Guarida de Magtheridon','Логово Магтеридона'),(3845,550,3,4096,2,1,0,25,70,-1,0,-1,-1,'Tempest Keep','Donjon de la Tempête','Festung der Stürme','El Castillo de la Tempestad','Крепость Бурь'),(3847,553,2,4096,2,1,0,5,68,-1,70,-1,-1,'The Botanica','La Botanica','Die Botanika','El Invernáculo','Ботаника'),(3848,552,2,4096,2,1,0,5,68,-1,70,-1,-1,'The Arcatraz','L\'Arcatraz','Die Arkatraz','El Arcatraz','Аркатрац'),(3849,554,2,4096,2,1,0,5,68,-1,70,-1,-1,'The Mechanar','Le Méchanar','Die Mechanar','El Mechanar','Механар'),(3917,530,8,64,2,1,0,0,0,-1,0,-1,-1,'Auchindoun','Auchindoun','Auchindoun','Auchindoun','Аукиндон'),(3923,565,3,0,2,1,0,25,70,-1,0,-1,-1,'Gruul\'s Lair','Repaire de Gruul','Gruuls Unterschlupf','Guarida de Gruul','Логово Груула'),(3948,451,451,64,2,2,0,0,0,-1,0,-1,-1,'Brian and Pat Test','Test de Brian et Pat','Brian und Pat Test','Brian and Pat Test','Тест Брайана и Пата'),(3959,564,3,0,2,1,0,25,70,-1,0,-1,-1,'Black Temple','Temple noir','Der Schwarze Tempel','Templo Oscuro','Черный храм'),(3968,572,9,65664,4,0,6,0,0,-1,0,-1,-1,'Ruins of Lordaeron','Ruines de Lordaeron','Ruinen von Lordaeron','Ruinas de Lordaeron','Руины Лордерона'),(3979,571,10,17473,2,2,0,0,0,-1,0,-1,-1,'The Frozen Sea','La mer Gelée','Die gefrorene See','El Mar Gélido','Ледяное море'),(4019,451,451,17472,2,2,0,0,0,-1,0,-1,-1,'Development Land','Terrain en développement','Entwicklungsland','Tierra de Desarrollo','Зона разработчика'),(4075,580,3,0,2,1,0,25,70,-1,0,-1,-1,'Sunwell Plateau','Plateau du Puits de soleil','Sonnenbrunnenplateau','Meseta de La Fuente del Sol','Плато Солнечного Колодца'),(4080,530,8,64,2,1,0,0,0,-1,0,-1,-1,'Isle of Quel\'Danas','Île de Quel\'Danas','Insel von Quel\'Danas','Isla de Quel\'Danas','Остров Кель\'Данас'),(4100,595,2,0,2,2,0,5,75,-1,80,-1,-1,'The Culling of Stratholme','L\'Épuration de Stratholme','Das Ausmerzen von Stratholme','La Matanza de Stratholme','Очищение Стратхольма'),(4131,585,2,0,2,1,0,5,65,-1,70,-1,-1,'Magisters\' Terrace','Terrasse des Magistères','Terrasse der Magister','Bancal del Magister','Терраса Магистров'),(4196,600,2,0,2,2,0,5,69,-1,80,-1,-1,'Drak\'Tharon Keep','Donjon de Drak\'Tharon','Feste Drak\'Tharon','Fortaleza de Drak\'Tharon','Крепость Драк\'Тарон'),(4197,571,10,151012417,5,2,0,0,0,-1,0,-1,-1,'Wintergrasp','Joug-d\'hiver','Tausendwintersee','Conquista del Invierno','Озеро Ледяных Оков'),(4201,571,10,64,2,2,0,0,0,-1,0,-1,-1,'Vordrassil\'s Tears','Larmes de Vordrassil','Vordrassils Tränen','Lágrimas de Vordrassil','Слезы Фордрассила'),(4228,578,2,16384,2,2,0,5,75,-1,80,-1,-1,'The Oculus','L\'Oculus','Das Oculus','El Oculus','Окулус'),(4258,571,10,17473,2,2,0,0,0,-1,0,-1,-1,'The North Sea','La mer Boréale','Das Nordmeer','El Mar del Norte','Северное море'),(4264,599,2,0,2,2,0,5,72,-1,80,-1,-1,'Halls of Stone','Les salles de Pierre','Die Hallen des Steins','Cámaras de Piedra','Чертоги Камня'),(4265,576,2,0,2,2,0,5,66,-1,80,-1,-1,'The Nexus','Le Nexus','Der Nexus','El Nexo','Нексус'),(4272,602,2,0,2,2,0,5,75,-1,80,-1,-1,'Halls of Lightning','Les salles de Foudre','Die Hallen der Blitze','Cámaras de Relámpagos','Чертоги Молний'),(4273,603,3,16384,2,2,0,5,80,-1,80,-1,-1,'Ulduar','Ulduar','Ulduar','Ulduar','Ульдуар'),(4277,601,2,0,2,2,0,5,67,-1,80,-1,-1,'Azjol-Nerub','Azjol-Nérub','Azjol-Nerub','Azjol-Nerub','Азжол-Неруб'),(4298,609,609,16448,2,2,0,0,0,-1,0,-1,-1,'Plaguelands: The Scarlet Enclave','Maleterres : l\'enclave Écarlate','Pestländer: Die Scharlachrote Enklave','Tierras de la Peste: El Enclave Escarlata','Чумные земли: Анклав Алого ордена'),(4378,617,9,67174528,4,0,6,0,0,-1,0,-1,-1,'Dalaran Arena','Arène de Dalaran','Arena von Dalaran','Arena de Dalaran','Арена Даларана'),(4384,607,6,16,4,2,4,0,0,-1,0,-1,-1,'Strand of the Ancients','Rivage des Anciens','Strand der Uralten','Playa de los Ancestros','Берег Древних'),(4395,571,10,536890664,3,2,0,0,0,-1,0,-1,-1,'Dalaran','Dalaran','Dalaran','Dalaran','Даларан'),(4406,618,9,67174528,4,0,6,0,0,-1,0,-1,-1,'The Ring of Valor','L\'Arène des valeureux','Der Ring der Ehre','El Círculo del Valor','Арена Доблести'),(4415,608,2,0,2,2,0,5,70,-1,80,-1,-1,'The Violet Hold','Le fort Pourpre','Die Violette Festung','El Bastión Violeta','Аметистовая крепость'),(4416,604,2,0,2,2,0,5,71,-1,80,-1,-1,'Gundrak','Gundrak','Gundrak','Gundrak','Гундрак'),(4493,615,3,0,2,2,0,0,80,-1,80,-1,-1,'The Obsidian Sanctum','Le sanctum Obsidien','Das Obsidiansanktum','El Sagrario Obsidiana','Обсидиановое святилище'),(4494,619,2,33570816,2,2,0,0,68,-1,80,-1,-1,'Ahn\'kahet: The Old Kingdom','Ahn\'kahet : l\'Ancien royaume','Ahn\'kahet: Das Alte Königreich','Ahn\'kahet: El Antiguo Reino','Ан\'кахет: Старое Королевство'),(4500,616,3,16384,2,2,0,5,80,-1,80,-1,-1,'The Eye of Eternity','L\'Œil de l\'éternité','Das Auge der Ewigkeit','El Ojo de la Eternidad','Око Вечности'),(4602,571,10,33554432,2,2,0,0,0,-1,0,-1,-1,'Force Interior','Force intérieure','Das Innere der Macht','Fuerza Interior','Интерьер силы'),(4603,624,3,0,2,2,0,0,80,-1,80,-1,-1,'Vault of Archavon','Caveau d\'Archavon','Archavons Kammer','La Cámara de Archavon','Склеп Аркавона'),(4630,571,10,64,2,2,0,0,0,-1,0,-1,-1,'The North Sea','La mer Boréale','Das Nordmeer','El Mar del Norte','Северное море'),(4710,628,6,0,4,2,4,0,0,-1,0,-1,-1,'Isle of Conquest','Île des Conquérants','Insel der Eroberung','Isla de la Conquista','Остров Завоеваний'),(4722,649,3,33554432,2,2,0,0,80,-1,80,-1,-1,'Trial of the Crusader','L\'épreuve du croisé','Prüfung des Kreuzfahrers','Prueba del Cruzado','Испытание крестоносца'),(4723,650,2,33554432,2,2,0,0,75,-1,80,-1,-1,'Trial of the Champion','L\'épreuve du champion','Prüfung des Champions','Prueba del Campeón','Испытание чемпиона'),(4742,571,10,1093,2,2,0,0,0,-1,0,-1,-1,'Hrothgar\'s Landing','Accostage de Hrothgar','Hrothgars Landestelle','Desembarco de Hrothgar','Лагерь Хротгара'),(4763,641,641,33554432,2,2,0,0,0,-1,0,-1,-1,'Transport: Alliance Gunship','Transport : canonnière de l\'Alliance','Transport: Kanonenboot der Allianz','Transporte: Nave de Guerra de la Alianza','Транспорт: Боевой корабль Альянса'),(4764,642,642,33554432,2,2,0,0,0,-1,0,-1,-1,'Transport: Horde Gunship','Transport : canonnière de la Horde','Transport: Kanonenboot der Horde','Transporte: Nave de Guerra de la Horda','Транспорт: Боевой корабль Орды'),(4809,632,2,16385,2,2,0,0,75,-1,80,-1,-1,'The Forge of Souls','La Forge des âmes','Die Seelenschmiede','La Forja de Almas','Кузня Душ'),(4812,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'Icecrown Citadel','Citadelle de la Couronne de glace','Eiskronenzitadelle','Ciudadela de la Corona de Hielo','Цитадель Ледяной Короны'),(4813,658,2,16385,2,2,0,0,75,-1,80,-1,-1,'Pit of Saron','Fosse de Saron','Grube von Saron','Foso de Saron','Яма Сарона'),(4820,668,2,16385,2,2,0,0,75,-1,80,-1,-1,'Halls of Reflection','Salles des Reflets','Hallen der Reflexion','Cámaras de Reflexión','Залы Отражений'),(4832,672,672,33554432,2,2,0,0,0,-1,0,-1,-1,'Transport: Alliance Gunship (IGB)','Transport: canonnière de l\'Alliance (IGB)','Transport: Kanonenschiff der Allianz (IGB)','Transporte: Nave de Guerra de la Alianza','Транспорт: боевой корабль Альянса (IGB)'),(4833,673,673,33554432,2,2,0,0,0,-1,0,-1,-1,'Transport: Horde Gunship (IGB)','Transport : canonnière de la Horde(IGB)','Transport: Kanonenschiff der Horde (IGB)','Transporte: Nave de Guerra de la Horda','Транспорт: боевой корабль Орды (IGB)'),(4893,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'The Frost Queen\'s Lair','Le repaire de la reine du Givre','Der Hort der Frostkönigin','La Guarida de la Reina de Escarcha','Логово Королевы Льда'),(4894,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'Putricide\'s Laboratory of Alchemical Horrors and Fun','Laboratoire des désopilantes atrocités alchimiques de Putricide','Seuchenmords Laboratorium der alchemistischen Schrecken und Späße','Laboratorio Horrores y Risas Alquímicas de Putricidio','Лаборатория алхимических ужасов и забав'),(4895,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'The Crimson Hall','La salle Cramoisie','Die Blutrote Halle','La Sala Carmesí','Багровый зал'),(4896,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'The Frozen Throne','Le Trône de glace','Der Frostthron','El Trono Helado','Ледяной Трон'),(4897,631,3,16385,2,2,0,0,80,-1,80,-1,-1,'The Sanctum of Blood','Le sanctum de Sang','Das Sanktum des Blutes','El Sagrario de Sangre','Святилище Крови'),(4987,724,3,0,2,2,0,0,80,-1,80,-1,-1,'The Ruby Sanctum','Le sanctum Rubis','Das Rubinsanktum','El Sagrario Rubí','Рубиновое святилище'); +/*!40000 ALTER TABLE `aowow_zones` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2013-05-21 23:11:46 diff --git a/template/bricks/listviews/zone.tpl b/template/bricks/listviews/zone.tpl new file mode 100644 index 00000000..c3afb960 --- /dev/null +++ b/template/bricks/listviews/zone.tpl @@ -0,0 +1,36 @@ +{strip} + new Listview({ldelim} + template:'zone', + {if !isset($params.id)}id:'zones',{/if} + {if !isset($params.name)}name:LANG.tab_zones,{/if} + {if !isset($params.parent)}parent:'listview-generic',{/if} + {foreach from=$params key=k item=v} + {if $v[0] == '$'} + {$k}:{$v|substr:1}, + {else if $v} + {$k}:'{$v}', + {/if} + {/foreach} + data:[ + {foreach name=i from=$data item=curr} + {ldelim} + id:{$curr.id}, + category:{$curr.category}, + territory:{$curr.territory}, + minlevel:{$curr.minlevel}, + maxlevel:{$curr.maxlevel}, + name:'{$curr.name|escape:"quotes"}' + {if isset($curr.expansion)},expansion:{$curr.expansion}{/if} + {if isset($curr.instance)},instance:{$curr.instance}{/if} + {if isset($curr.nplayers)},nplayers:{$curr.nplayers}{/if} + {if isset($curr.reqlevel)},reqlevel:{$curr.reqlevel}{/if} + {if isset($curr.lfgReqLevel)},lfgReqLevel:{$curr.lfgReqLevel}{/if} + {if isset($curr.heroicLevel)},heroicLevel:{$curr.heroicLevel}{/if} +{* {if isset($curr.percent)},percent:{$curr.percent}{/if} what was that originaly for..? *} + {rdelim} + {if $smarty.foreach.i.last}{else},{/if} + {/foreach} + ] + {rdelim}); +{/strip} + diff --git a/template/bricks/mapper.tpl b/template/bricks/mapper.tpl new file mode 100644 index 00000000..43399fa5 --- /dev/null +++ b/template/bricks/mapper.tpl @@ -0,0 +1,11 @@ +
+ {if isset($som)}
{/if} +
+
+
+ + \ No newline at end of file diff --git a/template/css/Mapper.css b/template/css/Mapper.css index 4c8e332b..1222e881 100644 --- a/template/css/Mapper.css +++ b/template/css/Mapper.css @@ -1,59 +1,193 @@ -/* - Mapper.css version 294 -*/ .mapper { -position:relative; -margin-top:10px; -border:3px solid #404040; -background-color:black; + position: relative; + margin-top: 10px; + border: 3px solid #404040; + background-color: black; } -.mapper .pin { -position:absolute; -width:1px; -height:1px; -font-size:1px; +.mapper .pin { + position: absolute; + width: 1px; + height: 1px; + font-size: 1px; + z-index: 5; /* Put pins on top of lines */ } .mapper .pin a { -position:relative; -width:11px; -height:11px; -left:-5px; -top:-5px; -background:url(../images/map-pin-yellow.png) no-repeat; -display:block; + position: relative; + width: 11px; + height: 11px; + left: -5px; + top: -5px; + background: url(../images/Mapper/pin-yellow.png) no-repeat; + display: block; } -.mapper .pin-1 a { -background-image:url(../images/map-pin-green.png); +.mapper .pin-start a { + background-image: url(../images/Mapper/quest-start.png); + width: 9px; + height: 17px; + left: -4px; + top: -8px; + z-index: 5; } -.mapper .pin-2 a { -background-image:url(../images/map-pin-red.png); +.mapper .pin-end a { + background-image: url(../images/Mapper/quest-end.png); + width: 12px; + height: 18px; + left: -6px; + top: -9px; + z-index: 5; } -.mapper .pin-3 a { -background-image:url(../images/map-pin-blue.png); +.mapper .pin-startend a { + background-image: url(../images/Mapper/quest-startend.png); + width: 19px; + height: 18px; + left: -9px; + top: -9px; + z-index: 5; } -.mapper .pin-4 a { -background-image:url(../images/map-pin-purple.png); +.mapper-pin, .mapper-pin-1, .mapper-pin-2, .mapper-pin-3, .mapper-pin-4 { + padding-left: 13px; + background-image: url(../images/Mapper/pin-yellow.png); + background-repeat: no-repeat; + background-position: 0 50%; +} + +.mapper-pin-1, .mapper .pin-1 a { + background-image: url(../images/Mapper/pin-green.png); +} + +.mapper-pin-2, .mapper .pin-2 a { + background-image: url(../images/Mapper/pin-red.png); +} + +.mapper-pin-3, .mapper .pin-3 a { + background-image: url(../images/Mapper/pin-blue.png); +} + +.mapper-pin-4, .mapper .pin-4 a { + background-image: url(../images/Mapper/pin-purple.png); } .mapper .glow { -margin:0 2px; -font-size:12px; -font-weight:bold; -color:white; -cursor:default; -white-space:nowrap; + margin: 0 2px; + font-size: 12px; + font-weight: bold; + color: white; + cursor: default; + white-space: nowrap; } .mapper .glow a { -text-decoration:none; + text-decoration: none; } .mapper .glow a:hover { -text-decoration:underline; -} \ No newline at end of file + text-decoration: underline; +} + +.mapper-som-button { + margin: 0 !important; + float: left !important; +} + +.mapper-legend { + float: left; + display: block; + background-color: #141414; + border: 1px solid #101010; + font-size: 11px; + margin: -4px 0 0 15px; + white-space: nowrap; + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.mapper-legend-container { + padding: 4px 8px; +} + +.mapper-legend-pin { + margin: 0 5px; +} + +.mapper .line var { + background: #C8B94C; +} + +.mapper .line-1 var { + background: #73B85B; +} + +.mapper .line-2 var { + background: #D7563C; +} + +.mapper .line-3 var { + background: #47ACCD; +} + +.mapper .line-4 var { + background: #C844D0; +} + +html.ie678 .line var { + margin-left: 0; +} + +.line { + position: absolute; + display: block; + cursor: default; +} + +.line var { + width: 100%; + height: 2px; + margin: -2px 0 0 2px; + display: block; + background: #FFFFFF; + border: 1px solid #181818; + border-left: none; + border-right: none; + -o-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -webkit-transform-origin: 0 0; + -o-box-shadow: 0px 0px 3px black; + /*-moz-box-shadow: 0px 0px 3px black;*/ + -webkit-box-shadow: 0px 0px 3px black; +} + +.line.flipped { + -o-transform: scaleY(-1); + -moz-transform: scaleY(-1); + -webkit-transform: scaleY(-1); + -ms-filter: "FlipV"; + filter: FlipV; +} + +.mapper .line var { + background: #C8B94C; +} + +.mapper .line-1 var { + background: #73B85B; +} + +.mapper .line-2 var { + background: #D7563C; +} + +.mapper .line-3 var { + background: #47ACCD; +} + +.mapper .line-4 var { + background: #C844D0; +} diff --git a/template/generic-no-filter.tpl b/template/generic-no-filter.tpl index 8d0066c0..e513eb1b 100644 --- a/template/generic-no-filter.tpl +++ b/template/generic-no-filter.tpl @@ -10,6 +10,9 @@ {include file='bricks/announcement.tpl' an=$item} {/foreach} {/if} +{if isset($lvData.map)} + {include file='bricks/mapper.tpl' map=$lvData.map som=$lvData.som} +{/if}
diff --git a/template/js/Mapper.js b/template/js/Mapper.js index 6dcfd3e3..4bdb2e6c 100644 --- a/template/js/Mapper.js +++ b/template/js/Mapper.js @@ -1,855 +1,855 @@ function Mapper(opt, noScroll) { - cO(this, opt); + cO(this, opt); - if(this.parent && !this.parent.nodeName) { - this.parent = ge(this.parent); - } - else if(!this.parent) { - return; - } - - var _; - - this.mouseX = this.mouseY = 0; - - this.editable = this.editable || false; - this.overlay = this.overlay || false; - - if(this.editable) { - this.zoomable = this.toggle = false; - this.show = this.mouse = true; - } - else { - this.zoomable = (this.zoomable == null ? true : this.zoomable); - this.toggle = (this.toggle == null ? true : this.toggle); - this.show = (this.show == null ? true : this.show); - this.mouse = (this.mouse == null ? false : this.mouse); - } - - this.buttons = (this.buttons == null ? true : this.buttons); - - this.zoneLink = (this.zoneLink == null ? true : this.zoneLink); - if(location.href.indexOf('zone=') != -1) { - this.zoneLink = false; + if(this.parent && !this.parent.nodeName) { + this.parent = ge(this.parent); + } + else if(!this.parent) { + return; } - this.zoom = (this.zoom == null ? 0 : this.zoom); - this.zone = (this.zone == null ? 0 : this.zone); - this.level = (this.level == null ? (Mapper.zoneDefaultLevel[this.zone] ? Mapper.zoneDefaultLevel[this.zone] : 0) : this.level); + var _; - this.pins = []; - this.nCoords = 0; + this.mouseX = this.mouseY = 0; - this.tempWidth = null; - this.tempHeight = null; + this.editable = this.editable || false; + this.overlay = this.overlay || false; - this.parent.className = 'mapper'; - this.parent.appendChild(this.span = ce('span')); + if(this.editable) { + this.zoomable = this.toggle = false; + this.show = this.mouse = true; + } + else { + this.zoomable = (this.zoomable == null ? true : this.zoomable); + this.toggle = (this.toggle == null ? true : this.toggle); + this.show = (this.show == null ? true : this.show); + this.mouse = (this.mouse == null ? false : this.mouse); + } - _ = this.span.style; - _.display = 'block'; - _.position = 'relative'; + this.buttons = (this.buttons == null ? true : this.buttons); - ns(this.span); + this.zoneLink = (this.zoneLink == null ? true : this.zoneLink); + if(location.href.indexOf('zone=') != -1) { + this.zoneLink = false; + } - this.overlaySpan = _ = ce('div'); - _.style.display = 'block'; - _.style.width = '100%'; - _.style.height = '100%'; - this.span.appendChild(_); + this.zoom = (this.zoom == null ? 0 : this.zoom); + this.zone = (this.zone == null ? 0 : this.zone); + this.level = (this.level == null ? (Mapper.zoneDefaultLevel[this.zone] ? Mapper.zoneDefaultLevel[this.zone] : 0) : this.level); - this.buttonDiv = _ = ce('div'); - _.style.position = 'absolute'; - _.style.top = _.style.right = '3px'; + this.pins = []; + this.nCoords = 0; - if(this.buttons) - this.parent.appendChild(_); + this.tempWidth = null; + this.tempHeight = null; - if(this.editable) { - this.span.onmouseup = this.addPin.bind(this); + this.parent.className = 'mapper'; + this.parent.appendChild(this.span = ce('span')); - _ = g_createGlow(LANG.mapper_tippin); - _.style.fontSize = '11px'; - _.style.position = 'absolute'; - _.style.bottom = _.style.right = '0'; + _ = this.span.style; + _.display = 'block'; + _.position = 'relative'; - ns(_); - this.parent.appendChild(_); - } - else { - this.sToggle = _ = RedButton.create(LANG.mapper_hidepins, true, this.toggleShow.bind(this)); + ns(this.span); - _.style['float'] = 'right'; + this.overlaySpan = _ = ce('div'); + _.style.display = 'block'; + _.style.width = '100%'; + _.style.height = '100%'; + this.span.appendChild(_); - _.style.display = 'none'; + this.buttonDiv = _ = ce('div'); + _.style.position = 'absolute'; + _.style.top = _.style.right = '3px'; - ns(_); - this.buttonDiv.appendChild(_); - } + if(this.buttons) + this.parent.appendChild(_); - if(this.zoomable) { - this.span.onclick = this.toggleZoom.bind(this); - this.span.id = 'sjdhfkljawelis' + (this.unique !== undefined ? this.unique : ''); + if(this.editable) { + this.span.onmouseup = this.addPin.bind(this); - this.sZoom = _ = g_createGlow(LANG.mapper_tipzoom); - _.style.fontSize = '11px'; - _.style.position = 'absolute'; - _.style.bottom = _.style.right = '0'; + _ = g_createGlow(LANG.mapper_tippin); + _.style.fontSize = '11px'; + _.style.position = 'absolute'; + _.style.bottom = _.style.right = '0'; - ns(_); - this.span.appendChild(_); - } + ns(_); + this.parent.appendChild(_); + } + else { + this.sToggle = _ = RedButton.create(LANG.mapper_hidepins, true, this.toggleShow.bind(this)); - this.sZoneLink = _ = g_createGlow(''); + _.style['float'] = 'right'; - _.style.display = 'none'; - _.style.position = 'absolute'; - _.style.top = _.style.left = '0'; + _.style.display = 'none'; - this.parent.appendChild(_); + ns(_); + this.buttonDiv.appendChild(_); + } - if(this.mouse) { - this.parent.onmouseout = (function() { + if(this.zoomable) { + this.span.onclick = this.toggleZoom.bind(this); + this.span.id = 'sjdhfkljawelis' + (this.unique !== undefined ? this.unique : ''); + + this.sZoom = _ = g_createGlow(LANG.mapper_tipzoom); + _.style.fontSize = '11px'; + _.style.position = 'absolute'; + _.style.bottom = _.style.right = '0'; + + ns(_); + this.span.appendChild(_); + } + + this.sZoneLink = _ = g_createGlow(''); + + _.style.display = 'none'; + _.style.position = 'absolute'; + _.style.top = _.style.left = '0'; + + this.parent.appendChild(_); + + if(this.mouse) { + this.parent.onmouseout = (function() { this.timeout = setTimeout((function() { this.sMouse.style.display = 'none'; }).bind(this), 1) }).bind(this); - this.parent.onmouseover = (function() { + this.parent.onmouseover = (function() { clearTimeout(this.timeout); this.sMouse.style.display = ''; }).bind(this); - this.span.onmousemove = this.span.onmousedown = this.getMousePos.bind(this); + this.span.onmousemove = this.span.onmousedown = this.getMousePos.bind(this); - this.sMouse = _ = g_createGlow('(0.0, 0.0)'); + this.sMouse = _ = g_createGlow('(0.0, 0.0)'); - _.style.display = 'none'; - _.style.position = 'absolute'; - _.style.bottom = _.style.left = '0'; + _.style.display = 'none'; + _.style.position = 'absolute'; + _.style.bottom = _.style.left = '0'; - _.onmouseup = sp; + _.onmouseup = sp; - ns(_); - this.span.appendChild(_); - } + ns(_); + this.span.appendChild(_); + } - this.floorPins = {}; + this.floorPins = {}; - if(opt.coords != null) { - this.setCoords(opt.coords); - } - else if(opt.link != null) { - this.setLink(opt.link); - } + if(opt.coords != null) { + this.setCoords(opt.coords); + } + else if(opt.link != null) { + this.setLink(opt.link); + } - if(opt.objectives) - this.setObjectives(opt.objectives); - if(opt.zoneparent && opt.zones) - this.setZones(opt.zoneparent, opt.zones); + if(opt.objectives) + this.setObjectives(opt.objectives); + if(opt.zoneparent && opt.zones) + this.setZones(opt.zoneparent, opt.zones); - this.updateMap(noScroll); + this.updateMap(noScroll); }; Mapper.sizes = [ - [ 488, 325, 'normal'], - [ 772, 515, 'zoom'], - [1002, 668, 'original'], - [ 224, 149, 'small'] + [ 488, 325, 'normal'], + [ 772, 515, 'zoom'], + [1002, 668, 'original'], + [ 224, 149, 'small'] ]; Mapper.onlyOneFloor = { - 4120: true, // Nexus - 4264: true, // Halls of Stone - 4416: true, // Gundrak - 4415: true, // Violet Hold - 4493: true, // Obsidian Sanctum - 4500: true, // Eye of Eternity - 4603: true, // Vault of Archavon - 4723: true, // Trial of the Champion - 4809: true, // The Forge of Souls - 4813: true, // Pit of Saron - 4820: true // Halls of Reflection + 4120: true, // Nexus + 4264: true, // Halls of Stone + 4416: true, // Gundrak + 4415: true, // Violet Hold + 4493: true, // Obsidian Sanctum + 4500: true, // Eye of Eternity + 4603: true, // Vault of Archavon + 4723: true, // Trial of the Champion + 4809: true, // The Forge of Souls + 4813: true, // Pit of Saron + 4820: true // Halls of Reflection }; Mapper.zoneLevelOffset = { - 4273: 0 // Ulduar + 4273: 0 // Ulduar }; Mapper.zoneDefaultLevel = { - 3456: 4, // Naxxramas - 4812: 4 // Icecrown Citadel + 3456: 4, // Naxxramas + 4812: 4 // Icecrown Citadel }; Mapper.remappedLevels = { - 4273: { 6: 5 } + 4273: { 6: 5 } }; Mapper.multiLevelZones = {}; Mapper.prototype = { - getMap: function() { return this.parent }, + getMap: function() { return this.parent }, - update: function(opt, noScroll) { - if(opt.zoom != null) { - this.zoom = opt.zoom; - } + update: function(opt, noScroll) { + if(opt.zoom != null) { + this.zoom = opt.zoom; + } - if(opt.zone != null) { - this.zone = opt.zone; - } + if(opt.zone != null) { + this.zone = opt.zone; + } - if(opt.show != null) { - this.show = opt.show; - } + if(opt.show != null) { + this.show = opt.show; + } - this.pins = []; - this.nCoords = 0; - for(var i in this.floorPins) - if(this.floorPins[i].parentNode) - de(this.floorPins[i]); - this.floorPins = {}; - if(this.floorButton) - { - de(this.floorButton); - this.floorButton = null; - } + this.pins = []; + this.nCoords = 0; + for(var i in this.floorPins) + if(this.floorPins[i].parentNode) + de(this.floorPins[i]); + this.floorPins = {}; + if(this.floorButton) + { + de(this.floorButton); + this.floorButton = null; + } - var level = (opt.level === undefined ? 0 : this.fixLevel(parseInt(opt.level))); - if(!opt.preservelevel) - this.level = 0; - else - level = this.level; - var mapperData = false; - if(isset('g_mapperData')) - mapperData = g_mapperData; - else if(isset('g_mapper_data')) - mapperData = g_mapper_data; - if(mapperData && mapperData[this.zone] && !opt.coords) - { - var zone = mapperData[this.zone]; - var maxCount = -1; - for(var i in zone) - { - i = parseInt(i); - var iLevel = this.fixLevel(i); + var level = (opt.level === undefined ? 0 : this.fixLevel(parseInt(opt.level))); + if(!opt.preservelevel) + this.level = 0; + else + level = this.level; + var mapperData = false; + if(isset('g_mapperData')) + mapperData = g_mapperData; + else if(isset('g_mapper_data')) + mapperData = g_mapper_data; + if(mapperData && mapperData[this.zone] && !opt.coords) + { + var zone = mapperData[this.zone]; + var maxCount = -1; + for(var i in zone) + { + i = parseInt(i); + var iLevel = this.fixLevel(i); - if(opt.level === undefined && zone[i].count > maxCount) - { - level = parseInt(iLevel); - maxCount = zone[i].count; - } + if(opt.level === undefined && zone[i].count > maxCount) + { + level = parseInt(iLevel); + maxCount = zone[i].count; + } - if(zone[i].coords) - this.setCoords(zone[i].coords, iLevel); - } - this.level = level; - if(this.floorPins[this.level]) - ae(this.span, this.floorPins[this.level]); - } - else if(opt.coords != null) - { - var lowestLevel = 999; - for(var i in opt.coords) - { - i = parseInt(i); - var iLevel = this.fixLevel(i); - this.setCoords(opt.coords[i], iLevel); - if(iLevel < lowestLevel) - lowestLevel = iLevel; - } + if(zone[i].coords) + this.setCoords(zone[i].coords, iLevel); + } + this.level = level; + if(this.floorPins[this.level]) + ae(this.span, this.floorPins[this.level]); + } + else if(opt.coords != null) + { + var lowestLevel = 999; + for(var i in opt.coords) + { + i = parseInt(i); + var iLevel = this.fixLevel(i); + this.setCoords(opt.coords[i], iLevel); + if(iLevel < lowestLevel) + lowestLevel = iLevel; + } - if(lowestLevel != 999 && !opt.preservelevel) - this.level = lowestLevel; + if(lowestLevel != 999 && !opt.preservelevel) + this.level = lowestLevel; - if(this.floorPins[this.level]) - ae(this.span, this.floorPins[this.level]); - } - // this.setCoords(opt.coords); - else if(opt.link != null) - this.setLink(opt.link); + if(this.floorPins[this.level]) + ae(this.span, this.floorPins[this.level]); + } + // this.setCoords(opt.coords); + else if(opt.link != null) + this.setLink(opt.link); - this.updateMap(noScroll); - }, + this.updateMap(noScroll); + }, - fixLevel: function(level) - { - if(Mapper.zoneLevelOffset[this.zone] !== undefined) - level += Mapper.zoneLevelOffset[this.zone]; - else if(Mapper.multiLevelZones[this.zone] && level > 0) - level += -1; - else if(Mapper.multiLevelZones[this.zone] == undefined) - level = 0; + fixLevel: function(level) + { + if(Mapper.zoneLevelOffset[this.zone] !== undefined) + level += Mapper.zoneLevelOffset[this.zone]; + else if(Mapper.multiLevelZones[this.zone] && level > 0) + level += -1; + else if(Mapper.multiLevelZones[this.zone] == undefined) + level = 0; - if(Mapper.remappedLevels[this.zone] && Mapper.remappedLevels[this.zone][level] !== undefined) - level = Mapper.remappedLevels[this.zone][level]; + if(Mapper.remappedLevels[this.zone] && Mapper.remappedLevels[this.zone][level] !== undefined) + level = Mapper.remappedLevels[this.zone][level]; - return level; - }, + return level; + }, - getZone: function() { + getZone: function() { return this.zone; }, - setZone: function(zone, level, noScroll) { - this.pins = []; - this.nCoords = 0; - if(this.floorPins[this.level]) - de(this.floorPins[this.level]); - this.floorPins = {}; - if(this.floorButton) - { - de(this.floorButton); - this.floorButton = null; - } + setZone: function(zone, level, noScroll) { + this.pins = []; + this.nCoords = 0; + if(this.floorPins[this.level]) + de(this.floorPins[this.level]); + this.floorPins = {}; + if(this.floorButton) + { + de(this.floorButton); + this.floorButton = null; + } - this.zone = zone; - this.level = level | 0; - this.updateMap(noScroll); + this.zone = zone; + this.level = level | 0; + this.updateMap(noScroll); - return true; - }, + return true; + }, - showFloors: function(event) - { - if(!Mapper.multiLevelZones[this.zone]) - return; + showFloors: function(event) + { + if(!Mapper.multiLevelZones[this.zone]) + return; - this.menu = []; - var _ = Mapper.multiLevelZones[this.zone]; - var src = g_zone_areas; + this.menu = []; + var _ = Mapper.multiLevelZones[this.zone]; + var src = g_zone_areas; - for(var i = 0; i < _.length; ++i) - { - var menuItem; - if(!src[this.zone]) - menuItem = [i, '[Level ' + (i + 1) + ']', this.setMap.bind(this, _[i], i, true)]; - else - menuItem = [i, src[this.zone][i], this.setMap.bind(this, _[i], i, true)]; + for(var i = 0; i < _.length; ++i) + { + var menuItem; + if(!src[this.zone]) + menuItem = [i, '[Level ' + (i + 1) + ']', this.setMap.bind(this, _[i], i, true)]; + else + menuItem = [i, src[this.zone][i], this.setMap.bind(this, _[i], i, true)]; - if(i == this.level || (this.level === undefined && i == 0)) - menuItem.checked = true; + if(i == this.level || (this.level === undefined && i == 0)) + menuItem.checked = true; - this.menu.push(menuItem); - } + this.menu.push(menuItem); + } - // Menu.showAtCursor(menu, event); - (Menu.showAtCursor.bind(this, event))() - }, + // Menu.showAtCursor(menu, event); + (Menu.showAtCursor.bind(this, event))() + }, - setMap: function(map, level, forceUpdate) - { - if(level != this.level) - { - if(this.floorPins[this.level]) - de(this.floorPins[this.level]); - if(this.floorPins[level]) - ae(this.span, this.floorPins[level]); - this.level = level; - } + setMap: function(map, level, forceUpdate) + { + if(level != this.level) + { + if(this.floorPins[this.level]) + de(this.floorPins[this.level]); + if(this.floorPins[level]) + ae(this.span, this.floorPins[level]); + this.level = level; + } - var type = g_locale.name; + var type = g_locale.name; - if(isset('g_ptr') && g_ptr) - type = 'ptr'; - else if(isset('g_beta') && g_beta) - type = 'beta'; - else if(isset('g_old') && g_old) - type = 'old'; + if(isset('g_ptr') && g_ptr) + type = 'ptr'; + else if(isset('g_beta') && g_beta) + type = 'beta'; + else if(isset('g_old') && g_old) + type = 'old'; - this.span.style.background = 'url(' + g_staticUrl + '/images/maps/' + type + '/' + Mapper.sizes[this.zoom][2] + '/' + map + '.jpg)'; + this.span.style.background = 'url(' + g_staticUrl + '/images/maps/' + type + '/' + Mapper.sizes[this.zoom][2] + '/' + map + '.jpg)'; - if(this.overlay) - this.overlaySpan.style.background = 'url(' + g_staticUrl + '/images/maps/overlay/' + Mapper.sizes[this.zoom][2] + '/' + map + '.png)'; + if(this.overlay) + this.overlaySpan.style.background = 'url(' + g_staticUrl + '/images/maps/overlay/' + Mapper.sizes[this.zoom][2] + '/' + map + '.png)'; - if(this.sZoneLink) - { - var zoneText = ''; - var zoneId = parseInt(this.zone); - var found = g_zones[zoneId] != null; - var src = g_zone_areas; - if(found) - { - if(this.zoneLink) - zoneText += '' + g_zones[zoneId] + ''; - if(Mapper.multiLevelZones[zoneId]) - { - if(this.zoneLink) - zoneText += ': '; - zoneText += (src[zoneId] ? src[zoneId][this.level] : 'Level ' + (this.level+1)); - } - g_setInnerHtml(this.sZoneLink, zoneText, 'div'); - if(this.zoneLink) - { - for(var i = 0; i < 9; ++i) - { - if(i == 4) continue; - this.sZoneLink.childNodes[i].firstChild.style.color = 'black'; - } - } - } - this.sZoneLink.style.display = found ? '' : 'none'; - } + if(this.sZoneLink) + { + var zoneText = ''; + var zoneId = parseInt(this.zone); + var found = g_zones[zoneId] != null; + var src = g_zone_areas; + if(found) + { + if(this.zoneLink) + zoneText += '' + g_zones[zoneId] + ''; + if(Mapper.multiLevelZones[zoneId]) + { + if(this.zoneLink) + zoneText += ': '; + zoneText += (src[zoneId] ? src[zoneId][this.level] : 'Level ' + (this.level+1)); + } + g_setInnerHtml(this.sZoneLink, zoneText, 'div'); + if(this.zoneLink) + { + for(var i = 0; i < 9; ++i) + { + if(i == 4) continue; + this.sZoneLink.childNodes[i].firstChild.style.color = 'black'; + } + } + } + this.sZoneLink.style.display = found ? '' : 'none'; + } - if(forceUpdate) - this.onMapUpdate && this.onMapUpdate(this); - }, + if(forceUpdate) + this.onMapUpdate && this.onMapUpdate(this); + }, - setObjectives: function(obj) - { - var startEnd = { start: 1, end: 1, startend: 1, sourcestart: 1, sourceend: 1 }; - for(var z in obj) - { - var zone = obj[z]; - if(g_mapperData[z] === undefined) - g_mapperData[z] = {}; - var objectiveIndex = {}; - var nextIndex = 0; - for(var l in zone.levels) - { - var level = zone.levels[l]; - var results = ShowOnMap.combinePins(level); - var pins = results[0]; - g_mapperData[z][l] = { count: pins.length, coords: [] }; - for(var i = 0; i < pins.length; ++i) - { - var tooltip = ShowOnMap.buildTooltip(pins[i].list); - g_mapperData[z][l].coords.push([pins[i].coord[0], pins[i].coord[1], { type: tooltip[1], url: tooltip[2], menu: tooltip[3], label: tooltip[0] }]); - } - } - } - }, + setObjectives: function(obj) + { + var startEnd = { start: 1, end: 1, startend: 1, sourcestart: 1, sourceend: 1 }; + for(var z in obj) + { + var zone = obj[z]; + if(g_mapperData[z] === undefined) + g_mapperData[z] = {}; + var objectiveIndex = {}; + var nextIndex = 0; + for(var l in zone.levels) + { + var level = zone.levels[l]; + var results = ShowOnMap.combinePins(level); + var pins = results[0]; + g_mapperData[z][l] = { count: pins.length, coords: [] }; + for(var i = 0; i < pins.length; ++i) + { + var tooltip = ShowOnMap.buildTooltip(pins[i].list); + g_mapperData[z][l].coords.push([pins[i].coord[0], pins[i].coord[1], { type: tooltip[1], url: tooltip[2], menu: tooltip[3], label: tooltip[0] }]); + } + } + } + }, - setZones: function(div, zones) - { - // div = $('#'+div); - div = ge(div); - if(!div || !zones || zones.length == 0 || !this.objectives) - return; + setZones: function(div, zones) + { + // div = $('#'+div); + div = ge(div); + if(!div || !zones || zones.length == 0 || !this.objectives) + return; - var zoneLinks = function(self, container, zoneList, zoneTypes) - { - var maxIdx = [false, -1]; - for(var i = 0; i < zoneList.length; ++i) - { - if(i > 0) span.append((i == zoneList.length-1 ? LANG.and : LANG.comma)); - var entry = null; - if(self.objectives[zoneList[i][0]].mappable > 0) - { - entry = ce('a'); + var zoneLinks = function(self, container, zoneList, zoneTypes) + { + var maxIdx = [false, -1]; + for(var i = 0; i < zoneList.length; ++i) + { + if(i > 0) ae(span, (i == zoneList.length-1 ? LANG.and : LANG.comma)); + var entry = null; + if(self.objectives[zoneList[i][0]].mappable > 0) + { + entry = ce('a'); entry.href = 'javascript:;'; ae(entry, ct(self.objectives[zoneList[i][0]].zone)); - entry.onClick = function(link, zone) { + entry.onClick = function(link, zone) { self.update({ zone: zone }); g_setSelectedLink(link, 'mapper'); }.bind(self, entry, zoneList[i][0]); - entry.isLink = true; - } - else - { - entry = ce('a'); + entry.isLink = true; + } + else + { + entry = ce('a'); entry.href = '?zone=' + zoneList[i][0]; ae(entry, ct(self.objectives[zoneList[i][0]].zone)); - g_addTooltip(entry, LANG.tooltip_zonelink); - } + g_addTooltip(entry, LANG.tooltip_zonelink); + } - if(zones.length > 1) - { - var types = zoneTypes[zoneList[i][0]]; - if(types.start && types.end) - { - entry.className += ' icontiny'; - entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/tiny/quest_startend.gif)'; - entry.style += ' padding-left', '20px'; - } - else if(types.start) - { - entry.className += ' icontiny'; - entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/tiny/quest_start.gif)'; - entry.style += ' padding-left', '14px'; - } - else if(types.end) - { - entry.className += ' icontiny'; - entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/tiny/quest_end.gif)'; - entry.style += ' padding-left', '16px'; - } - } - ae(container, entry); + if(zones.length > 1) + { + var types = zoneTypes[zoneList[i][0]]; + if(types.start && types.end) + { + entry.className += ' icontiny'; + entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/quest_startend.gif)'; + entry.style += ' padding-left', '20px'; + } + else if(types.start) + { + entry.className += ' icontiny'; + entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/quest_start.gif)'; + entry.style += ' padding-left', '14px'; + } + else if(types.end) + { + entry.className += ' icontiny'; + entry.style += ' background-image', 'url(' + g_staticUrl + '/images/icons/quest_end.gif)'; + entry.style += ' padding-left', '16px'; + } + } + ae(container, entry); - if(zoneList[i][1] > maxIdx[1]) - maxIdx = [entry, zoneList[i][1]]; - } - return maxIdx[0]; - }; + if(zoneList[i][1] > maxIdx[1]) + maxIdx = [entry, zoneList[i][1]]; + } + return maxIdx[0]; + }; - var getZoneList = function(zoneList, zoneTypes, type) - { - var ret = []; - for(var i = 0; i < zoneList.length; ++i) - { - if(zoneTypes[zoneList[i][0]][type]) - ret.push(zoneList[i]); - } - return ret; - }; + var getZoneList = function(zoneList, zoneTypes, type) + { + var ret = []; + for(var i = 0; i < zoneList.length; ++i) + { + if(zoneTypes[zoneList[i][0]][type]) + ret.push(zoneList[i]); + } + return ret; + }; - var typesByZone = {}; - var types = { start: [], end: [], objective: [] }; + var typesByZone = {}; + var types = { start: [], end: [], objective: [] }; - for(var zoneId in this.objectives) - { - if(typesByZone[zoneId] === undefined) - typesByZone[zoneId] = {}; - var zone = this.objectives[zoneId]; - for(var levelNum in zone.levels) - { - var level = zone.levels[levelNum]; - for(var i = 0; i < level.length; ++i) - { - if(level[i].point == 'start' || level[i].point == 'sourcestart') - { - types.start.push(zoneId); - typesByZone[zoneId].start = true; - } - else if(level[i].point == 'end' || level[i].point == 'sourceend') - { - types.end.push(zoneId); - typesByZone[zoneId].end = true; - } - else if(level[i].point == 'requirement' || level[i].point == 'sourcerequirement') - { - types.objective.push(zoneId); - typesByZone[zoneId].objective = true; - } - } - } - } + for(var zoneId in this.objectives) + { + if(typesByZone[zoneId] === undefined) + typesByZone[zoneId] = {}; + var zone = this.objectives[zoneId]; + for(var levelNum in zone.levels) + { + var level = zone.levels[levelNum]; + for(var i = 0; i < level.length; ++i) + { + if(level[i].point == 'start' || level[i].point == 'sourcestart') + { + types.start.push(zoneId); + typesByZone[zoneId].start = true; + } + else if(level[i].point == 'end' || level[i].point == 'sourceend') + { + types.end.push(zoneId); + typesByZone[zoneId].end = true; + } + else if(level[i].point == 'requirement' || level[i].point == 'sourcerequirement') + { + types.objective.push(zoneId); + typesByZone[zoneId].objective = true; + } + } + } + } - var h3 = ce('h3'); + var h3 = ce('h3'); ae(h3, ct(LANG.mapper_relevantlocs)); - ae(div, h3); - if(zones.length == 1 && this.missing == 0) - { - var span = ce('span'); + ae(div, h3); + if(zones.length == 1 && this.missing == 0) + { + var span = ce('span'); span.innerHTML = LANG.mapper_entiretyinzone.replace('$$', '' + this.objectives[zones[0][0]].zone + '.'); - ae(div, span); - this.update({ zone: zones[0][0] }); - } - else if(this.missing > 0) - { - var span = ce('span'); - var primaryLink = false, secondaryLink = false, tertiaryLink = false; - types.objective = array_unique(types.objective); - types.start = array_unique(types.start); - types.end = array_unique(types.end); - var startEnd = types.start.length > 0 && array_compare(types.start, types.end); - var startObj = types.start.length > 0 && array_compare(types.start, types.objective); - var endObj = types.end.length > 0 && array_compare(types.end, types.objective); + ae(div, span); + this.update({ zone: zones[0][0] }); + } + else if(this.missing > 0) + { + var span = ce('span'); + var primaryLink = false, secondaryLink = false, tertiaryLink = false; + types.objective = array_unique(types.objective); + types.start = array_unique(types.start); + types.end = array_unique(types.end); + var startEnd = types.start.length > 0 && array_compare(types.start, types.end); + var startObj = types.start.length > 0 && array_compare(types.start, types.objective); + var endObj = types.end.length > 0 && array_compare(types.end, types.objective); - var objZones = getZoneList(zones, typesByZone, 'objective'); - var startZones = getZoneList(zones, typesByZone, 'start'); - var endZones = getZoneList(zones, typesByZone, 'end'); + var objZones = getZoneList(zones, typesByZone, 'objective'); + var startZones = getZoneList(zones, typesByZone, 'start'); + var endZones = getZoneList(zones, typesByZone, 'end'); - if(startEnd && startObj) // everything in the same zones - { - var parts = LANG.mapper_happensin.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(startEnd && types.objective.length == 0) // starts and ends in x - { - var parts = LANG.mapper_objectives.sex.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(startEnd) // objectives in x, starts and ends in y - { - var parts = LANG.mapper_objectives.ox_sey.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, startZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[2]); - } - else if(startObj && types.end.length == 0) // objectives and starts in x - { - var parts = LANG.mapper_objectives.osx.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(startObj) // objectives and starts in x, ends in y - { - var parts = LANG.mapper_objectives.osx_ey.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, endZones, typesByZone); - ae(span, parts[2]); - } - else if(endObj && types.start.length == 0) // objectives and ends in x - { - var parts = LANG.mapper_objectives.oex.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(endObj) // objectives and ends in x, starts in y - { - var parts = LANG.mapper_objectives.oex_sy.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, startZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[1]); - } - else if(types.start.length > 0 && types.end.length > 0 && types.objective.length > 0) // objectives in x, starts in y, ends in z - { - var parts = LANG.mapper_objectives.ox_sy_ez.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, startZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[1]); - tertiaryLink = zoneLinks(this, span, endZones, typesByZone); - ae(span, parts[3]); - } - else if(types.start.length > 0 && types.end.length > 0) // starts in x, ends in y - { - var parts = LANG.mapper_objectives.sx_ey.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, startZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, endZones, typesByZone); - ae(span, parts[2]); - } - else if(types.start.length > 0 && types.objective.length > 0) // objectives in x, starts in y - { - var parts = LANG.mapper_objectives.ox_sy.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, startZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[2]); - } - else if(types.end.length > 0 && types.objective.length > 0) // objectives in x, ends in y - { - var parts = LANG.mapper_objectives.ox_ey.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, objZones, typesByZone); - ae(span, parts[1]); - secondaryLink = zoneLinks(this, span, endZones, typesByZone); - ae(span, parts[2]); - } - else if(types.start.length > 0) // starts in x - { - var parts = LANG.mapper_objectives.sx.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(types.end.length > 0) // ends in x - { - var parts = LANG.mapper_objectives.ex.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else if(types.objective.length > 0) // objectives in x - { - var parts = LANG.mapper_objectives.ox.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - else // wat? - { - var parts = LANG.mapper_happensin.split('$$'); - ae(span, ct(parts[0])); - primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - } - ae(div, span); + if(startEnd && startObj) // everything in the same zones + { + var parts = LANG.mapper_happensin.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(startEnd && types.objective.length == 0) // starts and ends in x + { + var parts = LANG.mapper_objectives.sex.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(startEnd) // objectives in x, starts and ends in y + { + var parts = LANG.mapper_objectives.ox_sey.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, startZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[2]); + } + else if(startObj && types.end.length == 0) // objectives and starts in x + { + var parts = LANG.mapper_objectives.osx.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(startObj) // objectives and starts in x, ends in y + { + var parts = LANG.mapper_objectives.osx_ey.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, endZones, typesByZone); + ae(span, parts[2]); + } + else if(endObj && types.start.length == 0) // objectives and ends in x + { + var parts = LANG.mapper_objectives.oex.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(endObj) // objectives and ends in x, starts in y + { + var parts = LANG.mapper_objectives.oex_sy.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, startZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[1]); + } + else if(types.start.length > 0 && types.end.length > 0 && types.objective.length > 0) // objectives in x, starts in y, ends in z + { + var parts = LANG.mapper_objectives.ox_sy_ez.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, startZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[1]); + tertiaryLink = zoneLinks(this, span, endZones, typesByZone); + ae(span, parts[3]); + } + else if(types.start.length > 0 && types.end.length > 0) // starts in x, ends in y + { + var parts = LANG.mapper_objectives.sx_ey.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, startZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, endZones, typesByZone); + ae(span, parts[2]); + } + else if(types.start.length > 0 && types.objective.length > 0) // objectives in x, starts in y + { + var parts = LANG.mapper_objectives.ox_sy.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, startZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[2]); + } + else if(types.end.length > 0 && types.objective.length > 0) // objectives in x, ends in y + { + var parts = LANG.mapper_objectives.ox_ey.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, objZones, typesByZone); + ae(span, parts[1]); + secondaryLink = zoneLinks(this, span, endZones, typesByZone); + ae(span, parts[2]); + } + else if(types.start.length > 0) // starts in x + { + var parts = LANG.mapper_objectives.sx.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(types.end.length > 0) // ends in x + { + var parts = LANG.mapper_objectives.ex.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else if(types.objective.length > 0) // objectives in x + { + var parts = LANG.mapper_objectives.ox.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + else // wat? + { + var parts = LANG.mapper_happensin.split('$$'); + ae(span, ct(parts[0])); + primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + } + ae(div, span); - if(primaryLink && primaryLink.isLink) - primaryLink.click(); - else if(secondaryLink && secondaryLink.isLink) - secondaryLink.click(); - else if(tertiaryLink && tertiaryLink.isLink) - tertiaryLink.click(); - } - else - { - var parts = LANG.mapper_happensin.split('$$'); - var span = ce('span'); + if(primaryLink && primaryLink.isLink) + primaryLink.click(); + else if(secondaryLink && secondaryLink.isLink) + secondaryLink.click(); + else if(tertiaryLink && tertiaryLink.isLink) + tertiaryLink.click(); + } + else + { + var parts = LANG.mapper_happensin.split('$$'); + var span = ce('span'); ae(span, ct(parts[0])); - var primaryLink = zoneLinks(this, span, zones, typesByZone); - ae(span, parts[1]); - ae(div, span); + var primaryLink = zoneLinks(this, span, zones, typesByZone); + ae(span, parts[1]); + ae(div, span); - if(primaryLink && primaryLink.isLink) - primaryLink.click(); - } - }, + if(primaryLink && primaryLink.isLink) + primaryLink.click(); + } + }, - setSize: function(w, h) { this.tempWidth = w; this.tempHeight = h; this.updateMap(true); }, + setSize: function(w, h) { this.tempWidth = w; this.tempHeight = h; this.updateMap(true); }, - getZoom: function() { return this.zoom; }, - setZoom: function(zoom, noScroll) { this.zoom = zoom; this.tempWidth = this.tempHeight = null; this.updateMap(noScroll); }, + getZoom: function() { return this.zoom; }, + setZoom: function(zoom, noScroll) { this.zoom = zoom; this.tempWidth = this.tempHeight = null; this.updateMap(noScroll); }, - toggleZoom: function(e) - { - this.zoom = 1 - this.zoom; - this.updateMap(true); + toggleZoom: function(e) + { + this.zoom = 1 - this.zoom; + this.updateMap(true); - if(e) - this.getMousePos(e); + if(e) + this.getMousePos(e); - if(this.sZoom) - { - if(this.sZoom.style.display == 'none') - this.sZoom.style.display = ''; - else - this.sZoom.style.display = 'none'; - } + if(this.sZoom) + { + if(this.sZoom.style.display == 'none') + this.sZoom.style.display = ''; + else + this.sZoom.style.display = 'none'; + } - if(this.zoom) - MapViewer.show({ mapper: this }); - }, + if(this.zoom) + MapViewer.show({ mapper: this }); + }, - getShow: function() { return this.show; }, - setShow: function(show) - { - this.show = show; + getShow: function() { return this.show; }, + setShow: function(show) + { + this.show = show; - var d = this.show ? '' : 'none'; + var d = this.show ? '' : 'none'; - for(var i in this.floorPins) - this.floorPins[i].style.display = d; - RedButton.setText(this.sToggle, (this.show ? LANG.mapper_hidepins : LANG.mapper_showpins)); - }, + for(var i in this.floorPins) + this.floorPins[i].style.display = d; + RedButton.setText(this.sToggle, (this.show ? LANG.mapper_hidepins : LANG.mapper_showpins)); + }, - toggleShow: function() - { - this.setShow(!this.show); - }, + toggleShow: function() + { + this.setShow(!this.show); + }, - getCoords: function() - { - var a = []; + getCoords: function() + { + var a = []; - for(var i in this.pins) - if(!this.pins[i].free) - a.push([this.pins[i].x, this.pins[i].y]); + for(var i in this.pins) + if(!this.pins[i].free) + a.push([this.pins[i].x, this.pins[i].y]); - return a; - }, + return a; + }, - clearPins: function() - { - for(var i in this.pins) - { - this.pins[i].style.display = 'none'; - this.pins[i].free = true; - } - }, + clearPins: function() + { + for(var i in this.pins) + { + this.pins[i].style.display = 'none'; + this.pins[i].free = true; + } + }, - setCoords: function(coords, coordsLevel) - { - var _; + setCoords: function(coords, coordsLevel) + { + var _; - var level, noLevel; - if(coordsLevel === undefined) - { - this.clearPins(); + var level, noLevel; + if(coordsLevel === undefined) + { + this.clearPins(); - if(coords.length) // Backward compatibility - { - noLevel = true; - level = 0; - } - else - { - for(var i in coords) - { - level = i; - break; - } + if(coords.length) // Backward compatibility + { + noLevel = true; + level = 0; + } + else + { + for(var i in coords) + { + level = i; + break; + } - if(level == null) return; + if(level == null) return; - coords = coords[level]; - } + coords = coords[level]; + } - level = parseInt(level); + level = parseInt(level); - if(!noLevel) - { - level = this.fixLevel(level); - this.level = level; - } - } - else - { - level = coordsLevel; - } + if(!noLevel) + { + level = this.fixLevel(level); + this.level = level; + } + } + else + { + level = coordsLevel; + } - this.nCoords = coords.length; + this.nCoords = coords.length; - for(var i in coords) - { - var - coord = coords[i], - opt = coord[2]; + for(var i in coords) + { + var + coord = coords[i], + opt = coord[2]; - if(coord[0] === undefined || coord[1] === undefined) - continue; + if(coord[0] === undefined || coord[1] === undefined) + continue; - _ = this.getPin(level); - _.x = coord[0]; - _.y = coord[1]; - _.style.left = _.x + '%'; - _.style.top = _.y + '%'; + _ = this.getPin(level); + _.x = coord[0]; + _.y = coord[1]; + _.style.left = _.x + '%'; + _.style.top = _.y + '%'; - if(this.editable) - _.a.onmouseup = this.delPin.bind(this, _); - else if(opt && opt.url) - { - _.a.href = Markup._fixUrl(opt.url); - _.a.rel = "np"; - _.a.style.cursor = 'pointer'; - } + if(this.editable) + _.a.onmouseup = this.delPin.bind(this, _); + else if(opt && opt.url) + { + _.a.href = Markup._fixUrl(opt.url); + _.a.rel = "np"; + _.a.style.cursor = 'pointer'; + } - if(opt && opt.tooltip) - { - _.a.tt = ''; - var printedFooter = false; - for(var name in opt.tooltip) - { - if(_.a.tt != '') - _.a.tt += '
'; - _.a.tt += '' + name + ' ($)
'; - for(var line in opt.tooltip[name].info) - _.a.tt += '
' + opt.tooltip[name].info[line] + '
'; - if(!printedFooter && opt.tooltip[name].footer) - { - _.a.tt += opt.tooltip[name].footer + '
'; - printedFooter = true; - } - } - } - else if(opt && opt.label) - _.a.tt = opt.label; - else - _.a.tt = '$'; + if(opt && opt.tooltip) + { + _.a.tt = ''; + var printedFooter = false; + for(var name in opt.tooltip) + { + if(_.a.tt != '') + _.a.tt += '
'; + _.a.tt += '' + name + ' ($)
'; + for(var line in opt.tooltip[name].info) + _.a.tt += '
' + opt.tooltip[name].info[line] + '
'; + if(!printedFooter && opt.tooltip[name].footer) + { + _.a.tt += opt.tooltip[name].footer + '
'; + printedFooter = true; + } + } + } + else if(opt && opt.label) + _.a.tt = opt.label; + else + _.a.tt = '$'; - if(opt && opt.menu) - { - _.a.menu = opt.menu; - //Menu.add(_.a, _.a.menu, { showAtCursor: true }); - _.a.onclick = function() { + if(opt && opt.menu) + { + _.a.menu = opt.menu; + //Menu.add(_.a, _.a.menu, { showAtCursor: true }); + _.a.onclick = function() { (Menu.show.bind(this))(); Tooltip.hide(); this.onmouseout = function() { @@ -859,241 +859,247 @@ Mapper.prototype = { sp(); return false; }.bind(_.a); - } + } - if(opt && opt.type) - _.className += ' pin-' + opt.type; + if(opt && opt.type) + _.className += ' pin-' + opt.type; - _.a.tt = str_replace(_.a.tt, '$', _.x.toFixed(1) + ', ' + _.y.toFixed(1)); + _.a.tt = str_replace(_.a.tt, '$', _.x.toFixed(1) + ', ' + _.y.toFixed(1)); - if(opt && opt.lines) - { - for(var p = 0, nPaths = opt.lines.length; p < nPaths; ++p) - { - if(coord[0] == opt.lines[p][0] && coord[1] == opt.lines[p][1]) - continue; + if(opt && opt.lines) + { + for(var p = 0, nPaths = opt.lines.length; p < nPaths; ++p) + { + if(coord[0] == opt.lines[p][0] && coord[1] == opt.lines[p][1]) + continue; - for(var s = 0, nSizes = Mapper.sizes.length; s < nSizes; ++s) - { - var size = Mapper.sizes[s]; - _ = Line(coord[0] * size[0] / 100, coord[1] * size[1] / 100, opt.lines[p][0] * size[0] / 100, opt.lines[p][1] * size[1] / 100, opt.type); - _.className += ' ' + size[2]; - ae(this.floorPins[level], _); - } - } - } - } + for(var s = 0, nSizes = Mapper.sizes.length; s < nSizes; ++s) + { + var size = Mapper.sizes[s]; + _ = Line(coord[0] * size[0] / 100, coord[1] * size[1] / 100, opt.lines[p][0] * size[0] / 100, opt.lines[p][1] * size[1] / 100, opt.type); + _.className += ' ' + size[2]; + ae(this.floorPins[level], _); + } + } + } + } - this.onPinUpdate && this.onPinUpdate(this); - }, + this.onPinUpdate && this.onPinUpdate(this); + }, - getLink: function() - { - var s = ''; + getLink: function() + { + var s = ''; - for(var i in this.pins) - if(!this.pins[i].free && this.pins[i].floor == this.level) - s += (this.pins[i].x < 10 ? '0' : '') + (this.pins[i].x < 1 ? '0' : '') + (this.pins[i].x * 10).toFixed(0) + (this.pins[i].y < 10 ? '0' : '') + (this.pins[i].y < 1 ? '0' : '') + (this.pins[i].y * 10).toFixed(0); + for(var i in this.pins) + if(!this.pins[i].free && this.pins[i].floor == this.level) + s += (this.pins[i].x < 10 ? '0' : '') + (this.pins[i].x < 1 ? '0' : '') + (this.pins[i].x * 10).toFixed(0) + (this.pins[i].y < 10 ? '0' : '') + (this.pins[i].y < 1 ? '0' : '') + (this.pins[i].y * 10).toFixed(0); - return (this.zone ? this.zone : '') + (Mapper.multiLevelZones[this.zone] && this.level != 0 ? '.' + this.level : '') + (s ? ':' + s : ''); - }, + return (this.zone ? this.zone : '') + (Mapper.multiLevelZones[this.zone] && this.level != 0 ? '.' + this.level : '') + (s ? ':' + s : ''); + }, - setLink: function(link, noScroll) - { - var a = []; + setLink: function(link, noScroll) + { + var a = []; - link = link.split(':'); + link = link.split(':'); - var zone = link[0]; - var level = 0; - if(zone.indexOf('.') != -1) - { - var zoneLevel = zone.split('.'); - zone = zoneLevel[0]; - level = parseInt(zoneLevel[1]); - } + var zone = link[0]; + var level = 0; + if(zone.indexOf('.') != -1) + { + var zoneLevel = zone.split('.'); + zone = zoneLevel[0]; + level = parseInt(zoneLevel[1]); + } - if(!this.setZone(zone, level, noScroll)) - return false; + if(!this.setZone(zone, level, noScroll)) + return false; - if(link.length == 2) - { - for(var i = 0; i < link[1].length; i += 6) - { - var x = link[1].substr(i, 3) / 10; - var y = link[1].substr(i + 3, 3) / 10; - if(isNaN(x) || isNaN(y)) break; - a.push([x, y]); - } - } + if(link.length == 2) + { + for(var i = 0; i < link[1].length; i += 6) + { + var x = link[1].substr(i, 3) / 10; + var y = link[1].substr(i + 3, 3) / 10; + if(isNaN(x) || isNaN(y)) break; + a.push([x, y]); + } + } - this.setCoords(a, level); + this.setCoords(a, level); - return true; - }, + return true; + }, - updateMap: function(noScroll) - { - this.parent.style.width = this.span.style.width = (this.tempWidth ? this.tempWidth : Mapper.sizes[this.zoom][0]) + 'px'; - this.parent.style.height = this.span.style.height = (this.tempHeight ? this.tempHeight : Mapper.sizes[this.zoom][1]) + 'px'; - if(!this.editable) - this.parent.style.cssFloat = this.parent.style.styleFloat = 'left'; + updateMap: function(noScroll) + { + this.parent.style.width = this.span.style.width = (this.tempWidth ? this.tempWidth : Mapper.sizes[this.zoom][0]) + 'px'; + this.parent.style.height = this.span.style.height = (this.tempHeight ? this.tempHeight : Mapper.sizes[this.zoom][1]) + 'px'; + if(!this.editable) + this.parent.style.cssFloat = this.parent.style.styleFloat = 'left'; - if(this.zone == '0') - this.span.style.background = 'black'; - else - { - var level = this.level; + if(this.zone == '0') + this.span.style.background = 'black'; + else + { + var level = this.level; - if(level == 1 && Mapper.onlyOneFloor[this.zone]) - level = 0; + if(level == 1 && Mapper.onlyOneFloor[this.zone]) + level = 0; - var map = this.zone + (level ? '-' + level : ''); - if(Mapper.multiLevelZones[this.zone]) - { - map = Mapper.multiLevelZones[this.zone][level]; - } - this.setMap(map, level); + var map = this.zone + (level ? '-' + level : ''); + if(Mapper.multiLevelZones[this.zone]) + { + map = Mapper.multiLevelZones[this.zone][level]; + } + this.setMap(map, level); - if(!this.floorButton && Mapper.multiLevelZones[this.zone]) - { - this.floorButton = _ = RedButton.create(LANG.mapper_floor, true, this.showFloors.bind(this)); + if(!this.floorButton && Mapper.multiLevelZones[this.zone]) + { + this.floorButton = _ = RedButton.create(LANG.mapper_floor, true, this.showFloors.bind(this)); - _.style['float'] = 'right'; + _.style['float'] = 'right'; - ns(_); - this.buttonDiv.appendChild(_); - } - else if(this.floorButton) - this.floorButton.style.display = Mapper.multiLevelZones[this.zone] ? '' : 'none'; - } + ns(_); + this.buttonDiv.appendChild(_); + } + else if(this.floorButton) + this.floorButton.style.display = Mapper.multiLevelZones[this.zone] ? '' : 'none'; + } - if(this.sToggle) - this.sToggle.style.display = (this.toggle && this.nCoords ? '' : 'none'); + if(this.sToggle) + this.sToggle.style.display = (this.toggle && this.nCoords ? '' : 'none'); - if(!noScroll) - g_scrollTo(this.parent, 3); + if(!noScroll) + g_scrollTo(this.parent, 3); // replacement start - // $('.line', this.floorPins[level]).hide(); - // $('.line.' + Mapper.sizes[this.zoom][2], this.floorPins[level]).show(); + // $('.line', this.floorPins[level]).hide(); + // $('.line.' + Mapper.sizes[this.zoom][2], this.floorPins[level]).show(); if (this.floorPins[level]) { var lines = this.floorPins[level].getElementsByClassName('line'); - for (i in lines) - lines[i].display = 'none'; + for (i in lines) { + if (i < lines.length) { + lines[i].style.display = 'none'; + } + } lines = this.floorPins[level].getElementsByClassName('line ' + Mapper.sizes[this.zoom][2]); - for (i in lines) - lines[i].display = 'block'; + for (i in lines) { + if (i < lines.length) { + lines[i].style.display = 'block'; + } + } } // end of replacement - this.onMapUpdate && this.onMapUpdate(this); - }, + this.onMapUpdate && this.onMapUpdate(this); + }, - cleanPin: function(i, floor) - { - var _ = this.pins[i]; - _.style.display = ''; - _.free = false; - _.className = 'pin'; + cleanPin: function(i, floor) + { + var _ = this.pins[i]; + _.style.display = ''; + _.free = false; + _.className = 'pin'; - _.a.onmousedown = rf; - _.a.onmouseup = rf; - _.a.href = 'javascript:;'; - _.a.style.cursor = 'default'; - _.floor = floor; + _.a.onmousedown = rf; + _.a.onmouseup = rf; + _.a.href = 'javascript:;'; + _.a.style.cursor = 'default'; + _.floor = floor; - return _; - }, + return _; + }, - getPin: function(floor) - { - for(var i = 0; i < this.pins.length; ++i) - if(this.pins[i].free) - return this.cleanPin(i, floor); + getPin: function(floor) + { + for(var i = 0; i < this.pins.length; ++i) + if(this.pins[i].free) + return this.cleanPin(i, floor); - var _ = ce('div'), a = ce('a'); - _.className = 'pin'; - _.appendChild(a); - _.a = a; - _.floor = floor; - a.onmouseover = this.pinOver; - a.onmouseout = Tooltip.hide; - a.onclick = sp; + var _ = ce('div'), a = ce('a'); + _.className = 'pin'; + _.appendChild(a); + _.a = a; + _.floor = floor; + a.onmouseover = this.pinOver; + a.onmouseout = Tooltip.hide; + a.onclick = sp; - this.pins.push(_); - this.cleanPin(this.pins.length - 1, floor); + this.pins.push(_); + this.cleanPin(this.pins.length - 1, floor); - if(!this.floorPins[floor]) - { - this.floorPins[floor] = ce('div'); - this.floorPins[floor].style.display = this.show ? '' : 'none'; - if(floor == this.level) - ae(this.span, this.floorPins[floor]); - } - ae(this.floorPins[floor], _); - return _; - }, + if(!this.floorPins[floor]) + { + this.floorPins[floor] = ce('div'); + this.floorPins[floor].style.display = this.show ? '' : 'none'; + if(floor == this.level) + ae(this.span, this.floorPins[floor]); + } + ae(this.floorPins[floor], _); + return _; + }, - addPin: function(e) - { - e = $E(e); - if(e._button >= 2) return; + addPin: function(e) + { + e = $E(e); + if(e._button >= 2) return; - this.getMousePos(e); - var p = this.getPin(this.level); + this.getMousePos(e); + var p = this.getPin(this.level); - p.x = this.mouseX; - p.y = this.mouseY; + p.x = this.mouseX; + p.y = this.mouseY; - p.style.left = p.x.toFixed(1) + '%'; - p.style.top = p.y.toFixed(1) + '%'; + p.style.left = p.x.toFixed(1) + '%'; + p.style.top = p.y.toFixed(1) + '%'; - p.a.onmouseup = this.delPin.bind(this, p); - p.a.tt = p.x.toFixed(1) + ', ' + p.y.toFixed(1); + p.a.onmouseup = this.delPin.bind(this, p); + p.a.tt = p.x.toFixed(1) + ', ' + p.y.toFixed(1); - this.onPinUpdate && this.onPinUpdate(this); + this.onPinUpdate && this.onPinUpdate(this); - return false; - }, + return false; + }, - delPin: function(pin, e) - { - e = $E(e); + delPin: function(pin, e) + { + e = $E(e); - pin.style.display = 'none'; - pin.free = true; - sp(e); + pin.style.display = 'none'; + pin.free = true; + sp(e); - this.onPinUpdate && this.onPinUpdate(this); + this.onPinUpdate && this.onPinUpdate(this); - return; - }, + return; + }, - pinOver: function() - { - Tooltip.show(this, this.tt, 4, 0); - }, + pinOver: function() + { + Tooltip.show(this, this.tt, 4, 0); + }, - getMousePos: function(e) - { - e = $E(e); + getMousePos: function(e) + { + e = $E(e); - var c = ac(this.parent); + var c = ac(this.parent); - var scroll = g_getScroll(); + var scroll = g_getScroll(); - this.mouseX = Math.floor((e.clientX + scroll.x - c[0] - 3) / Mapper.sizes[this.zoom][0] * 1000) / 10; - this.mouseY = Math.floor((e.clientY + scroll.y - c[1] - 3) / Mapper.sizes[this.zoom][1] * 1000) / 10; + this.mouseX = Math.floor((e.clientX + scroll.x - c[0] - 3) / Mapper.sizes[this.zoom][0] * 1000) / 10; + this.mouseY = Math.floor((e.clientY + scroll.y - c[1] - 3) / Mapper.sizes[this.zoom][1] * 1000) / 10; - if(this.mouseX < 0) this.mouseX = 0; - else if(this.mouseX > 100) this.mouseX = 100; + if(this.mouseX < 0) this.mouseX = 0; + else if(this.mouseX > 100) this.mouseX = 100; - if(this.mouseY < 0) this.mouseY = 0; - else if(this.mouseY > 100) this.mouseY = 100; + if(this.mouseY < 0) this.mouseY = 0; + else if(this.mouseY > 100) this.mouseY = 100; - if(this.mouse) - g_setTextNodes(this.sMouse, '(' + this.mouseX.toFixed(1) + ', ' + this.mouseY.toFixed(1) + ')'); - } + if(this.mouse) + g_setTextNodes(this.sMouse, '(' + this.mouseX.toFixed(1) + ', ' + this.mouseY.toFixed(1) + ')'); + } }; diff --git a/template/js/ShowOnMap.js b/template/js/ShowOnMap.js new file mode 100644 index 00000000..9c29bfd0 --- /dev/null +++ b/template/js/ShowOnMap.js @@ -0,0 +1,827 @@ + +var ShowOnMap = function(data, mapper) { + var self = this; + self.data = data; + + if (mapper == null) { + mapper = myMapper; + } + + self.mapper = mapper; + + self._legend = null; + self._legendLabel = null; + self._legendContents = null; + self._legendHorde = null; + self._legendAlliance = null; + self._menu = []; + + self.construct(); +}; + +ShowOnMap.prototype.onExpand = function() { + this.expanded = true; + location.replace(this.pound + '.map'); +}; + +ShowOnMap.prototype.onCollapse = function() { + this.expanded = false; + var hash = g_getHash(); + if (hash.indexOf('#show') == 0 && hash.indexOf('.map') > 0) { + this.pound = hash.substr(0, hash.indexOf('.map')); + location.replace(this.pound); + } +} + +ShowOnMap.prototype.construct = function() { + if (!this.data) { + return; + } + + var d = ge('som-generic'); + + var cmpFunc = function(a, b) { + return strcmp(a[1], b[1]); + }; + + var allianceMenu = []; + var hordeMenu = []; + for (var i in this.data) { + if (this.data[i].length === undefined) { + var submenu = []; + var allCoords = []; + var allLegend = {}; + var group = this.data[i]; + for (var p in group) { + var hasPaths = false; + for (var n = 0, len = group[p].length; n < len; ++n) { + if (group[p][n].paths) { + hasPaths = true; + break; + } + } + + var i2 = g_urlize(p); + if (group[p][0].name_enus !== undefined) { + i2 = g_urlize(group[p][0].name_enus); + } + + var coords = {}; + var legend = {}; + var entry = [i2]; + //pin.list.key = i; + var combined = ShowOnMap.combinePins(group[p], false, hasPaths); + var pins = combined[0]; + var nPins = combined[1]; + var nCoords = 0; + for (var n = 0; n < pins.length; ++n) { + var pin = pins[n]; + var tooltip = ShowOnMap.buildTooltip(pin.list); + var url = tooltip[2]; + var m = null; + if (url == 'javascript:;') { + m = tooltip[3]; + } + + if (pin.list.length == 1) { + url = (g_types[pin.list[0].type] && pin.list[0].id ? '?' + g_types[pin.list[0].type] + '=' + pin.list[0].id : ''); + } + if (i == 'rare' || i == 'herb' || i == 'vein') { + tooltip[1] = submenu.length + 1; + } + if (coords[pin.level] == undefined) { + coords[pin.level] = []; + } + coords[pin.level].push([ + pin.coord[0], + pin.coord[1], + { + url: url, + label: tooltip[0], + menu: m, + type: tooltip[1], + lines: pin.list[0].paths + } + ]); + nCoords++; + } + if (nCoords > 0) { + var url = (g_types[group[p][0].type] && group[p][0].id ? '?' + g_types[group[p][0].type] + '=' + group[p][0].id : ''); + legend[submenu.length+1] = [p, url]; + entry.push(p + sprintf(LANG.qty, nPins)); + entry.push(this.showStuff.bind(this, coords, [i, i2], legend)); + submenu.push(entry); + for (var l in coords) { + if (allCoords[l]) { + allCoords[l] = allCoords[l].concat(coords[l]); + } + else { + allCoords[l] = coords[l]; + } + } + allLegend[submenu.length] = [p, url]; + } + } + if (submenu.length > 0) { + submenu.sort(cmpFunc); + var entry = [i, LANG.som[i], this.showStuff.bind(this, allCoords, [i], allLegend), submenu]; + this._menu.push(entry); + } + } + else { + if (this.data[i].length == 0) { + continue; + } + + var hasPaths = false; + for (var n = 0, len = this.data[i].length; n < len; ++n) { + if (this.data[i][n].paths) { + hasPaths = true; + break; + } + } + + var entry = [i]; + var coords = {}; + var hordeCoords = {}, hordeDailyCoords = {}; + var allianceCoords = {}, allianceDailyCoords = {}; + var legend = {}; + var hordeLegend = {}; + var allianceLegend = {}; + var combined = ShowOnMap.combinePins(this.data[i], false, hasPaths); + var nPins = combined[1]; + var nCoords = 0, nHordeCoords = 0, nHordeDailyCoords = 0, nAllianceCoords = 0, nAllianceDailyCoords = 0; + + var processPins = function(id, pins) { + for (var n = 0; n < pins.length; ++n) { + var pin = pins[n]; + var idx = id; + pin.list.key = i; + var tooltip = ShowOnMap.buildTooltip(pin.list, (id == 'hordedailyquests' || id == 'alliancedailyquests') ? true : false); + var url = tooltip[2]; + var m = null; + if (url == 'javascript:;') { + m = tooltip[3]; + } + + if (pin.list.length == 1) { + url = (g_types[pin.list[0].type] && pin.list[0].id ? '?' + g_types[pin.list[0].type] + '=' + pin.list[0].id : ''); + } + var coord = [ + pin.coord[0], + pin.coord[1], + { + url: url, + label: tooltip[0], + menu: m, + type: tooltip[1], + lines: pin.list[0].paths + } + ]; + if (coords[pin.level] == undefined) { + coords[pin.level] = []; + hordeCoords[pin.level] = []; + hordeDailyCoords[pin.level] = []; + allianceCoords[pin.level] = []; + allianceDailyCoords[pin.level] = []; + } + + if (idx != 'rare' && idx != 'spirithealer' && idx != 'book' && idx != 'forge' && idx != 'anvil' && idx != 'hordequests' && idx != 'alliancequests' && idx != 'hordedailyquests' && idx != 'alliancedailyquests' && idx != 'boss') { + if (tooltip[1] == 2 || tooltip[1] == 0) { + if (tooltip[1] == 2) { + hordeLegend[2] = [LANG.som_legend_horde, null]; + } + else { + hordeLegend[0] = [LANG.som_legend_neutral, null]; + } + hordeCoords[pin.level].push(coord); + nHordeCoords++; + } + if (tooltip[1] == 3 || tooltip[1] == 0) { + if (tooltip[1] == 3) { + allianceLegend[3] = [LANG.som_legend_alliance, null]; + } + else { + allianceLegend[0] = [LANG.som_legend_neutral, null]; + } + allianceCoords[pin.level].push(coord); + nAllianceCoords++; + } + } + else if (idx == 'hordequests') { + idx = 'quest'; + if (tooltip[1] == 2) { + hordeLegend[2] = [LANG.som_legend_horde, null]; + } + else { + hordeLegend[0] = [LANG.som_legend_neutral, null]; + } + hordeCoords[pin.level].push(coord); + nHordeCoords++; + } + else if (idx == 'hordedailyquests') { + idx = 'daily'; + if (tooltip[1] == 2) { + hordeLegend[2] = [LANG.som_legend_horde, null]; + } + else { + hordeLegend[0] = [LANG.som_legend_neutral, null]; + } + hordeDailyCoords[pin.level].push(coord); + nHordeDailyCoords++; + } + else if (idx == 'alliancequests') { + idx = 'quest'; + if (tooltip[1] == 3) { + allianceLegend[3] = [LANG.som_legend_alliance, null]; + } + else { + allianceLegend[0] = [LANG.som_legend_neutral, null]; + } + allianceCoords[pin.level].push(coord); + nAllianceCoords++; + } + else if (idx == 'alliancedailyquests') { + idx = 'daily'; + if (tooltip[1] == 3) { + allianceLegend[3] = [LANG.som_legend_alliance, null]; + } + else { + allianceLegend[0] = [LANG.som_legend_neutral, null]; + } + allianceDailyCoords[pin.level].push(coord); + nAllianceDailyCoords++; + } + else { + coords[pin.level].push(coord); + nCoords++; + } + } + return idx; + }; + var idx = processPins(i, combined[0]); + if (i == 'alliancequests') { + var allianceDailyPins = ShowOnMap.combinePins(this.data[i], true); + if (allianceDailyPins[1] > 0) { + processPins('alliancedailyquests', allianceDailyPins[0]); + } + } + else if (i == 'hordequests') { + var hordeDailyPins = ShowOnMap.combinePins(this.data[i], true); + if (hordeDailyPins[1] > 0) { + processPins('hordedailyquests', hordeDailyPins[0]); + } + } + + if (idx == 'rare') { + nPins = this.data[idx].length; + } + else if (idx == 'forge' || idx == 'anvil') { + nPins = combined[0].length; + } + + if (nCoords > 0) { + var entry = [idx, LANG.som[idx] + sprintf(LANG.qty, nPins), this.showStuff.bind(this, coords, [idx], legend)]; + this._menu.push(entry); + } + if (nHordeCoords > 0) { + var entry = [idx, LANG.som[idx] + sprintf(LANG.qty, nHordeCoords), this.showStuff.bind(this, hordeCoords, ['horde', idx], hordeLegend), null]; + if (idx == 'quest') { + entry.push({ tinyIcon: 'quest_start' }); + + if (nHordeDailyCoords > 0) { + hordeMenu.push(entry); + entry = ['daily', LANG.som.daily + sprintf(LANG.qty, nHordeDailyCoords), this.showStuff.bind(this, hordeDailyCoords, ['horde', 'daily'], hordeLegend), null, { tinyIcon: 'quest_start_daily' }]; + } + } + hordeMenu.push(entry); + } + if (nAllianceCoords > 0) { + var entry = [idx, LANG.som[idx] + sprintf(LANG.qty, nAllianceCoords), this.showStuff.bind(this, allianceCoords, ['alliance', idx], allianceLegend), null]; + if (idx == 'quest') { + entry.push({ tinyIcon: 'quest_start' }); + + if (nAllianceDailyCoords > 0) { + allianceMenu.push(entry); + entry = ['daily', LANG.som.daily + sprintf(LANG.qty, nAllianceDailyCoords), this.showStuff.bind(this, allianceDailyCoords, ['alliance', 'daily'], allianceLegend), null, { tinyIcon: 'quest_start_daily' }]; + } + } + allianceMenu.push(entry); + } + } + } + + allianceMenu.sort(cmpFunc); + hordeMenu.sort(cmpFunc); + this._menu.sort(cmpFunc); + + if (hordeMenu.length > 0) { + this._menu.unshift(['horde', LANG.som.horde, '', hordeMenu, { tinyIcon: 'side_horde' }]); + } + if (allianceMenu.length > 0) { + this._menu.unshift(['alliance', LANG.som.alliance, '', allianceMenu, { tinyIcon: 'side_alliance' }]); + } + + var nothing = [-1, LANG.som_nothing, this.showStuff.bind(this, [], [-1], {})]; + nothing.checked = true; + this._menu.push(nothing); + + var redButton = RedButton.create(LANG.showonmap, true); + redButton.className += ' mapper-som-button'; + // Menu.add(redButton, this._menu, { showAtCursor: true }); + redButton.menu = this._menu; + redButton.onclick = function() { + (Menu.show.bind(this))(); + Tooltip.hide(); + this.onmouseout = function() { + Menu.hide(); + this.onmouseout = Tooltip.hide(); + }.bind(this); + sp(); + return false; + }.bind(redButton); + // replace end + ae(d, redButton); + + var clear; + if (!this._legend) { + this._legend = ce('div'); + this._legend.className = 'mapper-legend'; + this._legend.style.display = 'none'; + + var d2 = ce('div'); + d2.className = 'mapper-legend-container'; + + this._legendLabel = ce('b') + ae(this._legendLabel, ct(LANG.som_legend)); + ae(d2, this._legendLabel); + + this._legendContents = ce('div'); + this._legendContents.style.cssFloat = 'right'; + ae(d2, this._legendContents); + + var clear = ce('div'); + clear.style.clear = 'right'; + ae(d2, clear); + + ae(this._legend, d2); + } + ae(d, this._legend); + + var clear = ce('div'); + clear.style.clear = 'left'; + ae(d, clear); + + var components = []; + var hash = g_getHash(); + if (hash.indexOf('#show:') != -1) { + components = hash.split('.'); + } + else if (this.data.instance) { + components.push('#show:boss'); + } + + if (components.length > 0) { + if (components.length == 2 && components[1] == 'map') { + this.expanded = true; + this.mapper.toggleZoom(); + } + + var path = components[0].split(':'); + if (path.length < 2) { + return; + } + + var menu = this._menu; + for (var n = 1; n < path.length; ++n) { + var maxToRecurse = path.length - 1; + for (var p = 0; p < menu.length; ++p) { + if (menu[p][0] == path[n]) { + if (menu[p][3] && n < maxToRecurse) { + menu = menu[p][3]; + } + else { + menu = menu[p]; + } + break; + } + } + } + if (menu && menu[2] && menu[2].constructor && menu[2].call && menu[2].apply) { // sarjuuk: check if menu[2] is function + menu[2](); + } + } +}; + +ShowOnMap.prototype.setLegend = function(info) { + ee(this._legendContents); + + var div = ce('div'); + var count = 0; + for (var i in info) { + var sp = ce('span'); + sp.className = 'mapper-pin mapper-pin-' + i + ' mapper-legend-pin'; + + if (info[i][1]) { + var a = ce('a'); + a.href = info[i][1]; + ae(a, ct(info[i][0])); + ae(sp, a); + } + else { + sp.innerText = info[i][0]; + } + + ae(div, sp); + if ((++count) % 4 == 0) { + ae(div, ce('br')); + } + } + + ae(this._legendContents, div); +}; + +ShowOnMap.prototype.showStuff = function(coords, path, legendInfo) { + this.mapper.update({zone: g_pageInfo.id, coords: coords, preservelevel: true}); + this.setLegend(legendInfo); + this.checkMenu(path); + + if (path.length == 1 && path[0] == -1) { + this.pound = ''; + location.replace('#.'); + return; + } + + this.pound = '#show:' + path.join(':'); + if (this.pound != '#show:boss') { + location.replace(this.pound + (this.expanded ? '.map' : '')); + } +}; + +ShowOnMap.prototype.clearChecks = function(menu) { + for (var i = 0; i < menu.length; ++i) { + menu[i].checked = false; + if (menu[i][3] && menu[i][3].length > 0) { + this.clearChecks(menu[i][3]); + } + } + this._legend.style.display = 'none'; +}; + +ShowOnMap.prototype.checkMenu = function(path) { + this.clearChecks(this._menu); + if (path[0] != -1) { + this._legend.style.display = 'block'; + } + else { + this._legend.style.display = 'none'; + } + + var menu = this._menu; + var label = []; + for (var i = 0; i < path.length; ++i) { + for (var j = 0; j < menu.length; ++j) { + if (menu[j][0] == path[i]) { + menu[j].checked = true; + label.push([menu[j][0], menu[j][1]]); + menu = menu[j][3]; + break; + } + } + } + + var maxLabel = label.length - 1; + var str = ''; + var singlePinOptions = { 'rare': true, 'herb': true, 'vein': true }; + for (var i = 0; i < label.length; ++i) { + if (i > 0 && singlePinOptions[label[0][0]]) { + /* unsure, kept for reference, replacement below + var span = $('span', this._legendContents); + span.removeClass('mapper-legend-pin'); + span.append($('', { text: ' ' + label[i][1].substr(label[i][1].lastIndexOf('(')) })); + */ + var span = gE(this._legendContents[0], 'span')[0]; + span.className.replace(/\mapper-legend-pin\b/,''); + var b = ce('b'); + b.innerText = ' ' + label[i][1].substr(label[i][1].lastIndexOf('(')); + ae(span, b); + // replace end + } + else { + if (i == maxLabel) { + str += ''; + } + else { + str += ''; + } + str += label[i][1] + ''; + } + } + this._legendLabel.innerHtml = str; +}; + +ShowOnMap.combinePins = function(pins, dailyOnly, hasPaths) { + var combined = {}; + var coord = null, tmpCoord = null; + var x, y; + var nPins = 0; + + var getCoord = function(coord, tight) { + var x = Math.floor(coord[0]); + var y = Math.floor(coord[1]); + if (!tight) { + if (x % 2 == 1) { + x += 1; + } + if (y % 2 == 1) { + y += 1; + } + } + + if (combined[x] === undefined) { + combined[x] = {}; + } + if (combined[x][y] === undefined) { + combined[x][y] = []; + } + + return [x, y]; + } + + for (var p = 0; p < pins.length; ++p) { + var pin = pins[p]; + if (dailyOnly) { + if (!pin.quests) { + continue; + } + var noDaily = true; + for (var n = 0; n < pin.quests.length; ++n) { + if (pin.quests[n].daily) { + noDaily = false; + break; + } + } + if (noDaily) { + continue; + } + } + else if (hasPaths) { + // Don't combine pins that have paths + coord = getCoord([pin.id, 0], true); + x = coord[0]; y = coord[1]; + var newPin = dO(pin); + newPin.coord = pin.coords[0]; + + combined[x][y].push(newPin); + nPins++; + + continue; + } + + if (pin.point == 'start' || pin.point == 'end') { + coord = getCoord(pin.coord); + x = coord[0]; y = coord[1]; + if (combined[x][y].length > 3) { + var temp = combined[x][y]; + combined[x][y] = []; + for (var i = 0; i < temp.length; ++i) { + tmpCoord = getCoord(temp[i].coord, true); + combined[tmpCoord[0]][tmpCoord[1]].push(temp[i]); + } + } + + combined[x][y].push(pin); + nPins++; + } + else { + for (var c = 0; c < pin.coords.length; ++c) { + coord = getCoord(pin.coords[c]); + x = coord[0]; y = coord[1]; + var newPin = dO(pin); + newPin.coord = pin.coords[c]; + + if (combined[x][y].length > 3) { + var temp = combined[x][y]; + combined[x][y] = []; + for (var i = 0; i < temp.length; ++i) { + tmpCoord = getCoord(temp[i].coord, true); + combined[tmpCoord[0]][tmpCoord[1]].push(temp[i]); + } + } + + combined[x][y].push(newPin); + nPins++; + } + } + } + + var complete = []; + for (x in combined) { + for (y in combined[x]) { + complete.push({ + coord: [combined[x][y][0].coord[0], combined[x][y][0].coord[1]], + level: combined[x][y][0].level, + list: combined[x][y] + }); + } + } + + return [complete, nPins]; +}; + +ShowOnMap.buildTooltip = function(list, dailyOnly) { + var str = ''; + var url = ''; + var menu = []; + var pinType = -1; + var uniques = {}; + var nUniques = 0; + var pointTypes = {}; + var objType = 1; + + for (var n = 0; n < list.length; ++n) { + var obj = list[n]; + url = (g_types[obj.type] && obj.id ? '?' + g_types[obj.type] + '=' + obj.id : ''); + var key = url + obj.item; + var pointKey = url + obj.point; + if (!uniques[key]) { + uniques[key] = { + url: url, + obj: obj, + coords: [obj.coord], + all: [obj] + }; + nUniques++; + } + else { + if (!pointTypes[pointKey]) { + uniques[key].all.push(obj); + } + uniques[key].coords.push(obj.coord); + } + pointTypes[pointKey] = 1; + } + + var n = 0; + for (var key in uniques) { + var url = uniques[key].url; + var all = uniques[key].all; + var obj = uniques[key].obj; + var coords = uniques[key].coords; + if (n > 0) { + str += '
'; + } + menu.push([n++, obj.name, url]); + objType = obj.type; + + if (!obj.point) { + if ((obj.reacthorde == 1 && obj.reactalliance < 1) || obj.side == 2) { + if (pinType == 2 || pinType == -1) { + pinType = 2; + } + else { + pinType = 0; + } + } + else if ((obj.reactalliance == 1 && obj.reacthorde < 1) || obj.side == 1) { + if (pinType == 3 || pinType == -1) { + pinType = 3; + } + else { + pinType = 0; + } + } + else { + pinType = 0; + } + } + + str += '' + obj.name + ''; + if (coords.length > 0) { + str += ' (' + coords[0][0] + ', ' + coords[0][1] + ')
'; + } + + if (obj.quests) { + if (obj.quests.length > 1) { + str += LANG.som_startsquestpl; + } + else { + str += LANG.som_startsquest; + } + str += '
'; + for (var q = 0; q < obj.quests.length; ++q) { + var quest = obj.quests[q]; + if (dailyOnly && !quest.daily) { + continue; + } + str += '[' + quest.level + '] ' + quest.name + ((quest.series && !quest.first) ? '(*)' : '') + ((quest.category < 0 && g_quest_sorts[quest.category]) ? ' ' + g_quest_sorts[quest.category] + '' : '') + '
'; + } + str += '
'; + } + else if (obj.description) { + str += obj.description + '
'; + } + else if (obj.point) { + for (var n = 0; n < all.length; ++n) { + var o = all[n]; + switch (o.point) { + case 'start': + str += LANG.mapper_startsquest + '
'; + if (pinType == 'end') { + pinType = 'startend'; + } + else if (pinType != 'startend') { + pinType = 'start'; + } + break; + case 'end': + str += LANG.mapper_endsquest + '
'; + if (pinType == 'start') { + pinType = 'startend'; + } + else if (pinType != 'startend') { + pinType = 'end'; + } + break; + case 'sourcestart': + str += LANG.mapper_sourcestart + '
'; + str += '
' + o.item + '
'; + if (pinType == 'end') { + pinType = 'startend'; + } + else if (pinType != 'startend') { + pinType = 'start'; + } + break; + case 'sourceend': + str += LANG.mapper_sourceend + '
'; + str += '
' + o.item + '
'; + if (pinType == 'start') { + pinType = 'startend'; + } + else if (pinType != 'startend') { + pinType = 'end'; + } + break; + case 'requirement': + str += LANG.mapper_requiredquest + '
'; + if (pinType == -1) { + pinType = o.objective; + } + break; + case 'sourcerequirement': + str += LANG.mapper_sourcereq + '
'; + str += '
' + o.item + '
'; + if (pinType == -1) { + pinType = o.objective; + } + break; + } + } + } + } + + str += '
'; + if (list.length == 1) { + str += (list[0].type == 1 ? LANG.som_viewnpc : (list[0].type == 2 ? LANG.som_viewobj : '')); + } + else if (nUniques == 1) { + str += (objType == 1 ? LANG.som_viewnpc : (objType == 2 ? LANG.som_viewobj : '')); + } + else { + str += '
' + LANG.som_view; + } + str += '
'; + + var ret = []; + ret.push(str); + ret.push(pinType); + if (list.length == 1 || nUniques == 1) { + ret.push(url); + ret.push(null); + } + else { + ret.push('javascript:;'); + ret.push(menu); + } + + return ret; +}; + + +// !sarjuuk: tempfix! +Markup._fixUrl = function(url) +{ + if(!url) return ''; + + // Make local URLs absolute + var firstChar = url.charAt(0); + if(firstChar == '/' || firstChar == '?') + { + url = url.replace(/^[\/\?]+/, ''); + + url = '?' + url; + } + + return url; +} diff --git a/template/js/global.js b/template/js/global.js index d83dfcac..9735d9b8 100644 --- a/template/js/global.js +++ b/template/js/global.js @@ -2329,16 +2329,26 @@ function g_isLeftClick(a) { a = $E(a); return (a && a._button == 1) } -function g_createOrRegex(c) { - var e = c.split(" "), - d = ""; - for (var b = 0, a = e.length; b < a; ++b) { - if (b > 0) { - d += "|" + +function g_createOrRegex(search, negativeGroup) { + search = search.replace(/(\(|\)|\|\+|\*|\?|\$|\^)/g, '\\$1'); + var + parts = search.split(' '), + strRegex= ''; + + for (var j = 0, len = parts.length; j < len; ++j) { + if (j > 0) { + strRegex += '|'; } - d += e[b] + strRegex += parts[j]; } - return new RegExp("(" + d + ")", "gi") + + // The additional group is necessary so we dont replace %s + return new RegExp((negativeGroup != null ? '(' + negativeGroup + ')?' : '') + '(' + strRegex + ')', 'gi'); +} + +function g_getHash() { + return '#' + decodeURIComponent(location.href.split('#')[1] || ''); } DomContentLoaded.addEvent(function () { @@ -7175,9 +7185,9 @@ Listview.funcBox = { p.value = b.response; p.rows = 3; p.style.height = "6em"; - h.append(B); - h.append(w); - h.append(p) + ae(h, B); + ae(h, w); + ae(h, p) } ae(m, h); ae(m, ce('div')); @@ -10138,205 +10148,217 @@ Listview.templates = { nItemsPerPage: -1, searchable: 1, filtrable: 1, - columns: [{ - id: "name", - name: LANG.name, - type: "text", - align: "left", - value: "name", - compute: function(c, e) { - var b = ce("a"); - b.style.fontFamily = "Verdana, sans-serif"; - b.href = this.template.getItemLink(c); - ae(b, ct(c.name)); - if (c.expansion) { - var d = ce("span"); - d.className = (c.expansion == 1 ? "bc-icon": "wotlk-icon"); - ae(d, b); - ae(e, d) - } else { - ae(e, b) - } - }, - getVisibleText: function(a) { - var b = a.name; - if (a.expansion == 1) { - b += " bc" - } else { - if (a.expansion == 2) { - b += "wotlk wrath" - } - if (a.instance == 5 || a.instance == 8) { - b += " heroic" + + columns: [ + { + id: 'name', + name: LANG.name, + type: 'text', + align: 'left', + value: 'name', + compute: function(zone, td) { + var a = ce('a'); + a.style.fontFamily = 'Verdana, sans-serif'; + a.href = this.template.getItemLink(zone); + ae(a, ct(zone.name)); + if (zone.expansion) { + var sp = ce('span'); + sp.className = g_GetExpansionClassName(zone.expansion); + ae(sp, a); + ae(td, sp); } - } - return b - } - }, - { - id: "level", - name: LANG.level, - type: "range", - width: "10%", - getMinValue: function(a) { - return a.minlevel - }, - getMaxValue: function(a) { - return a.maxlevel - }, - compute: function(a, b) { - if (a.minlevel > 0 && a.maxlevel > 0) { - if (a.minlevel != a.maxlevel) { - return a.minlevel + LANG.hyphen + a.maxlevel - } else { - return a.minlevel - } - } - }, - sortFunc: function(d, c, e) { - if (e > 0) { - return strcmp(d.minlevel, c.minlevel) || strcmp(d.maxlevel, c.maxlevel) - } else { - return strcmp(d.maxlevel, c.maxlevel) || strcmp(d.minlevel, c.minlevel) - } - } - }, - { - id: "players", - name: LANG.players, - type: "text", - hidden: true, - compute: function(a, d) { - if (a.instance > 0) { - var b = ce("span"); - if (a.nplayers == -2) { - a.nplayers = "10/25" - } - var c = ""; - if (a.nplayers) { - if (a.instance == 4) { - c += sprintf(LANG.lvzone_xvx, a.nplayers, a.nplayers) - } else { - c += sprintf(LANG.lvzone_xman, a.nplayers) - } - } - ae(b, ct(c)); - ae(d, b) - } - }, - getVisibleText: function(a) { - if (a.instance > 0) { - if (a.nplayers == -2) { - a.nplayers = "10/25" - } - var b = ""; - if (a.nplayers && ((a.instance != 2 && a.instance != 5) || a.nplayers > 5)) { - if (a.instance == 4) { - b += sprintf(LANG.lvzone_xvx, a.nplayers, a.nplayers) - } else { - b += sprintf(LANG.lvzone_xman, a.nplayers) - } - } - return b - } - }, - sortFunc: function(d, c, e) { - return strcmp(d.nplayers, c.nplayers) - } - }, - { - id: "territory", - name: LANG.territory, - type: "text", - width: "13%", - compute: function(a, c) { - var b = ce("span"); - switch (a.territory) { - case 0: - b.className = "alliance-icon"; - break; - case 1: - b.className = "horde-icon"; - break; - case 4: - b.className = "ffapvp-icon"; - break - } - ae(b, ct(g_zone_territories[a.territory])); - ae(c, b) - }, - getVisibleText: function(a) { - return g_zone_territories[a.territory] - }, - sortFunc: function(d, c, e) { - return strcmp(g_zone_territories[d.territory], g_zone_territories[c.territory]) - } - }, - { - id: "instancetype", - name: LANG.instancetype, - type: "text", - compute: function(a, d) { - if (a.instance > 0) { - var b = ce("span"); - if ((a.instance >= 1 && a.instance <= 5) || a.instance == 7 || a.instance == 8) { - b.className = "instance-icon" + a.instance - } - if (a.nplayers == -2) { - a.nplayers = "10/25" - } - var c = g_zone_instancetypes[a.instance]; - if (a.heroicLevel) { - var f = ce("span"); - f.className = "heroic-icon"; - g_addTooltip(f, LANG.tooltip_heroicmodeavailable + LANG.qty.replace("$1", a.heroicLevel)); - ae(e, f); - } - ae(b, ct(c)); - ae(d, b) - } - }, - getVisibleText: function(a) { - if (a.instance > 0) { - var b = g_zone_instancetypes[a.instance]; - if (a.nplayers && ((a.instance != 2 && a.instance != 5) || a.nplayers > 5)) { - if (a.instance == 4) { - b += " " + sprintf(LANG.lvzone_xvx, a.nplayers, a.nplayers) - } else { - b += " " + sprintf(LANG.lvzone_xman, a.nplayers) - } - } - if (a.instance == 5 || a.instance == 8) { - b += " heroic" - } - return b - } - }, - sortFunc: function(d, c, e) { - return strcmp(g_zone_instancetypes[d.instance], g_zone_instancetypes[c.instance]) || strcmp(d.instance, c.instance) || strcmp(d.nplayers, c.nplayers) - } - }, - { - id: "category", - name: LANG.category, - type: "text", - width: "15%", - compute: function(c, d) { - d.className = "small q1"; - var b = ce("a"); - b.href = "?zones=" + c.category; - ae(b, ct(g_zone_categories[c.category])); - ae(d, b) - }, - getVisibleText: function(a) { - return g_zone_categories[a.category] - }, - sortFunc: function(d, c, e) { - return strcmp(g_zone_categories[d.category], g_zone_categories[c.category]) - } - }], - getItemLink: function(a) { - return "?zone=" + a.id + else { + ae(td, a); + } + }, + getVisibleText: function(zone) { + var buff = zone.name + Listview.funcBox.getExpansionText(zone); + + if (zone.instance == 5 || zone.instance == 8) { + buff += ' heroic'; + } + + return buff; + } + }, + { + id: 'level', + name: LANG.level, + type: 'range', + width: '10%', + getMinValue: function(zone) { + return zone.minlevel; + }, + getMaxValue: function(zone) { + return zone.maxlevel; + }, + compute: function(zone, td) { + if (zone.minlevel > 0 && zone.maxlevel > 0) { + if (zone.minlevel != zone.maxlevel) { + return zone.minlevel + LANG.hyphen + zone.maxlevel; + } + else { + return zone.minlevel; + } + } + }, + sortFunc: function(a, b, col) { + if (col > 0) { + return strcmp(a.minlevel, b.minlevel) || strcmp(a.maxlevel, b.maxlevel); + } + else { + return strcmp(a.maxlevel, b.maxlevel) || strcmp(a.minlevel, b.minlevel); + } + } + }, + { + id: 'players', + name: LANG.players, + type: 'text', + hidden: true, + compute: function(zone, td) { + if (zone.instance > 0) { + var sp = ce('span'); + + if (zone.nplayers == -2) { + zone.nplayers = '10/25'; + } + + var buff = ''; + if (zone.nplayers) { + if (zone.instance == 4) { + buff += sprintf(LANG.lvzone_xvx, zone.nplayers, zone.nplayers); + } + else { + buff += sprintf(LANG.lvzone_xman, zone.nplayers); + } + } + + ae(sp, ct(buff)); + ae(td, sp); + } + }, + getVisibleText: function(zone) { + if (zone.instance > 0) { + if (zone.nplayers == -2) { + zone.nplayers = '10/25'; + } + + var buff = ''; + if (zone.nplayers && ((zone.instance != 2 && zone.instance != 5) || zone.nplayers > 5)) { + if (zone.instance == 4) { + buff += sprintf(LANG.lvzone_xvx, zone.nplayers, zone.nplayers); + } + else { + buff += sprintf(LANG.lvzone_xman, zone.nplayers); + } + } + return buff; + } + }, + sortFunc: function(a, b, col) { + return strcmp(a.nplayers, b.nplayers); + } + }, + { + id: 'territory', + name: LANG.territory, + type: 'text', + width: '13%', + compute: function(zone, td) { + var sp = ce('span'); + switch (zone.territory) { + case 0: + sp.className = 'alliance-icon'; + break; + case 1: + sp.className = 'horde-icon'; + break; + case 4: + sp.className = 'ffapvp-icon'; + break; + } + + ae(sp, ct(g_zone_territories[zone.territory])); + ae(td, sp); + }, + getVisibleText: function(zone) { + return g_zone_territories[zone.territory]; + }, + sortFunc: function(a, b, col) { + return strcmp(g_zone_territories[a.territory], g_zone_territories[b.territory]); + } + }, + { + id: 'instancetype', + name: LANG.instancetype, + type: 'text', + compute: function(zone, td) { + if (zone.instance > 0) { + var sp = ce('span'); + if ((zone.instance >= 1 && zone.instance <= 5) || zone.instance == 7 || zone.instance == 8) { + sp.className = 'instance-icon' + zone.instance; + } + + var buff = g_zone_instancetypes[zone.instance]; + + if (zone.heroicLevel) { + var skull = ce('span'); + skull.className = 'heroic-icon'; + g_addTooltip(skull, LANG.tooltip_heroicmodeavailable + LANG.qty.replace('$1', zone.heroicLevel)); + ae(td, skull); + } + + ae(sp, ct(buff)); + ae(td, sp); + } + }, + getVisibleText: function(zone) { + if (zone.instance > 0) { + var buff = g_zone_instancetypes[zone.instance]; + + if (zone.nplayers && ((zone.instance != 2 && zone.instance != 5) || zone.nplayers > 5)) { + if (zone.instance == 4) { + buff += ' ' + sprintf(LANG.lvzone_xvx, zone.nplayers, zone.nplayers); + } + else { + buff += ' ' + sprintf(LANG.lvzone_xman, zone.nplayers); + } + } + if (zone.instance == 5 || zone.instance == 8) { + buff += ' heroic'; + } + + return buff; + } + }, + sortFunc: function(a, b, col) { + return strcmp(g_zone_instancetypes[a.instance], g_zone_instancetypes[b.instance]) || strcmp(a.instance, b.instance) || strcmp(a.nplayers, b.nplayers); + } + }, + { + id: 'category', + name: LANG.category, + type: 'text', + width: '15%', + compute: function(zone, td) { + td.className = 'small q1'; + var a = ce('a'); + a.href = '?zones=' + zone.category; + ae(a, ct(g_zone_categories[zone.category])); + ae(td, a); + }, + getVisibleText: function(zone) { + return g_zone_categories[zone.category]; + }, + sortFunc: function(a, b, col) { + return strcmp(g_zone_categories[a.category], g_zone_categories[b.category]); + } + } + ], + + getItemLink: function(zone) { + return '?zone=' + zone.id; } }, @@ -16655,6 +16677,46 @@ var ContactTool = new function() { DomContentLoaded.addEvent(this.checkPound); }; +function Line(x1, y1, x2, y2, type) { + var left = Math.min(x1, x2), + right = Math.max(x1, x2), + top = Math.min(y1, y2), + bottom = Math.max(y1, y2), + + width = (right - left), + height = (bottom - top), + length = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)), + + radian = Math.atan2(height, width), + sinTheta = Math.sin(radian), + cosTheta = Math.cos(radian); + + var $line = ce('span'); + $line.className = 'line'; + $line.style.top = top.toFixed(2) + 'px'; + $line.style.left = left.toFixed(2) + 'px'; + $line.style.width = width.toFixed(2) + 'px'; + $line.style.height = height.toFixed(2) + 'px'; + + var v = ce('var'); + v.style.width = length.toFixed(2) + 'px'; + v.style.OTransform = 'rotate(' + radian + 'rad)'; + v.style.MozTransform = 'rotate(' + radian + 'rad)'; + v.style.webkitTransform = 'rotate(' + radian + 'rad)'; + v.style.filter = "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=" + cosTheta + ', M12=' + (-1 * sinTheta) + ', M21=' + sinTheta + ', M22=' + cosTheta + ')'; + ae($line, v); + + if (!(x1 == left && y1 == top) && !(x2 == left && y2 == top)) { + $line.className += ' flipped'; + } + + if (type != null) { + $line.className += ' line-' + type; + } + + return $line; +} + var Links = new function() { var dialog = null; var oldHash = null; diff --git a/template/js/locale_dede.js b/template/js/locale_dede.js index a8e39879..42f4cf62 100644 --- a/template/js/locale_dede.js +++ b/template/js/locale_dede.js @@ -1916,33 +1916,39 @@ var g_zone_areas = { 4723: ['Kolosseum der Kreuzfahrer','Die eisigen Tiefen'], 4812: ['Die untere Zitadelle','Das Schädelbollwerk','Dom des Todbringers','Hort der Frostkönigin','Der obere Bereich','Königliche Quartiere','Der Frostthron','Frostgram'] }; + var g_zone_categories = { - 0:"Östliche Königreiche", - 1:"Kalimdor", - 8:"Scherbenwelt", - 10:"Nordend", - 2:"Dungeons", - 3:"Schlachtzüge", - 6:"Schlachtfelder", - 9:"Arenen" + 0: "Östliche Königreiche", + 1: "Kalimdor", + 2: "Dungeons", + 3: "Schlachtzüge", + 4: "Unbenutzt", + 6: "Schlachtfelder", + 8: "Scherbenwelt", + 9: "Arenen", + 10: "Nordend" }; + var g_zone_instancetypes = { - 1:"Durchgang", - 2:"Dungeon", - 3:"Schlachtzug", - 4:"Schlachtfeld", - 5:"Dungeon", - 6:"Arena", - 7:"Schlachtzug", - 8:"Schlachtzug" + 1: "Durchgang", + 2: "Dungeon", + 3: "Schlachtzug", // Classic + 4: "Schlachtfeld", + 5: "Dungeon", // Heroic + 6: "Arena", + 7: "Schlachtzug", // 10-25 + 8: "Schlachtzug" // 10-25 Heroic }; + var g_zone_territories = { - 0:"Allianz", - 1:"Horde", - 2:"Umkämpft", - 3:"Sicheres Gebiet", - 4:"PvP" + 0: "Allianz", + 1: "Horde", + 2: "Umkämpft", + 3: "Sicheres Gebiet", + 4: "PvP", + 5: "Welt-PvP" }; + var g_faction_categories = { "0":"Anderes", "469":"Allianz", diff --git a/template/js/locale_enus.js b/template/js/locale_enus.js index c0679eb0..34e3402a 100644 --- a/template/js/locale_enus.js +++ b/template/js/locale_enus.js @@ -1963,33 +1963,39 @@ var g_zone_areas = { 4723: ['Crusaders\' Coliseum','The Icy Depths'], 4812: ['The Lower Citadel','The Rampart of Skulls','Deathbringer\'s Rise','The Frost Queen\'s Lair','The Upper Reaches','Royal Quarters','The Frozen Throne','Frostmourne'] }; + var g_zone_categories = { - 0:"Eastern Kingdoms", - 1:"Kalimdor", - 8:"Outland", - 10:"Northrend", - 2:"Dungeons", - 3:"Raids", - 6:"Battlegrounds", - 9:"Arenas" + 0: "Eastern Kingdoms", + 1: "Kalimdor", + 2: "Dungeons", + 3: "Raids", + 4: "Unused", + 6: "Battlegrounds", + 8: "Outland", + 9: "Arenas", + 10: "Northrend" }; + var g_zone_instancetypes = { - 1:"Transit", - 2:"Dungeon", - 3:"Raid", - 4:"Battleground", - 5:"Dungeon", - 6:"Arena", - 7:"Raid", - 8:"Raid" + 1: "Transit", + 2: "Dungeon", + 3: "Raid", // Classic + 4: "Battleground", + 5: "Dungeon", // Heroic + 6: "Arena", + 7: "Raid", // 10-25 + 8: "Raid" // 10-25 Heroic }; + var g_zone_territories = { - 0:"Alliance", - 1:"Horde", - 2:"Contested", - 3:"Sanctuary", - 4:"PvP" + 0: "Alliance", + 1: "Horde", + 2: "Contested", + 3: "Sanctuary", + 4: "PvP", + 5: "World PvP" }; + var g_faction_categories = { "0":"Other", "469":"Alliance", diff --git a/template/js/locale_eses.js b/template/js/locale_eses.js index 21e71b8d..61ba63df 100644 --- a/template/js/locale_eses.js +++ b/template/js/locale_eses.js @@ -1916,33 +1916,39 @@ var g_zone_areas = { 4723: ['El Coliseo Argenta','Las profundidades heladas'], 4812: ['La ciudadela inferior','La Muralla de las Calaveras','Ascenso del Libramorte','La guarida de la Reina de Escarcha','Los Confines superiores','Cuarteles Reales','El Trono Helado','Agonía de Escarcha'] }; + var g_zone_categories = { - 0:"Reinos del Este", - 1:"Kalimdor", - 8:"Terrallende", - 10:"Rasganorte", - 2:"Mazmorras", - 3:"Bandas", - 6:"Campos de batalla", - 9:"Arenas" + 0: "Reinos del Este", + 1: "Kalimdor", + 2: "Mazmorras", + 3: "Bandas", + 4: "No las uso", + 6: "Campos de batalla", + 8: "Terrallende", + 9: "Arenas", + 10: "Rasganorte" }; + var g_zone_instancetypes = { - 1:"Tránsito", - 2:"Mazmorra", - 3:"Banda", - 4:"Campo de batalla", - 5:"Mazmorra", - 6:"Arena", - 7:"Banda", - 8:"Banda" + 1: "Tránsito", + 2: "Mazmorra", + 3: "Banda", // Classic + 4: "Campo de batalla", + 5: "Mazmorra", // Heroic + 6: "Arena", + 7: "Banda", // 10-25 + 8: "Banda" // 10-25 Heroic }; + var g_zone_territories = { - 0:"Alianza", - 1:"Horda", - 2:"En disputa", - 3:"Santuario", - 4:"JcJ" + 0: "Alianza", + 1: "Horda", + 2: "En disputa", + 3: "Santuario", + 4: "JcJ", + 5: "JcJ abierto" }; + var g_faction_categories = { "0":"Otros", "469":"Alianza", diff --git a/template/js/locale_frfr.js b/template/js/locale_frfr.js index 525c71dc..a427ce52 100644 --- a/template/js/locale_frfr.js +++ b/template/js/locale_frfr.js @@ -1903,33 +1903,39 @@ var g_zone_areas = { 4723: ['L\'colisée d\'Argent','Les Profondeurs Glacées'], 4812: ['La Citadelle Inférieure','Le Rempart des Cranes','Ascension de Porte-mort','Le repaire de la reine du Givre','Les étages supérieurs','Quartiers Royaux','Le Trône Gelé','Deuillegivre'] }; + var g_zone_categories = { - 0:"Royaumes de l'est", - 1:"Kalimdor", - 8:"Outreterre", - 10:"Norfendre", - 2:"Donjons", - 3:"Raids", - 6:"Champs de bataille", - 9:"Arènes" + 0: "Royaumes de l'est", + 1: "Kalimdor", + 2: "Donjons", + 3: "Raids", + 4: "Inutilisées", + 6: "Champs de bataille", + 8: "Outreterre", + 9: "Arènes", + 10: "Norfendre" }; + var g_zone_instancetypes = { - 1:"Transit", - 2:"Donjon", - 3:"Raid", - 4:"Champ de bataille", - 5:"Donjon", - 6:"Arène", - 7:"Raid", - 8:"Raid" + 1: "Transit", + 2: "Donjon", + 3: "Raid", // Classic + 4: "Champ de bataille", + 5: "Donjon", // Heroic + 6: "Arène", + 7: "Raid", // 10-25 + 8: "Raid" // 10-25 Heroic }; + var g_zone_territories = { - 0:"Alliance", - 1:"Horde", - 2:"Contesté", - 3:"Sanctuaire", - 4:"JcJ" + 0: "Alliance", + 1: "Horde", + 2: "Contesté", + 3: "Sanctuaire", + 4: "JcJ", + 5: "JcJ Global" }; + var g_faction_categories = { "0":"Autre", "469":"Alliance", diff --git a/template/js/locale_ruru.js b/template/js/locale_ruru.js index 2591adfc..34635acc 100644 --- a/template/js/locale_ruru.js +++ b/template/js/locale_ruru.js @@ -1903,33 +1903,39 @@ var g_zone_areas = { 4723: ['Колизей Серебряного Авангарда','Ледяные глубины'], 4812: ['Нижний ярус','Черепной вал','Подъем Смертоносного','Логово Королевы Льда','Верхний ярус','Королевские палаты','Ледяной Трон','Ледяная Скорбь'] }; + var g_zone_categories = { - 0:"Восточные королевства", - 1:"Калимдор", - 8:"Запределье", - 10:"Нордскол", - 2:"Подземелья", - 3:"Рейды", - 6:"Поля боя", - 9:"Арены" + 0: "Восточные королевства", + 1: "Калимдор", + 2: "Подземелья", + 3: "Рейды", + 4: "Неактивно", + 6: "Поля боя", + 8: "Запределье", + 9: "Арены", + 10: "Нордскол" }; + var g_zone_instancetypes = { - 1:"Транзит", - 2:"Подземелье", - 3:"Рейд", - 4:"Поле боя", - 5:"Подземелье", - 6:"Арена", - 7:"Рейд", - 8:"Рейд" + 1: "Транзит", + 2: "Подземелье", + 3: "Рейд", // Classic + 4: "Поле боя", + 5: "Подземелье", // Heroic + 6: "Арена", + 7: "Рейд", // 10-25 + 8: "Рейд" // 10-25 Heroic }; + var g_zone_territories = { - 0:"Альянс", - 1:"Орда", - 2:"Оспариваемая", - 3:"Святилище", - 4:"PvP" + 0: "Альянс", + 1: "Орда", + 2: "Оспариваемая", + 3: "Святилище", + 4: "PvP", + 5: "Мировое PvP" }; + var g_faction_categories = { "0":"Другое", "980":"The Burning Crusade",