vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[
2 Name: Tourist-2.0
3 Revision: $Rev: 15758 $
4 Author(s): ckknight (ckknight@gmail.com)
5 Website: http://ckknight.wowinterface.com/
6 Documentation: http://wiki.wowace.com/index.php/Tourist-2.0
7 SVN: http://svn.wowace.com/root/trunk/TouristLib/Tourist-2.0
8 Description: A library to provide information about zones and instances.
9 Dependencies: AceLibrary, Babble-Zone-2.2, AceConsole-2.0 (optional)
10 ]]
11  
12 local MAJOR_VERSION = "Tourist-2.0"
13 local MINOR_VERSION = "$Revision: 15758 $"
14  
15 if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") end
16 if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end
17  
18 if not AceLibrary:HasInstance("Babble-Zone-2.2") then error(MAJOR_VERSION .. " requires Babble-Zone-2.2.") end
19  
20 local Tourist = {}
21  
22 local Z = AceLibrary("Babble-Zone-2.2")
23  
24 local playerLevel = 1
25 local _,race = UnitRace("player")
26 local isHorde = (race == "Orc" or race == "Troll" or race == "Tauren" or race == "Scourge" or race == "BloodElf")
27 local isWestern = GetLocale() == "enUS" or GetLocale() == "deDE" or GetLocale() == "frFR" or GetLocale() == "esES"
28 local math_mod = math.fmod or math.mod
29  
30 local expansion = (MAX_PLAYER_LEVEL == 70)
31  
32 local Kalimdor, Eastern_Kingdoms, Outland = GetMapContinents()
33 if not Outland then
34 Outland = "Outland"
35 end
36  
37 local X_Y_ZEPPELIN = "%s/%s Zeppelin"
38 local X_Y_BOAT = "%s/%s Boat"
39 local X_Y_PORTAL = "%s/%s Portal"
40  
41 local recZones = {}
42 local recInstances = {}
43 local lows = setmetatable({}, {__index = function() return 0 end})
44 local highs = setmetatable({}, getmetatable(lows))
45 local continents = {}
46 local instances = {}
47 local paths = {}
48 local types = {}
49 local groupSizes = {}
50 local factions = {}
51  
52 local cost = {}
53  
54 local function PLAYER_LEVEL_UP(self)
55 playerLevel = UnitLevel("player")
56 for k in pairs(recZones) do
57 recZones[k] = nil
58 end
59 for k in pairs(recInstances) do
60 recInstances[k] = nil
61 end
62 for k in pairs(cost) do
63 cost[k] = nil
64 end
65 for zone in pairs(lows) do
66 if not self:IsHostile(zone) then
67 local low, high = self:GetLevel(zone)
68 if types[zone] == "Zone" then
69 if low <= playerLevel and playerLevel <= high then
70 recZones[zone] = true
71 end
72 elseif types[zone] == "Battleground" then
73 local playerLevel = playerLevel
74 if zone == Z["Alterac Valley"] then
75 playerLevel = playerLevel - 1
76 end
77 if playerLevel >= low and (playerLevel == MAX_PLAYER_LEVEL or math_mod(playerLevel, 10) >= 6) then
78 recInstances[zone] = true
79 end
80 elseif types[zone] == "Instance" then
81 if low <= playerLevel and playerLevel <= high then
82 recInstances[zone] = true
83 end
84 end
85 end
86 end
87 end
88  
89 function Tourist:GetLevel(zone)
90 self:argCheck(zone, 2, "string")
91 if types[zone] == "Battleground" then
92 if zone == Z["Alterac Valley"] then
93 if playerLevel <= 60 then
94 return 51, 60
95 else
96 return 61, 70
97 end
98 elseif playerLevel >= MAX_PLAYER_LEVEL then
99 return MAX_PLAYER_LEVEL, MAX_PLAYER_LEVEL
100 elseif playerLevel >= 60 then
101 return 60, 69
102 elseif playerLevel >= 50 then
103 return 50, 59
104 elseif playerLevel >= 40 then
105 return 40, 49
106 elseif playerLevel >= 30 then
107 return 30, 39
108 elseif playerLevel >= 20 or zone == Z["Arathi Basin"] then
109 return 20, 29
110 else
111 return 10, 19
112 end
113 end
114 return lows[zone], highs[zone]
115 end
116  
117 function Tourist:GetLevelColor(zone)
118 self:argCheck(zone, 2, "string")
119 if types[zone] == "Battleground" then
120 if (playerLevel < 51 and zone == Z["Alterac Valley"]) or (playerLevel < 20 and zone == Z["Arathi Basin"]) or (playerLevel < 10 and zone == Z["Warsong Gulch"]) then
121 return 1, 0, 0
122 end
123 local playerLevel = playerLevel
124 if zone == Z["Alterac Valley"] then
125 playerLevel = playerLevel - 1
126 end
127 if playerLevel == MAX_PLAYER_LEVEL then
128 return 1, 1, 0
129 end
130 playerLevel = math_mod(playerLevel, 10)
131 if playerLevel <= 5 then
132 return 1, playerLevel / 10, 0
133 elseif playerLevel <= 7 then
134 return 1, (playerLevel - 3) / 4, 0
135 else
136 return (9 - playerLevel) / 2, 1, 0
137 end
138 end
139 local low, high = lows[zone], highs[zone]
140  
141 if low <= 0 and high <= 0 then
142 -- City
143 return 1, 1, 1
144 elseif playerLevel == low and playerLevel == high then
145 return 1, 1, 0
146 elseif playerLevel <= low - 3 then
147 return 1, 0, 0
148 elseif playerLevel <= low then
149 return 1, (playerLevel - low - 3) / -6, 0
150 elseif playerLevel <= (low + high) / 2 then
151 return 1, (playerLevel - low) / (high - low) + 0.5, 0
152 elseif playerLevel <= high then
153 return 2 * (playerLevel - high) / (low - high), 1, 0
154 elseif playerLevel <= high + 3 then
155 local num = (playerLevel - high) / 6
156 return num, 1 - num, num
157 else
158 return 0.5, 0.5, 0.5
159 end
160 end
161  
162 function Tourist:GetFactionColor(zone)
163 self:argCheck(zone, 2, "string")
164 if factions[zone] == (isHorde and "Alliance" or "Horde") then
165 return 1, 0, 0
166 elseif factions[zone] == (isHorde and "Horde" or "Alliance") then
167 return 0, 1, 0
168 else
169 return 1, 1, 0
170 end
171 end
172  
173 local function retNil() return nil end
174 local function retOne(object, state)
175 if state == object then
176 return nil
177 else
178 return object
179 end
180 end
181  
182 local function retNormal(t, position)
183 return (next(t, position))
184 end
185  
186 function Tourist:IterateZoneInstances(zone)
187 self:argCheck(zone, 2, "string")
188  
189 local inst = instances[zone]
190  
191 if not inst then
192 return retNil
193 elseif type(inst) == "table" then
194 return retNormal, inst, nil
195 else
196 return retOne, inst, nil
197 end
198 end
199  
200 function Tourist:GetInstanceZone(instance)
201 self:argCheck(instance, 2, "string")
202 for k, v in pairs(instances) do
203 if v then
204 if type(v) == "string" then
205 if v == instance then
206 return k
207 end
208 else -- table
209 for l in pairs(v) do
210 if l == instance then
211 return k
212 end
213 end
214 end
215 end
216 end
217 end
218  
219 function Tourist:DoesZoneHaveInstances(zone)
220 self:argCheck(zone, 2, "string")
221 return instances[zone] and true or false
222 end
223  
224 local zonesInstances
225 local function initZonesInstances()
226 if not zonesInstances then
227 zonesInstances = {}
228 for zone, v in pairs(lows) do
229 if types[zone] ~= "Transport" then
230 zonesInstances[zone] = true
231 end
232 end
233 end
234 initZonesInstances = nil
235 end
236  
237 function Tourist:IterateZonesAndInstances()
238 if initZonesInstances then
239 initZonesInstances()
240 end
241 return retNormal, zonesInstances, nil
242 end
243  
244 local function zoneIter(_, position)
245 local k = next(zonesInstances, position)
246 while k ~= nil and (types[k] == "Instance" or types[k] == "Battleground") do
247 k = next(zonesInstances, k)
248 end
249 return k
250 end
251 function Tourist:IterateZones()
252 if initZonesInstances then
253 initZonesInstances()
254 end
255 return zoneIter, nil, nil
256 end
257  
258 local function instanceIter(_, position)
259 local k = next(zonesInstances, position)
260 while k ~= nil and (types[k] ~= "Instance" or types[k] ~= "Battleground") do
261 k = next(zonesInstances, k)
262 end
263 return k
264 end
265 function Tourist:IterateInstances()
266 if initZonesInstances then
267 initZonesInstances()
268 end
269 return instanceIter, nil, nil
270 end
271  
272 local function bgIter(_, position)
273 local k = next(zonesInstances, position)
274 while k ~= nil and types[k] ~= "Battleground" do
275 k = next(zonesInstances, k)
276 end
277 return k
278 end
279 function Tourist:IterateBattlegrounds()
280 if initZonesInstances then
281 initZonesInstances()
282 end
283 return bgIter, nil, nil
284 end
285  
286 local function allianceIter(_, position)
287 local k = next(zonesInstances, position)
288 while k ~= nil and factions[k] ~= "Alliance" do
289 k = next(zonesInstances, k)
290 end
291 return k
292 end
293 function Tourist:IterateAlliance()
294 if initZonesInstances then
295 initZonesInstances()
296 end
297 return allianceIter, nil, nil
298 end
299  
300 local function hordeIter(_, position)
301 local k = next(zonesInstances, position)
302 while k ~= nil and factions[k] ~= "Horde" do
303 k = next(zonesInstances, k)
304 end
305 return k
306 end
307 function Tourist:IterateHorde()
308 if initZonesInstances then
309 initZonesInstances()
310 end
311 return hordeIter, nil, nil
312 end
313  
314 if isHorde then
315 Tourist.IterateFriendly = Tourist.IterateHorde
316 Tourist.IterateHostile = Tourist.IterateAlliance
317 else
318 Tourist.IterateFriendly = Tourist.IterateAlliance
319 Tourist.IterateHostile = Tourist.IterateHorde
320 end
321  
322 local function contestedIter(_, position)
323 local k = next(zonesInstances, position)
324 while k ~= nil and factions[k] do
325 k = next(zonesInstances, k)
326 end
327 return k
328 end
329 function Tourist:IterateContested()
330 if initZonesInstances then
331 initZonesInstances()
332 end
333 return contestedIter, nil, nil
334 end
335  
336 local function kalimdorIter(_, position)
337 local k = next(zonesInstances, position)
338 while k ~= nil and continents[k] ~= Kalimdor do
339 k = next(zonesInstances, k)
340 end
341 return k
342 end
343 function Tourist:IterateKalimdor()
344 if initZonesInstances then
345 initZonesInstances()
346 end
347 return kalimdorIter, nil, nil
348 end
349  
350 local function easternKingdomsIter(_, position)
351 local k = next(zonesInstances, position)
352 while k ~= nil and continents[k] ~= Eastern_Kingdoms do
353 k = next(zonesInstances, k)
354 end
355 return k
356 end
357 function Tourist:IterateEasternKingdoms()
358 if initZonesInstances then
359 initZonesInstances()
360 end
361 return easternKingdomsIter, nil, nil
362 end
363  
364 local function outlandIter(_, position)
365 local k = next(zonesInstances, position)
366 while k ~= nil and continents[k] ~= Outland do
367 k = next(zonesInstances, k)
368 end
369 return k
370 end
371 function Tourist:IterateOutland()
372 if initZonesInstances then
373 initZonesInstances()
374 end
375 return outlandIter, nil, nil
376 end
377  
378 function Tourist:IterateRecommendedZones()
379 return retNormal, recZones, nil
380 end
381  
382 function Tourist:IterateRecommendedInstances()
383 return retNormal, recInstances, nil
384 end
385  
386 function Tourist:HasRecommendedInstances()
387 return next(recInstances) ~= nil
388 end
389  
390 function Tourist:IsInstance(zone)
391 self:argCheck(zone, 2, "string")
392 local t = types[zone]
393 return t == "Instance" or t == "Battleground"
394 end
395  
396 function Tourist:IsZone(zone)
397 self:argCheck(zone, 2, "string")
398 local t = types[zone]
399 return t ~= "Instance" and t ~= "Battleground" and t ~= "Transport"
400 end
401  
402 function Tourist:IsZoneOrInstance(zone)
403 self:argCheck(zone, 2, "string")
404 local t = types[zone]
405 return t and t ~= "Transport"
406 end
407  
408 function Tourist:IsBattleground(zone)
409 self:argCheck(zone, 2, "string")
410 local t = types[zone]
411 return t == "Battleground"
412 end
413  
414 function Tourist:IsAlliance(zone)
415 self:argCheck(zone, 2, "string")
416 return factions[zone] == "Alliance"
417 end
418  
419 function Tourist:IsHorde(zone)
420 self:argCheck(zone, 2, "string")
421 return factions[zone] == "Horde"
422 end
423  
424 if isHorde then
425 Tourist.IsFriendly = Tourist.IsHorde
426 Tourist.IsHostile = Tourist.IsAlliance
427 else
428 Tourist.IsFriendly = Tourist.IsAlliance
429 Tourist.IsHostile = Tourist.IsHorde
430 end
431  
432 function Tourist:IsContested(zone)
433 self:argCheck(zone, 2, "string")
434 return not factions[zone]
435 end
436  
437 function Tourist:GetContinent(zone)
438 self:argCheck(zone, 2, "string")
439  
440 return continents[zone] or UNKNOWN
441 end
442  
443 function Tourist:IsInKalimdor(zone)
444 self:argCheck(zone, 2, "string")
445  
446 return continents[zone] == Kalimdor
447 end
448  
449 function Tourist:IsInEasternKingdoms(zone)
450 self:argCheck(zone, 2, "string")
451  
452 return continents[zone] == Eastern_Kingdoms
453 end
454  
455 function Tourist:IsInOutland(zone)
456 self:argCheck(zone, 2, "string")
457  
458 return continents[zone] == Outland
459 end
460  
461 function Tourist:GetInstanceGroupSize(instance)
462 self:argCheck(instance, 2, "string")
463  
464 return groupSizes[instance] or 0
465 end
466  
467 local inf = 1/0
468 local stack = setmetatable({}, {__mode='k'})
469 local function iterator(S)
470 local position = S['#'] - 1
471 S['#'] = position
472 local x = S[position]
473 if not x then
474 for k in pairs(S) do
475 S[k] = nil
476 end
477 stack[S] = true
478 return nil
479 end
480 return x
481 end
482  
483 setmetatable(cost, {
484 __index = function(self, vertex)
485 local price = 1
486  
487 if lows[vertex] > playerLevel then
488 price = price * (1 + math.ceil((lows[vertex] - playerLevel) / 6))
489 end
490  
491 if factions[vertex] == (isHorde and "Horde" or "Alliance") then
492 price = price / 2
493 elseif factions[vertex] == (isHorde and "Alliance" or "Horde") then
494 if types[vertex] == "City" then
495 price = price * 10
496 else
497 price = price * 3
498 end
499 end
500  
501 if types[x] == "Transport" then
502 price = price * 2
503 end
504  
505 self[vertex] = price
506 return price
507 end
508 })
509  
510 function Tourist:IteratePath(alpha, bravo)
511 self:argCheck(alpha, 2, "string")
512 self:argCheck(bravo, 3, "string")
513  
514 if paths[alpha] == nil or paths[bravo] == nil then
515 return retNil
516 end
517  
518 local d = next(stack) or {}
519 stack[d] = nil
520 local Q = next(stack) or {}
521 stack[Q] = nil
522 local S = next(stack) or {}
523 stack[S] = nil
524 local pi = next(stack) or {}
525 stack[pi] = nil
526  
527 for vertex, v in pairs(paths) do
528 d[vertex] = inf
529 Q[vertex] = v
530 end
531 d[alpha] = 0
532  
533 while next(Q) do
534 local u
535 local min = inf
536 for z in pairs(Q) do
537 local value = d[z]
538 if value < min then
539 min = value
540 u = z
541 end
542 end
543 if min == inf then
544 return retNil
545 end
546 Q[u] = nil
547 if u == bravo then
548 break
549 end
550  
551 local adj = paths[u]
552 if type(adj) == "table" then
553 local d_u = d[u]
554 for v in pairs(adj) do
555 local c = d_u + cost[v]
556 if d[v] > c then
557 d[v] = c
558 pi[v] = u
559 end
560 end
561 elseif adj ~= false then
562 local c = d[u] + cost[adj]
563 if d[adj] > c then
564 d[adj] = c
565 pi[adj] = u
566 end
567 end
568 end
569  
570 local i = 1
571 local last = bravo
572 while last do
573 S[i] = last
574 i = i + 1
575 last = pi[last]
576 end
577  
578 for k in pairs(pi) do
579 pi[k] = nil
580 end
581 for k in pairs(Q) do
582 Q[k] = nil
583 end
584 for k in pairs(d) do
585 d[k] = nil
586 end
587 stack[pi] = true
588 stack[Q] = true
589 stack[d] = true
590  
591 S['#'] = i
592  
593 return iterator, S
594 end
595  
596 function Tourist:IterateBorderZones(zone)
597 self:argCheck(zone, 2, "string")
598 local path = paths[zone]
599 if not path then
600 return retNil
601 elseif type(path) == "table" then
602 return retNormal, path
603 else
604 return retOne, path
605 end
606 end
607  
608 local function activate(self, oldLib, oldDeactivate)
609 Tourist = self
610 self.frame = oldLib and oldLib.frame or CreateFrame("Frame", "TouristLibFrame", UIParent)
611 self.frame:UnregisterAllEvents()
612 self.frame:RegisterEvent("PLAYER_LEVEL_UP")
613 self.frame:RegisterEvent("PLAYER_ENTERING_WORLD")
614 self.frame:SetScript("OnEvent", function()
615 PLAYER_LEVEL_UP(self)
616 end)
617  
618 local BOOTYBAY_RATCHET_BOAT = string.format(X_Y_BOAT, Z["Booty Bay"], Z["Ratchet"])
619 local MENETHIL_THERAMORE_BOAT = string.format(X_Y_BOAT, Z["Menethil Harbor"], Z["Theramore Isle"])
620 local MENETHIL_AUBERDINE_BOAT = string.format(X_Y_BOAT, Z["Menethil Harbor"], Z["Auberdine"])
621 local AUBERDINE_DARNASSUS_BOAT = string.format(X_Y_BOAT, Z["Auberdine"], Z["Darnassus"])
622 local AUBERDINE_AZUREMYST_BOAT = string.format(X_Y_BOAT, Z["Auberdine"], Z["Azuremyst Isle"])
623 local ORGRIMMAR_UNDERCITY_ZEPPELIN = string.format(X_Y_ZEPPELIN, Z["Orgrimmar"], Z["Undercity"])
624 local ORGRIMMAR_GROMGOL_ZEPPELIN = string.format(X_Y_ZEPPELIN, Z["Orgrimmar"], Z["Grom'gol Base Camp"])
625 local UNDERCITY_GROMGOL_ZEPPELIN = string.format(X_Y_ZEPPELIN, Z["Undercity"], Z["Grom'gol Base Camp"])
626 local SHATTRATH_IRONFORGE_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Ironforge"])
627 local SHATTRATH_STORMWIND_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Stormwind City"])
628 local SHATTRATH_DARNASSUS_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Darnassus"])
629 local SHATTRATH_ORGRIMMAR_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Orgrimmar"])
630 local SHATTRATH_THUNDERBLUFF_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Thunder Bluff"])
631 local SHATTRATH_UNDERCITY_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Undercity"])
632 local SHATTRATH_EXODAR_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["The Exodar"])
633 local SHATTRATH_SILVERMOON_PORTAL = string.format(X_Y_PORTAL, Z["Shattrath City"], Z["Silvermoon City"])
634  
635 local zones = {}
636  
637 if expansion then
638 zones[AUBERDINE_AZUREMYST_BOAT] = {
639 paths = {
640 [Z["Darkshore"]] = true,
641 [Z["Azuremyst Isle"]] = true,
642 },
643 faction = "Alliance",
644 type = "Transport",
645 }
646 end
647  
648 zones[AUBERDINE_DARNASSUS_BOAT] = {
649 paths = {
650 [Z["Darkshore"]] = true,
651 [Z["Darnassus"]] = true,
652 },
653 faction = "Alliance",
654 type = "Transport",
655 }
656  
657 zones[BOOTYBAY_RATCHET_BOAT] = {
658 paths = {
659 [Z["Stranglethorn Vale"]] = true,
660 [Z["The Barrens"]] = true,
661 },
662 type = "Transport",
663 }
664  
665 zones[MENETHIL_AUBERDINE_BOAT] = {
666 paths = {
667 [Z["Wetlands"]] = true,
668 [Z["Darkshore"]] = true,
669 },
670 faction = "Alliance",
671 type = "Transport",
672 }
673  
674 zones[MENETHIL_THERAMORE_BOAT] = {
675 paths = {
676 [Z["Wetlands"]] = true,
677 [Z["Dustwallow Marsh"]] = true,
678 },
679 faction = "Alliance",
680 type = "Transport",
681 }
682  
683 zones[ORGRIMMAR_GROMGOL_ZEPPELIN] = {
684 paths = {
685 [Z["Durotar"]] = true,
686 [Z["Stranglethorn Vale"]] = true,
687 },
688 faction = "Horde",
689 type = "Transport",
690 }
691  
692 zones[ORGRIMMAR_UNDERCITY_ZEPPELIN] = {
693 paths = {
694 [Z["Durotar"]] = true,
695 [Z["Tirisfal Glades"]] = true,
696 },
697 faction = "Horde",
698 type = "Transport",
699 }
700  
701 if expansion then
702 zones[SHATTRATH_DARNASSUS_PORTAL] = {
703 paths = Z["Darnassus"],
704 type = "Transport",
705 }
706  
707 zones[SHATTRATH_EXODAR_PORTAL] = {
708 paths = Z["The Exodar"],
709 type = "Transport",
710 }
711  
712 zones[SHATTRATH_IRONFORGE_PORTAL] = {
713 paths = Z["Ironforge"],
714 type = "Transport",
715 }
716  
717 zones[SHATTRATH_ORGRIMMAR_PORTAL] = {
718 paths = Z["Orgrimmar"],
719 type = "Transport",
720 }
721  
722 zones[SHATTRATH_SILVERMOON_PORTAL] = {
723 paths = Z["Silvermoon City"],
724 type = "Transport",
725 }
726  
727 zones[SHATTRATH_STORMWIND_PORTAL] = {
728 paths = Z["Stormwind City"],
729 type = "Transport",
730 }
731  
732 zones[SHATTRATH_THUNDERBLUFF_PORTAL] = {
733 paths = Z["Thunder Bluff"],
734 type = "Transport",
735 }
736  
737 zones[SHATTRATH_UNDERCITY_PORTAL] = {
738 paths = Z["Undercity"],
739 type = "Transport",
740 }
741  
742 zones[Z["The Dark Portal"]] = {
743 paths = {
744 [Z["Blasted Lands"]] = true,
745 [Z["Hellfire Peninsula"]] = true,
746 },
747 type = "Transport",
748 }
749 end
750  
751 zones[UNDERCITY_GROMGOL_ZEPPELIN] = {
752 paths = {
753 [Z["Stranglethorn Vale"]] = true,
754 [Z["Tirisfal Glades"]] = true,
755 },
756 faction = "Horde",
757 type = "Transport",
758 }
759  
760 zones[Z["Alterac Valley"]] = {
761 continent = Eastern_Kingdoms,
762 paths = Z["Alterac Mountains"],
763 groupSize = 40,
764 type = "Battleground",
765 }
766  
767 zones[Z["Arathi Basin"]] = {
768 continent = Eastern_Kingdoms,
769 paths = Z["Arathi Highlands"],
770 groupSize = 15,
771 type = "Battleground",
772 }
773  
774 zones[Z["Warsong Gulch"]] = {
775 continent = Kalimdor,
776 paths = isHorde and Z["The Barrens"] or Z["Ashenvale"],
777 groupSize = 10,
778 type = "Battleground",
779 }
780  
781 zones[Z["Deeprun Tram"]] = {
782 continent = Eastern_Kingdoms,
783 paths = {
784 [Z["Stormwind City"]] = true,
785 [Z["Ironforge"]] = true,
786 },
787 faction = "Alliance",
788 }
789  
790 zones[Z["Ironforge"]] = {
791 continent = Eastern_Kingdoms,
792 instances = Z["Gnomeregan"],
793 paths = {
794 [Z["Dun Morogh"]] = true,
795 [Z["Deeprun Tram"]] = true,
796 },
797 faction = "Alliance",
798 type = "City",
799 }
800  
801 if expansion then
802 zones[Z["Silvermoon City"]] = {
803 continent = Eastern_Kingdoms,
804 paths = {
805 [Z["Eversong Woods"]] = true,
806 [Z["Undercity"]] = true,
807 },
808 faction = "Horde",
809 type = "City",
810 }
811 end
812  
813 zones[Z["Stormwind City"]] = {
814 continent = Eastern_Kingdoms,
815 instances = Z["The Stockade"],
816 paths = {
817 [Z["Deeprun Tram"]] = true,
818 [Z["The Stockade"]] = true,
819 [Z["Elwynn Forest"]] = true,
820 },
821 faction = "Alliance",
822 type = "City",
823 }
824  
825 zones[Z["Undercity"]] = {
826 continent = Eastern_Kingdoms,
827 instances = Z["Scarlet Monastery"],
828 paths = {
829 [Z["Silvermoon City"]] = expansion and true or nil,
830 [Z["Tirisfal Glades"]] = true,
831 },
832 faction = "Horde",
833 type = "City",
834 }
835  
836 zones[Z["Dun Morogh"]] = {
837 low = 1,
838 high = 10,
839 continent = Eastern_Kingdoms,
840 instances = Z["Gnomeregan"],
841 paths = {
842 [Z["Wetlands"]] = true,
843 [Z["Gnomeregan"]] = true,
844 [Z["Ironforge"]] = true,
845 [Z["Loch Modan"]] = true,
846 },
847 faction = "Alliance",
848 }
849  
850 zones[Z["Elwynn Forest"]] = {
851 low = 1,
852 high = 10,
853 continent = Eastern_Kingdoms,
854 instances = Z["The Stockade"],
855 paths = {
856 [Z["Westfall"]] = true,
857 [Z["Redridge Mountains"]] = true,
858 [Z["Stormwind City"]] = true,
859 [Z["Duskwood"]] = true,
860 },
861 faction = "Alliance",
862 }
863  
864 if expansion then
865 zones[Z["Eversong Woods"]] = {
866 low = 1,
867 high = 10,
868 continent = Eastern_Kingdoms,
869 paths = {
870 [Z["Silvermoon City"]] = true,
871 [Z["Ghostlands"]] = true,
872 },
873 faction = "Horde",
874 }
875 end
876  
877 zones[Z["Tirisfal Glades"]] = {
878 low = 1,
879 high = 10,
880 continent = Eastern_Kingdoms,
881 instances = Z["Scarlet Monastery"],
882 paths = {
883 [Z["Western Plaguelands"]] = true,
884 [Z["Undercity"]] = true,
885 [Z["Scarlet Monastery"]] = true,
886 [UNDERCITY_GROMGOL_ZEPPELIN] = true,
887 [ORGRIMMAR_UNDERCITY_ZEPPELIN] = true,
888 [Z["Silverpine Forest"]] = true,
889 },
890 faction = "Horde",
891 }
892  
893 if expansion then
894 zones[Z["Ghostlands"]] = {
895 low = 10,
896 high = 20,
897 continent = Eastern_Kingdoms,
898 instances = Z["Zul'Aman"],
899 paths = {
900 [Z["Eastern Plaguelands"]] = true,
901 [Z["Zul'Aman"]] = true,
902 [Z["Eversong Woods"]] = true,
903 },
904 faction = "Horde",
905 }
906 end
907  
908 zones[Z["Loch Modan"]] = {
909 low = 10,
910 high = 20,
911 continent = Eastern_Kingdoms,
912 paths = {
913 [Z["Wetlands"]] = true,
914 [Z["Badlands"]] = true,
915 [Z["Dun Morogh"]] = true,
916 [Z["Searing Gorge"]] = not isHorde and true or nil,
917 },
918 faction = "Alliance",
919 }
920  
921 zones[Z["Silverpine Forest"]] = {
922 low = 10,
923 high = 20,
924 continent = Eastern_Kingdoms,
925 instances = Z["Shadowfang Keep"],
926 paths = {
927 [Z["Tirisfal Glades"]] = true,
928 [Z["Hillsbrad Foothills"]] = true,
929 [Z["Shadowfang Keep"]] = true,
930 },
931 faction = "Horde",
932 }
933  
934 zones[Z["Westfall"]] = {
935 low = 10,
936 high = 20,
937 continent = Eastern_Kingdoms,
938 instances = Z["The Deadmines"],
939 paths = {
940 [Z["Duskwood"]] = true,
941 [Z["Elwynn Forest"]] = true,
942 [Z["The Deadmines"]] = true,
943 },
944 faction = "Alliance",
945 }
946  
947 zones[Z["Redridge Mountains"]] = {
948 low = 15,
949 high = 25,
950 continent = Eastern_Kingdoms,
951 paths = {
952 [Z["Burning Steppes"]] = true,
953 [Z["Elwynn Forest"]] = true,
954 [Z["Duskwood"]] = true,
955 },
956 }
957  
958 zones[Z["Duskwood"]] = {
959 low = 18,
960 high = 30,
961 continent = Eastern_Kingdoms,
962 paths = {
963 [Z["Redridge Mountains"]] = true,
964 [Z["Stranglethorn Vale"]] = true,
965 [Z["Westfall"]] = true,
966 [Z["Deadwind Pass"]] = true,
967 [Z["Elwynn Forest"]] = true,
968 },
969 }
970  
971 zones[Z["Hillsbrad Foothills"]] = {
972 low = 20,
973 high = 30,
974 continent = Eastern_Kingdoms,
975 paths = {
976 [Z["Alterac Mountains"]] = true,
977 [Z["The Hinterlands"]] = true,
978 [Z["Arathi Highlands"]] = true,
979 [Z["Silverpine Forest"]] = true,
980 },
981 }
982  
983 zones[Z["Wetlands"]] = {
984 low = 20,
985 high = 30,
986 continent = Eastern_Kingdoms,
987 paths = {
988 [Z["Arathi Highlands"]] = true,
989 [MENETHIL_AUBERDINE_BOAT] = true,
990 [MENETHIL_THERAMORE_BOAT] = true,
991 [Z["Dun Morogh"]] = true,
992 [Z["Loch Modan"]] = true,
993 },
994 }
995  
996 zones[Z["Alterac Mountains"]] = {
997 low = 30,
998 high = 40,
999 continent = Eastern_Kingdoms,
1000 instances = Z["Alterac Valley"],
1001 paths = {
1002 [Z["Western Plaguelands"]] = true,
1003 [Z["Alterac Valley"]] = true,
1004 [Z["Hillsbrad Foothills"]] = true,
1005 },
1006 }
1007  
1008 zones[Z["Arathi Highlands"]] = {
1009 low = 30,
1010 high = 40,
1011 continent = Eastern_Kingdoms,
1012 instances = Z["Arathi Basin"],
1013 paths = {
1014 [Z["Wetlands"]] = true,
1015 [Z["Hillsbrad Foothills"]] = true,
1016 [Z["Arathi Basin"]] = true,
1017 },
1018 }
1019  
1020 zones[Z["Stranglethorn Vale"]] = {
1021 low = 30,
1022 high = 45,
1023 continent = Eastern_Kingdoms,
1024 instances = Z["Zul'Gurub"],
1025 paths = {
1026 [Z["Zul'Gurub"]] = true,
1027 [BOOTYBAY_RATCHET_BOAT] = true,
1028 [Z["Duskwood"]] = true,
1029 [ORGRIMMAR_GROMGOL_ZEPPELIN] = true,
1030 [UNDERCITY_GROMGOL_ZEPPELIN] = true,
1031 },
1032 }
1033  
1034 zones[Z["Badlands"]] = {
1035 low = 35,
1036 high = 45,
1037 continent = Eastern_Kingdoms,
1038 instances = Z["Uldaman"],
1039 paths = {
1040 [Z["Uldaman"]] = true,
1041 [Z["Searing Gorge"]] = true,
1042 [Z["Loch Modan"]] = true,
1043 },
1044 }
1045  
1046 zones[Z["Swamp of Sorrows"]] = {
1047 low = 35,
1048 high = 45,
1049 continent = Eastern_Kingdoms,
1050 instances = Z["The Temple of Atal'Hakkar"],
1051 paths = {
1052 [Z["Blasted Lands"]] = true,
1053 [Z["Deadwind Pass"]] = true,
1054 [Z["The Temple of Atal'Hakkar"]] = true,
1055 },
1056 }
1057  
1058 zones[Z["The Hinterlands"]] = {
1059 low = 40,
1060 high = 50,
1061 continent = Eastern_Kingdoms,
1062 paths = {
1063 [Z["Hillsbrad Foothills"]] = true,
1064 [Z["Western Plaguelands"]] = true,
1065 },
1066 }
1067  
1068 zones[Z["Searing Gorge"]] = {
1069 low = 43,
1070 high = 50,
1071 continent = Eastern_Kingdoms,
1072 instances = {
1073 [Z["Blackrock Depths"]] = true,
1074 [Z["Blackwing Lair"]] = true,
1075 [Z["Molten Core"]] = true,
1076 [Z["Blackrock Spire"]] = true,
1077 },
1078 paths = {
1079 [Z["Blackrock Mountain"]] = true,
1080 [Z["Badlands"]] = true,
1081 [Z["Loch Modan"]] = not isHorde and true or nil,
1082 },
1083 }
1084  
1085 zones[Z["Blackrock Mountain"]] = {
1086 low = 42,
1087 high = 54,
1088 continent = Eastern_Kingdoms,
1089 instances = {
1090 [Z["Blackrock Depths"]] = true,
1091 [Z["Blackwing Lair"]] = true,
1092 [Z["Molten Core"]] = true,
1093 [Z["Blackrock Spire"]] = true,
1094 },
1095 paths = {
1096 [Z["Burning Steppes"]] = true,
1097 [Z["Blackwing Lair"]] = true,
1098 [Z["Molten Core"]] = true,
1099 [Z["Blackrock Depths"]] = true,
1100 [Z["Searing Gorge"]] = true,
1101 [Z["Blackrock Spire"]] = true,
1102 },
1103 }
1104  
1105 zones[Z["Deadwind Pass"]] = {
1106 low = 55,
1107 high = 60,
1108 continent = Eastern_Kingdoms,
1109 instances = expansion and Z["Karazhan"] or nil,
1110 paths = {
1111 [Z["Duskwood"]] = true,
1112 [Z["Swamp of Sorrows"]] = true,
1113 [Z["Karazhan"]] = expansion and true or nil,
1114 },
1115 }
1116  
1117 zones[Z["Blasted Lands"]] = {
1118 low = 45,
1119 high = 55,
1120 continent = Eastern_Kingdoms,
1121 paths = {
1122 [Z["The Dark Portal"]] = expansion and true or nil,
1123 [Z["Swamp of Sorrows"]] = true,
1124 },
1125 }
1126  
1127 zones[Z["Burning Steppes"]] = {
1128 low = 50,
1129 high = 58,
1130 continent = Eastern_Kingdoms,
1131 instances = {
1132 [Z["Blackrock Depths"]] = true,
1133 [Z["Blackwing Lair"]] = true,
1134 [Z["Molten Core"]] = true,
1135 [Z["Blackrock Spire"]] = true,
1136 },
1137 paths = {
1138 [Z["Blackrock Mountain"]] = true,
1139 [Z["Redridge Mountains"]] = true,
1140 },
1141 }
1142  
1143 zones[Z["Western Plaguelands"]] = {
1144 low = 51,
1145 high = 58,
1146 continent = Eastern_Kingdoms,
1147 instances = Z["Scholomance"],
1148 paths = {
1149 [Z["The Hinterlands"]] = true,
1150 [Z["Eastern Plaguelands"]] = true,
1151 [Z["Tirisfal Glades"]] = true,
1152 [Z["Scholomance"]] = true,
1153 [Z["Alterac Mountains"]] = true,
1154 },
1155 }
1156  
1157 zones[Z["Eastern Plaguelands"]] = {
1158 low = 53,
1159 high = 60,
1160 continent = Eastern_Kingdoms,
1161 instances = {
1162 [Z["Stratholme"]] = true,
1163 [Z["Naxxramas"]] = true,
1164 },
1165 paths = {
1166 [Z["Western Plaguelands"]] = true,
1167 [Z["Naxxramas"]] = true,
1168 [Z["Stratholme"]] = true,
1169 [Z["Ghostlands"]] = expansion and true or nil,
1170 },
1171 }
1172  
1173 zones[Z["The Deadmines"]] = {
1174 low = isWestern and 17 or 15,
1175 high = isWestern and 26 or 20,
1176 continent = Eastern_Kingdoms,
1177 paths = Z["Westfall"],
1178 groupSize = 5,
1179 faction = "Alliance",
1180 type = "Instance",
1181 }
1182  
1183 zones[Z["Shadowfang Keep"]] = {
1184 low = isWestern and 22 or 18,
1185 high = isWestern and 30 or 25,
1186 continent = Eastern_Kingdoms,
1187 paths = Z["Silverpine Forest"],
1188 groupSize = 5,
1189 faction = "Horde",
1190 type = "Instance",
1191 }
1192  
1193 zones[Z["The Stockade"]] = {
1194 low = isWestern and 24 or 23,
1195 high = isWestern and 32 or 26,
1196 continent = Eastern_Kingdoms,
1197 paths = Z["Stormwind City"],
1198 groupSize = 5,
1199 faction = "Alliance",
1200 type = "Instance",
1201 }
1202  
1203 zones[Z["Gnomeregan"]] = {
1204 low = isWestern and 29 or 24,
1205 high = isWestern and 38 or 33,
1206 continent = Eastern_Kingdoms,
1207 paths = Z["Dun Morogh"],
1208 groupSize = 5,
1209 faction = "Alliance",
1210 type = "Instance",
1211 }
1212  
1213 zones[Z["Scarlet Monastery"]] = {
1214 low = isWestern and 34 or 30,
1215 high = isWestern and 45 or 40,
1216 continent = Eastern_Kingdoms,
1217 paths = Z["Tirisfal Glades"],
1218 groupSize = 5,
1219 faction = "Horde",
1220 type = "Instance",
1221 }
1222  
1223 zones[Z["Uldaman"]] = {
1224 low = isWestern and 41 or 35,
1225 high = isWestern and 51 or 45,
1226 continent = Eastern_Kingdoms,
1227 paths = Z["Badlands"],
1228 groupSize = 5,
1229 type = "Instance",
1230 }
1231  
1232 zones[Z["The Temple of Atal'Hakkar"]] = {
1233 low = isWestern and 50 or 44,
1234 high = isWestern and 60 or 50,
1235 continent = Eastern_Kingdoms,
1236 paths = Z["Swamp of Sorrows"],
1237 groupSize = 5,
1238 type = "Instance",
1239 }
1240  
1241 zones[Z["Blackrock Depths"]] = {
1242 low = isWestern and 52 or 48,
1243 high = isWestern and 60 or 56,
1244 continent = Eastern_Kingdoms,
1245 paths = {
1246 [Z["Molten Core"]] = true,
1247 [Z["Blackrock Mountain"]] = true,
1248 },
1249 groupSize = 5,
1250 type = "Instance",
1251 }
1252  
1253 zones[Z["Blackrock Spire"]] = {
1254 low = isWestern and 55 or 53,
1255 high = 60,
1256 continent = Eastern_Kingdoms,
1257 paths = {
1258 [Z["Blackrock Mountain"]] = true,
1259 [Z["Blackwing Lair"]] = true,
1260 },
1261 groupSize = 10,
1262 type = "Instance",
1263 }
1264  
1265 zones[Z["Scholomance"]] = {
1266 low = 58,
1267 high = 60,
1268 continent = Eastern_Kingdoms,
1269 paths = Z["Western Plaguelands"],
1270 groupSize = 5,
1271 type = "Instance",
1272 }
1273  
1274 zones[Z["Stratholme"]] = {
1275 low = isWestern and 58 or 55,
1276 high = 60,
1277 continent = Eastern_Kingdoms,
1278 paths = Z["Eastern Plaguelands"],
1279 groupSize = 5,
1280 type = "Instance",
1281 }
1282  
1283 zones[Z["Blackwing Lair"]] = {
1284 low = 60,
1285 high = 62,
1286 continent = Eastern_Kingdoms,
1287 paths = Z["Blackrock Mountain"],
1288 groupSize = 40,
1289 type = "Instance",
1290 }
1291  
1292 zones[Z["Molten Core"]] = {
1293 low = 60,
1294 high = 62,
1295 continent = Eastern_Kingdoms,
1296 paths = Z["Blackrock Mountain"],
1297 groupSize = 40,
1298 type = "Instance",
1299 }
1300  
1301 zones[Z["Zul'Gurub"]] = {
1302 low = 60,
1303 high = 62,
1304 continent = Eastern_Kingdoms,
1305 paths = Z["Stranglethorn Vale"],
1306 groupSize = 20,
1307 type = "Instance",
1308 }
1309  
1310 zones[Z["Naxxramas"]] = {
1311 low = 60,
1312 high = 70,
1313 continent = Eastern_Kingdoms,
1314 groupSize = 40,
1315 type = "Instance",
1316 }
1317  
1318 if expansion then
1319 zones[Z["Karazhan"]] = {
1320 low = 70,
1321 high = 70,
1322 continent = Eastern_Kingdoms,
1323 paths = Z["Deadwind Pass"],
1324 groupSize = 10,
1325 type = "Instance",
1326 }
1327 end
1328  
1329 if expansion then
1330 zones[Z["Zul'Aman"]] = {
1331 low = 70,
1332 high = 70,
1333 continent = Eastern_Kingdoms,
1334 paths = Z["Ghostlands"],
1335 groupSize = 0,
1336 type = "Instance",
1337 }
1338 end
1339  
1340 zones[Z["Darnassus"]] = {
1341 continent = Kalimdor,
1342 paths = {
1343 [Z["Teldrassil"]] = true,
1344 [AUBERDINE_DARNASSUS_BOAT] = true,
1345 },
1346 faction = "Alliance",
1347 type = "City",
1348 }
1349  
1350 zones[Z["Hyjal"]] = {
1351 continent = Kalimdor,
1352 }
1353  
1354 zones[Z["Moonglade"]] = {
1355 continent = Kalimdor,
1356 paths = {
1357 [Z["Felwood"]] = true,
1358 [Z["Winterspring"]] = true,
1359 },
1360 }
1361  
1362 zones[Z["Orgrimmar"]] = {
1363 continent = Kalimdor,
1364 instances = Z["Ragefire Chasm"],
1365 paths = {
1366 [Z["Durotar"]] = true,
1367 [Z["Ragefire Chasm"]] = true,
1368 },
1369 faction = "Horde",
1370 type = "City",
1371 }
1372  
1373 if expansion then
1374 zones[Z["The Exodar"]] = {
1375 continent = Kalimdor,
1376 paths = Z["Azuremyst Isle"],
1377 faction = "Alliance",
1378 type = "City",
1379 }
1380 end
1381  
1382 zones[Z["Thunder Bluff"]] = {
1383 continent = Kalimdor,
1384 paths = Z["Mulgore"],
1385 faction = "Horde",
1386 type = "City",
1387 }
1388  
1389 if expansion then
1390 zones[Z["Azuremyst Isle"]] = {
1391 low = 1,
1392 high = 10,
1393 continent = Kalimdor,
1394 paths = {
1395 [Z["The Exodar"]] = true,
1396 [Z["Bloodmyst Isle"]] = true,
1397 [AUBERDINE_AZUREMYST_BOAT] = true,
1398 },
1399 faction = "Alliance",
1400 }
1401 end
1402  
1403 zones[Z["Durotar"]] = {
1404 low = 1,
1405 high = 10,
1406 continent = Kalimdor,
1407 instances = Z["Ragefire Chasm"],
1408 paths = {
1409 [ORGRIMMAR_UNDERCITY_ZEPPELIN] = true,
1410 [ORGRIMMAR_GROMGOL_ZEPPELIN] = true,
1411 [Z["The Barrens"]] = true,
1412 [Z["Orgrimmar"]] = true,
1413 },
1414 faction = "Horde",
1415 }
1416  
1417 zones[Z["Mulgore"]] = {
1418 low = 1,
1419 high = 10,
1420 continent = Kalimdor,
1421 paths = {
1422 [Z["Thunder Bluff"]] = true,
1423 [Z["The Barrens"]] = true,
1424 },
1425 faction = "Horde",
1426 }
1427  
1428 zones[Z["Teldrassil"]] = {
1429 low = 1,
1430 high = 10,
1431 continent = Kalimdor,
1432 paths = Z["Darnassus"],
1433 faction = "Alliance",
1434 }
1435  
1436 if expansion then
1437 zones[Z["Bloodmyst Isle"]] = {
1438 low = 10,
1439 high = 20,
1440 continent = Kalimdor,
1441 paths = {
1442 [Z["Azuremyst Isle"]] = true,
1443 },
1444 faction = "Alliance",
1445 }
1446 end
1447  
1448 zones[Z["Darkshore"]] = {
1449 low = 10,
1450 high = 20,
1451 continent = Kalimdor,
1452 paths = {
1453 [MENETHIL_AUBERDINE_BOAT] = true,
1454 [AUBERDINE_DARNASSUS_BOAT] = true,
1455 [AUBERDINE_AZUREMYST_BOAT] = expansion and true or nil,
1456 [Z["Ashenvale"]] = true,
1457 },
1458 faction = "Alliance",
1459 }
1460  
1461 zones[Z["The Barrens"]] = {
1462 low = 10,
1463 high = 25,
1464 continent = Kalimdor,
1465 instances = {
1466 [Z["Razorfen Kraul"]] = true,
1467 [Z["Wailing Caverns"]] = true,
1468 [Z["Razorfen Downs"]] = true,
1469 [Z["Warsong Gulch"]] = isHorde and true or nil,
1470 },
1471 paths = {
1472 [Z["Thousand Needles"]] = true,
1473 [Z["Razorfen Kraul"]] = true,
1474 [Z["Ashenvale"]] = true,
1475 [Z["Durotar"]] = true,
1476 [Z["Wailing Caverns"]] = true,
1477 [BOOTYBAY_RATCHET_BOAT] = true,
1478 [Z["Dustwallow Marsh"]] = true,
1479 [Z["Razorfen Downs"]] = true,
1480 [Z["Stonetalon Mountains"]] = true,
1481 [Z["Mulgore"]] = true,
1482 [Z["Warsong Gulch"]] = isHorde and true or nil,
1483 },
1484 faction = "Horde",
1485 }
1486  
1487 zones[Z["Stonetalon Mountains"]] = {
1488 low = 15,
1489 high = 27,
1490 continent = Kalimdor,
1491 paths = {
1492 [Z["Desolace"]] = true,
1493 [Z["The Barrens"]] = true,
1494 [Z["Ashenvale"]] = true,
1495 },
1496 }
1497  
1498 zones[Z["Ashenvale"]] = {
1499 low = 18,
1500 high = 30,
1501 continent = Kalimdor,
1502 instances = {
1503 [Z["Blackfathom Deeps"]] = true,
1504 [Z["Warsong Gulch"]] = not isHorde and true or nil,
1505 },
1506 paths = {
1507 [Z["Azshara"]] = true,
1508 [Z["The Barrens"]] = true,
1509 [Z["Blackfathom Deeps"]] = true,
1510 [Z["Warsong Gulch"]] = not isHorde and true or nil,
1511 [Z["Felwood"]] = true,
1512 [Z["Darkshore"]] = true,
1513 [Z["Stonetalon Mountains"]] = true,
1514 },
1515 }
1516  
1517 zones[Z["Thousand Needles"]] = {
1518 low = 25,
1519 high = 35,
1520 continent = Kalimdor,
1521 paths = {
1522 [Z["Feralas"]] = true,
1523 [Z["The Barrens"]] = true,
1524 [Z["Tanaris"]] = true,
1525 },
1526 }
1527  
1528 zones[Z["Desolace"]] = {
1529 low = 30,
1530 high = 40,
1531 continent = Kalimdor,
1532 instances = Z["Maraudon"],
1533 paths = {
1534 [Z["Feralas"]] = true,
1535 [Z["Stonetalon Mountains"]] = true,
1536 [Z["Maraudon"]] = true,
1537 },
1538 }
1539  
1540 zones[Z["Dustwallow Marsh"]] = {
1541 low = 35,
1542 high = 45,
1543 continent = Kalimdor,
1544 instances = Z["Onyxia's Lair"],
1545 paths = {
1546 [Z["Onyxia's Lair"]] = true,
1547 [Z["The Barrens"]] = true,
1548 [MENETHIL_THERAMORE_BOAT] = true,
1549 },
1550 }
1551  
1552 zones[Z["Feralas"]] = {
1553 low = 40,
1554 high = 50,
1555 continent = Kalimdor,
1556 instances = Z["Dire Maul"],
1557 paths = {
1558 [Z["Thousand Needles"]] = true,
1559 [Z["Desolace"]] = true,
1560 [Z["Dire Maul"]] = true,
1561 },
1562 }
1563  
1564 zones[Z["Tanaris"]] = {
1565 low = 40,
1566 high = 50,
1567 continent = Kalimdor,
1568 instances = {
1569 [Z["Zul'Farrak"]] = true,
1570 [Z["Caverns of Time"]] = expansion and true or nil,
1571 },
1572 paths = {
1573 [Z["Thousand Needles"]] = true,
1574 [Z["Caverns of Time"]] = expansion and true or nil,
1575 [Z["Un'Goro Crater"]] = true,
1576 [Z["Zul'Farrak"]] = true,
1577 },
1578 }
1579  
1580 zones[Z["Azshara"]] = {
1581 low = 45,
1582 high = 55,
1583 continent = Kalimdor,
1584 paths = Z["Ashenvale"],
1585 }
1586  
1587 zones[Z["Felwood"]] = {
1588 low = 48,
1589 high = 55,
1590 continent = Kalimdor,
1591 paths = {
1592 [Z["Winterspring"]] = true,
1593 [Z["Moonglade"]] = true,
1594 [Z["Ashenvale"]] = true,
1595 },
1596 }
1597  
1598 zones[Z["Un'Goro Crater"]] = {
1599 low = 48,
1600 high = 55,
1601 continent = Kalimdor,
1602 paths = {
1603 [Z["Silithus"]] = true,
1604 [Z["Tanaris"]] = true,
1605 },
1606 }
1607  
1608 zones[Z["Silithus"]] = {
1609 low = 55,
1610 high = 60,
1611 continent = Kalimdor,
1612 instances = {
1613 [Z["Ahn'Qiraj"]] = true,
1614 [Z["Ruins of Ahn'Qiraj"]] = true,
1615 },
1616 paths = {
1617 [Z["Ruins of Ahn'Qiraj"]] = true,
1618 [Z["Un'Goro Crater"]] = true,
1619 [Z["Ahn'Qiraj"]] = true,
1620 },
1621 }
1622  
1623 zones[Z["Winterspring"]] = {
1624 low = 55,
1625 high = 60,
1626 continent = Kalimdor,
1627 paths = {
1628 [Z["Felwood"]] = true,
1629 [Z["Moonglade"]] = true,
1630 },
1631 }
1632  
1633 zones[Z["Ragefire Chasm"]] = {
1634 low = 13,
1635 high = isWestern and 18 or 15,
1636 continent = Kalimdor,
1637 paths = Z["Orgrimmar"],
1638 groupSize = 5,
1639 faction = "Horde",
1640 type = "Instance",
1641 }
1642  
1643 zones[Z["Wailing Caverns"]] = {
1644 low = isWestern and 17 or 15,
1645 high = isWestern and 24 or 21,
1646 continent = Kalimdor,
1647 paths = Z["The Barrens"],
1648 groupSize = 5,
1649 faction = "Horde",
1650 type = "Instance",
1651 }
1652  
1653 zones[Z["Blackfathom Deeps"]] = {
1654 low = isWestern and 24 or 20,
1655 high = isWestern and 32 or 27,
1656 continent = Kalimdor,
1657 paths = Z["Ashenvale"],
1658 groupSize = 5,
1659 type = "Instance",
1660 }
1661  
1662 zones[Z["Razorfen Kraul"]] = {
1663 low = isWestern and 29 or 25,
1664 high = isWestern and 38 or 35,
1665 continent = Kalimdor,
1666 paths = Z["The Barrens"],
1667 groupSize = 5,
1668 type = "Instance",
1669 }
1670  
1671 zones[Z["Razorfen Downs"]] = {
1672 low = isWestern and 37 or 35,
1673 high = isWestern and 46 or 40,
1674 continent = Kalimdor,
1675 paths = Z["The Barrens"],
1676 groupSize = 5,
1677 type = "Instance",
1678 }
1679  
1680 zones[Z["Zul'Farrak"]] = {
1681 low = isWestern and 44 or 43,
1682 high = isWestern and 54 or 47,
1683 continent = Kalimdor,
1684 paths = Z["Tanaris"],
1685 groupSize = 5,
1686 type = "Instance",
1687 }
1688  
1689 zones[Z["Maraudon"]] = {
1690 low = isWestern and 46 or 40,
1691 high = isWestern and 55 or 49,
1692 continent = Kalimdor,
1693 paths = Z["Desolace"],
1694 groupSize = 5,
1695 type = "Instance",
1696 }
1697  
1698 zones[Z["Dire Maul"]] = {
1699 low = 56,
1700 high = 60,
1701 continent = Kalimdor,
1702 paths = Z["Feralas"],
1703 groupSize = 5,
1704 type = "Instance",
1705 }
1706  
1707 zones[Z["Onyxia's Lair"]] = {
1708 low = 60,
1709 high = 62,
1710 continent = Kalimdor,
1711 paths = Z["Dustwallow Marsh"],
1712 groupSize = 40,
1713 type = "Instance",
1714 }
1715  
1716 zones[Z["Ahn'Qiraj"]] = {
1717 low = 60,
1718 high = 65,
1719 continent = Kalimdor,
1720 paths = Z["Silithus"],
1721 groupSize = 40,
1722 type = "Instance",
1723 }
1724  
1725 zones[Z["Ruins of Ahn'Qiraj"]] = {
1726 low = 60,
1727 high = 65,
1728 continent = Kalimdor,
1729 paths = Z["Silithus"],
1730 groupSize = 20,
1731 type = "Instance",
1732 }
1733  
1734 if expansion then
1735 zones[Z["Caverns of Time"]] = {
1736 -- XXX Need to add the different instances;
1737 -- * Thrall escaping from Durnholde Keep (5)
1738 -- * Medivh opening the Dark Portal (5)
1739 -- * Battle on mount Hyjal (25)
1740 low = 64,
1741 high = 70,
1742 continent = Kalimdor,
1743 paths = Z["Tanaris"],
1744 groupSize = 5,
1745 type = "Instance",
1746 }
1747 end
1748  
1749 if expansion then
1750 zones[Z["Shattrath City"]] = {
1751 continent = Outland,
1752 paths = {
1753 [SHATTRATH_THUNDERBLUFF_PORTAL] = true,
1754 [SHATTRATH_STORMWIND_PORTAL] = true,
1755 [SHATTRATH_UNDERCITY_PORTAL] = true,
1756 [Z["Terokkar Forest"]] = true,
1757 [SHATTRATH_SILVERMOON_PORTAL] = true,
1758 [SHATTRATH_EXODAR_PORTAL] = true,
1759 [SHATTRATH_DARNASSUS_PORTAL] = true,
1760 [SHATTRATH_ORGRIMMAR_PORTAL] = true,
1761 [SHATTRATH_IRONFORGE_PORTAL] = true,
1762 [Z["Nagrand"]] = true,
1763 },
1764 type = "City",
1765 }
1766  
1767 zones[Z["Hellfire Citadel"]] = {
1768 continent = Outland,
1769 instances = {
1770 [Z["The Blood Furnace"]] = true,
1771 [Z["Hellfire Ramparts"]] = true,
1772 [Z["Magtheridon's Lair"]] = true,
1773 [Z["The Shattered Halls"]] = true,
1774 },
1775 paths = {
1776 [Z["Hellfire Peninsula"]] = true,
1777 [Z["The Blood Furnace"]] = true,
1778 [Z["Hellfire Ramparts"]] = true,
1779 [Z["Magtheridon's Lair"]] = true,
1780 [Z["The Shattered Halls"]] = true,
1781 }
1782 }
1783  
1784 zones[Z["Hellfire Peninsula"]] = {
1785 low = 58,
1786 high = 63,
1787 continent = Outland,
1788 instances = {
1789 [Z["The Blood Furnace"]] = true,
1790 [Z["Hellfire Ramparts"]] = true,
1791 [Z["Magtheridon's Lair"]] = true,
1792 [Z["The Shattered Halls"]] = true,
1793 },
1794 paths = {
1795 [Z["Zangarmarsh"]] = true,
1796 [Z["The Dark Portal"]] = true,
1797 [Z["Terokkar Forest"]] = true,
1798 [Z["Hellfire Citadel"]] = true,
1799 },
1800 }
1801  
1802 zones[Z["Coilfang Reservoir"]] = {
1803 continent = Outland,
1804 instances = {
1805 [Z["The Underbog"]] = true,
1806 [Z["Serpentshrine Cavern"]] = true,
1807 [Z["The Steamvault"]] = true,
1808 [Z["The Slave Pens"]] = true,
1809 },
1810 paths = {
1811 [Z["Zangarmarsh"]] = true,
1812 [Z["The Underbog"]] = true,
1813 [Z["Serpentshrine Cavern"]] = true,
1814 [Z["The Steamvault"]] = true,
1815 [Z["The Slave Pens"]] = true,
1816 },
1817 }
1818  
1819 zones[Z["Zangarmarsh"]] = {
1820 low = 60,
1821 high = 64,
1822 continent = Outland,
1823 instances = {
1824 [Z["The Underbog"]] = true,
1825 [Z["Serpentshrine Cavern"]] = true,
1826 [Z["The Steamvault"]] = true,
1827 [Z["The Slave Pens"]] = true,
1828 },
1829 paths = {
1830 [Z["Coilfang Reservoir"]] = true,
1831 [Z["Blade's Edge Mountains"]] = true,
1832 [Z["Terokkar Forest"]] = true,
1833 [Z["Nagrand"]] = true,
1834 [Z["Hellfire Peninsula"]] = true,
1835 },
1836 }
1837  
1838 zones[Z["The Bone Wastes"]] = {
1839 continent = Outland,
1840 instances = {
1841 [Z["Mana-Tombs"]] = true,
1842 [Z["Sethekk Halls"]] = true,
1843 [Z["Shadow Labyrinth"]] = true,
1844 [Z["Auchenai Crypts"]] = true,
1845 },
1846 paths = {
1847 [Z["Terokkar Forest"]] = true,
1848 [Z["Mana-Tombs"]] = true,
1849 [Z["Sethekk Halls"]] = true,
1850 [Z["Shadow Labyrinth"]] = true,
1851 [Z["Auchenai Crypts"]] = true,
1852 },
1853 }
1854  
1855 zones[Z["Terokkar Forest"]] = {
1856 low = 62,
1857 high = 65,
1858 continent = Outland,
1859 instances = {
1860 [Z["Mana-Tombs"]] = true,
1861 [Z["Sethekk Halls"]] = true,
1862 [Z["Shadow Labyrinth"]] = true,
1863 [Z["Auchenai Crypts"]] = true,
1864 },
1865 paths = {
1866 [Z["The Bone Wastes"]] = true,
1867 [Z["Shadowmoon Valley"]] = true,
1868 [Z["Zangarmarsh"]] = true,
1869 [Z["Shattrath City"]] = true,
1870 [Z["Hellfire Peninsula"]] = true,
1871 [Z["Nagrand"]] = true,
1872 },
1873 }
1874  
1875 zones[Z["Nagrand"]] = {
1876 low = 64,
1877 high = 67,
1878 continent = Outland,
1879 paths = {
1880 [Z["Zangarmarsh"]] = true,
1881 [Z["Shattrath City"]] = true,
1882 [Z["Terokkar Forest"]] = true,
1883 },
1884 }
1885  
1886 zones[Z["Blade's Edge Mountains"]] = {
1887 low = 65,
1888 high = 68,
1889 continent = Outland,
1890 instances = Z["Gruul's Lair"],
1891 paths = {
1892 [Z["Netherstorm"]] = true,
1893 [Z["Zangarmarsh"]] = true,
1894 },
1895 }
1896  
1897 zones[Z["Tempest Keep"]] = {
1898 continent = Outland,
1899 instances = {
1900 [Z["The Mechanar"]] = true,
1901 [Z["Eye of the Storm"]] = true,
1902 [Z["The Botanica"]] = true,
1903 [Z["The Arcatraz"]] = true,
1904 },
1905 paths = {
1906 [Z["Netherstorm"]] = true,
1907 [Z["The Mechanar"]] = true,
1908 [Z["Eye of the Storm"]] = true,
1909 [Z["The Botanica"]] = true,
1910 [Z["The Arcatraz"]] = true,
1911 },
1912 }
1913  
1914 zones[Z["Netherstorm"]] = {
1915 low = 67,
1916 high = 70,
1917 continent = Outland,
1918 instances = {
1919 [Z["The Mechanar"]] = true,
1920 [Z["Eye of the Storm"]] = true,
1921 [Z["The Botanica"]] = true,
1922 [Z["The Arcatraz"]] = true,
1923 },
1924 paths = {
1925 [Z["Tempest Keep"]] = true,
1926 [Z["Blade's Edge Mountains"]] = true,
1927 },
1928 }
1929  
1930 zones[Z["Shadowmoon Valley"]] = {
1931 low = 67,
1932 high = 70,
1933 continent = Outland,
1934 instances = Z["Black Temple"],
1935 paths = Z["Terokkar Forest"],
1936 }
1937  
1938 zones[Z["Black Temple"]] = {
1939 low = 70,
1940 high = 70,
1941 continent = Outland,
1942 paths = Z["Shadowmoon Valley"],
1943 groupSize = 25,
1944 type = "Instance",
1945 }
1946  
1947 zones[Z["Auchenai Crypts"]] = {
1948 low = 64,
1949 high = 66,
1950 continent = Outland,
1951 paths = Z["The Bone Wastes"],
1952 groupSize = 5,
1953 type = "Instance",
1954 }
1955  
1956 zones[Z["Auchenai Crypts"]] = {
1957 low = 64,
1958 high = 66,
1959 continent = Outland,
1960 paths = Z["The Bone Wastes"],
1961 groupSize = 5,
1962 type = "Instance",
1963 }
1964  
1965 zones[Z["Shadow Labyrinth"]] = {
1966 low = 65,
1967 high = 67,
1968 continent = Outland,
1969 paths = Z["The Bone Wastes"],
1970 groupSize = 5,
1971 type = "Instance",
1972 }
1973  
1974 zones[Z["Sethekk Halls"]] = {
1975 low = 67,
1976 high = 69,
1977 continent = Outland,
1978 paths = Z["The Bone Wastes"],
1979 groupSize = 5,
1980 type = "Instance",
1981 }
1982  
1983 zones[Z["Mana-Tombs"]] = {
1984 low = 70,
1985 high = 72,
1986 continent = Outland,
1987 paths = Z["The Bone Wastes"],
1988 groupSize = 5,
1989 type = "Instance",
1990 }
1991  
1992 zones[Z["Hellfire Ramparts"]] = {
1993 low = 60,
1994 high = 62,
1995 continent = Outland,
1996 paths = Z["Hellfire Citadel"],
1997 groupSize = 5,
1998 type = "Instance",
1999 }
2000  
2001 zones[Z["The Blood Furnace"]] = {
2002 low = 61,
2003 high = 63,
2004 continent = Outland,
2005 paths = Z["Hellfire Citadel"],
2006 groupSize = 5,
2007 type = "Instance",
2008 }
2009  
2010 zones[Z["The Shattered Halls"]] = {
2011 low = 70,
2012 high = 72,
2013 continent = Outland,
2014 paths = Z["Hellfire Citadel"],
2015 groupSize = 5,
2016 type = "Instance",
2017 }
2018  
2019 zones[Z["Magtheridon's Lair"]] = {
2020 low = 70,
2021 high = 70,
2022 continent = Outland,
2023 paths = Z["Hellfire Citadel"],
2024 groupSize = 25,
2025 type = "Instance",
2026 }
2027  
2028 zones[Z["The Slave Pens"]] = {
2029 low = 62,
2030 high = 64,
2031 continent = Outland,
2032 paths = Z["Coilfang Reservoir"],
2033 groupSize = 5,
2034 type = "Instance",
2035 }
2036  
2037 zones[Z["The Underbog"]] = {
2038 low = 63,
2039 high = 65,
2040 continent = Outland,
2041 paths = Z["Coilfang Reservoir"],
2042 groupSize = 5,
2043 type = "Instance",
2044 }
2045  
2046 zones[Z["The Steamvault"]] = {
2047 low = 70,
2048 high = 72,
2049 continent = Outland,
2050 paths = Z["Coilfang Reservoir"],
2051 groupSize = 5,
2052 type = "Instance",
2053 }
2054  
2055 zones[Z["Serpentshrine Cavern"]] = {
2056 low = 70,
2057 high = 70,
2058 continent = Outland,
2059 paths = Z["Coilfang Reservoir"],
2060 groupSize = 25,
2061 type = "Instance",
2062 }
2063  
2064 zones[Z["Gruul's Lair"]] = {
2065 low = 70,
2066 high = 70,
2067 continent = Outland,
2068 paths = Z["Blade's Edge Mountains"],
2069 groupSize = 25,
2070 type = "Instance",
2071 }
2072  
2073 zones[Z["The Mechanar"]] = {
2074 low = 69,
2075 high = 72,
2076 continent = Outland,
2077 paths = Z["Tempest Keep"],
2078 groupSize = 5,
2079 type = "Instance",
2080 }
2081  
2082 zones[Z["The Botanica"]] = {
2083 low = 70,
2084 high = 72,
2085 continent = Outland,
2086 paths = Z["Tempest Keep"],
2087 groupSize = 5,
2088 type = "Instance",
2089 }
2090  
2091 zones[Z["The Arcatraz"]] = {
2092 low = 70,
2093 high = 72,
2094 continent = Outland,
2095 paths = Z["Tempest Keep"],
2096 groupSize = 5,
2097 type = "Instance",
2098 }
2099  
2100 zones[Z["Eye of the Storm"]] = {
2101 low = 70,
2102 high = 70,
2103 continent = Outland,
2104 paths = Z["Tempest Keep"],
2105 groupSize = 25,
2106 type = "Instance",
2107 }
2108 end
2109  
2110 for k,v in pairs(zones) do
2111 lows[k] = v.low or 0
2112 highs[k] = v.high or 0
2113 continents[k] = v.continent or UNKNOWN
2114 instances[k] = v.instances
2115 paths[k] = v.paths or false
2116 types[k] = v.type or "Zone"
2117 groupSizes[k] = v.groupSize
2118 factions[k] = v.faction
2119 end
2120  
2121 PLAYER_LEVEL_UP(self)
2122  
2123 if oldDeactivate then
2124 oldDeactivate(oldLib)
2125 end
2126 end
2127  
2128 local function external(self, major, instance)
2129 if major == "AceConsole-2.0" then
2130 local print = print
2131 if DEFAULT_CHAT_FRAME then
2132 function print(text)
2133 DEFAULT_CHAT_FRAME:AddMessage(text)
2134 end
2135 end
2136 local t = {
2137 name = MAJOR_VERSION .. "." .. string.gsub(MINOR_VERSION, ".-(%d+).*", "%1"),
2138 desc = "A library to provide information about zones and instances.",
2139 type = "group",
2140 args = {
2141 zone = {
2142 name = "Zone",
2143 desc = "Get information about a zone",
2144 type = "text",
2145 usage = "<zone name>",
2146 get = false,
2147 set = function(text)
2148 local type
2149 if self:IsBattleground(text) then
2150 type = "Battleground"
2151 elseif self:IsInstance(text) then
2152 type = "Instance"
2153 else
2154 type = "Zone"
2155 end
2156 local faction
2157 if self:IsAlliance(text) then
2158 faction = "Alliance"
2159 elseif self:IsHorde(text) then
2160 faction = "Horde"
2161 else
2162 faction = "Contested"
2163 end
2164 if self:IsHostile(text) then
2165 faction = faction .. " (hostile)"
2166 elseif self:IsFriendly(text) then
2167 faction = faction .. " (friendly)"
2168 end
2169 local low, high = self:GetLevel(text)
2170 print("|cffffff7f" .. text .. "|r")
2171 print(" |cffffff7fType: [|r" .. type .. "|cffffff7f]|r")
2172 print(" |cffffff7fFaction: [|r" .. faction .. "|cffffff7f]|r")
2173 if low > 0 and high > 0 then
2174 if low == high then
2175 print(" |cffffff7fLevel: [|r" .. low .. "|cffffff7f]|r")
2176 else
2177 print(" |cffffff7fLevels: [|r" .. low .. "-" .. high .. "|cffffff7f]|r")
2178 end
2179 end
2180 print(" |cffffff7fContinent: [|r" .. self:GetContinent(text) .. "|cffffff7f]|r")
2181 local groupSize = self:GetInstanceGroupSize(text)
2182 if groupSize > 0 then
2183 print(" |cffffff7fGroup size: [|r" .. groupSize .. "|cffffff7f]|r")
2184 end
2185 if self:DoesZoneHaveInstances(text) then
2186 print(" |cffffff7fInstances:|r")
2187 for instance in self:IterateZoneInstances(text) do
2188 local isBG = self:IsBattleground(instance) and " (BG)" or ""
2189 local low, high = self:GetLevel(instance)
2190 local faction = ""
2191 if self:IsAlliance(instance) then
2192 faction = " - Alliance"
2193 elseif self:IsHorde(instance) then
2194 faction = " - Horde"
2195 end
2196 if self:IsHostile(instance) then
2197 faction = faction .. " (hostile)"
2198 elseif self:IsFriendly(instance) then
2199 faction = faction .. " (friendly)"
2200 end
2201 print(" " .. instance .. isBG .. " - " .. low .. "-" .. high .. faction)
2202 end
2203 end
2204 end,
2205 validate = {}
2206 },
2207 path = {
2208 name = "Shortest path to destination",
2209 desc = "Prints the fastest route from your current location to the destination.",
2210 type = "text",
2211 get = false,
2212 set = function(destination)
2213 if not Z:HasTranslation(destination) or not Z:HasReverseTranslation(destination) then return end
2214 local current = GetRealZoneText()
2215 print(string.format("|cffffff7fPath from %s to %s:|r", current, destination))
2216 for zone in self:IteratePath(current, destination) do
2217 local text
2218 if self:IsHostile(zone) then
2219 text = " |cffff0000" .. zone .. "|r"
2220 elseif self:IsFriendly(zone) then
2221 text = " |cff00ff00" .. zone .. "|r"
2222 else
2223 text = " |cffffff00" .. zone .. "|r"
2224 end
2225  
2226 local low, high = self:GetLevel(zone)
2227 if low > 0 then
2228 local r, g, b = self:GetLevelColor(zone)
2229 if low == high then
2230 text = text .. string.format(" (|cff%02x%02x%02x%d|r)", r * 255, g * 255, b * 255, low)
2231 else
2232 text = text .. string.format(" (|cff%02x%02x%02x%d-%d|r)", r * 255, g * 255, b * 255, low, high)
2233 end
2234 end
2235  
2236 if zone == destination then
2237 print(text)
2238 else
2239 print(text .. " ->")
2240 end
2241 end
2242 end
2243 },
2244 recommend = {
2245 name = "Recommended Zones",
2246 desc = "List recommended zones",
2247 type = "execute",
2248 func = function()
2249 print("|cffffff7fRecommended zones:|r")
2250 for zone in self:IterateRecommendedZones() do
2251 local low, high = self:GetLevel(zone)
2252 local faction = ""
2253 if self:IsAlliance(zone) then
2254 faction = " - Alliance"
2255 elseif self:IsHorde(zone) then
2256 faction = " - Horde"
2257 end
2258 if self:IsHostile(zone) then
2259 faction = faction .. " (hostile)"
2260 elseif self:IsFriendly(zone) then
2261 faction = faction .. " (friendly)"
2262 end
2263 print(" |cffffff7f" .. zone .. "|r - " .. low .. "-" .. high .. faction)
2264 end
2265 if self:HasRecommendedInstances() then
2266 print("|cffffff7fRecomended instances:|r")
2267 for instance in self:IterateRecommendedInstances() do
2268 local isBG = self:IsBattleground(instance) and " (BG)" or ""
2269 local low, high = self:GetLevel(instance)
2270 local faction = ""
2271 if self:IsAlliance(instance) then
2272 faction = " - Alliance"
2273 elseif self:IsHorde(instance) then
2274 faction = " - Horde"
2275 end
2276 if self:IsHostile(instance) then
2277 faction = faction .. " (hostile)"
2278 elseif self:IsFriendly(instance) then
2279 faction = faction .. " (friendly)"
2280 end
2281 print(" |cffffff7f" .. instance .. "|r" .. isBG .. " - " .. low .. "-" .. high .. faction)
2282 end
2283 end
2284 end
2285 }
2286 }
2287 }
2288 for zone in self:IterateZonesAndInstances() do
2289 t.args.zone.validate[zone] = zone
2290 end
2291 t.args.path.validate = t.args.zone.validate
2292 instance.RegisterChatCommand(self, { "/tourist", "/touristLib" }, t, "TOURIST")
2293 end
2294 end
2295  
2296 AceLibrary:Register(Tourist, MAJOR_VERSION, MINOR_VERSION, activate, nil, external)