WoWInterface SVN MountRandomMount

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 34 to Rev 33
    Reverse comparison

Rev 34 → Rev 33

trunk/MountRandomMount_MountListData.lua
1,37 → 1,583
function MountRandomMount:MountDataListFill()
if MountRandomMount_SavedTable == nil or MountRandomMount_SavedTable['ground'] == nil or MountRandomMount_SavedTable['flying'] == nil then
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "6.0.2")) then
MountRandomMount_SavedTable['ground'] = {}
MountRandomMount_SavedTable['flying'] = {}
MountRandomMount_MountDataListVersion = "6.0.2";
MountRandomMount_MountDataList= {
["flying"] = {
["source-achv"] = {
60025, --Albino Drake
175700, --Albino Drake
142478, --Armored Blue Dragonhawk
136400, --Armored Skyscreamer
72808, --Bloodbathed Frostbrood Vanquisher
61996, --Blue Dragonhawk
97560, --Corrupted Fire Hawk
127156, --Crimson Cloud Serpent
88990, --Dark Phoenix
88335, --Drake of the East Wind
97359, --Flameward Hippogryph
127161, --Heavenly Crimson Cloud Serpent
72807, --Icebound Frostbrood Vanquisher
63956, --Ironbound Proto-Drake
133023, --Jade Pandaren Kite
130985, --Pandaren Kite
148620, --Prideful Gladiator's Cloud Serpent
59961, --Red Proto-Drake
63963, --Rusted Proto-Drake
148392, --Spawn of Galakras
124408, --Thundering Jade Cloud Serpent
107844, --Twilight Harbinger
60024, --Violet Proto-Drake
88331, --Volcanic Stone Drake
142266, --Armored Red Dragonhawk
118737, --Pandaren Kite
61997, --Red Dragonhawk
},
["source-tcg"] = {
96503, --Amani Dragonhawk
74856, --Blazing Hippogryph
93623, --Mottled Drake
46199, --X-51 Nether-Rocket X-TREME
46197, --X-51 Nether-Rocket
},
["source-vendor"] = {
63844, --Argent Hippogryph
61229, --Armored Snowy Gryphon
132117, --Ashen Pandaren Phoenix
41514, --Azure Netherwing Drake
41515, --Cobalt Netherwing Drake
129552, --Crimson Pandaren Phoenix
132118, --Emerald Pandaren Phoenix
41513, --Onyx Netherwing Drake
41516, --Purple Netherwing Drake
32242, --Swift Blue Gryphon
32290, --Swift Green Gryphon
32292, --Swift Purple Gryphon
32289, --Swift Red Gryphon
41517, --Veridian Netherwing Drake
41518, --Violet Netherwing Drake
132119, --Violet Pandaren Phoenix
32239, --Ebon Gryphon
32235, --Golden Gryphon
32240, --Snowy Gryphon
61230, --Armored Blue Wind Rider
32295, --Swift Green Wind Rider
32297, --Swift Purple Wind Rider
32246, --Swift Red Wind Rider
32296, --Swift Yellow Wind Rider
54729, --Winged Steed of the Ebon Blade
32244, --Blue Wind Rider
32245, --Green Wind Rider
32243, --Tawny Wind Rider
},
["source-other"] = {
139595, --Armored Bloodwing
127170, --Astral Cloud Serpent
102514, --Corrupted Hippogryph
155741, --Dread Raven
149801, --Emerald Hippogryph
142878, --Enchanted Fey Dragon
113120, --Feldrake
136505, --Ghastly Charger
61294, --Green Proto-Drake
148619, --Grievous Gladiator's Cloud Serpent
163025, --Grinning Reaver
142073, --Hearthsteed
127164, --Heavenly Golden Cloud Serpent
127158, --Heavenly Onyx Cloud Serpent
124659, --Imperial Quilen
153489, --Iron Skyreaver
107516, --Spectral Gryphon
147595, --Stormcrow
134573, --Swift Windsteed
139442, --Thundering Cobalt Cloud Serpent
148476, --Thundering Onyx Cloud Serpent
107203, --Tyrael's Charger
148618, --Tyrannical Gladiator's Cloud Serpent
163024, --Warforged Nightmare
75973, --X-53 Touring Rocket
107517, --Spectral Wind Rider
},
["source-drop"] = {
40192, --Ashes of Al'ar
59567, --Azure Drake Mount
59650, --Black Drake Mount
107842, --Blazing Drake
59568, --Blue Drake Mount
59996, --Blue Proto-Drake
59569, --Bronze Drake Mount
139448, --Clutch of Ji-Kun
88742, --Drake of the North Wind
88744, --Drake of the South Wind
110039, --Experiment 12-B
72286, --Invincible
107845, --Life-Binder's Handmaiden
63796, --Mimiron's Head
69395, --Onyxian Drake
88718, --Phosphorescent Stone Drake
97493, --Pureblood Fire Hawk
132036, --Thundering Ruby Cloud Serpent
60002, --Time-Lost Proto-Drake
59571, --Twilight Drake
88746, --Vitreous Stone Drake
},
["source-faction"] = {
123992, --Azure Cloud Serpent
39803, --Blue Riding Nether Ray
43927, --Cenarion War Hippogryph
88741, --Drake of the West Wind
123993, --Golden Cloud Serpent
135416, --Grand Armored Gryphon
39798, --Green Riding Nether Ray
113199, --Jade Cloud Serpent
39801, --Purple Riding Nether Ray
59570, --Red Drake
39800, --Red Riding Nether Ray
66087, --Silver Covenant Hippogryph
39802, --Silver Riding Nether Ray
129918, --Thundering August Cloud Serpent
130092, --Red Flying Cloud
135418, --Grand Armored Wyvern
66088, --Sunreaver Dragonhawk
},
["source-event"] = {
71342, --Big Love Rocket
48025, --Headless Horseman's Mount
},
["source-store"] = {
75614, --Celestial Steed
110051, --Heart of the Aspects
98727, --Winged Guardian
},
["source-prof"] = {
75596, --Frosty Flying Carpet
120043, --Jeweled Onyx Panther
61309, --Magnificent Flying Carpet
169952, --Magnificent Flying Carpet
93326, --Sandstone Drake
134359, --Sky Golem
44151, --Turbo-Charged Flying Machine
126507, --Depleted-Kyparium Rocket
61451, --Flying Carpet
44153, --Flying Machine
126508, --Geosynchronous World Spinner
121837, --Jade Panther
121838, --Ruby Panther
121836, --Sapphire Panther
121839, --Sunstone Panther
},
["source-quest"] = {
136163, --Grand Gryphon
127154, --Onyx Cloud Serpent
136164, --Grand Wyvern
},
["source-promo"] = {
121820, --Obsidian Nightwing
},
["source-none"] = {
32345, --Peep the Phoenix Mount
37015, --Swift Nether Drake
44744, --Merciless Nether Drake
49193, --Vengeful Nether Drake
58615, --Brutal Nether Drake
59976, --Black Proto-Drake
60021, --Plagued Proto-Drake
64927, --Deadly Gladiator's Frost Wyrm
65439, --Furious Gladiator's Frost Wyrm
67336, --Relentless Gladiator's Frost Wyrm
71810, --Wrathful Gladiator's Frost Wyrm
97501, --Felfire Hawk
101282, --Vicious Gladiator's Twilight Drake
101821, --Ruthless Gladiator's Twilight Drake
124550, --Cataclysmic Gladiator's Twilight Drake
127165, --Heavenly Jade Cloud Serpent
127169, --Heavenly Azure Cloud Serpent
139407, --Malevolent Gladiator's Cloud Serpent
},
["source-class"] = {
54729, --Winged Steed of the Ebon Blade
},
},
["ground"] = {
["source-drop"] = {
98204, --Amani Battle Bear
138424, --Amber Primordial Direhorn
96491, --Armored Razzashi Raptor
36702, --Fiery Warhorse
101542, --Flametalon of Alysrazor
61465, --Grand Black War Mammoth
88750, --Grey Riding Camel
138426, --Jade Primordial Direhorn
41252, --Raven Lord
17481, --Rivendare's Deathcharger
138425, --Slate Primordial Direhorn
136471, --Spawn of Horridon
46628, --Swift White Hawkstrider
96499, --Swift Zulian Panther
25953, --Blue Qiraji Battle Tank
26056, --Green Qiraji Battle Tank
26054, --Red Qiraji Battle Tank
26055, --Yellow Qiraji Battle Tank
61467, --Grand Black War Mammoth
},
["source-faction"] = {
123886, --Amber Scorpion
127174, --Azure Riding Crane
118089, --Azure Water Strider
130138, --Black Riding Goat
129934, --Blue Shado-Pan Riding Tiger
88748, --Brown Riding Camel
130086, --Brown Riding Goat
39315, --Cobalt Riding Talbuk
34896, --Cobalt War Talbuk
140249, --Golden Primal Direhorn
127176, --Golden Riding Crane
61470, --Grand Ice Mammoth
65637, --Great Red Elekk
129932, --Green Shado-Pan Riding Tiger
59799, --Ice Mammoth
66090, --Quel'dorei Steed
129935, --Red Shado-Pan Riding Tiger
127177, --Regal Riding Crane
39317, --Silver Riding Talbuk
34898, --Silver War Talbuk
92231, --Spectral Steed
65640, --Swift Gray Steed
65638, --Swift Moonsaber
65643, --Swift Violet Ram
88749, --Tan Riding Camel
39318, --Tan Riding Talbuk
34899, --Tan War Talbuk
65642, --Turbostrider
130137, --White Riding Goat
39319, --White Riding Talbuk
34897, --White War Talbuk
171634, --White Stallion
171625, --White Stallion
171829, --White Stallion
171833, --White Stallion
140250, --Crimson Primal Direhorn
61469, --Grand Ice Mammoth
65641, --Great Golden Kodo
59797, --Ice Mammoth
92232, --Spectral Wolf
66091, --Sunreaver Hawkstrider
65646, --Swift Burgundy Wolf
65644, --Swift Purple Raptor
65639, --Swift Red Hawkstrider
65645, --White Skeletal Warhorse
171842, --White Stallion
171839, --White Stallion
171832, --White Stallion
},
["source-vendor"] = {
67466, --Argent Warhorse
60114, --Armored Brown Bear
148428, --Ashhide Mushan Beast
22719, --Black Battlestrider
48027, --Black War Elekk
59785, --Black War Mammoth
22720, --Black War Ram
22717, --Black War Steed
22723, --Black War Tiger
127220, --Blonde Riding Yak
142641, --Brawler's Burly Mushan Beast
39316, --Dark Riding Talbuk
34790, --Dark War Talbuk
103081, --Darkmoon Dancing Bear
63637, --Darnassian Nightsaber
63639, --Exodar Elekk
63638, --Gnomeregan Mechanostrider
90621, --Golden King
122708, --Grand Expedition Yak
127295, --Great Black Dragon Turtle
127302, --Great Blue Dragon Turtle
35713, --Great Blue Elekk
127308, --Great Brown Dragon Turtle
127293, --Great Green Dragon Turtle
35712, --Great Green Elekk
127310, --Great Purple Dragon Turtle
35714, --Great Purple Elekk
120822, --Great Red Dragon Turtle
127216, --Grey Riding Yak
63636, --Ironforge Ram
23510, --Stormpike Battle Charger
63232, --Stormwind Steed
23238, --Swift Brown Ram
23229, --Swift Brown Steed
102346, --Swift Forest Strider
23221, --Swift Frostsaber
23239, --Swift Gray Ram
23225, --Swift Green Mechanostrider
102350, --Swift Lovebird
23219, --Swift Mistsaber
103196, --Swift Mountain Horse
23227, --Swift Palomino
102349, --Swift Springstrider
23338, --Swift Stormsaber
23223, --Swift White Mechanostrider
23240, --Swift White Ram
23228, --Swift White Steed
23222, --Swift Yellow Mechanostrider
61425, --Traveler's Tundra Mammoth
146615, --Vicious Warsaber
171846, --White Stallion
171834, --White Stallion
17229, --Winterspring Frostsaber
59791, --Wooly Mammoth
127286, --Black Dragon Turtle
470, --Black Stallion
127287, --Blue Dragon Turtle
10969, --Blue Mechanostrider
127288, --Brown Dragon Turtle
34406, --Brown Elekk
458, --Brown Horse
6899, --Brown Ram
6648, --Chestnut Mare
35710, --Gray Elekk
6777, --Gray Ram
120395, --Green Dragon Turtle
17453, --Green Mechanostrider
103195, --Mountain Horse
472, --Pinto
127289, --Purple Dragon Turtle
35711, --Purple Elekk
127290, --Red Dragon Turtle
10873, --Red Mechanostrider
10789, --Spotted Frostsaber
66847, --Striped Dawnsaber
8394, --Striped Frostsaber
10793, --Striped Nightsaber
17454, --Unpainted Mechanostrider
6898, --White Ram
171825, --White Stallion
60116, --Armored Brown Bear
22718, --Black War Kodo
59788, --Black War Mammoth
22721, --Black War Raptor
22724, --Black War Wolf
63635, --Darkspear Raptor
63643, --Forsaken Warhorse
23509, --Frost Wolf Howler
87091, --Goblin Turbo-Trike
23249, --Great Brown Kodo
23248, --Great Gray Kodo
23247, --Great White Kodo
17465, --Green Skeletal Warhorse
93644, --Kor'kron Annihilator
66846, --Ochre Skeletal Warhorse
63640, --Orgrimmar Wolf
23246, --Purple Skeletal Warhorse
22722, --Red Skeletal Warhorse
63642, --Silvermoon Hawkstrider
23241, --Swift Blue Raptor
23250, --Swift Brown Wolf
23252, --Swift Gray Wolf
35025, --Swift Green Hawkstrider
23242, --Swift Olive Raptor
23243, --Swift Orange Raptor
33660, --Swift Pink Hawkstrider
35027, --Swift Purple Hawkstrider
23251, --Swift Timber Wolf
35028, --Swift Warstrider
63641, --Thunder Bluff Kodo
61447, --Traveler's Tundra Mammoth
146622, --Vicious Skeletal Warhorse
171835, --White Stallion
59793, --Wooly Mammoth
35022, --Black Hawkstrider
64977, --Black Skeletal Horse
64658, --Black Wolf
35020, --Blue Hawkstrider
17463, --Blue Skeletal Horse
18990, --Brown Kodo
17464, --Brown Skeletal Horse
6654, --Brown Wolf
6653, --Dire Wolf
8395, --Emerald Raptor
87090, --Goblin Trike
18989, --Gray Kodo
35018, --Purple Hawkstrider
34795, --Red Hawkstrider
17462, --Red Skeletal Horse
580, --Timber Wolf
10796, --Turquoise Raptor
10799, --Violet Raptor
64657, --White Kodo
},
["source-tcg"] = {
51412, --Big Battle Bear
65917, --Magic Rooster
97581, --Savage Raptor
42777, --Swift Spectral Tiger
74918, --Wooly White Rhino
42776, --Spectral Tiger
},
["source-other"] = {
138642, --Black Primal Raptor
138423, --Cobalt Primordial Direhorn
138643, --Green Primal Raptor
148417, --Kor'kron Juggernaut
138641, --Red Primal Raptor
130965, --Son of Galleon
68057, --Swift Alliance Steed
24242, --Swift Razzashi Raptor
101573, --Swift Shorestrider
49322, --Swift Zhevra
54753, --White Polar Bear
102488, --White Riding Camel
171636, --White Stallion
171621, --White Stallion
171620, --White Stallion
171622, --White Stallion
171847, --White Stallion
171849, --White Stallion
171851, --White Stallion
171830, --White Stallion
171828, --White Stallion
171824, --White Stallion
171633, --White Stallion
171635, --White Stallion
171616, --White Stallion
171619, --White Stallion
171618, --White Stallion
171624, --White Stallion
171626, --White Stallion
171628, --White Stallion
171630, --White Stallion
171843, --White Stallion
171826, --White Stallion
171836, --White Stallion
171837, --White Stallion
68056, --Swift Horde Wolf
},
["source-achv"] = {
60118, --Black War Bear
148396, --Ironmarch Warmaw
100332, --Vicious War Steed
171436, --White Stallion
170347, --White Stallion
171632, --White Stallion
171627, --White Stallion
171629, --White Stallion
171848, --White Stallion
171838, --White Stallion
60119, --Black War Bear
100333, --Vicious War Wolf
171845, --White Stallion
},
["source-quest"] = {
138640, --Bone-White Primal Raptor
73313, --Crimson Deathcharger
171637, --White Stallion
171638, --White Stallion
171617, --White Stallion
171623, --White Stallion
171841, --White Stallion
171831, --White Stallion
64659, --Venomhide Ravasaur
},
["source-prof"] = {
84751, --Fossilized Raptor
169952, --Magnificent Flying Carpet
60424, --Mekgineer's Chopper
92155, --Ultramarine Qiraji Battle Tank
171844, --White Stallion
55531, --Mechano-Hog
},
["source-event"] = {
49379, --Great Brewfest Kodo
43900, --Swift Brewfest Ram
},
["source-none"] = {
15779, --White Mechanostrider Mod B
16055, --Black Nightsaber
16056, --Ancient Frostsaber
16080, --Red Wolf
16081, --Arctic Wolf
16082, --Palomino
16083, --White Stallion
16084, --Mottled Red Raptor
17450, --Ivory Raptor
17459, --Icy Blue Mechanostrider Mod A
17460, --Frost Ram
17461, --Black Ram
18991, --Green Kodo
18992, --Teal Kodo
24252, --Swift Zulian Tiger
26656, --Black Qiraji Battle Tank
43688, --Amani War Bear
43899, --Brewfest Ram
48778, --Acherus Deathcharger
50869, --Brewfest Kodo
58983, --Big Blizzard Bear
64656, --Blue Skeletal Warhorse
66906, --Argent Charger
66907, --Argent Warhorse
68187, --Crusader's White Warhorse
68188, --Crusader's Black Warhorse
89520, --Goblin Mini Hotrod
123160, --Crimson Riding Crane
123182, --White Riding Yak
127178, --Jungle Riding Crane
127180, --Albino Riding Crane
127209, --Black Riding Yak
127213, --Brown Riding Yak
127271, --Crimson Water Strider
127272, --Orange Water Strider
127274, --Jade Water Strider
127278, --Golden Water Strider
171827, --Mount Template 50
171840, --Mount Template 51
171850, --Mount Template 49
179244, --Summon Chauffeur
179245, --Summon Chauffeur
180545, --Mystic Runesaber
},
["source-class"] = {
48778, --Acherus Deathcharger
5784, --Felsteed
23161, --Dreadsteed
13819, --Summon Warhorse
23214, --Summon Charger
34767, --Summon Thalassian Charger
34769, --Summon Thalassian Warhorse
69820, --Summon Sunwalker Kodo
69826, --Summon Great Sunwalker Kodo
73629, --Summon Exarch's Elekk
73630, --Summon Great Exarch's Elekk
},
},
["aquatic"] = {
["source-tcg"] = {
30174, --Riding Turtle
},
["source-drop"] = {
98718, --Subdued Seahorse
},
["source-quest"] = {
75207, --Abyssal Seahorse
},
["source-prof"] = {
64731, --Sea Turtle
},
},
}
end
 
