Данные для карт
[cswow.git] / map / zone_tables.php
blob1d0e06168e5e47fd54b02343f7ad53a1f6d7ea44
1 <?php
2 $NPCType = array(
3 '0'=>'none',
4 '1'=>'Beast',
5 '2'=>'Dragonkin',
6 '3'=>'Demon',
7 '4'=>'Elemental',
8 '5'=>'Giant',
9 '6'=>'Undead',
10 '7'=>'Humanoid',
11 '8'=>'Critter',
12 '9'=>'Mechanical',
13 '10'=>'Not specified',
14 '11'=>'Totem',
15 '12'=>'Non-combat Pet',
16 '13'=>'Gas Cloud'
19 $gmapName = array(
20 '0'=>"Azeroths",
21 '1'=>"Kalimdor",
22 '13'=>"Testing",
23 '25'=>"Scott Test",
24 '29'=>"CashTest",
25 '30'=>"Alterac Valley",
26 '33'=>"Shadowfang Keep",
27 '34'=>"Stormwind Stockade",
28 '35'=>"<unused>StormwindPrison",
29 '36'=>"Deadmines",
30 '37'=>"Azshara Crater",
31 '42'=>"Collin's Test",
32 '43'=>"Wailing Caverns",
33 '44'=>"<unused> Monastery",
34 '47'=>"Razorfen Kraul",
35 '48'=>"Blackfathom Deeps",
36 '70'=>"Uldaman",
37 '90'=>"Gnomeregan",
38 '109'=>"Sunken Temple",
39 '129'=>"Razorfen Downs",
40 '169'=>"Emerald Dream",
41 '189'=>"Scarlet Monastery",
42 '209'=>"Zul'Farrak",
43 '229'=>"Blackrock Spire",
44 '230'=>"Blackrock Depths",
45 '249'=>"Onyxia's Lair",
46 '269'=>"Opening of the Dark Portal",
47 '289'=>"Scholomance",
48 '309'=>"Zul'Gurub",
49 '329'=>"Stratholme",
50 '349'=>"Maraudon",
51 '369'=>"Deeprun Tram",
52 '389'=>"Ragefire Chasm",
53 '409'=>"Molten Core",
54 '429'=>"Dire Maul",
55 '449'=>"Alliance PVP Barracks",
56 '450'=>"Horde PVP Barracks",
57 '451'=>"Development Land",
58 '469'=>"Blackwing Lair",
59 '489'=>"Warsong Gulch",
60 '509'=>"Ruins of Ahn'Qiraj",
61 '529'=>"Arathi Basin",
62 '530'=>"Outland",
63 '531'=>"Ahn'Qiraj Temple",
64 '532'=>"Karazhan",
65 '533'=>"Naxxramas",
66 '534'=>"The Battle for Mount Hyjal",
67 '540'=>"Hellfire Citadel: The Shattered Halls",
68 '542'=>"Hellfire Citadel: The Blood Furnace",
69 '543'=>"Hellfire Citadel: Ramparts",
70 '544'=>"Magtheridon's Lair",
71 '545'=>"Coilfang: The Steamvault",
72 '546'=>"Coilfang: The Underbog",
73 '547'=>"Coilfang: The Slave Pens",
74 '548'=>"Coilfang: Serpentshrine Cavern",
75 '550'=>"Tempest Keep",
76 '552'=>"Tempest Keep: The Arcatraz",
77 '553'=>"Tempest Keep: The Botanica",
78 '554'=>"Tempest Keep: The Mechanar",
79 '555'=>"Auchindoun: Shadow Labyrinth",
80 '556'=>"Auchindoun: Sethekk Halls",
81 '557'=>"Auchindoun: Mana-Tombs",
82 '558'=>"Auchindoun: Auchenai Crypts",
83 '559'=>"Nagrand Arena",
84 '560'=>"The Escape From Durnholde",
85 '562'=>"Blade's Edge Arena",
86 '564'=>"Black Temple",
87 '565'=>"Gruul's Lair",
88 '566'=>"Eye of the Storm",
89 '568'=>"Zul'Aman",
90 '571'=>"Northrend",
91 '572'=>"Ruins of Lordaeron",
92 '573'=>"ExteriorTest",
93 '574'=>"Utgarde Keep",
94 '575'=>"Utgarde Pinnacle",
95 '576'=>"The Nexus",
96 '578'=>"The Oculus",
97 '580'=>"The Sunwell",
98 '582'=>"Transport: Rut'theran to Auberdine",
99 '584'=>"Transport: Menethil to Theramore",
100 '585'=>"Magister's Terrace",
101 '586'=>"Transport: Exodar to Auberdine",
102 '587'=>"Transport: Feathermoon Ferry",
103 '588'=>"Transport: Menethil to Auberdine",
104 '589'=>"Transport: Orgrimmar to Grom'Gol",
105 '590'=>"Transport: Grom'Gol to Undercity",
106 '591'=>"Transport: Undercity to Orgrimmar",
107 '592'=>"Transport: Borean Tundra Test",
108 '593'=>"Transport: Booty Bay to Ratchet",
109 '594'=>"Transport: Howling Fjord Sister Mercy (Quest)",
110 '595'=>"The Culling of Stratholme",
111 '596'=>"Transport: Naglfar",
112 '597'=>"Craig Test",
113 '598'=>"Sunwell Fix (Unused)",
114 '599'=>"Halls of Stone",
115 '600'=>"Drak'Tharon Keep",
116 '601'=>"Azjol-Nerub",
117 '602'=>"Halls of Lightning",
118 '603'=>"Ulduar",
119 '604'=>"Gundrak",
120 '605'=>"Development Land (non-weighted textures)",
121 '606'=>"QA and DVD",
122 '607'=>"Strand of the Ancients",
123 '608'=>"Violet Hold",
124 '609'=>"Ebon Hold",
125 '610'=>"Transport: Tirisfal to Vengeance Landing",
126 '612'=>"Transport: Menethil to Valgarde",
127 '613'=>"Transport: Orgrimmar to Warsong Hold",
128 '614'=>"Transport: Stormwind to Valiance Keep",
129 '615'=>"The Obsidian Sanctum",
130 '616'=>"The Eye of Eternity",
131 '617'=>"Dalaran Sewers",
132 '618'=>"The Ring of Valor",
133 '619'=>"Ahn'kahet: The Old Kingdom",
134 '620'=>"Transport: Moa'ki to Unu'pe",
135 '621'=>"Transport: Moa'ki to Kamagua",
136 '622'=>"Transport: Orgrim's Hammer",
137 '623'=>"Transport: The Skybreaker",
138 '624'=>"Vault of Archavon",
139 '628'=>"Isle of Conquest",
140 '631'=>"Icecrown Citadel",
141 '632'=>"The Forge of Souls",
142 '641'=>"Transport: Alliance Airship BG",
143 '642'=>"Transport: Horde Airship BG",
144 '647'=>"Transport: Orgrimmar to Thunder Bluff",
145 '649'=>"Trial of the Crusader",
146 '650'=>"Trial of the Champion",
147 '658'=>"Pit of Saron",
148 '668'=>"Halls of Reflection",
149 '672'=>"Transport: The Skybreaker (Icecrown Citadel Raid)",
150 '673'=>"Transport: Orgrim's Hammer (Icecrown Citadel Raid)",
151 '712'=>"Transport: The Skybreaker (IC Dungeon)",
152 '713'=>"Transport: Orgrim's Hammer (IC Dungeon)",
153 '718'=>"Trasnport: The Mighty Wind (Icecrown Citadel Raid)",
154 '723'=>"Stormwind",
155 '724'=>"The Ruby Sanctum"
158 static $MapCoord =Array(
159 //=========================== Not used maps =============================================================
160 // Array( 0,"Eastern Kingdoms",,,,,1950,2564,"Instance/Azeroth.jpg"), // Use in GPS
161 // Array( 1,"Kalimdor",,,,,1950,2564,"Instance/Kalimdor.jpg"), // Use in GPS
162 // Array( 13,"Testing",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
163 // Array( 25,"Scott Test",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
164 // Array( 29,"CashTest",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
165 // Array( 35,"<unused>StormwindPrison",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
166 // Array( 37,"Azshara Crater",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
167 // Array( 42,"Collin's Test",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
168 // Array( 44,"<unused> Monastery",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
169 // Array(169,"Emerald Dream",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
170 // Array(369,"Deeprun Tram",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"), это карта железной дороги между стормом и айроном
171 // Array(451,"Development Land",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
172 // Array(530,"Outland",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"), // Use in GPS
173 //Array(568,"Zul'Aman"),
174 //Array(572,"Ruins of Lordaeron"),
175 //=======================================================================================================
176 Array( 30,"Alterac Valley",1032,-1676,296,-754,1300,504,"Instance/AlteracValley.jpg"),
177 // Array( 33,"Shadowfang Keep",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"), // have many level -> passed
178 Array( 34,"Stormwind Stockade",201,-11,158,-158,424,632,"Instance/Stockade.jpg"),
179 Array( 36,"Deadmines",128,-321,-339,-1151,898,1623,"Instance/Deadmines.jpg"),
180 Array( 43,"Wailing Caverns",192,-399,560,-388,1182,1896,"Instance/WailingCaverns.jpg"),
181 // Array( 47,"Razorfen Kraul",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
182 Array( 48,"Blackfathom Deeps",-72,-900,429,-507,1656,1872,"Instance/BlackfathomDeeps.jpg"),
183 Array( 70,"Uldaman",189,-375,472,-75,1128,1094,"Instance/Uldaman.jpg"),
184 Array( 90,"Gnomeregan",-196,-920,762,-146,1448,1816,"Instance/Gnomeregan.jpg"),
185 Array(109,"Sunken Temple",-241,-718,329,-141,954,940,"Instance/SunkenTemple.jpg"),
186 // Array(129,"Razorfen Downs",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
187 // Array(189,"Scarlet Monastery",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
188 Array(209,"Zul'Farrak",2062,1143,1433,604,441,398,"Instance/ZulFarrak.jpg"),
189 // Array(229,"Blackrock Spire",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
190 Array(230,"Blackrock Depths",1491,252,271,-855,2478,2252,"Instance/BlackrockDepths.jpg"),
191 Array(249,"Onyxia's Lair",67,-225,-8,-292,583,568,"Instance/OnyxiasLair.jpg"),
192 // Array(269,"Opening of the Dark Portal",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
193 // Array(289,"Scholomance",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
194 Array(309,"Zul'Gurub",-11335,-12568,-1106,-2137,592,495,"Instance/ZulGurub.jpg"),
195 Array(329,"Stratholme",4155,3373,-2923,-3809,1564,1772,"Instance/Stratholme.jpg"),
196 Array(349,"Maraudon",1172,-174,300,-819,2692,2238,"Instance/Maraudon.jpg"),
197 // Array(389,"Ragefire Chasm",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
198 Array(409,"Molten Core",1338,483,-267,-1260,1710,1986,"Instance/MoltenCore.jpg"),
199 // Array(429,"Dire Maul",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
200 // Array(449,"Alliance PVP Barracks",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
201 // Array(450,"Horde PVP Barracks",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
202 // Array(469,"Blackwing Lair",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
203 Array(489,"Warsong Gulch",1698,827,1864,994,418,418,"Instance/WarsongGulch.jpg"),
204 Array(509,"Ruins of Ahn'Qiraj",-8070,-10257,2470,950,1050,730,"Instance/RuinsofAhnQiraj.jpg"),
205 // Array(529,"Arathi Basin",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
206 Array(531,"Ahn'Qiraj Temple",-7840,-9372,2255,782,3064,2947,"Instance/AhnQirajTemple.jpg"), // Поворот исходника на 21.5 град
207 // Array(532,"Karazhan",,,,,1950,2564,"Instance/SerpentshrineCavern.jpg"),
208 Array(533,"Naxxramas",3569,2428,-2862,-4080,2282,2436,"Instance/Naxxramas.jpg"),
209 Array(534,"The Battle for Mount Hyjal",5958,4075,-1104,-4123,904,1449,"Instance/TheBattleforMountHyjal.jpg"),
210 Array(540,"Hellfire Citadel: The Shattered Halls",582,-46,357,-168,1256,1050,"Instance/TheShatteredHalls.jpg"),
211 Array(542,"Hellfire Citadel: The Blood Furnace",558,-49,219,-229,1214,896,"Instance/TheBloodFurnace.jpg"),
212 Array(543,"Hellfire Citadel: Ramparts",-508,-2176,2376,900,834,738,"Instance/Ramparts.jpg"),
213 Array(544,"Magtheridon's Lair",242,-127,122,-111,738,466,"Instance/MagtheridonsLair.jpg"),
215 Array(545,"Coilfang: The Steamvault",132,-406,35,-622,1076,1314,"Instance/TheSteamvault.jpg"),
216 Array(546,"Coilfang: The Underbog",427,-189,191,-610,1232,1602,"Instance/TheUnderbog.jpg"),
217 Array(547,"Coilfang: The Slave Pens",157.5,-357.5,44.5,-829.5,1030,1748,"Instance/TheSlavePens.jpg"),
218 Array(548,"Coilfang: Serpentshrine Cavern",579,-396,121,-1161,1950,2564,"Instance/SerpentshrineCavern.jpg"),
219 Array(550,"Tempest Keep: The Eye",883,-78,501,-509,1923,2021,"Instance/TheEye.jpg"),
220 Array(552,"Tempest Keep: The Arcatraz",547,-56,247,-306,1206,1106,"Instance/TheArcatraz.jpg"),
221 Array(553,"Tempest Keep: The Botanica",232,-266,641,-104,996,1490,"Instance/TheBotanica.jpg"),
222 Array(554,"Tempest Keep: The Mechanar",354,-104,212,-221,916,866,"Instance/TheMechanar.jpg"),
223 Array(555,"Auchindoun: Shadow Labyrinth",86,-588.5,83.5,-575.5,1349,1318,"Instance/ShadowLabyrinth.jpg"),
224 Array(556,"Auchindoun: Sethekk Halls",124,-295.5,385,-70,839,910,"Instance/SethekkHalls.jpg"),
225 Array(557,"Auchindoun: Mana-Tombs",84.5,-438,65.5,-306.5,1045,744,"Instance/ManaTombs.jpg"),
226 Array(558,"Auchindoun: Auchenai Crypts",298.75,-187.25,56,-448.5,972,1009,"Instance/AuchenaiCrypts.jpg"),
227 // Array(559,"Nagrand Arena"),//bg
228 Array(560,"The Escape From Durnholde",3730,530,2667,-533,1536,1536,"Instance/TheEscapeFromDurnholde.jpg"),
229 //Array(562,"Blade's Edge Arena"),//bg
230 //Array(564,"Black Temple"),
231 Array(565,"Gruul's Lair",304,-37,445,-32,682,954,"Instance/GruulsLair.jpg"),
232 Array(566,"Eye of the Storm",2873,1433,2118,942,891,565,"Instance/EyeoftheStorm.jpg"), //bg
235 function get_Map($map_id)
237 global $MapCoord;
238 for($i=0; $i<count($MapCoord); $i++)
239 if ($MapCoord[$i][0]==$map_id)
240 return $MapCoord[$i];
241 return 0;
244 static $baseIconPath="img/map_icon";
246 function get_map_name($map_id)
248 global $gmapName;
249 $mapname = @$gmapName[$map_id];
250 if ($mapname != "")
251 return $mapname;
252 return "Unknown $map_id";
255 // Таблица преобразования глобальных координат в координаты на картинке карты
256 // формат id, Map, MapID, X1, X2, Y1, Y2, NotDef
257 // Расчёт координат идёт по формулам:
258 // y=Ширина картинки*(posy - Y1)/(Y2-Y1);
259 // x=Высота картинки*(posx - X1)/(X2-X1);
260 // y - горизонтальная координата
261 // x - вертикальная координата
262 $AreaCoord =Array(
263 //******************************************************************************
264 //************************ Azeroth Areas ***************************************
265 //******************************************************************************
266 Array(14, 0, 0, "Azeroth", 17051.83594, -20599.61719, 9194.25, -15906.71875, -1),
267 Array(15, 0, 36, "Alterac", 783.333313, -2016.666626, 1500, -366.6666565, -1),
268 Array(16, 0, 45, "Arathi", -866.666626, -4466.666504, -133.3333282, -2533.333252, -1),
269 Array(17, 0, 3, "Badlands", -2079.166504, -4566.666504, -5889.583008, -7547.916504, -1),
270 Array(19, 0, 4, "BlastedLands", -1241.666626, -4591.666504, -10566.66602, -12800, -1),
271 Array(20, 0, 85, "Tirisfal", 3033.333252, -1485.416626, 3837.499756, 824.999939, -1),
272 Array(21, 0, 130, "Silverpine", 3449.999756, -750, 1666.666626, -1133.333252, -1),
273 Array(22, 0, 28, "WesternPlaguelands", 416.6666565, -3883.333252, 3366.666504, 499.9999695, -1),
274 Array(23, 0, 139, "EasternPlaguelands", -2185.416504, -6056.25, 3799.999756, 1218.75, -1),
275 Array(24, 0, 267, "Hilsbrad", 1066.666626, -2133.333252, 400, -1733.333252, -1),
276 Array(26, 0, 47, "Hinterlands", -1575, -5425, 1466.666626, -1100, -1),
277 Array(27, 0, 1, "DunMorogh", 1802.083252, -3122.916504, -3877.083252, -7160.416504, -1),
278 Array(28, 0, 51, "SearingGorge", -322.9166565, -2554.166504, -6100, -7587.499512, -1),
279 Array(29, 0, 46, "BurningSteppes", -266.6666565, -3195.833252, -7031.249512, -8983.333008, -1),
280 Array(30, 0, 12, "Elwynn", 1535.416626, -1935.416626, -7939.583008, -10254.16602, -1),
281 Array(32, 0, 41, "DeadwindPass", -833.333313, -3333.333252, -9866.666016, -11533.33301, -1),
282 Array(34, 0, 10, "Duskwood", 833.333313, -1866.666626, -9716.666016, -11516.66602, -1),
283 Array(35, 0, 38, "LochModan", -1993.749878, -4752.083008, -4487.5, -6327.083008, -1),
284 Array(36, 0, 44, "Redridge", -1570.833252, -3741.666504, -8575, -10022.91602, -1),
285 Array(37, 0, 33, "Stranglethorn", 2220.833252, -4160.416504, -11168.75, -15422.91602, -1),
286 Array(38, 0, 8, "SwampOfSorrows", -2222.916504, -4516.666504, -9620.833008, -11150, -1),
287 Array(39, 0, 40, "Westfall", 3016.666504, -483.333313, -9400, -11733.33301, -1),
288 Array(40, 0, 11, "Wetlands", -389.583313, -4525, -2147.916504, -4904.166504, -1),
289 Array(301, 0, 1519, "Stormwind", 1380.971436, 36.70063019, -8278.850586, -9175.205078, -1),
290 Array(341, 0, 1537, "Ironforge", -713.5913696, -1504.216431, -4569.241211, -5096.845703, -1),
291 Array(382, 0, 1497, "Undercity", 873.192627, -86.18240356, 1877.945313, 1237.841187, -1),
292 //******************************************************************************
293 //************************ Kalimdor Areas **************************************
294 //******************************************************************************
295 Array(13, 1, 0, "Kalimdor", 17066.59961 , -19733.21094 , 12799.90039 , -11733.2998 , -1),
296 Array(4, 1, 14, "Durotar", -1962.499878 , -7249.999512 , 1808.333252 , -1716.666626 , -1),
297 Array(9, 1, 215, "Mulgore", 2047.916626 , -3089.583252 , -272.9166565 , -3697.916504 , -1),
298 Array(11, 1, 17, "Barrens", 2622.916504 , -7510.416504 , 1612.499878 , -5143.75 , -1),
299 Array(41, 1, 141, "Teldrassil", 3814.583252 , -1277.083252 , 11831.25 , 8437.5 , -1),
300 Array(42, 1, 148, "Darkshore", 2941.666504 , -3608.333252 , 8333.333008 , 3966.666504 , -1),
301 Array(43, 1, 331, "Ashenvale", 1699.999878 , -4066.666504 , 4672.916504 , 829.166626 , -1),
302 Array(61, 1, 400, "ThousandNeedles", -433.333313 , -4833.333008 , -3966.666504 , -6899.999512 , -1),
303 Array(81, 1, 406, "StonetalonMountains", 3245.833252 , -1637.499878 , 2916.666504 , -339.583313 , -1),
304 Array(101, 1, 405, "Desolace", 4233.333008 , -262.5 , 452.083313 , -2545.833252 , -1),
305 Array(121, 1, 357, "Feralas", 5441.666504 , -1508.333252 , -2366.666504 , -6999.999512 , -1),
306 Array(141, 1, 15, "Dustwallow", -974.999939 , -6225 , -2033.333252 , -5533.333008 , -1),
307 Array(161, 1, 440, "Tanaris", -218.7499847 , -7118.749512 , -5875 , -10475 , -1),
308 Array(181, 1, 16, "Aszhara", -3277.083252 , -8347.916016 , 5341.666504 , 1960.416626 , -1),
309 Array(182, 1, 361, "Felwood", 1641.666626 , -4108.333008 , 7133.333008 , 3299.999756 , -1),
310 Array(201, 1, 490, "UngoroCrater", 533.333313 , -3166.666504 , -5966.666504 , -8433.333008 , -1),
311 Array(241, 1, 493, "Moonglade", -1381.25 , -3689.583252 , 8491.666016 , 6952.083008 , -1),
312 Array(261, 1, 1377, "Silithus", 2537.5 , -945.8339844 , -5958.333984 , -8281.25 , -1),
313 Array(281, 1, 618, "Winterspring", -316.6666565 , -7416.666504 , 8533.333008 , 3799.999756 , -1),
314 Array(321, 1, 1637, "Ogrimmar", -3680.601074 , -5083.205566 , 2273.877197 , 1338.460571 , -1),
315 Array(362, 1, 1638, "ThunderBluff", 516.666626 , -527.083313 , -849.999939 , -1545.833252 , -1),
316 Array(381, 1, 1657, "Darnassis", 2938.362793 , 1880.029541 , 10238.31641 , 9532.586914 , -1),
318 //******************************************************************************
319 //********************** Battleground Areas ************************************
320 //******************************************************************************
321 Array(401, 30, 2597, "AlteracValley", 1781.249878 , -2456.25 , 1085.416626 , -1739.583252 , -1),
322 Array(443, 489, 3277, "WarsongGulch", 2041.666626 , 895.833313 , 1627.083252 , 862.499939 , -1),
323 Array(461, 529, 3358, "ArathiBasin", 1858.333252 , 102.0833282 , 1508.333252 , 337.5 , -1),
324 Array(482, 566, 3820, "NetherstormArena", 2660.416504 , 389.583313 , 2918.75 , 1404.166626 , -1),
326 //******************************************************************************
327 //************************* Island Areas **************************************
328 //******************************************************************************
329 Array(480, 530, 3487, "SilvermoonCity", -6400.75 , -7612.208496 , 10153.70898 , 9346.938477 , 0),
330 Array(462, 530, 3430, "EversongWoods", -4487.5 , -9412.5 , 11041.66602 , 7758.333008 , 0),
331 Array(463, 530, 3433, "Ghostlands", -5283.333008 , -8583.333008 , 8266.666016 , 6066.666504 , 0),
333 Array(471, 530, 3557, "TheExodar" , -11066.36719 , -12123.1377 , -3609.68335 , -4314.371094 , 1),
334 Array(464, 530, 3524, "AzuremystIsle", -10500 , -14570.83301, -2793.75 , -5508.333008 , 1),
335 Array(476, 530, 3525, "BloodmystIsle", -10075 , -13337.49902, -758.333313 , -2933.333252 , 1),
336 //******************************************************************************
337 //************************* Outland Areas **************************************
338 //******************************************************************************
339 Array(466, 530, 0, "Expansion01", 12996.03906,-4468.039063, 5821.359375, -5821.359375,-1),
340 Array(465, 530, 3483, "Hellfire", 5539.583008, 375, 1481.25, -1962.499878,-1),
341 Array(467, 530, 3521, "Zangarmarsh", 9475, 4447.916504, 1935.416626, -1416.666626,-1),
342 Array(473, 530, 3520, "ShadowmoonValley", 4225, -1275, -1947.916626, -5614.583008,-1),
343 Array(475, 530, 3522, "BladesEdgeMountains", 8845.833008, 3420.833252, 4408.333008, 791.666626,-1),
344 Array(477, 530, 3518, "Nagrand", 10295.83301, 4770.833008, 41.66666412,-3641.666504,-1),
345 Array(478, 530, 3519, "TerokkarForest", 7083.333008, 1683.333252, -999.999939,-4600, -1),
346 Array(479, 530, 3523, "Netherstorm", 5483.333008, -91.666664, 5456.25, 1739.583252,-1),
347 Array(481, 530, 3703, "ShattrathCity", 6135.258789, 4829.008789,-1473.954468, -2344.787842,-1),
348 Array(499, 530, 4080, "Sunwell", -5302.083008,-8629.166016,13568.74902, 11350, 0),
350 function get_Area($area_id)
352 global $AreaCoord;
353 for($i=0; $i<count($AreaCoord); $i++)
354 if ($AreaCoord[$i][2]==$area_id)
355 return $AreaCoord[$i];
356 return 0;
358 // Таблицы зон определяющих в какой карте находится обьект и позволяющие выбрать
359 // наилучшую карту
360 $zone_0 = Array(
361 Array(700,10,1244,1873,"Undercity",1497),
362 Array(-840,-1330,-5050,-4560,"Ironforge",1537),
363 Array(1190,200,-9074,-8280,"Stormwind City",1519),
364 Array(-2170,-4400,-7348,-6006,"Badlands",3),
365 Array(-500,-4400,-4485,-2367,"Wetlands",11),
366 Array(2220,-2250,-15422,-11299,"Stranglethorn Vale",33),
367 Array(-1724,-3540,-9918,-8667,"Redridge Mountains",44),
368 Array(-2480,-4400,-6006,-4485,"Loch Modan",38),
369 Array(662,-1638,-11299,-9990,"Duskwood",10),
370 Array(-1638,-2344,-11299,-9918,"Deadwind Pass",41),
371 Array(834,-1724,-9990,-8526,"Elwynn Forest",12),
372 Array(-500,-3100,-8667,-7348,"Burning Steppes",46),
373 Array(-608,-2170,-7348,-6285,"Searing Gorge",51),
374 Array(2000,-2480,-6612,-4485,"Dun Morogh",1),
375 Array(-1575,-5425,-432,805,"The Hinterlands",47),
376 Array(3016,662,-11299,-9400,"Westfall",40),
377 Array(600,-1575,-1874,220,"Hillsbrad Foothills",267),
378 Array(-2725,-6056,805,3800,"Eastern Plaguelands",139),
379 Array(-850,-2725,805,3400,"Western Plaguelands",28),
380 Array(2200,600,-900,1525,"Silverpine Forest",130),
381 Array(2200,-850,1525,3400,"Tirisfal Glades",85),
382 Array(-2250,-3520,-12800,-10666,"Blasted Lands",4),
383 Array(-2344,-4516,-11070,-9600,"Swamp of Sorrows",8),
384 Array(-1575,-3900,-2367,-432,"Arathi Highlands",45),
385 Array(600,-1575,220,1525,"Alterac Mountains",36),
388 $zone_1 = Array(
389 Array(2698,2030,9575,10267,"Darnassus",1657),
390 Array(326,-360,-1490,-910,"Thunder Bluff",1638),
391 Array(-3849,-4809,1387,2222,"Orgrimmar",1637),
392 Array(-1300,-3250,7142,8500,"Moonglade",493),
393 Array(2021,-300,-9000,-6016,"Silithus",1377),
394 Array(-2259,-7000,4150,8500,"Winterspring",618),
395 Array(-300,-2494,-8221,-6016,"Un'Goro Crater",490),
396 Array(-590,-2259,3580,7142,"Felwood",361),
397 Array(-3787,-8000,1370,6000,"Azshara",16),
398 Array(-1900,-5500,-10475,-6825,"Tanaris",440),
399 Array(-2478,-5500,-5135,-2330,"Dustwallow Marsh",15),
400 Array(360,-1536,-3474,-412,"Mulgore",215),
401 Array(4000,-804,-6828,-2477,"Feralas",357),
402 Array(3500,360,-2477,372,"Desolace",405),
403 Array(-804,-5500,-6828,-4566,"Thousand Needles",400),
404 Array(-3758,-5500,-1300,1370,"Durotar",14),
405 Array(1000,-3787,1370,4150,"Ashenvale",331),
406 Array(2500,-1300,4150,8500,"Darkshore",148),
407 Array(3814,-1100,8600,11831,"Teldrassil",141),
408 Array(3500,-804,-412,3580,"Stonetalon Mountains",406),
409 Array(-804,-4200,-4566,1370,"The Barrens",17),
411 $zone_530 = Array(
412 Array( 6135, 4829, -1474, -2345, "Shattrath City",3703),
414 Array( 5100, 375, 1481, -1400, "Hellfire Peninsula", 3483),//!
415 Array( 4225,-1275, -1948, -5615, "Shadowmoon Valley",3520),
416 Array( 7700, 4460, 4408, 1070, "Blades Edge Mountains",3522),//!
417 Array( 9475, 4448, 1935, -600, "Zangarmarsh", 3521),
418 Array(10296, 6100, -600, -3300, "Nagrand",3518),//!
419 Array( 7083, 1683, -1000, -4600, "Terokkar Forest",3519),
420 Array( 4460, -92, 5456, 1740, "Netherstorm",3523),
422 Array( -6401, -7612, 10154, 9347, "Silvermoon City",3487),
423 Array(-11066,-12123, -3610, -4314, "The Exodar",3557),
425 Array( -4488, -9413, 11042, 7758, "Eversong Woods",3430),
426 Array( -5283, -8583, 8267, 6067, "Ghostlands",3433),
427 Array(-10500,-14571, -2794, -5508, "Azuremyst Isle",3524),
428 Array(-10075,-13337, -758, -2933, "Bloodmyst Isle",3525),
429 Array( -5302, -8629,166016, 13569, "Sunwell", 4080),
432 function get_zone($map_id,$player_x,$player_y)
434 global $zone_0,$zone_1,$zone_530;
435 switch ($map_id)
437 case 0:
438 for ($i=0; $i<count($zone_0); $i++)
439 if (($zone_0[$i][2] < $player_x) && ($zone_0[$i][3] > $player_x) &&
440 ($zone_0[$i][1] < $player_y) && ($zone_0[$i][0] > $player_y))
441 return $zone_0[$i];
442 break;
443 case 1:
444 for ($i=0; $i<count($zone_1); $i++)
445 if (($zone_1[$i][2] < $player_x) && ($zone_1[$i][3] > $player_x) &&
446 ($zone_1[$i][1] < $player_y) && ($zone_1[$i][0] > $player_y))
447 return $zone_1[$i];
448 break;
449 case 530:
450 for ($i=0; $i<count($zone_530); $i++)
451 if (($zone_530[$i][3] < $player_x) && ($zone_530[$i][2] > $player_x) &&
452 ($zone_530[$i][1] < $player_y) && ($zone_530[$i][0] > $player_y))
453 return $zone_530[$i];
454 break;
455 default:
456 return(0);
459 function get_zone_name($map_id,$player_x,$player_y)
461 $zone = get_zone($map_id,$player_x,$player_y);
462 return $zone[4];
465 function get_time_text($time)
467 $day = floor($time/(60*60*24));$time-=$day*60*60*24;
468 $hour= floor($time/(60*60));$time-=$hour*60*60;
469 $min = floor($time/(60));$time-=$min*60;
470 $sec = $time;
471 $t="";
472 if ($day!=0)
474 $a=$day - floor($day/10)*10;
475 if ($a==0) $t=$t."$day дней ";
476 else if ($a==1) $t=$t."$day день ";
477 else if ($a <5) $t=$t."$day дня ";
478 else $t=$t."$day дней ";
480 if ($hour!=0)
482 $a=$hour - floor($hour/10)*10;
483 if ($a==0) $t=$t."$hour часов ";
484 else if ($a==1) $t=$t."$hour час ";
485 else if ($a <5) $t=$t."$hour часа ";
486 else $t=$t."$hour часов ";
488 if ($min!=0)
490 $a=$min - floor($min/10)*10;
491 if ($a==0) $t=$t."$min минут ";
492 else if ($a==1) $t=$t."$min минута ";
493 else if ($a <5) $t=$t."$min минуты ";
494 else $t=$t."$min минут ";
496 if ($sec!=0)
498 $a=$sec - floor($sec/10)*10;
499 if ($a==0) $t=$t."$sec секунд";
500 else if ($a==1) $t=$t."$sec секунда";
501 else if ($a <5) $t=$t."$sec секунды";
502 else $t=$t."$sec секунд";
504 return $t;
507 function validateTextForMap($text)
509 $letter = array("'",'"' ,"<" ,">" ,">" ,"\r","\n" );
510 $values = array("`",'&quot;',"&lt;","&gt;","&gt;","" ,"<br>");
511 return str_replace($letter, $values, $text);