/
zones_and_pet_levels.lua
executable file
·116 lines (107 loc) · 3.12 KB
/
zones_and_pet_levels.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
function zone_and_pet_level(CurrentPlayerZone)
--------------------------
-- ZONES AND PET LEVELS --
--------------------------
zones_and_pet_levelsTable =
{
-- {"ZONE", MIN, MAX },
-- KALIMDOR
{"Orgrimmar", 1, 1 },
{"Azuremyst Isle", 1, 2 },
{"Durotar", 1, 2 },
{"Mulgore", 1, 2 },
{"Teldrassil", 1, 2 },
{"Darnassus", 1, 3 },
{"Exodar", 1, 3 },
{"Thunder Bluff", 1, 3 },
{"Northern Barrens", 3, 4 },
{"Azshara", 3, 6 },
{"Bloodmyst Isle", 3, 6 },
{"Darkshore", 3, 6 },
{"Ashenvale", 4, 6 },
{"Stonetalon Mountains",5, 7 },
{"Desolace", 7, 9 },
{"Southern Barrens", 9, 10 },
{"Feralas", 11, 12 },
{"Dustwallow Marsh", 12, 13 },
{"Tanaris", 13, 14 },
{"Thousand Needles", 13, 14 },
{"Felwood", 14, 15 },
{"Moonglade", 15, 16 },
{"Un'Goro Crater", 15, 16 },
{"Ahn'Qiraj: The Fallen Kingdom", 16, 17 },
{"Silithus", 16, 17 },
{"Winterspring", 17, 18 },
-- EASTERN KINGDOMS
{"Stormwind", 1, 1 },
{"Dun Morogh", 1, 2 },
{"Elwynn Forest", 1, 2 },
{"Eversong Woods", 1, 2 },
{"Tirisfal Glade", 1, 2 },
{"Undercity", 1, 2 },
{"Ironforge", 1, 3 },
{"Silvermoon City", 1, 3 },
{"Westfall", 3, 4 },
{"Ghostlands", 3, 6 },
{"Loch Modan", 3, 6 },
{"Silverpine Forest", 3, 6 },
{"Redridge Mountains", 4, 6 },
{"Duskwood", 5, 7 },
{"Hillsbrad Foothills", 6, 7 },
{"Wetlands", 6, 7 },
{"Arathi Highlands", 7, 8 },
{"Northern Stranglethorn Vale", 7, 9 },
{"The Cape of Stranglethorn", 9, 10 },
{"Western Plaguelands", 10, 11 },
{"The Hinterlands", 11, 12 },
{"Eastern Plaguelands", 12, 13 },
{"Badlands", 13, 14 },
{"Searing Gorge", 13, 14 },
{"Swamp of Sorrows", 14, 15 },
{"Burning Steppes", 15, 16 },
{"Blasted Lands", 16, 17 },
{"Deadwind Pass", 17, 18 },
-- OUTLAND
{"Hellfire", 17, 18 },
{"Nagrand", 18, 19 },
{"Terrokar", 18, 19 },
{"Zangarmarsh", 18, 19 },
{"Blade's edge", 18, 20 },
{"Netherstorm", 20, 21 },
{"Shadowmoon", 20, 21 },
-- NORTHREND
{"Borean tundra", 20, 22 },
{"Howling Fjord", 20, 22 },
{"Grizzly Hills", 21, 22 },
{"Scholazar Basin", 21, 22 },
{"Crystalsong forest", 22, 23 },
{"Dragonblight", 22, 23 },
{"Icecrown", 22, 23 },
{"Storm Peaks", 22, 23 },
-- CATACLYSM Zones
{"Deepholm", 22, 23 },
{"Mount Hyjal", 22, 24 },
{"Uldum", 23, 24 },
{"Twilight Highlands", 23, 24 },
-- PANDARIA
{"Krasarang Wilds", 23, 25 },
{"Kun-Lai Summit", 23, 25 },
{"The Jade Forest", 23, 25 },
{"Valley of the Four Winds", 23, 25 },
{"Dread Wastes", 24, 25 },
{"Townlong Steppes", 24, 25 },
}
local zone = nil
local zonePetMinLevel = nil
local zonePetMaxLevel = nil
for _, zoneTable in pairs(zones_and_pet_levelsTable) do
zone = zoneTable[1]
zonePetMinLevel = zoneTable[2]
zonePetMaxLevel = zoneTable[3]
-- Return pet level if conditions are true.
if string.lower(CurrentPlayerZone) == string.lower(zone) then
return zonePetMinLevel, zonePetMaxLevel
end
end
return nil
end