MountRandomMount_MountDataList = {}
MountRandomMount_MountDataList['ground'] = {}
MountRandomMount_MountDataList['flying'] = {}
MountRandomMount_MountDataAquatic = {}
local mounts = C_MountJournal.GetMountIDs()
for _, v in pairs(mounts) do
local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, isFiltered, isCollected, mountID = C_MountJournal.GetMountInfoByID(v)
if isCollected and isUsable then
if MountRandomMount_MountDataList['flying'][sourceType] == nil then
MountRandomMount_MountDataList['flying'][sourceType] = {}
MountRandomMount_MountDataList['ground'][sourceType] = {}
end
local creatureDisplayID, descriptionText, sourceText, isSelfMount, mountType = C_MountJournal.GetMountInfoExtraByID(mountID)
if mountType == 230 or mountType == 269 or mountType == 284 then
MountRandomMount_MountDataList['ground'][sourceType][mountID] = creatureName
end
if mountType == 248 or mountType == 247 then
MountRandomMount_MountDataList['flying'][sourceType][mountID] = creatureName
end
if mountType == 231 or mountType == 232 or mountType == 254 then
MountRandomMount_MountDataAquatic[mountID] = creatureName
end
end
end
 
table.foreach(MountRandomMount_MountDataList, function(k,v)
table.foreach(MountRandomMount_MountDataList[k], function(l,w)
table.sort(MountRandomMount_MountDataList[k][l])
table.sort(MountRandomMount_MountDataList[k][l], function(a,b)
local test1 = GetSpellInfo(a)
if GetSpellInfo(a) == nil then
test1 = '999'
end
local test2 = GetSpellInfo(b)
if GetSpellInfo(b) == nil then
test2 = '999'
end
return test1<test2
end)
end)
end)
end
\ No newline at end of file
trunk/Locale/enUS.lua
81,5 → 81,4
L["Ground Mount"] = "Ground Mount"
L["Enabled"] = "> Enabled <"
L['This panel is only updated when you reload the UI or at loggin.'] = "This panel is only updated when you reload the UI or at loggin."
L['Flying will be random with land mount in area where flying is not enable.'] = "This panel is only updated when you reload the UI or at loggin."
L['MountRandomMount'] = true
\ No newline at end of file +L['Flying will be random with land mount in area where flying is not enable.'] = "This panel is only updated when you reload the UI or at loggin." \ No newline at end of file
trunk/script-import.php
1,6 → 1,6
<?php
$URLs = array(
"http://legion.wowhead.com/items=15.5" => '1',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=1;crv=0" => '1',
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=1;crv=0" => '2',
"http://www.wowhead.com/spells=-5.3" => '4',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=3;crv=0" => '1',
16,6 → 16,60
 
$notFlying = array();
$notFlying[169952] = 1;//Creeping Carpet
//$landFlyingMount = array();
/*$landFlyingMount[63844]=3;//Argent Hippogryph
$landFlyingMount[61230]=3;//Armored Blue Wind Rider
$landFlyingMount[61229]=3;//Armored Snowy Gryphon
$landFlyingMount[74856]=3;//Blazing Hippogryph
$landFlyingMount[32244]=3;//Blue Wind Rider
$landFlyingMount[75614]=3;//Celestial Steed
$landFlyingMount[43927]=3;//Cenarion War Hippogryph
$landFlyingMount[32239]=3;//Ebon Gryphon
$landFlyingMount[32235]=3;//Golden Gryphon
$landFlyingMount[135416]=3;//Grand Armored Gryphon
$landFlyingMount[135418]=3;//Grand Armored Wyvern
$landFlyingMount[136163]=3;//Grand Gryphon
$landFlyingMount[136164]=3;//Grand Wyvern
$landFlyingMount[32245]=3;//Green Wind Rider
$landFlyingMount[32240]=3;//Snowy Gryphon
$landFlyingMount[32242]=3;//Swift Blue Gryphon
$landFlyingMount[32290]=3;//Swift Green Gryphon
$landFlyingMount[32295]=3;//Swift Green Wind Rider
$landFlyingMount[32292]=3;//Swift Purple Gryphon
$landFlyingMount[32297]=3;//Swift Purple Wind Rider
$landFlyingMount[32289]=3;//Swift Red Gryphon
$landFlyingMount[32246]=3;//Swift Red Wind Rider
$landFlyingMount[134573]=3;//Swift Windsteed
$landFlyingMount[32296]=3;//Swift Yellow Wind Rider
$landFlyingMount[32243]=3;//Tawny Wind Rider
$landFlyingMount[66087]=3;//Silver Covenant Hippogryph
$landFlyingMount[75973]=3;//X-53 Touring Rocket
$landFlyingMount[72286]=3;//Invincible
$landFlyingMount[48025]=3;//Headless Horsemans Mount
$landFlyingMount[71342]=3;//Big Love Rocket
$landFlyingMount[61451]=3;//Flying Carpet
$landFlyingMount[61309]=3;//Magnificent Flying Carpet
$landFlyingMount[75596]=3;//Fro sty Flying Carpet
$landFlyingMount[44151]=3;//Turbo-Charged Flying Machine
$landFlyingMount[44153]=3;//Flying Machine
$landFlyingMount[98727]=3;//Winged Guardian
$landFlyingMount[97359]=3;//Flameward Hippogryph
$landFlyingMount[102514]=3;//Corrupted Hippogryph
$landFlyingMount[107203]=3;//Tyrael's (Space) Charger
$landFlyingMount[110051]=3;//Heart of the Aspects
$landFlyingMount[121820]=3;//Obsidian Nightwing
$landFlyingMount[121839]=3;//Sunstone Panther (before it was Dawnstone Panther)
$landFlyingMount[121837]=3;//Emerald Panther
$landFlyingMount[124659]=3;//Imperial Quilen
$landFlyingMount[120043]=3;//Jeweled Onyx Panther
$landFlyingMount[130092]=3;//Red Flying Cloud
$landFlyingMount[121838]=3;//Ruby Panther
$landFlyingMount[121836]=3;//Sapphire Panther
$landFlyingMount[134359]=3;//Sky Golem
$landFlyingMount[136400]=3;//Armored Skyscreamer
$landFlyingMount[142073]=3;//Hearthsteed
$landFlyingMount[153489]=3;//Iron SkyReaver
$landFlyingMount[155741]=3;//Dread Raven*/
 
foreach($URLs as $URL => $type){
$outputfile = "dl.html";
trunk/MountRandomMount.lua
15,8 → 15,6
local MRMDebug = false
local MRM_Zones = {}
 
SLASH_RELOADUI1 = "/rl"
SlashCmdList.RELOADUI = ReloadUI
 
function MountRandomMount:MountRandom()
if (MountRandomMount_SavedTable == nil)
27,14 → 25,14
end
if CanExitVehicle() then
VehicleExit()
elseif IsMounted() then
Dismount()
elseif IsMounted() then
Dismount()
return
end
 
local fly = MountRandomMount:Flying()
local mountSummoned
 
 
if fly then
if MountRandomMount_SavedTable['flying'] == nil or #MountRandomMount_SavedTable['flying'] == 0 then
if MountRandomMount_SavedTable['ground'] == nil or #MountRandomMount_SavedTable['ground'] == 0 then
42,19 → 40,19
return
else
print(L['MRMNoFlyingMountsLand'])
mountSummoned = MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
C_MountJournal.SummonByID(mountSummoned)
CastSpellByName(mountSummoned)
return
end
end
mountSummoned = MountRandomMount_SavedTable['flying'][(random(#MountRandomMount_SavedTable['flying']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['flying'][(random(#MountRandomMount_SavedTable['flying']))])
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
C_MountJournal.SummonByID(mountSummoned)
CastSpellByName(mountSummoned)
else
if(IsSwimming()) then
SetMapToCurrentZone()
63,8 → 61,8
local zone = GetCurrentMapZone()
if continent == 2 and ( zones[zone] == L['MRMKelp'] or zones[zone] == L['MRMShimExp'] or zones[zone] == L['MRMAbysDepth']) then
if MountRandomMount_SeaHorseHave then
local SeaTurtle = MountRandomMount_SeaHorseID
C_MountJournal.SummonByID(SeaTurtle)
local SeaTurtleName = GetSpellInfo(MountRandomMount_SeaHorseID)
CastSpellByName(SeaTurtleName)
return
else
print("You don't have a swimming mount, calling random land mount.")
72,18 → 70,18
print(L['MRMNoMounts'])
return
else
mountSummoned = MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
C_MountJournal.SummonByID(mountSummoned)
CastSpellByName(mountSummoned)
return
end
end
else
if MountRandomMount_SeaTurtleHave then
local SeaTurtle = MountRandomMount_SeaTurtleID
C_MountJournal.SummonByID(mountSummoned)
local SeaTurtleName = GetSpellInfo(MountRandomMount_SeaTurtleID)
CastSpellByName(SeaTurtleName)
return
else
print("You don't have a swimming mount, calling random land mount.")
91,11 → 89,11
print(L['MRMNoMounts'])
return
else
mountSummoned = MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
C_MountJournal.SummonByID(mountSummoned)
CastSpellByName(mountSummoned)
return
end
end
104,7 → 102,7
MountRandomMount:LandOnly()
end
end
 
 
end
 
function MountRandomMount:Flying()
142,20 → 140,20
end
if CanExitVehicle() then
VehicleExit()
elseif IsMounted() then
Dismount()
elseif IsMounted() then
Dismount()
return
end
if MountRandomMount_SavedTable['enableFlyEverywere'] == true and (math.random(0, 1) == 1 or #MountRandomMount_SavedTable['ground'] == 0) then
mountSummoned = MountRandomMount_SavedTable['flying'][(random(#MountRandomMount_SavedTable['flying']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['flying'][(random(#MountRandomMount_SavedTable['flying']))])
else
mountSummoned = MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))]
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
end
 
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
C_MountJournal.SummonByID(mountSummoned)
CastSpellByName(mountSummoned)
end
 
function MountRandomMount:OnPostClick()
225,19 → 223,19
function MountRandomMount:OnPreClick()
if MRMDebug then
print("pre click hit")
end
end
local localizedClass, englishClass = UnitClass("player")
local localizedRace, raceEn = UnitRace("player")
if localizedClass == L['MRMShaman'] or localizedClass == L['MRMShamanF'] then
local name2 = GetSpellInfo(2645)
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMGhostWolf'])
end
 
 
 
 
elseif localizedClass == L['MRMDruid'] then
local isInstance, instanceType = IsInInstance()
local inside = IsIndoors()
245,7 → 243,7
local name2 = GetSpellInfo(1066)--Aquatic Form
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMAcquaForm'])
end
253,7 → 251,7
local name2 = GetSpellInfo(768)--Cat Form
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMCatForm'])
end
262,7 → 260,7
local name2 = GetSpellInfo(87840)--Running Wild
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMRunningWild'])
end
270,7 → 268,7
local name2 = GetSpellInfo(783)--Travel Form
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMTravelForm'])
end
281,17 → 279,17
local name2 = GetSpellInfo(40120)--Swift Flight Form
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
name2 = GetSpellInfo(33943)--Flight Form
name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
name2 = GetSpellInfo(783)--Travel Form
name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(MRMFlighForm)
end
302,7 → 300,7
local name2 = GetSpellInfo(87840)--Running Wild
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMRunningWild'])
end
310,7 → 308,7
local name2 = GetSpellInfo(783)--Travel Form
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMTravelForm'])
end
321,7 → 319,7
local name2 = GetSpellInfo(87840)--Running Wild
local name = GetSpellInfo(name2)
if name ~= nil then
MountRandomMount.btn:SetAttribute("spell", name)
MountRandomMount.btn:SetAttribute("spell", name)
else
print(L['MRMRunningWild'])
end
trunk/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
1,4 → 1,4
--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 6
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
65,7 → 65,9
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
 
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
-- TODO: Remove this after beta has gone out
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
 
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2,12 → 2,10
ScrollFrame Container
Plain container that scrolls its content and doesn't grow in height.
-------------------------------------------------------------------------------]]
local Type, Version = "ScrollFrame", 24
local Type, Version = "ScrollFrame", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local pairs, assert, type = pairs, assert, type
local min, max, floor, abs = math.min, math.max, math.floor, math.abs
178,11 → 176,7
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
if IsLegion then
scrollbg:SetColorTexture(0, 0, 0, 0.4)
else
scrollbg:SetTexture(0, 0, 0, 0.4)
end
scrollbg:SetTexture(0, 0, 0, 0.4)
 
--Container Support
local content = CreateFrame("Frame", nil, scrollframe)
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,12 → 2,10
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 39
local Type, Version = "TreeGroup", 36
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
214,7 → 212,7
if self.enabletooltips then
GameTooltip:SetOwner(frame, "ANCHOR_NONE")
GameTooltip:SetPoint("LEFT",frame,"RIGHT")
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, 1)
 
GameTooltip:Show()
end
337,8 → 335,6
button.toggle.button = button
button.toggle:SetScript("OnClick",Expand_OnClick)
 
button.text:SetHeight(14) -- Prevents text wrapping
 
return button
end,
 
671,13 → 667,8
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetTexture(0,0,0,0.4)
 
if IsLegion then
scrollbg:SetColorTexture(0,0,0,0.4)
else
scrollbg:SetTexture(0,0,0,0.4)
end
 
local border = CreateFrame("Frame",nil,frame)
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
border:SetPoint("BOTTOMRIGHT")
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,9 → 1,7
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1137 2016-05-15 10:57:36Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 996 2010-12-01 18:34:17Z nevcairiel $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local select, assert = select, assert
 
442,7 → 440,7
-- A single line to separate items
do
local widgetType = "Dropdown-Item-Separator"
local widgetVersion = 2
local widgetVersion = 1
 
-- exported, override
local function SetDisabled(self, disabled)
457,11 → 455,7
 
local line = self.frame:CreateTexture(nil, "OVERLAY")
line:SetHeight(1)
if IsLegion then
line:SetColorTexture(.5, .5, .5)
else
line:SetTexture(.5, .5, .5)
end
line:SetTexture(.5, .5, .5)
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
 
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
1,12 → 1,10
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker", 23
local Type, Version = "ColorPicker", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local pairs = pairs
 
148,11 → 146,7
local texture = frame:CreateTexture(nil, "BACKGROUND")
texture:SetWidth(16)
texture:SetHeight(16)
if IsLegion then
texture:SetColorTexture(1, 1, 1)
else
texture:SetTexture(1, 1, 1)
end
texture:SetTexture(1, 1, 1)
texture:SetPoint("CENTER", colorSwatch)
texture:Show()
 
trunk/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,10 → 1,10
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 1126 2014-11-10 06:38:01Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1113 2014-09-11 20:18:16Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 60
local MAJOR, MINOR = "AceConfigDialog-3.0", 59
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
542,16 → 542,16
 
if descStyle and descStyle ~= "tooltip" then return end
 
GameTooltip:SetText(name, 1, .82, 0, true)
GameTooltip:SetText(name, 1, .82, 0, 1)
 
if opt.type == "multiselect" then
GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1)
end
if type(desc) == "string" then
GameTooltip:AddLine(desc, 1, 1, 1, true)
GameTooltip:AddLine(desc, 1, 1, 1, 1)
end
if type(usage) == "string" then
GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1)
end
 
GameTooltip:Show()
1448,10 → 1448,10
GameTooltip:SetPoint("LEFT",button,"RIGHT")
end
 
GameTooltip:SetText(name, 1, .82, 0, true)
GameTooltip:SetText(name, 1, .82, 0, 1)
 
if type(desc) == "string" then
GameTooltip:AddLine(desc, 1, 1, 1, true)
GameTooltip:AddLine(desc, 1, 1, 1, 1)
end
 
GameTooltip:Show()
trunk/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
172,7 → 172,6
local function validateKey(k,errlvl,...)
errlvl=(errlvl or 0)+1
if type(k)~="string" then
print(',',k)
err("["..tostring(k).."] - key is not a string", errlvl,...)
end
if strfind(k, "[%c\127]") then
trunk/MountRandomMount.toc
1,8 → 1,8
## Interface: 70000
## Interface: 60000
## Title: MountRandomMount
## Notes: Random mount addon.
## Author: Dardack, Tomate
## Version: 7.0a
## Version: 6.0a
## SavedVariables: MountRandomMount_MountDataList, MountRandomMount_MountDataListVersion
## SavedVariablesPerCharacter: MountRandomMount_SavedTable
## X-Embeds: Ace3
trunk/MountRandomMount_GUI.lua
30,138 → 30,70
}
}
 
