syzler@1
|
1 -- libMyLilPony
|
syzler@1
|
2 -- Copyright (c) 2011 Syzler
|
syzler@1
|
3 --
|
syzler@1
|
4 -- This program is free software: you can redistribute it and/or modify
|
syzler@1
|
5 -- it under the terms of the GNU General Public License as published by
|
syzler@1
|
6 -- the Free Software Foundation, either version 3 of the License, or
|
syzler@1
|
7 -- (at your option) any later version.
|
syzler@1
|
8 --
|
syzler@1
|
9 -- This program is distributed in the hope that it will be useful,
|
syzler@1
|
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
syzler@1
|
11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
syzler@1
|
12 -- GNU General Public License for more details.
|
syzler@1
|
13 --
|
syzler@1
|
14 -- You should have received a copy of the GNU General Public License
|
syzler@1
|
15 -- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
syzler@1
|
16
|
syzler@1
|
17 -- Mount data table and API functions for checking type of mount
|
syzler@1
|
18
|
syzler@1
|
19 local MyLilPony_Mounts = {
|
syzler@1
|
20 -- standard ground mounts
|
syzler@1
|
21 [458] = "G"; [470] = "G"; [472] = "G"; [579] = "G"; [580] = "G"; [5784] = "G"; [6648] = "G";
|
syzler@1
|
22 [6653] = "G"; [6654] = "G"; [6777] = "G"; [6898] = "G"; [6899] = "G"; [8394] = "G"; [8395] = "G";
|
syzler@1
|
23 [10789] = "G"; [10793] = "G"; [10795] = "G"; [10796] = "G"; [10799] = "G"; [10873] = "G";
|
syzler@1
|
24 [10969] = "G"; [13819] = "G"; [15779] = "G"; [15780] = "G"; [15781] = "G"; [16055] = "G";
|
syzler@1
|
25 [16056] = "G"; [16058] = "G"; [16059] = "G"; [16060] = "G"; [16080] = "G"; [16081] = "G";
|
syzler@1
|
26 [16082] = "G"; [16083] = "G"; [16084] = "G"; [17229] = "G"; [17450] = "G"; [17453] = "G";
|
syzler@1
|
27 [17454] = "G"; [17455] = "G"; [17456] = "G"; [17458] = "G"; [17459] = "G"; [17460] = "G";
|
syzler@1
|
28 [17461] = "G"; [17462] = "G"; [17463] = "G"; [17464] = "G"; [17465] = "G"; [17481] = "G";
|
syzler@1
|
29 [18363] = "G"; [18989] = "G"; [18990] = "G"; [18991] = "G"; [18992] = "G"; [22717] = "G";
|
syzler@1
|
30 [22718] = "G"; [22719] = "G"; [22720] = "G"; [22721] = "G"; [22722] = "G"; [22723] = "G";
|
syzler@1
|
31 [22724] = "G"; [23161] = "G"; [23214] = "G"; [23219] = "G"; [23220] = "G"; [23221] = "G";
|
syzler@1
|
32 [23222] = "G"; [23223] = "G"; [23225] = "G"; [23227] = "G"; [23228] = "G"; [23229] = "G";
|
syzler@1
|
33 [23238] = "G"; [23239] = "G"; [23240] = "G"; [23241] = "G"; [23242] = "G"; [23243] = "G";
|
syzler@1
|
34 [23246] = "G"; [23247] = "G"; [23248] = "G"; [23249] = "G"; [23250] = "G"; [23251] = "G";
|
syzler@1
|
35 [23252] = "G"; [23338] = "G"; [23509] = "G"; [23510] = "G"; [24242] = "G"; [24252] = "G";
|
syzler@1
|
36 [30174] = "G"; [33630] = "G"; [33660] = "G"; [34406] = "G"; [34407] = "G"; [34767] = "G";
|
syzler@1
|
37 [34769] = "G"; [34790] = "G"; [34795] = "G"; [34896] = "G"; [34897] = "G"; [34898] = "G";
|
syzler@1
|
38 [34899] = "G"; [35018] = "G"; [35020] = "G"; [35022] = "G"; [35025] = "G"; [35027] = "G";
|
syzler@1
|
39 [35028] = "G"; [35710] = "G"; [35711] = "G"; [35712] = "G"; [35713] = "G"; [35714] = "G";
|
syzler@1
|
40 [36702] = "G"; [39315] = "G"; [39316] = "G"; [39317] = "G"; [39318] = "G"; [39319] = "G";
|
syzler@1
|
41 [41252] = "G"; [42776] = "G"; [42777] = "G"; [43688] = "G"; [43899] = "G"; [43900] = "G";
|
syzler@1
|
42 [46628] = "G"; [47037] = "G"; [48027] = "G"; [48778] = "G"; [48954] = "G"; [49322] = "G";
|
syzler@1
|
43 [49378] = "G"; [49379] = "G"; [50281] = "G"; [50869] = "G"; [51412] = "G"; [54753] = "G";
|
syzler@1
|
44 [55531] = "G"; [59572] = "G"; [59573] = "G"; [59785] = "G"; [59788] = "G"; [59791] = "G";
|
syzler@1
|
45 [59793] = "G"; [59797] = "G"; [59799] = "G"; [59802] = "G"; [59804] = "G"; [59810] = "G";
|
syzler@1
|
46 [59811] = "G"; [60114] = "G"; [60116] = "G"; [60118] = "G"; [60119] = "G"; [60136] = "G";
|
syzler@1
|
47 [60140] = "G"; [60424] = "G"; [61425] = "G"; [61447] = "G"; [61465] = "G"; [61466] = "G";
|
syzler@1
|
48 [61467] = "G"; [61469] = "G"; [61470] = "G"; [63232] = "G"; [63234] = "G"; [63635] = "G";
|
syzler@1
|
49 [63636] = "G"; [63637] = "G"; [63638] = "G"; [63639] = "G"; [63640] = "G"; [63641] = "G";
|
syzler@1
|
50 [63642] = "G"; [63643] = "G"; [64657] = "G"; [64658] = "G"; [64659] = "G"; [64977] = "G";
|
syzler@1
|
51 [65637] = "G"; [65638] = "G"; [65639] = "G"; [65640] = "G"; [65641] = "G"; [65642] = "G";
|
syzler@1
|
52 [65643] = "G"; [65644] = "G"; [65645] = "G"; [65646] = "G"; [66091] = "G"; [66846] = "G";
|
syzler@1
|
53 [66847] = "G"; [66906] = "G"; [67466] = "G"; [68056] = "G"; [68188] = "G"; [73313] = "G";
|
syzler@1
|
54 [74918] = "G"; [87090] = "G"; [87091] = "G"; [88748] = "G"; [88749] = "G"; [88750] = "G";
|
syzler@1
|
55 [92231] = "G";
|
syzler@1
|
56
|
syzler@1
|
57 -- standard flying mounts
|
syzler@1
|
58 [3363] = "A"; [28828] = "A"; [32235] = "A"; [32239] = "A"; [32240] = "A"; [32242] = "A";
|
syzler@1
|
59 [32243] = "A"; [32244] = "A"; [32245] = "A"; [32246] = "A"; [32289] = "A"; [32290] = "A";
|
syzler@1
|
60 [32292] = "A"; [32295] = "A"; [32296] = "A"; [32297] = "A"; [32345] = "A"; [33176] = "A";
|
syzler@1
|
61 [33182] = "A"; [33184] = "A"; [37011] = "A"; [37015] = "A"; [39798] = "A"; [39800] = "A";
|
syzler@1
|
62 [39801] = "A"; [39802] = "A"; [39803] = "A"; [40192] = "A"; [41513] = "A"; [41514] = "A";
|
syzler@1
|
63 [41515] = "A"; [41516] = "A"; [41517] = "A"; [41518] = "A"; [43810] = "A"; [43927] = "A";
|
syzler@1
|
64 [44151] = "A"; [44153] = "A"; [44221] = "A"; [44229] = "A"; [44317] = "A"; [44744] = "A";
|
syzler@1
|
65 [46197] = "A"; [46199] = "A"; [49193] = "A"; [51960] = "A"; [54729] = "A"; [55164] = "A";
|
syzler@1
|
66 [58615] = "A"; [59567] = "A"; [59568] = "A"; [59569] = "A"; [59570] = "A"; [59571] = "A";
|
syzler@1
|
67 [59650] = "A"; [59961] = "A"; [59976] = "A"; [59996] = "A"; [60002] = "A"; [60021] = "A";
|
syzler@1
|
68 [60024] = "A"; [60025] = "A"; [61229] = "A"; [61230] = "A"; [61294] = "A"; [61309] = "A";
|
syzler@1
|
69 [61442] = "A"; [61444] = "A"; [61446] = "A"; [61451] = "A"; [61996] = "A"; [61997] = "A";
|
syzler@1
|
70 [62048] = "A"; [63796] = "A"; [63844] = "A"; [63956] = "A"; [63963] = "A"; [64927] = "A";
|
syzler@1
|
71 [65439] = "A"; [66087] = "A"; [66088] = "A"; [67336] = "A"; [69395] = "A"; [71342] = "A";
|
syzler@1
|
72 [71810] = "A"; [72807] = "A"; [72808] = "A"; [74856] = "A"; [75596] = "A"; [75973] = "A";
|
syzler@1
|
73 [88331] = "A"; [88335] = "A"; [88718] = "A"; [88741] = "A"; [88742] = "A"; [88744] = "A";
|
syzler@1
|
74 [88746] = "A"; [88990] = "A"; [93623] = "A";
|
syzler@1
|
75
|
syzler@1
|
76 -- special mounts
|
syzler@1
|
77 [48025] = "AG"; -- headless horseman's mount
|
syzler@1
|
78 [72286] = "AG"; -- invincible (king lichy's mount)
|
syzler@1
|
79 [75614] = "AG"; -- celestial steed
|
syzler@1
|
80 [64731] = "SV"; -- sea turtle
|
syzler@1
|
81 [25953] = "Q"; -- blue qiraji battle tank
|
syzler@1
|
82 [26054] = "Q"; -- red qiraji battle tank
|
syzler@1
|
83 [26055] = "Q"; -- yellow qiraji battle tank
|
syzler@1
|
84 [26056] = "Q"; -- green qiraji battle tank
|
syzler@1
|
85 [26656] = "GQ"; -- black qiraji battle tank
|
syzler@1
|
86 [92155] = "GQ"; -- ultramarine qiraji battle tank
|
syzler@1
|
87 [75207] = "V"; -- abyssal seahorse
|
syzler@1
|
88 };
|
syzler@1
|
89
|
syzler@7
|
90 --- Checks whether or not the specified spell ID is a ground mount.
|
syzler@7
|
91 -- @param spellId The spell ID of the mount to be checked.
|
syzler@7
|
92 -- @return A Boolean value indicating whether or not the specified spell is a ground mount.
|
syzler@1
|
93 function MyLilPony.IsGroundMount(spellId)
|
syzler@1
|
94 local entry = MyLilPony_Mounts[spellId];
|
syzler@1
|
95 return entry ~= nil and string.match(entry, "G");
|
syzler@1
|
96 end
|
syzler@1
|
97
|
syzler@7
|
98 --- Checks whether or not the specified spell ID is a flying mount.
|
syzler@7
|
99 -- @param spellId The spell ID of the mount to be checked.
|
syzler@7
|
100 -- @return A Boolean value indicating whether or not the specified spell is a flying mount.
|
syzler@1
|
101 function MyLilPony.IsFlyingMount(spellId)
|
syzler@1
|
102 local entry = MyLilPony_Mounts[spellId];
|
syzler@1
|
103 return entry ~= nil and string.match(entry, "A");
|
syzler@1
|
104 end
|
syzler@1
|
105
|
syzler@7
|
106 --- Checks whether or not the specified spell ID is an aquatic mount.
|
syzler@7
|
107 -- @param spellId The spell ID of the mount to be checked.
|
syzler@7
|
108 -- @return A Boolean value indicating whether or not the specified spell is an aquatic mount.
|
syzler@1
|
109 function MyLilPony.IsAquaticMount(spellId)
|
syzler@1
|
110 local entry = MyLilPony_Mounts[spellId];
|
syzler@1
|
111 return entry ~= nil and string.match(entry, "S");
|
syzler@1
|
112 end
|
syzler@1
|
113
|
syzler@7
|
114 --- Checks whether or not the specified spell ID is a Temple of Ahn'Qiraj mount.
|
syzler@7
|
115 -- @param spellId The spell ID of the mount to be checked.
|
syzler@7
|
116 -- @return A Boolean value indicating whether or not the specified spell is a Temple of Ahn'Qiraj mount.
|
syzler@1
|
117 function MyLilPony.IsAhnQirajMount(spellId)
|
syzler@1
|
118 local entry = MyLilPony_Mounts[spellId];
|
syzler@1
|
119 return entry ~= nil and string.match(entry, "Q");
|
syzler@1
|
120 end
|
syzler@1
|
121
|
syzler@7
|
122 --- Checks whether or not the specified spell ID is a Vash'jir mount.
|
syzler@7
|
123 -- @param spellId The spell ID of the mount to be checked.
|
syzler@7
|
124 -- @return A Boolean value indicating whether or not the specified spell is a Vash'jir mount.
|
syzler@1
|
125 function MyLilPony.IsVashjirMount(spellId)
|
syzler@1
|
126 local entry = MyLilPony_Mounts[spellId];
|
syzler@1
|
127 return entry ~= nil and string.match(entry, "V");
|
syzler@1
|
128 end
|