/trunk
return |
end |
local fly = MountRandomMount:Flying() |
local fly = MountRandomMount:Flying(false) |
local mountSummoned |
if fly then |
end |
function MountRandomMount:Flying() |
function MountRandomMount:Flying(druid) |
--get breath status |
local timer, initial, maxvalue, scale = GetMirrorTimerInfo(2) |
if timer == "BREATH" and scale == -1 then |
return false |
end |
end |
if continent ~= 7 and continent ~= -1 and IsFlyableArea() then |
return true |
if druid then |
if GetShapeshiftFormID() == 27 then |
return true |
elseif IsUsableSpell(60025) then |
return true |
else |
return false |
end |
else |
return false |
if IsUsableSpell(60025) then |
return true |
else |
return false |
end |
end |
end |
function MountRandomMount:LandOnly() |
local mountSummoned |
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 |
if MountRandomMount_SavedTable == nil or MountRandomMount_SavedTable['ground'] == nil or #MountRandomMount_SavedTable['ground'] == 0 then |
print(L['MRMNoMounts']) |
return |
end |
Dismount() |
return |
end |
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 |
mountSummoned = GetSpellInfo(MountRandomMount_SavedTable['ground'][(random(#MountRandomMount_SavedTable['ground']))]) |
if MRMDebug then |
print("The summoned mount is: "..mountSummoned) |
end |
end |
end |
else |
local fly = MountRandomMount:Flying() |
local fly = MountRandomMount:Flying(true) |
if fly then |
local name2 = GetSpellInfo(40120)--Swift Flight Form |
local name = GetSpellInfo(name2) |
-- f:AddChild(btn) |
-- @class file |
-- @name AceGUI-3.0 |
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $ |
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34 |
-- @release $Id: AceGUI-3.0.lua 924 2010-05-13 15:12:20Z nevcairiel $ |
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 33 |
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) |
if not AceGUI then return end -- No upgrade needed |
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 |
end |
if child.width == "fill" then |
safelayoutcall(child, "SetWidth", width) |
child:SetWidth(width) |
frame:SetPoint("RIGHT", content) |
usedwidth = 0 |
rowoffset = child.alignoffset or (rowheight / 2) |
rowstartoffset = rowoffset |
elseif child.width == "relative" then |
safelayoutcall(child, "SetWidth", width * child.relWidth) |
child:SetWidth(width * child.relWidth) |
if child.DoLayout then |
child:DoLayout() |
TreeGroup Container |
Container that uses a tree control to switch between groups. |
-------------------------------------------------------------------------------]] |
local Type, Version = "TreeGroup", 36 |
local Type, Version = "TreeGroup", 34 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
if frame.obj.noupdate then return end |
local self = frame.obj |
local status = self.status or self.localstatus |
status.scrollvalue = floor(value + 0.5) |
status.scrollvalue = value |
self:RefreshTree() |
AceGUI:ClearFocus() |
end |
Button Widget |
Graphical Button. |
-------------------------------------------------------------------------------]] |
local Type, Version = "Button", 23 |
local Type, Version = "Button", 22 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
self:SetHeight(24) |
self:SetWidth(200) |
self:SetDisabled(false) |
self:SetAutoWidth(false) |
self:SetText() |
end, |
["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 |
--[[----------------------------------------------------------------------------- |
ColorPicker Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "ColorPicker", 22 |
local Type, Version = "ColorPicker", 21 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local self = frame.obj |
if not self.disabled then |
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG") |
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10) |
ColorPickerFrame:SetClampedToScreen(true) |
ColorPickerFrame.func = function() |
Slider Widget |
Graphical Slider, like, for Range values. |
-------------------------------------------------------------------------------]] |
local Type, Version = "Slider", 21 |
local Type, Version = "Slider", 20 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
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) |
--[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
-- Lua APIs |
do |
local widgetType = "Dropdown" |
local widgetVersion = 30 |
local widgetVersion = 25 |
--[[ 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 |
AceGUI:ClearFocus() |
else |
self.open = true |
self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth()) |
self.pullout:SetWidth(self.frame:GetWidth()) |
self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0) |
AceGUI:SetFocus(self) |
end |
end |
self.open = true |
self:Fire("OnOpened") |
end |
local function OnPulloutClose(this) |
self:SetHeight(44) |
self:SetWidth(200) |
self:SetLabel() |
self:SetPulloutWidth(nil) |
end |
-- exported, AceGUI callback |
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 |
if text and text ~= "" then |
self.label:SetText(text) |
self.label:Show() |
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14) |
self:SetHeight(40) |
self.alignoffset = 26 |
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18) |
self:SetHeight(44) |
self.alignoffset = 30 |
else |
self.label:SetText("") |
self.label:Hide() |
return self.multiselect |
end |
local function SetPulloutWidth(self, width) |
self.pulloutWidth = width |
end |
--[[ Constructor ]]-- |
local function Constructor() |
self.GetMultiselect = GetMultiselect |
self.SetItemValue = SetItemValue |
self.SetItemDisabled = SetItemDisabled |
self.SetPulloutWidth = SetPulloutWidth |
self.alignoffset = 26 |
self.alignoffset = 30 |
frame:SetScript("OnHide",Dropdown_OnHide) |
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 |
--[[----------------------------------------------------------------------------- |
EditBox Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "EditBox", 25 |
local Type, Version = "EditBox", 24 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
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() |
--- 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 1113 2014-09-11 20:18:16Z nevcairiel $ |
-- @release $Id: AceConfigDialog-3.0.lua 1049 2012-04-02 13:22:10Z mikk $ |
local LibStub = LibStub |
local MAJOR, MINOR = "AceConfigDialog-3.0", 59 |
local MAJOR, MINOR = "AceConfigDialog-3.0", 57 |
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfigDialog then return end |
t.text = message |
t.button1 = ACCEPT |
t.button2 = CANCEL |
t.preferredIndex = STATICPOPUP_NUMDIALOGS |
t.preferredIndex = 3 |
local dialog, oldstrata |
t.OnAccept = function() |
safecall(func, unpack(t)) |
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 |
-- :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 1105 2013-12-08 22:11:58Z nevcairiel $ |
local MAJOR, MINOR = "AceConfigRegistry-3.0", 15 |
-- @release $Id: AceConfigRegistry-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $ |
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14 |
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfigRegistry then return end |
-- @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. |
-- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown) |
function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation) |
function AceConfigRegistry:RegisterOptionsTable(appName, options) |
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) |
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl) |
errlvl=(errlvl or 0)+1 |
validateGetterArgs(uiType, uiName, errlvl) |
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then |
if not AceConfigRegistry.validated[uiType][appName] then |
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable |
AceConfigRegistry.validated[uiType][appName] = true |
end |
errlvl=(errlvl or 0)+1 |
validateGetterArgs(uiType, uiName, errlvl) |
local tab = assert(options(uiType, uiName, appName)) |
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then |
if not AceConfigRegistry.validated[uiType][appName] then |
AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl) -- upgradable |
AceConfigRegistry.validated[uiType][appName] = true |
end |
## Interface: 60000 |
## Interface: 50400 |
## Title: MountRandomMount |
## Notes: Random mount addon. |
## Author: Dardack, Tomate |
## Version: 6.0a |
## Version: 5.4f |
## SavedVariables: MountRandomMount_MountDataList, MountRandomMount_MountDataListVersion |
## SavedVariablesPerCharacter: MountRandomMount_SavedTable |
## X-Embeds: Ace3 |
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 |
} |
} |
} |
function MountRandomMount:PlayerMounts() |
_G['playerMountArray'] = {} |
local mountcount = _G['C_MountJournal'].GetNumMounts() |
local mountcount = GetNumCompanions("MOUNT") |
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 |
local _, creatureName, creatureSpellID = GetCompanionInfo("MOUNT", i) |
playerMountArray[creatureSpellID] = creatureName |
end |
_G['MountRandomMount_SeaTurtleHave'] = true |
if _G['playerMountArray'][98718] ~= nil then |
if playerMountArray[98718] ~= nil then |
_G['MountRandomMount_SeaTurtleID'] = 98718 |
elseif _G['playerMountArray'][64731] ~= nil then |
elseif 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 _G['playerMountArray'][75207] ~= nil then |
if playerMountArray[75207] ~= nil then |
_G['MountRandomMount_SeaHorseID'] = 75207 |
_G['MountRandomMount_SeaHorseHave'] = true |
else |
function MountRandomMount:MountDataListFill() |
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "6.0.2")) then |
MountRandomMount_SavedTable['ground'] = {} |
MountRandomMount_SavedTable['flying'] = {} |
MountRandomMount_MountDataListVersion = "6.0.2"; |
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "5.4.5")) then |
MountRandomMount_MountDataListVersion = "5.4.5"; |
MountRandomMount_MountDataList= { |
["flying"] = { |
["source-achv"] = { |
60025, --Albino Drake |
175700, --Albino Drake |
142478, --Armored Blue Dragonhawk |
136400, --Armored Skyscreamer |
72808, --Bloodbathed 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 |
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 |
148620, --Prideful Gladiator's Cloud Serpent |
107516, --Spectral Gryphon |
147595, --Stormcrow |
134573, --Swift Windsteed |
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 |
}, |
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 |
121820, --Obsidian Nightwing |
}, |
["source-none"] = { |
153489, --Iron Skyreaver |
32345, --Peep the Phoenix Mount |
37015, --Swift Nether Drake |
44744, --Merciless Nether Drake |
65439, --Furious Gladiator's Frost Wyrm |
67336, --Relentless Gladiator's Frost Wyrm |
71810, --Wrathful Gladiator's Frost Wyrm |
97501, --Felfire Hawk |
97501, --Green Fire 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 |
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 |
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 |
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 |
130137, --White Riding Goat |
39319, --White Riding Talbuk |
34897, --White War Talbuk |
171634, --White Stallion |
171625, --White Stallion |
171829, --White Stallion |
171833, --White Stallion |
130092, --Red Flying Cloud |
140250, --Crimson Primal Direhorn |
135418, --Grand Armored Wyvern |
61469, --Grand Ice Mammoth |
65641, --Great Golden Kodo |
59797, --Ice Mammoth |
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 |
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 |
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 |
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 |
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 |
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 |
171825, --White Stallion |
61230, --Armored Blue Wind Rider |
60116, --Armored Brown Bear |
22718, --Black War Kodo |
59788, --Black War Mammoth |
22724, --Black War Wolf |
63635, --Darkspear Raptor |
63643, --Forsaken Warhorse |
23509, --Frost Wolf Howler |
23509, --Frostwolf 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 |
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 |
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 |
49322, --Swift Zhevra |
134573, --Swift Windsteed |
107203, --Tyrael's Charger |
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 |
75973, --X-53 Touring Rocket |
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 |
136163, --Grand Gryphon |
136164, --Grand Wyvern |
64659, --Venomhide Ravasaur |
}, |
["source-store"] = { |
75614, --Celestial Steed |
110051, --Heart of the Aspects |
98727, --Winged Guardian |
}, |
["source-prof"] = { |
84751, --Fossilized Raptor |
169952, --Magnificent Flying Carpet |
75596, --Frosty Flying Carpet |
120043, --Jeweled Onyx Panther |
61309, --Magnificent Flying Carpet |
60424, --Mekgineer's Chopper |
134359, --Sky Golem |
44151, --Turbo-Charged Flying Machine |
92155, --Ultramarine Qiraji Battle Tank |
171844, --White Stallion |
61451, --Flying Carpet |
44153, --Flying Machine |
121837, --Jade Panther |
121838, --Ruby Panther |
121836, --Sapphire Panther |
121839, --Sunstone Panther |
55531, --Mechano-Hog |
}, |
["source-event"] = { |
49379, --Great Brewfest Kodo |
43900, --Swift Brewfest Ram |
["source-promo"] = { |
121820, --Obsidian Nightwing |
}, |
["source-none"] = { |
15779, --White Mechanostrider Mod B |
16055, --Black Nightsaber |
16056, --Ancient Frostsaber |
16080, --Red Wolf |
16081, --Arctic Wolf |
16081, --Winter Wolf |
16082, --Palomino |
16083, --White Stallion |
16084, --Mottled Red Raptor |
43688, --Amani War Bear |
43899, --Brewfest Ram |
48778, --Acherus Deathcharger |
49322, --Swift Zhevra |
50869, --Brewfest Kodo |
58983, --Big Blizzard Bear |
64656, --Blue Skeletal Warhorse |
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 |
155741, --Dread Raven |
}, |
["source-class"] = { |
48778, --Acherus Deathcharger |
}, |
}, |
["aquatic"] = { |
["source-tcg"] = { |
30174, --Riding Turtle |
}, |
["source-drop"] = { |
98718, --Subdued Seahorse |
}, |
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." |
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["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." |
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["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." |
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["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." |
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["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." |
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é." |
$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" => '4', |
"http://www.wowhead.com/spells=-5.3?filter=cr=16;crs=1;crv=0" => '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.1?filter=cr=16;crs=6;crv=0" => '1', |
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=6;crv=0" => '2' |
"http://www.wowhead.com/spells=-5.2?filter=cr=16;crs=5;crv=0" => '2' |
); |
$completearray = array(); |
$notFlying = array(); |
$notFlying[169952] = 1;//Creeping Carpet |
//$landFlyingMount = array(); |
/*$landFlyingMount[63844]=3;//Argent Hippogryph |
$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[71342]=3;//Big Love Rocket |
$landFlyingMount[61451]=3;//Flying Carpet |
$landFlyingMount[61309]=3;//Magnificent Flying Carpet |
$landFlyingMount[75596]=3;//Fro sty Flying Carpet |
$landFlyingMount[75596]=3;//Frosty Flying Carpet |
$landFlyingMount[44151]=3;//Turbo-Charged Flying Machine |
$landFlyingMount[44153]=3;//Flying Machine |
$landFlyingMount[98727]=3;//Winged Guardian |
$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"; |
$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($notFlying[$mount[0]])){ |
if(isset($landFlyingMount[$mount[0]])){ |
$currentType = 3; |
} |
if($mount[0] == 30174){//Riding Turtle wirdly taged as flying one |
$currentType = 1; |
} |
$completearray[$currentType][$mount[0]] = str_replace('\\','',$mount[1]); |
} |
$echo = 1; |
$URLs = array( |
"http://eu.battle.net/wow/en/character/elune/R%C3%BBbis/mount",//ally |
"http://eu.battle.net/wow/en/character/chogall/Rübis/mount",//ally |
"http://eu.battle.net/wow/en/character/chogall/Tomatan/mount"//horde |
); |
$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' || $id == '30174'){ |
if($id == '64731'){ |
$type = 'aquatic'; |
} |
if(isset($notFlying[$id])){ |
if(isset($landFlyingMount[$id])){ |
$allMounts['ground'][$source][$id] = $nameMount; |
} |
$allMounts[$type][$source][$id] = $nameMount; |