local tableAccents = {}
tableAccents["à"] = "a"
tableAccents["á"] = "a"
tableAccents["â"] = "a"
tableAccents["ã"] = "a"
tableAccents["ä"] = "a"
tableAccents["ç"] = "c"
tableAccents["è"] = "e"
tableAccents["é"] = "e"
tableAccents["ê"] = "e"
tableAccents["ë"] = "e"
tableAccents["ì"] = "i"
tableAccents["í"] = "i"
tableAccents["î"] = "i"
tableAccents["ï"] = "i"
tableAccents["ñ"] = "n"
tableAccents["ò"] = "o"
tableAccents["ó"] = "o"
tableAccents["ô"] = "o"
tableAccents["õ"] = "o"
tableAccents["ö"] = "o"
tableAccents["ù"] = "u"
tableAccents["ú"] = "u"
tableAccents["û"] = "u"
tableAccents["ü"] = "u"
tableAccents["ý"] = "y"
tableAccents["ÿ"] = "y"
tableAccents["À"] = "A"
tableAccents["Á"] = "A"
tableAccents["Â"] = "A"
tableAccents["Ã"] = "A"
tableAccents["Ä"] = "A"
tableAccents["Ç"] = "C"
tableAccents["È"] = "E"
tableAccents["É"] = "E"
tableAccents["Ê"] = "E"
tableAccents["Ë"] = "E"
tableAccents["Ì"] = "I"
tableAccents["Í"] = "I"
tableAccents["Î"] = "I"
tableAccents["Ï"] = "I"
tableAccents["Ñ"] = "N"
tableAccents["Ò"] = "O"
tableAccents["Ó"] = "O"
tableAccents["Ô"] = "O"
tableAccents["Õ"] = "O"
tableAccents["Ö"] = "O"
tableAccents["Ù"] = "U"
tableAccents["Ú"] = "U"
tableAccents["Û"] = "U"
tableAccents["Ü"] = "U"
tableAccents["Ý"] = "Y"
 
