WoWInterface SVN MountRandomMount

Compare Revisions

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

Rev 32 → Rev 33

MountRandomMount.toc
1,8 → 1,8
## Interface: 50400
## Interface: 60000
## Title: MountRandomMount
## Notes: Random mount addon.
## Author: Dardack, Tomate
## Version: 5.4f
## Version: 6.0a
## SavedVariables: MountRandomMount_MountDataList, MountRandomMount_MountDataListVersion
## SavedVariablesPerCharacter: MountRandomMount_SavedTable
## X-Embeds: Ace3
MountRandomMount_GUI.lua
13,6 → 13,20
fontSize = "medium",
type = "description"
},
enableFlyEverywere = {
order = 2,
name = L['Flying will be random with land mount in area where flying is not enable.'],
type = "toggle",
set = function(info,val)
MountRandomMount_SavedTable['enableFlyEverywere'] = val
end,
get = function(info)
if MountRandomMount_SavedTable['enableFlyEverywere'] == nil then
MountRandomMount_SavedTable['enableFlyEverywere'] = false
end
return MountRandomMount_SavedTable['enableFlyEverywere']
end
}
}
}
 
234,23 → 248,28
 
function MountRandomMount:PlayerMounts()
_G['playerMountArray'] = {}
local mountcount = GetNumCompanions("MOUNT")
local mountcount = _G['C_MountJournal'].GetNumMounts()
local i
local count = 0
for i = 1, mountcount do
local _, creatureName, creatureSpellID = GetCompanionInfo("MOUNT", i)
playerMountArray[creatureSpellID] = creatureName
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 playerMountArray[98718] ~= nil then
if _G['playerMountArray'][98718] ~= nil then
_G['MountRandomMount_SeaTurtleID'] = 98718
elseif playerMountArray[64731] ~= nil then
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 playerMountArray[75207] ~= nil then
if _G['playerMountArray'][75207] ~= nil then
_G['MountRandomMount_SeaHorseID'] = 75207
_G['MountRandomMount_SeaHorseHave'] = true
else
MountRandomMount_MountListData.lua
1,10 → 1,13
function MountRandomMount:MountDataListFill()
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "5.4.5")) then
MountRandomMount_MountDataListVersion = "5.4.5";
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
19,6 → 22,7
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
71,17 → 75,19
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
148620, --Prideful Gladiator's Cloud Serpent
153489, --Iron Skyreaver
107516, --Spectral Gryphon
147595, --Stormcrow
134573, --Swift Windsteed
89,6 → 95,7
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
},
147,6 → 154,7
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
168,7 → 176,6
121820, --Obsidian Nightwing
},
["source-none"] = {
153489, --Iron Skyreaver
32345, --Peep the Phoenix Mount
37015, --Swift Nether Drake
44744, --Merciless Nether Drake
180,14 → 187,13
65439, --Furious Gladiator's Frost Wyrm
67336, --Relentless Gladiator's Frost Wyrm
71810, --Wrathful Gladiator's Frost Wyrm
97501, --Green Fire Hawk
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
155741, --Dread Raven
},
["source-class"] = {
54729, --Winged Steed of the Ebon Blade
202,7 → 208,6
101542, --Flametalon of Alysrazor
61465, --Grand Black War Mammoth
88750, --Grey Riding Camel
72286, --Invincible
138426, --Jade Primordial Direhorn
41252, --Raven Lord
17481, --Rivendare's Deathcharger
224,12 → 229,10
129934, --Blue Shado-Pan Riding Tiger
88748, --Brown Riding Camel
130086, --Brown Riding Goat
43927, --Cenarion War Hippogryph
39315, --Cobalt Riding Talbuk
34896, --Cobalt War Talbuk
140249, --Golden Primal Direhorn
127176, --Golden Riding Crane
135416, --Grand Armored Gryphon
61470, --Grand Ice Mammoth
65637, --Great Red Elekk
129932, --Green Shado-Pan Riding Tiger
237,7 → 240,6
66090, --Quel'dorei Steed
129935, --Red Shado-Pan Riding Tiger
127177, --Regal Riding Crane
66087, --Silver Covenant Hippogryph
39317, --Silver Riding Talbuk
34898, --Silver War Talbuk
92231, --Spectral Steed
251,9 → 253,11
130137, --White Riding Goat
39319, --White Riding Talbuk
34897, --White War Talbuk
130092, --Red Flying Cloud
171634, --White Stallion
171625, --White Stallion
171829, --White Stallion
171833, --White Stallion
140250, --Crimson Primal Direhorn
135418, --Grand Armored Wyvern
61469, --Grand Ice Mammoth
65641, --Great Golden Kodo
59797, --Ice Mammoth
263,12 → 267,13
65644, --Swift Purple Raptor
65639, --Swift Red Hawkstrider
65645, --White Skeletal Warhorse
171842, --White Stallion
171839, --White Stallion
171832, --White Stallion
},
["source-vendor"] = {
63844, --Argent Hippogryph
67466, --Argent Warhorse
60114, --Armored Brown Bear
61229, --Armored Snowy Gryphon
148428, --Ashhide Mushan Beast
22719, --Black Battlestrider
48027, --Black War Elekk
284,6 → 289,7
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
298,20 → 304,16
63636, --Ironforge Ram
23510, --Stormpike Battle Charger
63232, --Stormwind Steed
32242, --Swift Blue Gryphon
23238, --Swift Brown Ram
23229, --Swift Brown Steed
102346, --Swift Forest Strider
23221, --Swift Frostsaber
23239, --Swift Gray Ram
32290, --Swift Green Gryphon
23225, --Swift Green Mechanostrider
102350, --Swift Lovebird
23219, --Swift Mistsaber
103196, --Swift Mountain Horse
23227, --Swift Palomino
32292, --Swift Purple Gryphon
32289, --Swift Red Gryphon
102349, --Swift Springstrider
23338, --Swift Stormsaber
23223, --Swift White Mechanostrider
320,6 → 322,8
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
331,8 → 335,6
458, --Brown Horse
6899, --Brown Ram
6648, --Chestnut Mare
32239, --Ebon Gryphon
32235, --Golden Gryphon
35710, --Gray Elekk
6777, --Gray Ram
120395, --Green Dragon Turtle
343,14 → 345,13
35711, --Purple Elekk
127290, --Red Dragon Turtle
10873, --Red Mechanostrider
32240, --Snowy Gryphon
10789, --Spotted Frostsaber
66847, --Striped Dawnsaber
8394, --Striped Frostsaber
10793, --Striped Nightsaber
17454, --Unpainted Mechanostrider
6898, --White Ram
61230, --Armored Blue Wind Rider
171825, --White Stallion
60116, --Armored Brown Bear
22718, --Black War Kodo
59788, --Black War Mammoth
358,12 → 359,13
22724, --Black War Wolf
63635, --Darkspear Raptor
63643, --Forsaken Warhorse
23509, --Frostwolf Howler
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
373,26 → 375,22
23250, --Swift Brown Wolf
23252, --Swift Gray Wolf
35025, --Swift Green Hawkstrider
32295, --Swift Green Wind Rider
23242, --Swift Olive Raptor
23243, --Swift Orange Raptor
33660, --Swift Pink Hawkstrider
35027, --Swift Purple Hawkstrider
32297, --Swift Purple Wind Rider
32246, --Swift Red Wind Rider
23251, --Swift Timber Wolf
35028, --Swift Warstrider
32296, --Swift Yellow Wind Rider
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
32244, --Blue Wind Rider
18990, --Brown Kodo
17464, --Brown Skeletal Horse
6654, --Brown Wolf
400,101 → 398,104
8395, --Emerald Raptor
87090, --Goblin Trike
18989, --Gray Kodo
32245, --Green Wind Rider
35018, --Purple Hawkstrider
34795, --Red Hawkstrider
17462, --Red Skeletal Horse
32243, --Tawny Wind Rider
580, --Timber Wolf
10796, --Turquoise Raptor
10799, --Violet Raptor
64657, --White Kodo
},
["source-achv"] = {
136400, --Armored Skyscreamer
60118, --Black War Bear
97359, --Flameward Hippogryph
90621, --Golden King
148396, --Kor'kron War Wolf
100332, --Vicious War Steed
60119, --Black War Bear
93644, --Kor'kron Annihilator
100333, --Vicious War Wolf
},
["source-tcg"] = {
51412, --Big Battle Bear
74856, --Blazing Hippogryph
65917, --Magic Rooster
30174, --Riding Turtle
97581, --Savage Raptor
42777, --Swift Spectral Tiger
74918, --Wooly White Rhino
42776, --Spectral Tiger
},
["source-event"] = {
71342, --Big Love Rocket
49379, --Great Brewfest Kodo
48025, --Headless Horseman's Mount
43900, --Swift Brewfest Ram
},
["source-other"] = {
138642, --Black Primal Raptor
138423, --Cobalt Primordial Direhorn
102514, --Corrupted Hippogryph
138643, --Green Primal Raptor
142073, --Hearthsteed
124659, --Imperial Quilen
148417, --Kor'kron Juggernaut
138641, --Red Primal Raptor
130965, --Son of Galleon
68057, --Swift Alliance Steed
24242, --Swift Razzashi Raptor
101573, --Swift Shorestrider
134573, --Swift Windsteed
107203, --Tyrael's Charger
49322, --Swift Zhevra
54753, --White Polar Bear
102488, --White Riding Camel
75973, --X-53 Touring Rocket
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
136163, --Grand Gryphon
136164, --Grand Wyvern
171637, --White Stallion
171638, --White Stallion
171617, --White Stallion
171623, --White Stallion
171841, --White Stallion
171831, --White Stallion
64659, --Venomhide Ravasaur
},
["source-store"] = {
75614, --Celestial Steed
110051, --Heart of the Aspects
98727, --Winged Guardian
},
["source-prof"] = {
84751, --Fossilized Raptor
75596, --Frosty Flying Carpet
120043, --Jeweled Onyx Panther
61309, --Magnificent Flying Carpet
169952, --Magnificent Flying Carpet
60424, --Mekgineer's Chopper
134359, --Sky Golem
44151, --Turbo-Charged Flying Machine
92155, --Ultramarine Qiraji Battle Tank
61451, --Flying Carpet
44153, --Flying Machine
121837, --Jade Panther
121838, --Ruby Panther
121836, --Sapphire Panther
121839, --Sunstone Panther
171844, --White Stallion
55531, --Mechano-Hog
},
["source-promo"] = {
121820, --Obsidian Nightwing
["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, --Winter Wolf
16081, --Arctic Wolf
16082, --Palomino
16083, --White Stallion
16084, --Mottled Red Raptor
509,7 → 510,6
43688, --Amani War Bear
43899, --Brewfest Ram
48778, --Acherus Deathcharger
49322, --Swift Zhevra
50869, --Brewfest Kodo
58983, --Big Blizzard Bear
64656, --Blue Skeletal Warhorse
528,7 → 528,12
127272, --Orange Water Strider
127274, --Jade Water Strider
127278, --Golden Water Strider
155741, --Dread Raven
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
545,6 → 550,9
},
},
["aquatic"] = {
["source-tcg"] = {
30174, --Riding Turtle
},
["source-drop"] = {
98718, --Subdued Seahorse
},
Locale/enUS.lua
80,4 → 80,5
L["Flying Mount"] = "Flying Mount"
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."
\ No newline at end of file +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." \ No newline at end of file
Locale/zhTW.lua
82,4 → 82,5
L["Flying Mount"] = "Flying Mount"
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."
\ No newline at end of file +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." \ No newline at end of file
Locale/ruRU.lua
80,4 → 80,5
L["Flying Mount"] = "Flying Mount"
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."
\ No newline at end of file +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." \ No newline at end of file
Locale/frFR.lua
80,4 → 80,5
L["Flying Mount"] = "Monture volante"
L["Ground Mount"] = "Monture terrestre"
L["Enabled"] = "> Utilis\195\169 <"
L['This panel is only updated when you reload the UI or at loggin.'] = "Ce panneau n'est mis \195\160 jour qu'au rechargement de l'interface ou \195\160 la connection."
\ No newline at end of file +L['This panel is only updated when you reload the UI or at loggin.'] = "Ce panneau n'est mis \195\160 jour qu'au rechargement de l'interface ou \195\160 la connection." +L['Flying will be random with land mount in area where flying is not enable.'] = "Les montures volantes seront également utilisées en tant que monture terrestre dans les zones ou le vol n'est pas activé." \ No newline at end of file
Locale/deDE.lua
80,4 → 80,5
L["Flying Mount"] = "Flying Mount"
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."
\ No newline at end of file +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." \ No newline at end of file
script-import.php
2,19 → 2,22
$URLs = array(
"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?filter=cr=16;crs=1;crv=0" => '4',
"http://www.wowhead.com/spells=-5.3" => '4',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=3;crv=0" => '1',
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=3;crv=0" => '2',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=4;crv=0" => '1',
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=4;crv=0" => '2',
"http://www.wowhead.com/spells=-5.3?filter=cr=16;crs=4;crv=0" => '4',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=5;crv=0" => '1',
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=5;crv=0" => '2'
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=5;crv=0" => '2',
"http://www.wowhead.com/spells=-5.1?filter=cr=16;crs=6;crv=0" => '1',
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=6;crv=0" => '2'
);
$completearray = array();
 
$landFlyingMount = array();
$landFlyingMount[63844]=3;//Argent Hippogryph
$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
46,7 → 49,7
$landFlyingMount[71342]=3;//Big Love Rocket
$landFlyingMount[61451]=3;//Flying Carpet
$landFlyingMount[61309]=3;//Magnificent Flying Carpet
$landFlyingMount[75596]=3;//Frosty 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
66,7 → 69,7
$landFlyingMount[136400]=3;//Armored Skyscreamer
$landFlyingMount[142073]=3;//Hearthsteed
$landFlyingMount[153489]=3;//Iron SkyReaver
$landFlyingMount[155741]=3;//Dread Raven
$landFlyingMount[155741]=3;//Dread Raven*/
 
foreach($URLs as $URL => $type){
$outputfile = "dl.html";
91,19 → 94,15
$workingarray = explode(';', $wokingstring);
 
foreach($workingarray as $mount){
$pos = strpos($mount, "',rank_enus:");
$pos = strpos($mount, '","rank_enus":');
$mount = substr($mount, 0, $pos);
$mount = str_replace(array("_[", "]={name_enus:'"), array('', '*-*'), $mount);
$mount = str_replace(array("_[", "]={name_ptr:'"), array('', '*-*'), $mount);
$mount = str_replace(array("_[", ']={"name_enus":"'), array('', '*-*'), $mount);
$mount = str_replace(array("_[", ']={"name_ptr":"'), array('', '*-*'), $mount);
$mount = explode('*-*', $mount);
$currentType = $type;
if(isset($landFlyingMount[$mount[0]])){
$currentType = 3;
}
if($mount[0] == 30174){//Riding Turtle wirdly taged as flying one
if(isset($notFlying[$mount[0]])){
$currentType = 1;
}
 
$completearray[$currentType][$mount[0]] = str_replace('\\','',$mount[1]);
}
 
115,7 → 114,7
$echo = 1;
 
$URLs = array(
"http://eu.battle.net/wow/en/character/chogall/Rübis/mount",//ally
"http://eu.battle.net/wow/en/character/elune/R%C3%BBbis/mount",//ally
"http://eu.battle.net/wow/en/character/chogall/Tomatan/mount"//horde
);
 
132,10 → 131,10
$source = str_replace(array(' 4 type-2', ' 4 type-1', ' 4 type-3', ' 3 type-2', ' 3 type-1', ' 3 type-3', ' 1 type-2', ' 1 type-1', ' 1 type-3'), '', $mount->$source);
$nameMount = $mount->find('span.name',0)->innertext;
$type = str_replace(array('grid-item not-collected ', 'grid-item is-collected '), '', $mount->class);
if($id == '64731'){
if($id == '64731' || $id == '30174'){
$type = 'aquatic';
}
if(isset($landFlyingMount[$id])){
if(isset($notFlying[$id])){
$allMounts['ground'][$source][$id] = $nameMount;
}
$allMounts[$type][$source][$id] = $nameMount;
MountRandomMount.lua
30,7 → 30,7
return
end
 
local fly = MountRandomMount:Flying(false)
local fly = MountRandomMount:Flying()
local mountSummoned
 
if fly then
105,7 → 105,7
 
end
 
function MountRandomMount:Flying(druid)
function MountRandomMount:Flying()
--get breath status
local timer, initial, maxvalue, scale = GetMirrorTimerInfo(2)
if timer == "BREATH" and scale == -1 then
121,27 → 121,20
return false
end
end
 
if druid then
if GetShapeshiftFormID() == 27 then
return true
elseif IsUsableSpell(60025) then
return true
else
return false
end
 
if continent ~= 7 and continent ~= -1 and IsFlyableArea() then
return true
else
if IsUsableSpell(60025) then
return true
else
return false
end
return false
end
end
 
function MountRandomMount:LandOnly()
local mountSummoned
if MountRandomMount_SavedTable == nil or MountRandomMount_SavedTable['ground'] == nil or #MountRandomMount_SavedTable['ground'] == 0 then
if MountRandomMount_SavedTable == nil
or (
(MountRandomMount_SavedTable['ground'] == nil or #MountRandomMount_SavedTable['ground'] == 0)
and (MountRandomMount_SavedTable['enableFlyEverywere'] == false or (MountRandomMount_SavedTable['flying'] == nil or #MountRandomMount_SavedTable['flying'] == 0))) then
print(L['MRMNoMounts'])
return
end
151,7 → 144,12
Dismount()
return
end
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
if MountRandomMount_SavedTable['enableFlyEverywere'] == true and (math.random(0, 1) == 1 or #MountRandomMount_SavedTable['ground'] == 0) then
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['flying'][(random(#MountRandomMount_SavedTable['flying']))])
else
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))])
end
 
if MRMDebug then
print("The summoned mount is: "..mountSummoned)
end
276,7 → 274,7
end
end
else
local fly = MountRandomMount:Flying(true)
local fly = MountRandomMount:Flying()
if fly then
local name2 = GetSpellInfo(40120)--Swift Flight Form
local name = GetSpellInfo(name2)
Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,17 → 356,19
 
do
local widgetType = "Dropdown"
local widgetVersion = 25
local widgetVersion = 30
 
--[[ Static data ]]--
 
--[[ UI event handler ]]--
 
local function Control_OnEnter(this)
this.obj.button:LockHighlight()
this.obj:Fire("OnEnter")
end
 
local function Control_OnLeave(this)
this.obj.button:UnlockHighlight()
this.obj:Fire("OnLeave")
end
 
386,7 → 388,7
AceGUI:ClearFocus()
else
self.open = true
self.pullout:SetWidth(self.frame:GetWidth())
self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth())
self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
AceGUI:SetFocus(self)
end
403,6 → 405,7
end
 
self.open = true
self:Fire("OnOpened")
end
 
local function OnPulloutClose(this)
461,6 → 464,7
self:SetHeight(44)
self:SetWidth(200)
self:SetLabel()
self:SetPulloutWidth(nil)
end
 
-- exported, AceGUI callback
490,9 → 494,11
if disabled then
self.text:SetTextColor(0.5,0.5,0.5)
self.button:Disable()
self.button_cover:Disable()
self.label:SetTextColor(0.5,0.5,0.5)
else
self.button:Enable()
self.button_cover:Enable()
self.label:SetTextColor(1,.82,0)
self.text:SetTextColor(1,1,1)
end
515,9 → 521,9
if text and text ~= "" then
self.label:SetText(text)
self.label:Show()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
self:SetHeight(44)
self.alignoffset = 30
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14)
self:SetHeight(40)
self.alignoffset = 26
else
self.label:SetText("")
self.label:Hide()
635,6 → 641,10
return self.multiselect
end
 
local function SetPulloutWidth(self, width)
self.pulloutWidth = width
end
 
--[[ Constructor ]]--
 
local function Constructor()
666,8 → 676,9
self.GetMultiselect = GetMultiselect
self.SetItemValue = SetItemValue
self.SetItemDisabled = SetItemDisabled
self.SetPulloutWidth = SetPulloutWidth
 
self.alignoffset = 30
self.alignoffset = 26
 
frame:SetScript("OnHide",Dropdown_OnHide)
 
694,6 → 705,15
button:SetScript("OnLeave",Control_OnLeave)
button:SetScript("OnClick",Dropdown_TogglePullout)
 
local button_cover = CreateFrame("BUTTON",nil,self.frame)
self.button_cover = button_cover
button_cover.obj = self
button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
button_cover:SetScript("OnEnter",Control_OnEnter)
button_cover:SetScript("OnLeave",Control_OnLeave)
button_cover:SetScript("OnClick",Dropdown_TogglePullout)
 
local text = _G[dropdown:GetName() .. "Text"]
self.text = text
text.obj = self
Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 24
local Type, Version = "EditBox", 25
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
90,6 → 90,11
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
elseif type == "macro" then
local name = GetMacroInfo(id)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
end
HideButton(self)
AceGUI:ClearFocus()
Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,7 → 2,7
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 34
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
 
231,7 → 231,7
if frame.obj.noupdate then return end
local self = frame.obj
local status = self.status or self.localstatus
status.scrollvalue = value
status.scrollvalue = floor(value + 0.5)
self:RefreshTree()
AceGUI:ClearFocus()
end
Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,7 → 2,7
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 22
local Type, Version = "Button", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
45,6 → 45,7
self:SetHeight(24)
self:SetWidth(200)
self:SetDisabled(false)
self:SetAutoWidth(false)
self:SetText()
end,
 
52,7 → 53,17
 
["SetText"] = function(self, text)
self.text:SetText(text)
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetAutoWidth"] = function(self, autoWidth)
self.autoWidth = autoWidth
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker", 21
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
 
51,6 → 51,7
local self = frame.obj
if not self.disabled then
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
ColorPickerFrame:SetClampedToScreen(true)
 
ColorPickerFrame.func = function()
Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
2,7 → 2,7
Slider Widget
Graphical Slider, like, for Range values.
-------------------------------------------------------------------------------]]
local Type, Version = "Slider", 20
local Type, Version = "Slider", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
61,6 → 61,10
local self = frame.obj
if not frame.setup then
local newvalue = frame:GetValue()
if self.step and self.step > 0 then
local min_value = self.min or 0
newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value
end
if newvalue ~= self.value and not self.disabled then
self.value = newvalue
self:Fire("OnValueChanged", newvalue)
Libs/AceGUI-3.0/AceGUI-3.0.lua
24,8 → 24,8
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 924 2010-05-13 15:12:20Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 33
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
673,8 → 673,16
end
end)
 
local layoutrecursionblock = nil
local function safelayoutcall(object, func, ...)
layoutrecursionblock = true
object[func](object, ...)
layoutrecursionblock = nil
end
 
AceGUI:RegisterLayout("Flow",
function(content, children)
if layoutrecursionblock then return end
--used height so far
local height = 0
--width used in the current row
762,7 → 770,7
end
 
if child.width == "fill" then
child:SetWidth(width)
safelayoutcall(child, "SetWidth", width)
frame:SetPoint("RIGHT", content)
 
usedwidth = 0
776,7 → 784,7
rowoffset = child.alignoffset or (rowheight / 2)
rowstartoffset = rowoffset
elseif child.width == "relative" then
child:SetWidth(width * child.relWidth)
safelayoutcall(child, "SetWidth", width * child.relWidth)
 
if child.DoLayout then
child:DoLayout()
Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,8 → 8,8
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14
-- @release $Id: AceConfigRegistry-3.0.lua 1105 2013-12-08 22:11:58Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 15
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
288,7 → 288,8
-- @param appName The application name as given to `:RegisterOptionsTable()`
-- @param options The options table, OR a function reference that generates it on demand. \\
-- See the top of the page for info on arguments passed to such functions.
function AceConfigRegistry:RegisterOptionsTable(appName, options)
-- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation)
if type(options)=="table" then
if options.type~="group" then -- quick sanity checker
error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
296,7 → 297,7
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
if not AceConfigRegistry.validated[uiType][appName] then
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
307,7 → 308,7
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
local tab = assert(options(uiType, uiName, appName))
if not AceConfigRegistry.validated[uiType][appName] then
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
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 1049 2012-04-02 13:22:10Z mikk $
-- @release $Id: AceConfigDialog-3.0.lua 1113 2014-09-11 20:18:16Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 57
local MAJOR, MINOR = "AceConfigDialog-3.0", 59
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
580,7 → 580,7
t.text = message
t.button1 = ACCEPT
t.button2 = CANCEL
t.preferredIndex = 3
t.preferredIndex = STATICPOPUP_NUMDIALOGS
local dialog, oldstrata
t.OnAccept = function()
safecall(func, unpack(t))
1817,6 → 1817,14
tinsert(path, (select(n, ...)))
end
 
local option = options
if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
for i = 1, #path do
option = options.args[path[i]]
end
name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
end
 
--if a container is given feed into that
if container then
f = container