-- Strip accents from a string
function string.stripAccents( str )
 
local normalizedString = ""
 
for strChar in string.gmatch(str, "([%z\1-\127\194-\244][\128-\191]*)") do
if tableAccents[strChar] ~= nil then
normalizedString = normalizedString..tableAccents[strChar]
else
normalizedString = normalizedString..strChar
end
end
 
return normalizedString
 
end
 
 
 
--POPULATE GROUND MOUNTS OPTIONS
function MountRandomMount:GroundFrame()
local optionTable = {}
local allmounts = {}
local allMountsOrder = {}
local EnableMounts = {}
local sourcesort = {}
local sources, mounts, k, v, j, i, sourceTxt
local sources, mounts, k, v, j
 
for sources, mounts in pairs(MountRandomMount_MountDataList["ground"]) do
local optionTableMount = {}
i = 0
table.foreach(mounts, function(k,v)
optionTableMount['mount'..v..k] = {
order = k,
name = v,
type = "toggle",
set = function(info,val)
if val then
print(v.." "..L['MRMLandAdded'])
table.insert(MountRandomMount_SavedTable['ground'], k)
else
if GetSpellInfo(v) ~= nil then
local spellName = GetSpellInfo(v)
optionTableMount[spellName..v] = {
order = k,
name = spellName,
type = "toggle",
hidden = function()
if playerMountArray[v] == nil then
return true
else
return false
end
end,
set = function(info,val)
local insert = true
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['ground']) do
if vSaved == k then
print(v.." "..L['MRMLandRemoved'])
if vSaved == v then
print(spellName.." "..L['MRMLandRemoved'])
table.remove(MountRandomMount_SavedTable['ground'], iSaved)
insert = false
break
end
end
end
end,
get = function(info)
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['ground']) do
if vSaved == k then
return true
if insert then
print(spellName.." "..L['MRMLandAdded'])
table.insert(MountRandomMount_SavedTable['ground'], v)
end
end,
get = function(info)
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['ground']) do
if vSaved == v then
return true
end
end
return false
end
return false
end
}
table.insert(allMountsOrder, 'mount'..v..k)
i = 1
allmounts['mount'..v..k] = optionTableMount['mount'..v..k]
}
table.insert(allMountsOrder, spellName..v)
allmounts[spellName..v] = optionTableMount[spellName..v]
 
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['ground']) do
if vSaved == k then
EnableMounts['mount'..v..k] = optionTableMount['mount'..k]
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['ground']) do
if vSaved == v then
EnableMounts[spellName..v] = optionTableMount[spellName..v]
end
end
else
--print('The mount '..v..' does not exist')
end
end)
 
if i ~= 0 then
if sources ~= 0 then
sourceTxt = _G["BATTLE_PET_SOURCE_"..sources]
else
sourceTxt = 'API BUG'
end
table.insert(sourcesort, sourceTxt)
optionTable[sourceTxt] = {
name = sourceTxt,
optionTable[sources] = {
name = L[sources],
order = 2,
type = "group",
handler = MountRandomMount,
childGroups = "tab",
170,15 → 102,6
end
end
 
table.sort(sourcesort, function(a, b)
return string.stripAccents(a)<string.stripAccents(b)
end)
j=3
table.foreach(sourcesort, function(k,v)
optionTable[v].order = j
j=j+1
end)
 
table.sort(allMountsOrder)
j=1
table.foreach(allMountsOrder, function(k,v)
219,77 → 142,71
local allmounts = {}
local allMountsOrder = {}
local EnableMounts = {}
local sourcesort = {}
local sources, mounts, k, v, j, i, sourceTxt
local sources, mounts, k, v, j, i
 
for sources, mounts in pairs(MountRandomMount_MountDataList["flying"]) do
local optionTableMount = {}
i = 0
table.foreach(mounts, function(k,v)
optionTableMount['mount'..v..k] = {
order = k,
name = v,
type = "toggle",
set = function(info,val)
if val then
print(v.." "..L['MRMFlyingAdded'])
table.insert(MountRandomMount_SavedTable['flying'], k)
else
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['flying']) do
if vSaved == k then
print(v.." "..L['MRMFlyingRemoved'])
table.remove(MountRandomMount_SavedTable['flying'], iSaved)
if GetSpellInfo(v) ~= nil then
local spellName = GetSpellInfo(v)
optionTableMount[spellName..v] = {
order = k,
name = spellName,
type = "toggle",
hidden = function()
if _G['playerMountArray'][v] == nil then
return true
else
return false
end
end,
set = function(info,val)
local insert = true
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do
if vSaved == v then
print(spellName.." "..L['MRMFlyingRemoved'])
table.remove(_G['MountRandomMount_SavedTable']['flying'], iSaved)
insert = false
break
end
end
end
end,
get = function(info)
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['flying']) do
if vSaved == k then
return true
if insert then
print(spellName.." "..L['MRMFlyingAdded'])
table.insert(_G['MountRandomMount_SavedTable']['flying'], v)
end
end,
get = function(info)
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do
if vSaved == v then
return true
end
end
return false
end
return false
}
table.insert(allMountsOrder, spellName..v)
allmounts[spellName..v] = optionTableMount[spellName..v]
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do
if vSaved == v then
EnableMounts[spellName..v] = optionTableMount[spellName..v]
end
end
}
table.insert(allMountsOrder, 'mount'..v..k)
i = 1
allmounts['mount'..v..k] = optionTableMount['mount'..v..k]
 
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do
if vSaved == k then
EnableMounts['mount'..v..k] = optionTableMount['mount'..k]
end
else
--print('The mount '..v..' does not exist')
end
end)
 
if i ~= 0 then
if sources ~= 0 then
sourceTxt = _G["BATTLE_PET_SOURCE_"..sources]
else
sourceTxt = 'API BUG'
end
table.insert(sourcesort, sourceTxt)
optionTable[sourceTxt] = {
name = sourceTxt,
optionTable[sources] = {
name = L[sources],
order = 2,
type = "group",
handler = MountRandomMount,
handler = _G['MountRandomMount'],
childGroups = "tab",
args = optionTableMount
}
end
end
 
table.sort(sourcesort, function(a, b)
return string.stripAccents(a)<string.stripAccents(b)
end)
j=3
table.foreach(sourcesort, function(k,v)
optionTable[v].order = j
j=j+1
end)
 
table.sort(allMountsOrder)
j=1
table.foreach(allMountsOrder, function(k,v)
301,7 → 218,7
name = L['All'],
order = 1,
type = "group",
handler = MountRandomMount,
handler = _G['MountRandomMount'],
childGroups = "tab",
args = allmounts
}
318,7 → 235,7
 
return {
name = L["Flying Mount"],
handler = MountRandomMount,
handler = _G['MountRandomMount'],
type = "group",
args = optionTable
}
331,25 → 248,29
 
function MountRandomMount:PlayerMounts()
_G['playerMountArray'] = {}
local mounts = C_MountJournal.GetMountIDs()
local mountcount = _G['C_MountJournal'].GetNumMounts()
local i
local count = 0
for i = 1, mountcount do
local creatureName, creatureID, _, _, summonable, _, _, _, faction, _, owned = C_MountJournal.GetMountInfo(i)
if summonable == true and owned == true and faction ~= 0 then
_G['playerMountArray'][creatureID] = creatureName
end
end
 
_G['MountRandomMount_SeaTurtleHave'] = true
if MountRandomMount_MountDataAquatic[420] ~= nil then--Hippocampe assujetti
_G['MountRandomMount_SeaTurtleID'] = 420
elseif MountRandomMount_MountDataAquatic[838] ~= nil then--Fathom Dweller
_G['MountRandomMount_SeaTurtleID'] = 838
elseif MountRandomMount_MountDataAquatic[800] ~= nil then--Brinedeep Bottom-Feeder
_G['MountRandomMount_SeaTurtleID'] = 800
elseif MountRandomMount_MountDataAquatic[312] ~= nil then--Tortue de mer
_G['MountRandomMount_SeaTurtleID'] = 312
elseif MountRandomMount_MountDataAquatic[125] ~= nil then--Tortue de monte
_G['MountRandomMount_SeaTurtleID'] = 125
if _G['playerMountArray'][98718] ~= nil then
_G['MountRandomMount_SeaTurtleID'] = 98718
elseif _G['playerMountArray'][64731] ~= nil then
_G['MountRandomMount_SeaTurtleID'] = 64731
elseif _G['playerMountArray'][30174] ~= nil then
_G['MountRandomMount_SeaTurtleID'] = 30174
else
_G['MountRandomMount_SeaTurtleHave'] = false
end
 
if MountRandomMount_MountDataAquatic[373] ~= nil then--Hippocampe de Vashj’ir
_G['MountRandomMount_SeaHorseID'] = 373
if _G['playerMountArray'][75207] ~= nil then
_G['MountRandomMount_SeaHorseID'] = 75207
_G['MountRandomMount_SeaHorseHave'] = true
else
_G['MountRandomMount_SeaHorseHave'] = false