Skip to content

Instantly share code, notes, and snippets.

@t-mart
Created June 27, 2010 06:01
Show Gist options
  • Save t-mart/454692 to your computer and use it in GitHub Desktop.
Save t-mart/454692 to your computer and use it in GitHub Desktop.
---------
function GoGo_OnLoad()
---------
SLASH_GOGOMOUNT1 = "/gogo"
SlashCmdList["GOGOMOUNT"] = function(msg) GoGo_OnSlash(msg) end
SLASH_GOGOID1 = "/id"
SlashCmdList["GOGOID"] = function(msg) GoGo_Msg(GoGo_Id(msg)) end
this:RegisterEvent("VARIABLES_LOADED")
this:RegisterEvent("UPDATE_BINDINGS")
this:RegisterEvent("TAXIMAP_OPENED")
this:RegisterEvent("CHAT_MSG_ADDON")
this:RegisterEvent("COMPANION_LEARNED")
this:RegisterEvent("PLAYER_ENTERING_WORLD")
-- this:RegisterEvent("BAG_UPDATE")
end --function
---------
function GoGo_OnEvent(event)
---------
if event == "VARIABLES_LOADED" then
if not GoGo_Prefs then
GoGo_Prefs = {}
GoGo_Settings_Default()
end --if
-- GoGo_Localize()
-- GoGo_LoadMountDB()
GoGo_Variables.TestVersion = false
GoGo_Variables.Debug = false
_, GoGo_Variables.Player.Class = UnitClass("player")
if (GoGo_Variables.Player.Class == "DRUID") then
GoGo_Variables.Druid = {}
this:RegisterEvent("PLAYER_REGEN_DISABLED")
elseif (GoGo_Variables.Player.Class == "SHAMAN") then
GoGo_Variables.Shaman = {}
this:RegisterEvent("PLAYER_REGEN_DISABLED")
end --if
GOGO_OUTLANDS = table.concat({GetMapZones(3)}, ":")..":"..GOGO_ZONE_TWISTING_NETHER
GOGO_NORTHREND = table.concat({GetMapZones(4)}, ":")..":"..GOGO_ZONE_THEFROZENSEA
GoGoFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
if not GoGo_Prefs.version then
GoGo_Settings_Default()
elseif GoGo_Prefs.version ~= GetAddOnMetadata("GoGoMount", "Version") then
GoGo_Settings_SetUpdates()
end --if
GoGo_Panel_Options()
GoGo_Panel_UpdateViews()
-- GoGo_Panel_GlobalFavorites_Populate()
elseif event == "PLAYER_REGEN_DISABLED" then
for i, button in ipairs({GoGoButton, GoGoButton2, GoGoButton3}) do
if GoGo_Variables.Player.Class == "SHAMAN" then
GoGo_FillButton(button, GoGo_InBook(GOGO_SPELLS["SHAMAN"]))
elseif GoGo_Variables.Player.Class == "DRUID" then
GoGo_FillButton(button, GoGo_InBook(GOGO_SPELLS["DRUID"]))
end --if
end --for
elseif event == "ZONE_CHANGED_NEW_AREA" then
SetMapToCurrentZone()
GoGo_Variables.Player.Zone = GetRealZoneText()
elseif event == "TAXIMAP_OPENED" then
GoGo_Dismount()
elseif event == "UPDATE_BINDINGS" then
if not InCombatLockdown() then -- ticket 213
GoGo_CheckBindings()
end --if
elseif event == "UI_ERROR_MESSAGE" then
if GOGO_ERRORS[arg1] and not IsFlying() then
GoGo_Dismount()
end --if
elseif (event == "PLAYER_ENTERING_WORLD") then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("EVENT: Player Entering World")
end --if
GoGo_BuildMountSpellList()
GoGo_BuildMountItemList()
GoGo_BuildMountList()
GoGo_CheckFor310()
elseif (event == "COMPANION_LEARNED") then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("EVENT: Companion Learned")
end --if
GoGo_BuildMountSpellList()
GoGo_BuildMountList()
GoGo_CheckFor310()
-- elseif (event == "BAG_UPDATE") then -- currently causing a noticable lag when moving bag items around
-- if GoGo_Variables.Debug then
-- GoGo_DebugAddLine("EVENT: Bag Update")
-- end --if
-- GoGo_BuildMountItemList()
-- GoGo_BuildMountList()
elseif (event == "CHAT_MSG_ADDON") and (arg1 == "GoGoMountVER") and not GoGo_Prefs.DisableUpdateNotice then
if (arg2 > GetAddOnMetadata("GoGoMount", "Version")) and not GoGo_Variables.UpdateShown then
GoGo_Variables.UpdateShown = true
GoGo_Msg(GOGO_STRING_NEWVERSIONFOUND .. arg4)
end --if
end --if
end --function
---------
function GoGo_OnSlash(msg)
---------
if GOGO_COMMANDS[string.lower(msg)] then
GOGO_COMMANDS[string.lower(msg)]()
elseif string.find(msg, "spell:%d+") or string.find(msg, "item:%d+") then
local FItemID = string.gsub(msg,".-\124H([^\124]*)\124h.*", "%1");
local idtype, itemid = strsplit(":",FItemID);
GoGo_AddPrefMount(tonumber(itemid))
GoGo_Msg("pref")
else
GoGo_Msg("optiongui")
GoGo_Msg("auto")
GoGo_Msg("fly")
GoGo_Msg("genericfastflyer")
GoGo_Msg("updatenotice")
GoGo_Msg("mountnotice")
if GoGo_Variables.Player.Class == "DRUID" then GoGo_Msg("druidclickform") end --if
GoGo_Msg("pref")
end --if
end --function
---------
function GoGo_PreClick(button)
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_PreClick: Starts")
GoGo_DebugAddLine("GoGo_PreClick: Location = " .. GetRealZoneText() .. " - " .. GetZoneText() .. " - " ..GetSubZoneText() .. " - " .. GetMinimapZoneText())
GoGo_DebugAddLine("GoGo_PreClick: Current unit speed is " .. GetUnitSpeed("player"))
local level = UnitLevel("player")
GoGo_DebugAddLine("GoGo_PreClick: We are level " .. level)
GoGo_DebugAddLine("GoGo_PreClick: We are a " .. GoGo_Variables.Player.Class)
if GoGo_InCapitalCity() then
GoGo_DebugAddLine("GoGo_PreClick: We are in a capital city as per GoGo_InCapitalCity()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not in a capital city as per GoGo_InCaptialCity()")
end --if
if GoGo_CanFly() then
GoGo_DebugAddLine("GoGo_PreClick: We can fly here as per GoGo_CanFly()")
else
GoGo_DebugAddLine("GoGo_PreClick: We can not fly here as per GoGo_CanFly()")
end --if
if IsOutdoors() then
GoGo_DebugAddLine("GoGo_PreClick: We are outdoors as per IsOutdoors()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not outdoors as per IsOutdoors()")
end --if
if IsIndoors() then
GoGo_DebugAddLine("GoGo_PreClick: We are indoors as per IsIndoors()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not indoors as per IsIndoors()")
end --if
if IsFlyableArea() then
GoGo_DebugAddLine("GoGo_PreClick: We can fly here as per IsFlyableArea()")
else
GoGo_DebugAddLine("GoGo_PreClick: We can not fly here as per IsFlyableArea()")
end --if
if IsFlying() then
GoGo_DebugAddLine("GoGo_PreClick: We are flying as per IsFlying()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not flying as per IsFlying()")
end --if
if IsSwimming() then
GoGo_DebugAddLine("GoGo_PreClick: We are swimming as per IsSwimming()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not swimming as per IsSwimming()")
end --if
if IsFalling() then
GoGo_DebugAddLine("GoGo_PreClick: We are falling as per IsFalling()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not falling as per IsFalling()")
end --if
if GoGo_IsMoving() then
GoGo_DebugAddLine("GoGo_PreClick: We are moving as per GoGo_IsMoving()")
else
GoGo_DebugAddLine("GoGo_PreClick: We are not moving as per GoGo_IsMoving()")
end --if
local posX, posY = GetPlayerMapPosition("Player")
GoGo_DebugAddLine("GoGo_PreClick: Player location: X = ".. posX .. ", Y = " .. posY)
end --if
if not InCombatLockdown() then
GoGo_FillButton(button)
end --if
if IsMounted() or CanExitVehicle() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_PreClick: Player is mounted and is being dismounted.")
end --if
GoGo_Dismount()
elseif GoGo_Variables.Player.Class == "DRUID" and GoGo_IsShifted() and not InCombatLockdown() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_PreClick: Player is a druid, is shifted and not in combat.")
end --if
GoGo_Dismount(button)
elseif GoGo_Variables.Player.Class == "SHAMAN" and UnitBuff("player", GoGo_Variables.Localize.GhostWolf) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_PreClick: Player is a shaman and is in wolf form.")
end --if
GoGo_Dismount()
elseif not InCombatLockdown() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_PreClick: Player not in combat, button pressed, looking for a mount.")
end --if
GoGo_FillButton(button, GoGo_GetMount())
end --if
if not GoGo_Variables.TestVersion then
if ( IsInGuild() ) then
SendAddonMessage("GoGoMountVER", GetAddOnMetadata("GoGoMount", "Version"), "GUILD")
end --if
-- SendAddonMessage("GoGoMountVER", GetAddOnMetadata("GoGoMount", "Version"), "BATTLEGROUND")
-- SendAddonMessage("GoGoMountVER", GetAddOnMetadata("GoGoMount", "Version"), "RAID")
end --if
GoGo_Variables.Debug = false
end --function
---------
function GoGo_GetMount()
---------
local selectedmount = GoGo_ChooseMount()
-- if (GoGo_Variables.Player.Class == "PALADIN") and GoGo_Prefs.PaliUseCrusader and GoGo_InBook(GoGo_Variables.Localize.CrusaderAura) then
-- local modifier = GetSpellInfo(GoGo_Variables.Localize.CrusaderAura)
-- selectedmount = selectedmount .. "\n /stopcasting;\n /cast " .. modifier
-- end --if
return selectedmount
end --function
---------
function GoGo_ChooseMount()
---------
if (GoGo_Variables.Player.Class == "DRUID") then
GoGo_Variables.Druid.FeralSwiftness, _ = GoGo_GetTalentInfo(GOGO_TALENT_FERALSWIFTNESS)
if IsIndoors() then
if IsSwimming() then
return GoGo_InBook(GoGo_Variables.Localize.AquaForm)
elseif GoGo_Variables.Druid.FeralSwiftness > 0 then
return GoGo_InBook(GoGo_Variables.Localize.CatForm)
end --if
return
end --if
if (GoGo_IsMoving() or IsSwimming() or IsFalling()) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: We are a druid and we're moving, falling or swimming. Changing shape form.")
end --if
return GoGo_InBook(GOGO_SPELLS["DRUID"])
end --if
elseif (GoGo_Variables.Player.Class == "SHAMAN") and GoGo_IsMoving() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: We are a shaman and we're moving. Changing shape form.")
end --if
GoGo_Variables.Shaman.ImprovedGhostWolf, _ = GoGo_GetTalentInfo(GOGO_TALENT_IMPROVEDGHOSTWOLF)
if (GoGo_Variables.Shaman.ImprovedGhostWolf == 2) then return GoGo_InBook(GOGO_SPELLS["SHAMAN"]) end --if
elseif (GoGo_Variables.Player.Class == "HUNTER") and GoGo_IsMoving() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: We are a hunter and we're moving. Checking for aspects.")
end --if
if GoGo_InBook(GoGo_Variables.Localize.AspectPack) then
return GoGo_InBook(GoGo_Variables.Localize.AspectPack)
elseif GoGo_InBook(GoGo_Variables.Localize.AspectCheetah) then
return GoGo_InBook(GoGo_Variables.Localize.AspectCheetah)
end --if
end --if
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Passed Druid / Shaman forms - nothing selected.")
end --if
local mounts = {}
local GoGo_FilteredMounts = {}
GoGo_Variables.Player.Zone = GetRealZoneText()
GoGo_Variables.EngineeringLevel = GoGo_GetSkillLevel(GOGO_SKILL_ENGINEERING) or 0
GoGo_Variables.TailoringLevel = GoGo_GetSkillLevel(GOGO_SKILL_TAILORING) or 0
GoGo_Variables.RidingLevel = GoGo_GetSkillLevel(GOGO_SKILL_RIDING) or 0
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: " .. GOGO_SKILL_ENGINEERING .. " = "..GoGo_Variables.EngineeringLevel)
GoGo_DebugAddLine("GoGo_ChooseMount: " .. GOGO_SKILL_TAILORING .. " = "..GoGo_Variables.TailoringLevel)
GoGo_DebugAddLine("GoGo_ChooseMount: " .. GOGO_SKILL_RIDING .. " = "..GoGo_Variables.RidingLevel)
end --if
if (table.getn(mounts) == 0) then
if GoGo_Prefs[GoGo_Variables.Player.Zone] then
GoGo_FilteredMounts = GoGo_Prefs[GoGo_Variables.Player.Zone]
GoGo_DisableUnknownMountNotice = true
end --if
end --if
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Checked for zone favorites.")
end --if
if (table.getn(mounts) == 0) and not GoGo_FilteredMounts or (table.getn(GoGo_FilteredMounts) == 0) then
if GoGo_Prefs.GlobalPrefMounts then
GoGo_FilteredMounts = GoGo_Prefs.GlobalPrefMounts
GoGo_DisableUnknownMountNotice = true
end --if
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Checked for global favorites.")
end --if
end --if
if (table.getn(mounts) == 0) and not GoGo_FilteredMounts or (table.getn(GoGo_FilteredMounts) == 0) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Checking for spell and item mounts.")
end --if
-- Not updating bag items on bag changes right now so scan and update list
GoGo_BuildMountItemList()
GoGo_BuildMountList()
GoGo_FilteredMounts = GoGo_Variables.MountList
if not GoGo_FilteredMounts or (table.getn(GoGo_FilteredMounts) == 0) then
if GoGo_Variables.Player.Class == "SHAMAN" then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: No mounts found. Forcing shaman shape form.")
end --if
return GoGo_InBook(GOGO_SPELLS["SHAMAN"])
elseif GoGo_Variables.Player.Class == "DRUID" then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: No mounts found. Forcing druid shape form.")
end --if
return GoGo_InBook(GOGO_SPELLS["DRUID"])
else
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: No mounts found. Giving up the search.")
end --if
return nil
end --if
end --if
end --if
local GoGo_TempMounts = {}
if GoGo_Variables.EngineeringLevel <= 299 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 45)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 46)
elseif GoGo_Variables.EngineeringLevel >= 300 and GoGo_Variables.EngineeringLevel <= 374 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 46)
elseif GoGo_Variables.EngineeringLevel >= 375 then
-- filter nothing
else
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 45)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 46)
end --if
if GoGo_Variables.TailoringLevel <= 299 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 49)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 48)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 47)
elseif GoGo_Variables.TailoringLevel >= 300 and GoGo_Variables.TailoringLevel <= 424 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 49)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 47)
elseif GoGo_Variables.TailoringLevel >= 425 and GoGo_Variables.TailoringLevel <= 449 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 47)
elseif GoGo_Variables.TailoringLevel >= 450 then
-- filter nothing
else
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 49)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 48)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 47)
end --if
if IsSwimming() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Forcing ground mounts because we're swimming.")
end --if
GoGo_Variables.SkipFlyingMount = true
else
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 53)
end --if
if GoGo_Variables.Player.Zone ~= GOGO_ZONE_AQ40 then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Removing AQ40 mounts since we are not in AQ40.")
end --if
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 50)
end --if
if GoGo_Variables.SelectPassengerMount then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Filtering out all mounts except passenger mounts since passenger mount only was requested.")
end --if
GoGo_FilteredMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 2) or {}
end --if
if (table.getn(mounts) == 0) and IsSwimming() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Looking for water speed increase mounts since we're in water.")
end --if
mounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 5) or {}
end --if
if (table.getn(mounts) == 0) and GoGo_CanFly() and not GoGo_Variables.SkipFlyingMount then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Looking for flying mounts since we past flight checks.")
end --if
if GoGo_Variables.RidingLevel <= 224 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 36)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 35)
elseif GoGo_Variables.RidingLevel >= 225 and GoGo_Variables.RidingLevel <= 299 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 35)
elseif GoGo_Variables.RidingLevel >= 300 then
-- filter nothing
else
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 36)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 35)
end --if
-- if GoGo_Variables.Player.Class == "DRUID" and GoGo_InBook(GoGo_Variables.Localize.FastFlightForm) then
-- table.insert(mounts, GoGo_Variables.Localize.FastFlightForm)
-- end --if
-- not considering flight forms as mounts any more... will be used if player is moving, falling, etc.
-- if (table.getn(mounts) == 0) and (GoGo_Variables.Player.Class == "DRUID") and (GoGo_InBook(GoGo_Variables.Localize.FlightForm)) then
-- table.insert(mounts, GoGo_Variables.Localize.FlightForm)
-- end --if
if (table.getn(mounts) == 0) then
GoGo_TempMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 9)
mounts = GoGo_FilterMountsIn(GoGo_TempMounts, 24)
end --if
if GoGo_Prefs.genericfastflyer then
local GoGo_TempMountsA = GoGo_FilterMountsIn(GoGo_TempMounts, 23)
if GoGo_Variables.RidingLevel <= 299 then
GoGo_TempMountsA = GoGo_FilterMountsOut(GoGo_TempMountsA, 29)
end --if
if GoGo_TempMountsA then
for counter = 1, table.getn(GoGo_TempMountsA) do
table.insert(mounts, GoGo_TempMountsA[counter])
end --for
end --if
local GoGo_TempMountsA = GoGo_FilterMountsIn(GoGo_TempMounts, 26)
if GoGo_TempMountsA then
for counter = 1, table.getn(GoGo_TempMountsA) do
table.insert(mounts, GoGo_TempMountsA[counter])
end --for
end --if
end --if
if (table.getn(mounts) == 0) then
GoGo_TempMountsA = GoGo_FilterMountsIn(GoGo_TempMounts, 23)
if GoGo_Variables.RidingLevel <= 299 then
mounts = GoGo_FilterMountsOut(GoGo_TempMountsA, 29)
else
mounts = GoGo_TempMountsA
end --if
-- if (GoGo_Variables.Player.Class == "DRUID") and (GoGo_InBook(GoGo_Variables.Localize.FastFlightForm)) and (GoGo_Prefs.useshapeform) then
-- table.insert(mounts, GoGo_Variables.Localize.FastFlightForm)
-- end --if
end --if
if (table.getn(mounts) == 0) then
GoGo_TempMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 9)
mounts = GoGo_FilterMountsIn(GoGo_TempMounts, 22)
-- if (GoGo_Variables.Player.Class == "Druid") and (GoGo_InBook(GoGo_Variables.Localize.FlightForm)) and (GoGo_Prefs.useshapeform) then
-- table.insert(GoGo_TempMounts, GoGo_Variables.Localize.FlightForm)
-- end --if
end --if
end --if
if (table.getn(GoGo_FilteredMounts) >= 1) then
--GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 1)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 36)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 35)
end --if
if (table.getn(mounts) == 0) and (table.getn(GoGo_FilteredMounts) >= 1) then -- no flying mounts selected yet - try to use loaned mounts
GoGo_TempMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 52) or {}
if (table.getn(GoGo_TempMounts) >= 1) and (GoGo_Variables.Player.Zone == GOGO_ZONE_SHOLAZARBASIN or GoGo_Variables.Player.Zone == GOGO_ZONE_THESTORMPEAKS or GoGo_Variables.Player.Zone == GOGO_ZONE_ICECROWN) then
mounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 52)
end --if
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 52)
end --if
-- Set the oculus mounts as the only mounts available if we're in the oculus, not skiping flying and have them in inventory
if (table.getn(mounts) == 0) and (table.getn(GoGo_FilteredMounts) >= 1) and (GoGo_Variables.Player.Zone == GOGO_ZONE_THEOCULUS) and not GoGo_Variables.SkipFlyingMount then
GoGo_TempMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 54) or {}
if (table.getn(GoGo_TempMounts) >= 1) then
mounts = GoGo_TempMounts
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: In the Oculus, Oculus only mount found, using.")
end --if
else
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: In the Oculus, no oculus mount found in inventory.")
end --if
end --if
else
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 54)
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Not in Oculus or forced ground mount only.")
end --if
end --if
-- Select ground mounts
if (table.getn(mounts) == 0) and GoGo_CanRide() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Looking for ground mounts since we can't fly.")
end --if
if GoGo_Variables.RidingLevel <= 74 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 37)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 38)
elseif GoGo_Variables.RidingLevel >= 75 and GoGo_Variables.RidingLevel <= 149 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 37)
end --if
GoGo_TempMounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 21)
if GoGo_Variables.RidingLevel <= 149 then
GoGo_TempMounts = GoGo_FilterMountsOut(GoGo_TempMounts, 29)
end --if
if GoGo_Variables.RidingLevel <= 225 and GoGo_CanFly() then
mounts = GoGo_FilterMountsOut(GoGo_TempMounts, 3)
else
mounts = GoGo_TempMounts
end --if
if (table.getn(mounts) == 0) then
mounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 20)
end --if
if (table.getn(mounts) == 0) then
mounts = GoGo_FilterMountsIn(GoGo_FilteredMounts, 25)
end --if
if GoGo_InCapitalCity() then
mounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, "mammoth")
end --if
end --if
if table.getn(GoGo_FilteredMounts) >= 1 then
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 37)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 38)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 21)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 20)
GoGo_FilteredMounts = GoGo_FilterMountsOut(GoGo_FilteredMounts, 25)
end --if
if (table.getn(mounts) == 0) then
if (GoGo_Variables.Player.Class == "SHAMAN") and (GoGo_InBook(GoGo_Variables.Localize.GhostWolf)) then
table.insert(mounts, GoGo_Variables.Localize.GhostWolf)
end --if
end --if
if (table.getn(mounts) >= 1) then
if GoGo_Variables.Debug then
for a = 1, table.getn(mounts) do
GoGo_DebugAddLine("GoGo_ChooseMount: Found mount " .. mounts[a] .. " - included in random pick.")
end --for
end --if
selected = mounts[math.random(table.getn(mounts))]
if type(selected) == "string" then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_ChooseMount: Selected string " .. selected)
end --if
return selected
else
selected = GoGo_GetIDName(selected)
return selected
end --if
end --if
end --function
---------
function GoGo_FilterMountsOut(PlayerMounts, FilterID)
---------
local GoGo_FilteringMounts = {}
if table.getn(PlayerMounts) == 0 then
return GoGo_FilteringMounts
end --if
for a = 1, table.getn(PlayerMounts) do
local MountID = PlayerMounts[a]
for DBMountID, DBMountData in pairs(GoGo_Variables.MountDB) do
if (DBMountID == MountID) and not DBMountData[FilterID] then
table.insert(GoGo_FilteringMounts, MountID)
elseif not GoGo_Variables.MountDB[MountID] then
GoGo_Prefs.UnknownMounts[MountID] = true
if not GoGo_Prefs.DisableMountNotice and not GoGo_DisableUnknownMountNotice then
GoGo_DisableUnknownMountNotice = true
GoGo_Msg("UnknownMount")
end --if
end --if
end --for
end --for
return GoGo_FilteringMounts
end --function
---------
function GoGo_FilterMountsIn(PlayerMounts, FilterID)
---------
local GoGo_FilteringMounts = {}
if table.getn(PlayerMounts) == 0 then
return GoGo_FilteringMounts
end --if
for a = 1, table.getn(PlayerMounts) do
local MountID = PlayerMounts[a]
for DBMountID, DBMountData in pairs(GoGo_Variables.MountDB) do
if (DBMountID == MountID) and DBMountData[FilterID] then
table.insert(GoGo_FilteringMounts, MountID)
elseif not GoGo_Variables.MountDB[MountID] then
GoGo_Prefs.UnknownMounts[MountID] = true
if not GoGo_Prefs.DisableMountNotice and not GoGo_DisableUnknownMountNotice then
GoGo_DisableUnknownMountNotice = true
GoGo_Msg("UnknownMount")
end --if
end --if
end --for
end --for
return GoGo_FilteringMounts
end --function
---------
function GoGo_Dismount(button)
---------
if IsMounted() then
Dismount()
elseif CanExitVehicle() then
VehicleExit()
elseif GoGo_Variables.Player.Class == "DRUID" then
if GoGo_IsShifted() and button then
if GoGo_Prefs.DruidClickForm and not IsFlying() then
GoGo_FillButton(button, GoGo_GetMount())
else
-- CancelUnitBuff("player", GoGo_IsShifted()) -- protected by blizzard now
GoGo_FillButton(button, GoGo_IsShifted())
end --if
end --if
elseif GoGo_Variables.Player.Class == "SHAMAN" and UnitBuff("player", GoGo_InBook(GoGo_Variables.Localize.GhostWolf)) then
CancelUnitBuff("player", GoGo_InBook(GoGo_Variables.Localize.GhostWolf))
else
return nil
end --if
return true
end --function
---------
function GoGo_InCompanions(item)
---------
for slot = 1, GetNumCompanions("MOUNT") do
local _, _, spellID = GetCompanionInfo("MOUNT", slot)
if spellID and string.find(item, spellID) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InCompanions: Found mount name " .. GetSpellInfo(spellID) .. " in mount list.")
end --if
return GetSpellInfo(spellID)
end --if
end --for
end --function
---------
function GoGo_BuildMountList()
---------
GoGo_Variables.MountList = {}
if (table.getn(GoGo_Variables.MountSpellList) > 0) then
for a=1, table.getn(GoGo_Variables.MountSpellList) do
table.insert(GoGo_Variables.MountList, GoGo_Variables.MountSpellList[a])
end --for
end --if
if (table.getn(GoGo_Variables.MountItemList) > 0) then
for a=1, table.getn(GoGo_Variables.MountItemList) do
table.insert(GoGo_Variables.MountList, GoGo_Variables.MountItemList[a])
end --for
end --if
return GoGo_Variables.MountList
end --function
---------
function GoGo_BuildMountSpellList()
---------
GoGo_Variables.MountSpellList = {}
if (GetNumCompanions("MOUNT") >= 1) then
for slot = 1, GetNumCompanions("MOUNT"),1 do
local _, _, SpellID = GetCompanionInfo("MOUNT", slot)
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_BuildMountSpellList: Found mount spell ID " .. SpellID .. " at slot " .. slot .. " and added to known mount list.")
end --if
table.insert(GoGo_Variables.MountSpellList, SpellID)
end --for
end --if
return GoGo_Variables.MountSpellList
end -- function
---------
function GoGo_BuildMountItemList()
---------
GoGo_Variables.MountItemList = {}
for a = 1, table.getn(GoGo_MountsItems) do
local MountID = GoGo_MountsItems[a]
if GoGo_InBags(MountID) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_BuildMountItemList: Found mount item ID " .. MountID .. " in a bag and added to known mount list.")
end --if
table.insert(GoGo_Variables.MountItemList, MountID)
end --if
end --for
return GoGo_Variables.MountItemList
end --function
---------
function GoGo_InBags(item)
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InBags: Searching for " .. item)
end --if
for bag = 0, NUM_BAG_FRAMES do
for slot = 1, GetContainerNumSlots(bag) do
local link = GetContainerItemLink(bag, slot)
if link then
local _, itemid, _ = strsplit(":",link,3)
if tonumber(itemid) == item then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InBags: Found item ID " .. item .. " in bag " .. (bag+1) .. ", at slot " .. slot .. " and added to known mount list.")
end --if
return GetItemInfo(link)
end --if
end --if
end --for
end --for
end --function
---------
function GoGo_InBook(spell)
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InBook: Searching for type " .. type(spell))
end --if
if type(spell) == "function" then
return spell()
else
if type(spell) == "string" then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InBook: Searching for " .. spell)
end --if
local slot = 1
while GetSpellName(slot, "spell") do
local name = GetSpellName(slot, "spell")
if name == spell then
return spell
end --if
slot = slot + 1
end --while
elseif type(spell) == "number" then
local spellname = GetSpellInfo(spell)
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_InBook: Searching for spell ID " .. spell)
end --if
local slot = 1
while GetSpellName(slot, "spell") do
local name = GetSpellName(slot, "spell")
if name == spellname then
return name
end --if
slot = slot + 1
end --while
-- blah
end --if
end --if
end --function
---------
function GoGo_IsShifted()
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_IsShifted: GoGo_IsShifted starting")
end --if
for i = 1, GetNumShapeshiftForms() do
local _, name, active = GetShapeshiftFormInfo(i)
if active then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_IsShifted: Found " .. name)
end --if
return name
end
end --for
end --function
---------
function GoGo_InOutlands()
---------
if string.find(GOGO_OUTLANDS, GoGo_Variables.Player.Zone, 1, true) then
return true
end --if
end --function
function GoGo_InNorthrend()
---------
if string.find(GOGO_NORTHREND, GoGo_Variables.Player.Zone, 1, true) then
return true
end --if
end --function
---------
function GoGo_AddPrefMount(spell)
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_AddPrefMount: Preference " .. spell)
end --if
if not GoGo_Prefs.GlobalPrefMount then
GoGo_Variables.Player.Zone = GetRealZoneText()
if not GoGo_Prefs[GoGo_Variables.Player.Zone] then GoGo_Prefs[GoGo_Variables.Player.Zone] = {} end
table.insert(GoGo_Prefs[GoGo_Variables.Player.Zone], spell)
if table.getn(GoGo_Prefs[GoGo_Variables.Player.Zone]) > 1 then
local i = 2
repeat
if GoGo_Prefs[GoGo_Variables.Player.Zone][i] == GoGo_Prefs[GoGo_Variables.Player.Zone][i - 1] then
table.remove(GoGo_Prefs[GoGo_Variables.Player.Zone], i)
else
i = i + 1
end --if
until i > table.getn(GoGo_Prefs[GoGo_Variables.Player.Zone])
end --if
else
if not GoGo_Prefs.GlobalPrefMounts then GoGo_Prefs.GlobalPrefMounts = {} end
table.insert(GoGo_Prefs.GlobalPrefMounts, spell)
if table.getn(GoGo_Prefs.GlobalPrefMounts) > 1 then
local i = 2
repeat
if GoGo_Prefs.GlobalPrefMounts[i] == GoGo_Prefs.GlobalPrefMounts[i - 1] then
table.remove(GoGo_Prefs.GlobalPrefMounts, i)
else
i = i + 1
end --if
until i > table.getn(GoGo_Prefs.GlobalPrefMounts)
end --if
end --if
end --function
---------
function GoGo_GetIDName(itemid)
---------
local tempname = ""
local ItemName = ""
if type(itemid) == "number" then
local GoGo_TempMount = {}
table.insert(GoGo_TempMount, itemid)
if (table.getn(GoGo_FilterMountsIn(GoGo_TempMount, 4)) == 1) then
return GetItemInfo(itemid) or "Unknown Mount"
else
return GetSpellInfo(itemid) or "Unknown Mount"
end --if
elseif type(itemid) == "table" then
for a=1, table.getn(itemid) do
tempname = itemid[a]
local GoGo_TempTable = {}
table.insert(GoGo_TempTable, tempname)
if (table.getn(GoGo_FilterMountsIn(GoGo_TempTable, 4)) == 1) then
-- tempname = GetItemInfo(tempname)
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_GetIDName: GetItemID for " .. tempname .. GetItemInfo(tempname))
end --if
ItemName = ItemName .. (GetItemInfo(tempname) or "Unknown Mount") .. ", "
else
-- tempname = GetSpellInfo(tempname)
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_GetIDName: GetSpellID for " .. tempname .. GetSpellInfo(tempname))
end --if
ItemName = ItemName .. (GetSpellInfo(tempname) or "Unknown Mount") .. ", "
end --if
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_GetIDName: Itemname string is " .. ItemName)
end --if
end --for
return ItemName
end --if
end --function
---------
function GoGo_GetTalentInfo(talentname)
---------
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_GetTalentInfo: Searching talent tree for " .. talentname)
end --if
local numTabs = GetNumTalentTabs()
for tab=1, numTabs do
local numTalents = GetNumTalents(tab)
for talent=1, numTalents do
local name, _, _, _, rank, maxrank = GetTalentInfo(tab,talent)
if (talentname == name) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_GetTalentInfo: Found " .. talentname .. " with rank " .. rank)
end --if
return rank, maxrank
end --if
end --for
end --for
return 0,0
end --function
---------
function GoGo_FillButton(button, mount)
---------
if mount then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_FillButton: Casting " .. mount)
end --if
button:SetAttribute("macrotext", "/use "..mount)
else
button:SetAttribute("macrotext", nil)
end --if
end --function
---------
function GoGo_CheckBindings()
---------
for binding, button in pairs({GOGOBINDING = GoGoButton, GOGOBINDING2 = GoGoButton2, GOGOBINDING3 = GoGoButton3}) do
ClearOverrideBindings(button)
local key1, key2 = GetBindingKey(binding)
if key1 then
SetOverrideBindingClick(button, true, key1, button:GetName())
end --if
if key2 then
SetOverrideBindingClick(button, true, key2, button:GetName())
end --if
end --if
end --function
---------
function GoGo_InCapitalCity()
---------
local cities = { "Orgrimmar", "Undercity", "Shattrath", "Stormwind City", "Ironforge", "Dalaran", "Thunder Bluff", "Silvermoon City", "Darnassus", "The Exodar" }
for city in ipairs(cities) do
if string.find(GetRealZoneText(), cities[city]) then
return true
end --if
end --for
return false
end --function
---------
function GoGo_CanFly()
---------
GoGo_Variables.Player.Zone = GetRealZoneText()
GoGo_Variables.Player.SubZone = GetSubZoneText()
local level = UnitLevel("player")
-- if (level <= 69) and not (GoGo_Variables.Player.Class == "DRUID") then
-- return false
-- elseif (GoGo_Variables.Player.Class == "DRUID" and level <= 67) then
-- return false
-- end --if
if (level < 60) then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player under level 60")
end --if
return false
end --if
if GoGo_InOutlands() then
-- we can fly here
elseif (GoGo_InNorthrend() and (GoGo_InBook(GoGo_Variables.Localize.ColdWeatherFlying))) then
if GoGo_Variables.Player.Zone == GOGO_ZONE_DALARAN then
if (GoGo_Variables.Player.SubZone == GOGO_SZONE_KRASUSLANDING) then
if not IsFlyableArea() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_SZONE_KRASUSLANDING .. " and not in flyable area.")
end --if
return false
end --if
elseif (GoGo_Variables.Player.SubZone == GOGO_SZONE_THEVIOLETCITADEL) then
if not IsOutdoors() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_SZONE_THEVIOLETCITADEL .. " and not outdoors area.")
end --if
return false
end --if
-- if not GoGo_CheckCoOrds("Dalaran", "VioletCitadel") then
-- return false
-- end --if
if not IsFlyableArea() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_SZONE_THEVIOLETCITADEL .. " and not in flyable area.")
end --if
return false
end --if
elseif (GoGo_Variables.Player.SubZone == GOGO_SZONE_THEUNDERBELLY) then
-- if not GoGo_CheckCoOrds("Dalaran", "Underbelly") then
-- return false
-- end --if
if not IsFlyableArea() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_SZONE_THEUNDERBELLY .. " and not in flyable area.")
end --if
return false
end --if
elseif (GoGo_Variables.Player.SubZone == GOGO_ZONE_DALARAN) then
-- if not GoGo_CheckCoOrds("Dalaran", "Dalaran") then
-- return false
-- end --if
if not IsFlyableArea() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_ZONE_DALARAN .. " and not outdoors area.")
end --if
return false
end --if
else
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in " .. GOGO_ZONE_DALARAN .. " and not in known flyable subzone.")
end --if
return false
end --if
end --if
if GoGo_Variables.Player.Zone == GOGO_ZONE_WINTERGRASP then
if GetWintergraspWaitTime() then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Player in Wintergrasp and battle ground is not active.")
end --if
-- timer ticking to start wg.. we can mount
else
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player in Wintergrasp and battle ground is active.")
end --if
-- we should be in battle.. can't mount
return false
end --if
end --if
else
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanFly: Failed - Player does not meet any flyable conditions.")
end --if
return false -- we can't fly anywhere else
end --if
return true
end --function
---------
function GoGo_CanRide()
---------
local level = UnitLevel("player")
if level >= 20 then
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CanRide: Passed - Player is over level 20.")
end --if
return true
end --if
end --function
---------
function GoGo_CheckFor310() -- checks to see if any existing 310% mounts exist to increase the speed of [6] mounts
---------
local loop
local MountID
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CheckFor310: Function executed.")
end --if
local Find310Mounts = GoGo_FilterMountsIn(GoGo_Variables.MountList,24)
for loop=1, table.getn(Find310Mounts) do
MountID = Find310Mounts[loop]
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CheckFor310: Mount ID " .. MountID .. " found as 310% flying.")
end --if
end --for
if (table.getn(Find310Mounts) > 0) then
Find310Mounts = GoGo_FilterMountsIn(GoGo_Variables.MountList,6)
if table.getn(Find310Mounts) then
for loop=1, table.getn(Find310Mounts) do
MountID = Find310Mounts[loop]
GoGo_Variables.MountDB[MountID][24] = true
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CheckFor310: Mount ID " .. MountID .. " added as 310% flying.")
end --if
end --for
end --if
end --if
end --function
---------
function GoGo_IsMoving()
---------
if GetUnitSpeed("player") ~= 0 then
return true
else
return false
end --if
end --function
---------
function GoGo_GetSkillLevel(searchname)
---------
for skillIndex = 1, GetNumSkillLines() do
skillName, isHeader, isExpanded, skillRank = GetSkillLineInfo(skillIndex)
if isHeader == nil then
if skillName == searchname then
return skillRank
end --if
end --if
end --for
end --function
---------
function GoGo_CheckCoOrds(ZoneName, SubZoneName)
---------
local posX, posY = GetPlayerMapPosition("Player")
local CanFlyHere = false
local ZoneName = GoGo_FlyCoOrds[ZoneName]
local SubZoneName = ZoneName[SubZoneName]
for a = 1, table.getn(SubZoneName) or 0 do
if GoGo_Variables.Debug then
GoGo_DebugAddLine("GoGo_CheckCoOrds: Checking CoOrds " .. a)
end --if
local PointAX, PointAY, PointBX, PointBY = SubZoneName[a][1], SubZoneName[a][2], SubZoneName[a][3], SubZoneName[a][4]
if posX >= PointAX and posX <= PointBX and posY >= PointAY and posY <= PointBY then
-- we are in the rectangle a
return true
end --if
end --for
return false
end --function
---------
function GoGo_Msg(msg)
---------
if msg then
if GOGO_MESSAGES[msg] then
GoGo_Msg(GOGO_MESSAGES[msg]())
else
msg = string.gsub(msg, "<", LIGHTYELLOW_FONT_COLOR_CODE)
msg = string.gsub(msg, ">", "|r")
DEFAULT_CHAT_FRAME:AddMessage(GREEN_FONT_COLOR_CODE.."GoGo: |r"..msg)
end --if
end --if
end --function
---------
function GoGo_Id(itemstring)
---------
local _, _, itemid = string.find(itemstring,"(item:%d+)")
if itemid then
return itemid.." - "..itemstring
end --if
local _, _, spellid = string.find(itemstring,"(spell:%d+)")
if spellid then
return spellid.." - "..itemstring
end --if
end --function
GOGO_ERRORS = {
[SPELL_FAILED_NOT_MOUNTED] = true,
[SPELL_FAILED_NOT_SHAPESHIFT] = true,
[ERR_ATTACK_MOUNTED] = true,
}
GOGO_SPELLS = {
["DRUID"] = function()
if GoGo_InBook(GoGo_Variables.Localize.AquaForm) then
if not GoGo_Variables.SkipFlyingMount and GoGo_CanFly() and GoGo_InBook(GoGo_Variables.Localize.FastFlightForm) then
return "[swimming] "..GoGo_InBook(GoGo_Variables.Localize.AquaForm).."; [combat]"..GoGo_InBook(GoGo_Variables.Localize.TravelForm).."; "..GoGo_InBook(GoGo_Variables.Localize.FastFlightForm)
elseif not GoGo_Variables.SkipFlyingMount and GoGo_CanFly() and GoGo_InBook(GoGo_Variables.Localize.FlightForm) then
return "[swimming] "..GoGo_InBook(GoGo_Variables.Localize.AquaForm).."; [combat]"..GoGo_InBook(GoGo_Variables.Localize.TravelForm).."; "..GoGo_InBook(GoGo_Variables.Localize.FlightForm)
else
return "[swimming] "..GoGo_InBook(GoGo_Variables.Localize.AquaForm).."; "..GoGo_InBook(GoGo_Variables.Localize.TravelForm)
end --if
end --if
end, --function
["SHAMAN"] = function()
return GoGo_InBook(GoGo_Variables.Localize.GhostWolf)
end, --function
}
GOGO_COMMANDS = {
["auto"] = function()
GoGo_Prefs.autodismount = not GoGo_Prefs.autodismount
GoGo_Msg("auto")
GoGo_Panel_UpdateViews()
end, --function
["genericfastflyer"] = function()
if not GoGo_CanFly() then
return
else
GoGo_Prefs.genericfastflyer = not GoGo_Prefs.genericfastflyer
GoGo_Msg("genericfastflyer")
GoGo_Panel_UpdateViews()
end --if
end, --function
["clear"] = function()
if GoGo_Prefs.GlobalPrefMount then
GoGo_Prefs.GlobalPrefMounts = nil
if not InCombatLockdown() then
for i, button in ipairs({GoGoButton, GoGoButton2}) do
GoGo_FillButton(button)
end --for
end --if
else
GoGo_Prefs[GoGo_Variables.Player.Zone] = nil
if not InCombatLockdown() then
for i, button in ipairs({GoGoButton, GoGoButton2}) do
GoGo_FillButton(button)
end --for
end --if
end --if
GoGo_Msg("pref")
end, --function
["updatenotice"] = function()
GoGo_Prefs.DisableUpdateNotice = not GoGo_Prefs.DisableUpdateNotice
GoGo_Msg("updatenotice")
GoGo_Panel_UpdateViews()
end, --function
["mountnotice"] = function()
GoGo_Prefs.DisableMountNotice = not GoGo_Prefs.DisableMountNotice
GoGo_Msg("mountnotice")
GoGo_Panel_UpdateViews()
end, --function
["druidclickform"] = function()
GoGo_Prefs.DruidClickForm = not GoGo_Prefs.DruidClickForm
GoGo_Msg("druidclickform")
GoGo_Panel_UpdateViews()
end, --function
["options"] = function()
InterfaceOptionsFrame_OpenToCategory(GoGo_Panel)
end, --function
}
GOGO_MESSAGES = {
["auto"] = function()
if GoGo_Prefs.autodismount then
return "Autodismount active - </gogo auto> to toggle"
else
return "Autodismount inactive - </gogo auto> to toggle"
end --if
end, --function
["genericfastflyer"] = function()
if not GoGo_CanFly() then
return
elseif GoGo_Prefs.genericfastflyer then
return "Considering epic flying mounts 310% - 280% speeds the same for random selection - </gogo genericfastflyer> to toggle"
else
return "Considering epic flying mounts 310% - 280% speeds different for random selection - </gogo genericfastflyer> to toggle"
end --if
end, --function
["pref"] = function()
local msg = ""
if not GoGo_Prefs.GlobalPrefMount then
local list = ""
if GoGo_Prefs[GoGo_Variables.Player.Zone] then
list = list .. GoGo_GetIDName(GoGo_Prefs[GoGo_Variables.Player.Zone])
msg = GoGo_Variables.Player.Zone..": "..list.." - </gogo clear> to clear"
else
msg = GoGo_Variables.Player.Zone..": ?".." - </gogo ItemLink> or </gogo SpellName> to add"
end --if
if GoGo_Prefs.GlobalPrefMounts then
list = list .. GoGo_GetIDName(GoGo_Prefs.GlobalPrefMounts)
msg = msg .. "\nGlobal Preferred Mounts: "..list.." - Enable global mount preferences to change."
end --if
return msg
else
local list = ""
if GoGo_Prefs.GlobalPrefMounts then
list = list .. GoGo_GetIDName(GoGo_Prefs.GlobalPrefMounts)
msg = "Global Preferred Mounts: "..list.." - </gogo clear> to clear"
else
msg = "Global Preferred Mounts: ?".." - </gogo ItemLink> or </gogo SpellName> to add"
end --if
if GoGo_Prefs[GoGo_Variables.Player.Zone] then
list = list .. GoGo_GetIDName(GoGo_Prefs[GoGo_Variables.Player.Zone])
msg = msg .. "\n" .. GoGo_Variables.Player.Zone ..": "..list.." - Disable global mount preferences to change."
end --if
return msg
end --if
end, --function
["updatenotice"] = function()
if GoGo_Prefs.DisableUpdateNotice then
return "Update notices from other players disabled - </gogo updatenotice> to toggle"
else
return "Update notices from other players enabled - </gogo updatenotice> to toggle"
end --if
end, --function
["mountnotice"] = function()
if GoGo_Prefs.DisableMountNotice then
return "Update notices about unknown mounts are disabled - </gogo mountnotice> to toggle"
else
return "Update notices about unknown mounts are enabled - </gogo mountnotice> to toggle"
end --if
end, --function
["druidclickform"] = function()
if GoGo_Prefs.DruidClickForm then
return "Single click form changes enabled - </gogo druidclickform> to toggle"
else
return "Single click form changes disabled - </gogo druidclickform> to toggle"
end --if
end, --function
["UnknownMount"] = function() return GOGO_STRING_UNKNOWNMOUNTFOUND end, --function
["optiongui"] = function() return "To open the GUI options window - </gogo options>" end, --function
}
---------
function GoGo_DebugAddLine(LogLine)
---------
if not GoGo_DebugLog_Line then GoGo_DebugLog_Line = 1 end --if
GoGo_DebugLog[GoGo_DebugLog_Line] = LogLine
--DEFAULT_CHAT_FRAME:AddMessage(GoGo_Msg(LogLine))
GoGo_DebugLog_Line = GoGo_DebugLog_Line + 1
end --function
---------
function GoGo_Panel_OnLoad(GoGo_Panel)
---------
-- local GoGo_Panel = CreateFrame("FRAME", nil);
-- GoGo_Panel:SetScript("OnShow",function() GoGo_Panel_UpdateViews(); end);
GoGo_Panel.name = "GoGoMount"
GoGo_Panel.okay = function (self) GoGo_Panel_Okay(); end;
GoGo_Panel.default = function (self) GoGo_Settings_Default(); GoGo_Panel_UpdateViews(); end;
InterfaceOptions_AddCategory(GoGo_Panel)
end --function
---------
function GoGo_Panel_CurrentZoneFavorites_OnLoad(GoGo_Panel_CurrentZoneFavorites)
---------
GoGo_Panel_CurrentZoneFavorites.name = GOGO_STRING_CURRENTZONEFAVORITES
GoGo_Panel_CurrentZoneFavorites.parent = "GoGoMount"
GoGo_Panel_CurrentZoneFavorites.okay = function (self) GoGo_Panel_Okay(); end;
GoGo_Panel_CurrentZoneFavorites.default = function (self) GOGO_COMMANDS["clear"](); GoGo_UpdateFavoritesTabs(); end; -- use clear command with default button
InterfaceOptions_AddCategory(GoGo_Panel_CurrentZoneFavorites)
end --function
---------
function GoGo_Panel_GlobalFavorites_OnLoad(GoGo_Panel_GlobalFavorites)
---------
GoGo_Panel_GlobalFavorites.name = GOGO_STRING_GLOBALFAVORITES
GoGo_Panel_GlobalFavorites.parent = "GoGoMount"
GoGo_Panel_GlobalFavorites.okay = function (self) GoGo_Panel_Okay(); end;
GoGo_Panel_GlobalFavorites.default = function (self) GOGO_COMMANDS["clear"](); GoGo_UpdateFavoritesTabs(); end; -- use clear command with default button
InterfaceOptions_AddCategory(GoGo_Panel_GlobalFavorites)
end --function
--[[
---------
function GoGo_Panel_GlobalFavorites_Populate()
---------
if getn(GoGo_Variables.MountList) > 0 then
for numMounts = 1, getn(GoGo_Variables.MountList) do
GoGo_CurrentMountID = CreateFrame("CheckButton", GoGo_Variables.MountList[numMounts], GoGo_Panel_GlobalFavorites, "OptionsCheckButtonTemplate")
GoGo_CurrentMountID:SetPoint("TOPLEFT", numMounts * 16, -16)
--GoGo_Panel_MountItem = getglobal(GoGo_Panel_MountItem[GoGo_CurrentMountID])
GoGo_CurrentMountIDText:SetText(GoGo_Variables.MountList[numMounts])
end --for
end --if
end --function
]]
---------
function GoGo_Panel_Options()
---------
GoGo_Panel_DruidClickForm = CreateFrame("CheckButton", "GoGo_Panel_DruidClickForm", GoGo_Panel, "OptionsCheckButtonTemplate")
GoGo_Panel_DruidClickForm:SetPoint("TOPLEFT", 16, -16)
GoGo_Panel_DruidClickFormText:SetText(GOGO_STRING_DRUIDSINGLECLICK)
GoGo_Panel_AutoDismount = CreateFrame("CheckButton", "GoGo_Panel_AutoDismount", GoGo_Panel, "OptionsCheckButtonTemplate")
GoGo_Panel_AutoDismount:SetPoint("TOPLEFT", "GoGo_Panel_DruidClickForm", "BOTTOMLEFT", 0, -4)
GoGo_Panel_AutoDismountText:SetText(GOGO_STRING_ENABLEAUTODISMOUNT)
GoGo_Panel_GenericFastFlyer = CreateFrame("CheckButton", "GoGo_Panel_GenericFastFlyer", GoGo_Panel, "OptionsCheckButtonTemplate")
GoGo_Panel_GenericFastFlyer:SetPoint("TOPLEFT", "GoGo_Panel_AutoDismount", "BOTTOMLEFT", 0, -4)
GoGo_Panel_GenericFastFlyerText:SetText(GOGO_STRING_SAMEEPICFLYSPEED)
GoGo_Panel_GlobalPrefMount = CreateFrame("CheckButton", "GoGo_Panel_GlobalPrefMount", GoGo_Panel, "OptionsCheckButtonTemplate")
GoGo_Panel_GlobalPrefMount:SetPoint("TOPLEFT", "GoGo_Panel_GenericFastFlyer", "BOTTOMLEFT", 0, -4)
GoGo_Panel_GlobalPrefMountText:SetText("Preferred mount changes apply to global setting")
-- GoGo_Panel_PaliUseCrusader = CreateFrame("CheckButton", "GoGo_Panel_PaliUseCrusader", GoGo_Panel, "OptionsCheckButtonTemplate")
-- GoGo_Panel_PaliUseCrusader:SetPoint("TOPLEFT", "GoGo_Panel_GlobalPrefMount", "BOTTOMLEFT", 0, -4)
-- GoGo_Panel_PaliUseCrusaderText:SetText("Paladins: Auto start Crusader Aura when mounting")
GoGo_Panel_DisableUpdateNotice = CreateFrame("CheckButton", "GoGo_Panel_DisableUpdateNotice", GoGo_Panel, "OptionsCheckButtonTemplate")
-- GoGo_Panel_DisableUpdateNotice:SetPoint("TOPLEFT", "GoGo_Panel_PaliUseCrusader", "BOTTOMLEFT", 0, -12)
GoGo_Panel_DisableUpdateNotice:SetPoint("TOPLEFT", "GoGo_Panel_GlobalPrefMount", "BOTTOMLEFT", 0, -12)
GoGo_Panel_DisableUpdateNoticeText:SetText(GOGO_STRING_DISABLEUPDATENOTICES)
GoGo_Panel_DisableMountNotice = CreateFrame("CheckButton", "GoGo_Panel_DisableMountNotice", GoGo_Panel, "OptionsCheckButtonTemplate")
GoGo_Panel_DisableMountNotice:SetPoint("TOPLEFT", "GoGo_Panel_DisableUpdateNotice", "BOTTOMLEFT", 0, -4)
GoGo_Panel_DisableMountNoticeText:SetText(GOGO_STRING_DISABLEUNKNOWNMOUNTNOTICES)
-- Global favorite scroll frame and buttons
--[[
GoGo_Panel_GlobalFavorites_Scroll = CreateFrame("ScrollFrame", "GoGo_Panel_GlobalFavorites_Scroll", GoGo_Panel_GlobalFavorites, "FauxScrollFrameTemplate")
GoGo_Panel_GlobalFavorites_Scroll:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites", "TOPLEFT")
GoGo_Panel_GlobalFavorites_Scroll:SetScript("OnVerticalScroll",function() FauxScrollFrame_OnVerticalScroll(this, offset, 16, GoGo_Panel_GlobalFavorites_Scroll_Update); end);
GoGo_Panel_GlobalFavorites_Scroll:SetScript("OnShow",function() GoGo_Panel_GlobalFavorites_Scroll_Update(); end);
GoGo_Panel_GlobalFavorites_Line1 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line1", GoGo_Panel_GlobalFavorites_Scroll, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line1:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Scroll", "TOPLEFT", 8, 0)
GoGo_Panel_GlobalFavorites_Line2 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line2",GoGo_Panel_GlobalFavorites_Scroll, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line2:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line1", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line3 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line3", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line3:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line2", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line4 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line4", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line4:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line3", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line5 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line5", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line5:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line4", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line6 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line6", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line6:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line5", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line7 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line7", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line7:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line6", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line8 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line8", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line8:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line7", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line9 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line9", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line9:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line8", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line10 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line10", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line10:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line9", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line11 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line11", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line11:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line10", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line12 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line12", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line12:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line11", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line13 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line13", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line13:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line12", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line14 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line14", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line14:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line13", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line15 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line15", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line15:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line14", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line16 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line16", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line16:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line15", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line17 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line17", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line17:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line16", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line18 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line18", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line18:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line17", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line19 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line19", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line19:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line18", "BOTTOMLEFT")
GoGo_Panel_GlobalFavorites_Line20 = CreateFrame("Button", "GoGo_Panel_GlobalFavorites_Line20", GoGo_Panel_GlobalFavorites, "GoGo_Favorite_Button")
GoGo_Panel_GlobalFavorites_Line20:SetPoint("TOPLEFT", "GoGo_Panel_GlobalFavorites_Line19", "BOTTOMLEFT")
]]
end --function
---------
function GoGo_Panel_GlobalFavorites_Scroll_Update()
---------
local line; -- 1 through 5 of our window to scroll
local lineplusoffset; -- an index into our data calculated from the scroll offset
FauxScrollFrame_Update(GoGo_Panel_GlobalFavorites_Scroll,50,20,16);
for line=1,20 do
lineplusoffset = line + FauxScrollFrame_GetOffset(GoGo_Panel_GlobalFavorites_Scroll);
if lineplusoffset <= 50 then
getglobal("GoGo_Panel_GlobalFavorites_Line"..line):SetText(GoGo_GetIDName(GoGo_Variables.MountSpellList[lineplusoffset]));
--GoGo_DebugAddLine(GoGo_GetIDName(GoGo_Variables.MountSpellList[lineplusoffset]))
getglobal("GoGo_Panel_GlobalFavorites_Line"..line):Show();
else
getglobal("GoGo_Panel_GlobalFavorites_Line"..line):Hide();
end --if
end --for
end --function
---------
function GoGo_Panel_UpdateViews()
---------
GoGo_Panel_AutoDismount:SetChecked(GoGo_Prefs.autodismount)
GoGo_Panel_GenericFastFlyer:SetChecked(GoGo_Prefs.genericfastflyer)
GoGo_Panel_DisableUpdateNotice:SetChecked(GoGo_Prefs.DisableUpdateNotice)
GoGo_Panel_DisableMountNotice:SetChecked(GoGo_Prefs.DisableMountNotice)
GoGo_Panel_DruidClickForm:SetChecked(GoGo_Prefs.DruidClickForm)
GoGo_Panel_GlobalPrefMount:SetChecked(GoGo_Prefs.GlobalPrefMount)
-- GoGo_Panel_PaliUseCrusader:SetChecked(GoGo_Prefs.PaliUseCrusader)
if GoGo_Prefs.autodismount then
GoGoFrame:RegisterEvent("UI_ERROR_MESSAGE")
else
GoGoFrame:UnregisterEvent("UI_ERROR_MESSAGE")
end --if
end -- function
---------
function GoGo_Panel_Okay()
---------
GoGo_Prefs.autodismount = GoGo_Panel_AutoDismount:GetChecked()
GoGo_Prefs.genericfastflyer = GoGo_Panel_GenericFastFlyer:GetChecked()
GoGo_Prefs.DisableUpdateNotice = GoGo_Panel_DisableUpdateNotice:GetChecked()
GoGo_Prefs.DisableMountNotice = GoGo_Panel_DisableMountNotice:GetChecked()
GoGo_Prefs.DruidClickForm = GoGo_Panel_DruidClickForm:GetChecked()
GoGo_Prefs.GlobalPrefMount = GoGo_Panel_GlobalPrefMount:GetChecked()
-- GoGo_Prefs.PaliUseCrusader = GoGo_Panel_PaliUseCrusader:GetChecked()
end --function
---------
function GoGo_Settings_Default()
---------
GoGo_Prefs.version = GetAddOnMetadata("GoGoMount", "Version")
GoGo_Prefs.autodismount = true
GoGo_Prefs.DisableUpdateNotice = false
GoGo_Prefs.DisableMountNotice = false
GoGo_Prefs.genericfastflyer = false
GoGo_Prefs.DruidClickForm = true
GoGo_Prefs.UnknownMounts = {}
GoGo_Prefs.GlobalPrefMounts = {}
GoGo_Prefs.GlobalPrefMount = false
-- GoGo_Prefs.PaliUseCrusader = false
end --function
---------
function GoGo_Settings_SetUpdates()
---------
GoGo_Prefs.version = GetAddOnMetadata("GoGoMount", "Version")
if not GoGo_Prefs.autodismount then GoGo_Prefs.autodismount = false end
if not GoGo_Prefs.DisableUpdateNotice then GoGo_Prefs.DisableUpdateNotice = false end
if not GoGo_Prefs.DisableMountNotice then GoGo_Prefs.DisableMountNotice = false end
if not GoGo_Prefs.genericfastflyer then GoGo_Prefs.genericfastflyer = false end
if not GoGo_Prefs.DruidClickForm then GoGo_Prefs.DruidClickForm = false end
if not GoGo_Prefs.GlobalPrefMount then GoGo_Prefs.GlobalPrefMount = false end
-- if not GoGo_Prefs.PaliUseCrusader then GoGo_Prefs.PaliUseCrusader = false end
GoGo_Prefs.UnknownMounts = {}
end --function
BINDING_HEADER_GOGOHEADER = "GoGoMount"
BINDING_NAME_GOGOBINDING = "Mount/Dismount"
BINDING_NAME_GOGOBINDING2 = "Mount/Dismount (no flying)"
BINDING_NAME_GOGOBINDING3 = "Mount/Dismount Passenger Mounts"
GoGo_Variables = {}
GoGo_Variables.Player = {}
GoGo_Variables.MountList = {}
GoGo_DebugLog = {}
GoGo_Variables.Localize = {}
GoGo_Variables.Localize.Zone = {}
GoGo_Variables.Localize.String = {}
GoGo_Variables.Localize.Skill = {}
GoGo_Variables.MountDB = {
[25953] = {[16] = true, [21] = true, [38] = true, [50] = true, [51] = true}, -- Blue Qiraji Battle Tank
[26055] = {[16] = true, [21] = true, [38] = true, [50] = true, [51] = true}, -- Yellow Qiraji Battle Tank
[26054] = {[16] = true, [21] = true, [38] = true, [50] = true, [51] = true}, -- Red Qiraji Battle Tank
[26056] = {[16] = true, [21] = true, [38] = true, [50] = true, [51] = true}, -- Green Qiraji Battle Tank
[26656] = {[16] = true, [21] = true, [37] = true, [51] = true}, -- Black Qiraji Battle Tank
[30174] = {[15] = true, [25] = true, [39] = true}, -- Riding Turtle
[64731] = {[5] = true, [15] = true, [25] = true, [120] = true, [39] = true}, -- Sea Turtle
[33189] = {[4] = true, [15] = true, [25] = true, [39] = true}, -- Rickety Magic Broom -- itemid
-- [42692] = {[15] = true, [25] = true, [39] = true, [999] = true}, -- Rickety Magic Broom
[37011] = {[9] = true, [3] = true, [4] = true, [14] = true, [20] = true, [21] = true, [22] = true, [23] = true, [29] = true, [38] = true}, -- Magic Broom -- itemid
[33183] = {[16] = true, [20] = true, [38] = true, [4] = true}, -- Magic Broom -- itemid
-- [42680] = {[16] = true, [20] = true, [38] = true, [999] = true}, -- Magic Broom
--- [47977] = {[16] = true, [20] = true, [38] = true, [999] = true}, -- Magic Broom
--- [42681] = {[16] = true, [20] = true, [38] = true, [999] = true}, -- Magic Broom
-- [42683] = {[16] = true, [21] = true, [37] = true, [999] = true}, -- Swift Magic Broom
--- [42684] = {[16] = true, [21] = true, [37] = true, [999] = true}, -- Swift Magic Broom
[33176] = {[12] = true, [22] = true, [36] = true, [9] = true, [4] = true}, -- Flying Broom -- itemid
-- [42667] = {[12] = true, [22] = true, [36] = true, [9] = true, [999] = true}, -- Flying Broom
--- [42673] = {[12] = true, [22] = true, [36] = true, [9] = true, [999] = true}, -- Flying Broom
[33182] = {[11] = true, [23] = true, [35] = true, [9] = true, [4] = true}, -- Swift Flying Broom -- itemid
[33184] = {[16] = true, [23] = true, [37] = true, [9] = true, [4] = true, [999] = true}, -- Swift Magic Broom -- itemid
-- [42668] = {[11] = true, [23] = true, [35] = true, [9] = true, [999] = true}, -- Swift Flying Broom
--- [42679] = {[11] = true, [23] = true, [35] = true, [9] = true, [999] = true}, -- Swift Flying Broom
[32243] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Tawny Wind Rider
[32244] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Blue Wind Rider
[32245] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Green Wind Rider
[32246] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Red Wind Rider
[32295] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Green Wind Rider
[32296] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Yellow Wind Rider
[32297] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Purple Wind Rider
[44229] = {[18] = true, [22] = true, [39] = true, [9] = true, [4] = true, [52] = true}, -- Loaned Wind Rider Reins
[61230] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Armored Blue Wind Rider
[37015] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Swift Nether Drake
[41513] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Onyx Netherwing Drake
[41514] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Azure Netherwing Drake
[41515] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Cobalt Netherwing Drake
[41516] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Purple Netherwing Drake
[41517] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Veridian Netherwing Drake
[41518] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Violet Netherwing Drake
[44317] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Merciless Nether Drake
[44744] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Merciless Nether Drake
[49193] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Vengeful Nether Drake
[58615] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Brutal Nether Drake
[39798] = {[11] = true, [23] = true, [35] = true, [9] = true, [70] = true}, -- Green Riding Nether Ray
[39800] = {[11] = true, [23] = true, [35] = true, [9] = true, [70] = true}, -- Red Riding Nether Ray
[39801] = {[11] = true, [23] = true, [35] = true, [9] = true, [70] = true}, -- Purple Riding Nether Ray
[39802] = {[11] = true, [23] = true, [35] = true, [9] = true, [70] = true}, -- Silver Riding Nether Ray
[39803] = {[11] = true, [23] = true, [35] = true, [9] = true, [70] = true}, -- Blue Riding Nether Ray
[46199] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- X-51 Nether-Rocket X-TREME
[46197] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- X-51 Nether-Rocket
[71342] = {[9] = true, [3] = true, [14] = true, [20] = true, [21] = true, [22] = true, [29] = true, [23] = true, [38] = true}, -- Big Love Rocket
[75973] = {[9] = true, [2] = true, [6] = true, [12] = true, [22] = true, [23] = true, [24] = false, [36] = true}, -- X-53 Touring Rocket
[43927] = {[11] = true, [23] = true, [35] = true, [9] = true, [71] = true}, -- Cenarion War Hippogryph
[63844] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Argent Hippogryph
[66087] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Silver Covenant Hippogryph
[74856] = {[9] = true, [3] = true, [14] = true, [20] = true, [21] = true, [22] = true, [29] = true, [23] = true, [38] = true, [24] = true}, -- Blazing Hippogryph
[43810] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Frost Wyrm
[51960] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Frostwyrm Mount
[64927] = {[9] = true, [11] = true, [24] = true, [35] = true}, -- Deadly Gladiator's Frostwyrm
[65439] = {[9] = true, [11] = true, [24] = true, [35] = true}, -- Furious Gladiator's Frost Wyrm
[67336] = {[9] = true, [11] = true, [24] = true, [35] = true}, -- Relentless Gladiator's Frost Wyrm
[71810] = {[9] = true, [11] = true, [24] = true, [35] = true}, -- Wrathful Gladiator's Frost Wyrm
[72807] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Icebound Frostbrood Vanquisher
[72808] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Bloodbathed Frostbrood Vanquisher
[3363] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Nether Drake
[28828] = {[11] = true, [26] = true, [35] = true, [9] = true}, -- Nether Drake
[37815] = {[11] = true, [9] = true, [4] = true, [54] = true}, -- Emerald Drake
[37859] = {[11] = true, [9] = true, [4] = true, [54] = true}, -- Amber Drake
[37860] = {[11] = true, [9] = true, [4] = true, [54] = true}, -- Ruby Drake
[59567] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Azure Drake
[59568] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Blue Drake
[59569] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Bronze Drake
[59570] = {[11] = true, [23] = true, [35] = true, [9] = true, [72] = true}, -- Red Drake
[59571] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Twilight Drake
[59650] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Black Drake
[60025] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Albino Drake
[69395] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Onyxian Drake
[59961] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Red Proto-Drake
[59976] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Black Proto-Drake
[59996] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Blue Proto-Drake
[60002] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Time-Lost Proto-Drake
[60021] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Plagued Proto-Drake
[60024] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Violet Proto-Drake
[61294] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Green Proto-Drake
[63956] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Ironbound Proto-Drake
[63963] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Rusted Proto-Drake
[32345] = {[11] = true, [24] = true, [9] = true}, -- Peep the Phoenix Mount
[40192] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Ashes of Al'ar
[54726] = {[12] = true, [29] = true, [9] = true, [36] = true, [22] = true, [23] = true, [100] = true}, -- Winged Steed of the Ebon Blade
[54727] = {[12] = true, [29] = true, [9] = true, [36] = true, [22] = true, [23] = true, [100] = true}, -- Winged Steed of the Ebon Blade
[54729] = {[12] = true, [29] = true, [9] = true, [36] = true, [22] = true, [23] = true, [100] = true}, -- Winged Steed of the Ebon Blade
[32235] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Golden Gryphon
[32239] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Ebon Gryphon
[32240] = {[12] = true, [22] = true, [36] = true, [9] = true}, -- Snowy Gryphon
[32242] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Blue Gryphon
[32289] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Red Gryphon
[32290] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Green Gryphon
[32292] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Purple Gryphon
[44221] = {[18] = true, [22] = true, [39] = true, [9] = true, [4] = true, [52] = true}, -- Loaned Gryphon Reins
[55164] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Swift Spectral Gryphon
[61229] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Armored Snowy Gryphon
[578] = {[14] = true, [20] = true, [38] = true}, -- Black Wolf
[579] = {[16] = true, [21] = true, [37] = true}, -- Red Wolf
[580] = {[14] = true, [20] = true, [38] = true}, -- Timber Wolf
[6653] = {[14] = true, [20] = true, [38] = true}, -- Dire Wolf
[6654] = {[14] = true, [20] = true, [38] = true}, -- Brown Wolf
[16080] = {[16] = true, [21] = true, [37] = true}, -- Red Wolf
[16081] = {[16] = true, [21] = true, [37] = true}, -- Winter Wolf
[22724] = {[16] = true, [21] = true, [37] = true}, -- Black War Wolf
[23250] = {[16] = true, [21] = true, [37] = true}, -- Swift Brown Wolf
[23251] = {[16] = true, [21] = true, [37] = true}, -- Swift Timber Wolf
[23252] = {[16] = true, [21] = true, [37] = true}, -- Swift Gray Wolf
[23509] = {[16] = true, [21] = true, [37] = true}, -- Frostwolf Howler
[63640] = {[16] = true, [21] = true, [37] = true}, -- Origimmar Wolf (Swift Orgrimmar Wolf)
[64658] = {[14] = true, [20] = true, [38] = true}, -- Black Wolf
[65646] = {[16] = true, [21] = true, [37] = true}, -- Swift Burgundy Wolf
[68056] = {[16] = true, [21] = true, [37] = true}, -- Swift Horde Wolf
[18363] = {[14] = true, [20] = true, [38] = true}, -- Riding Kodo
[18989] = {[14] = true, [20] = true, [38] = true}, -- Gray Kodo
[18990] = {[14] = true, [20] = true, [38] = true}, -- Brown Kodo
[18991] = {[16] = true, [21] = true, [37] = true}, -- Green Kodo
[18992] = {[16] = true, [21] = true, [37] = true}, -- Teal Kodo
[22718] = {[16] = true, [21] = true, [37] = true}, -- Black War Kodo
[23247] = {[16] = true, [21] = true, [37] = true}, -- Great White Kodo
[23248] = {[16] = true, [21] = true, [37] = true}, -- Great Gray Kodo
[23249] = {[16] = true, [21] = true, [37] = true}, -- Great Brown Kodo
[49378] = {[14] = true, [20] = true, [38] = true}, -- Brewfest Riding Kodo
[49379] = {[16] = true, [21] = true, [37] = true}, -- Great Brewfest Kodo
[50869] = {[14] = true, [20] = true, [38] = true}, -- Brewfest Kodo
[63641] = {[16] = true, [21] = true, [37] = true}, -- Thunder Bluff Kodo (Great Mulgore Kodo)
[64657] = {[14] = true, [20] = true, [38] = true}, -- White Kodo
[65641] = {[16] = true, [21] = true, [37] = true}, -- Great Golden Kodo
[34795] = {[14] = true, [20] = true, [38] = true}, -- Red Hawkstrider
[35018] = {[14] = true, [20] = true, [38] = true}, -- Purple Hawkstrider
[35020] = {[14] = true, [20] = true, [38] = true}, -- Blue Hawkstrider
[35022] = {[14] = true, [20] = true, [38] = true}, -- Black Hawkstrider
[33660] = {[16] = true, [21] = true, [37] = true}, -- Swift Pink Hawkstrider
[35025] = {[16] = true, [21] = true, [37] = true}, -- Swift Green Hawkstrider
[35027] = {[16] = true, [21] = true, [37] = true}, --Swift Purple Hawkstrider
[35028] = {[16] = true, [21] = true, [37] = true}, -- Swift Warstrider
[46628] = {[16] = true, [21] = true, [37] = true}, -- Swift White Hawkstrider
[41252] = {[11] = true, [21] = true, [37] = true}, -- Raven Lord
[63642] = {[16] = true, [21] = true, [37] = true}, -- Silvermoon Hawkstrider (Swift Silvermoon Hawkstrider)
[65639] = {[16] = true, [21] = true, [37] = true}, -- Swift Red Hawkstrider
[66091] = {[16] = true, [21] = true, [37] = true}, -- Sunreaver Hawkstrider
[65917] = {[16] = true, [21] = true, [37] = true}, -- Magic Rooster
[66122] = {[16] = true, [21] = true, [37] = true}, -- Magic Rooster
[66123] = {[16] = true, [21] = true, [37] = true}, -- Magic Rooster
[66124] = {[16] = true, [21] = true, [37] = true}, -- Magic Rooster
[34790] = {[16] = true, [21] = true, [37] = true}, -- Dark War Talbuk
[34896] = {[16] = true, [21] = true, [37] = true}, -- Cobalt War Talbuk
[34897] = {[16] = true, [21] = true, [37] = true}, -- White War Talbuk
[34898] = {[16] = true, [21] = true, [37] = true}, -- Silver War Talbuk
[34899] = {[16] = true, [21] = true, [37] = true}, -- Tan War Talbuk
[39315] = {[16] = true, [21] = true, [37] = true}, -- Cobalt Riding Talbuk
[39316] = {[16] = true, [21] = true, [37] = true}, -- Dark Riding Talbuk
[39317] = {[16] = true, [21] = true, [37] = true}, -- Silver Riding Talbuk
[39318] = {[16] = true, [21] = true, [37] = true}, -- Tan Riding Talbuk
[39319] = {[16] = true, [21] = true, [37] = true}, -- White Riding Talbuk
[6777] = {[14] = true, [20] = true, [38] = true}, -- Gray Ram
[6898] = {[14] = true, [20] = true, [38] = true}, -- White Ram
[6899] = {[14] = true, [20] = true, [38] = true}, -- Brown Ram
[17460] = {[16] = true, [21] = true, [37] = true}, -- Frost Ram
[17461] = {[16] = true, [21] = true, [37] = true}, -- Black Ram
[22720] = {[16] = true, [21] = true, [37] = true}, -- Black War Ram
[23238] = {[16] = true, [21] = true, [37] = true}, -- Swift Brown Ram
[23239] = {[16] = true, [21] = true, [37] = true}, -- Swift Gray Ram
[23240] = {[16] = true, [21] = true, [37] = true}, -- Swift White Ram
[23510] = {[16] = true, [21] = true, [37] = true}, -- Stormpike Battle Charger
[43899] = {[14] = true, [20] = true, [38] = true}, -- Brewfest Ram
[43900] = {[16] = true, [21] = true, [37] = true}, -- Swift Brewfest Ram
[63636] = {[16] = true, [21] = true, [37] = true}, -- Ironforge Ram (Swift Ironforge Ram)
[65643] = {[16] = true, [21] = true, [37] = true}, -- Swift Violet Ram
[10873] = {[14] = true, [20] = true, [38] = true}, -- Red Mechanostrider
[10969] = {[14] = true, [20] = true, [38] = true}, -- Blue Mechanostrider
[15779] = {[16] = true, [21] = true, [37] = true}, -- White Mechanostrider Mod B
[15780] = {[14] = true, [20] = true, [38] = true}, -- Green Mechanostrider
[15781] = {[14] = true, [20] = true, [38] = true}, -- Steel Mechanostrider
[17453] = {[14] = true, [20] = true, [38] = true}, -- Green Mechanostrider
[17454] = {[14] = true, [20] = true, [38] = true}, -- Unpainted Mechanostrider
[17455] = {[14] = true, [20] = true, [38] = true}, -- Purple Mechanostrider
[17456] = {[14] = true, [20] = true, [38] = true}, -- Red and Blue Mechanostrider
[17458] = {[14] = true, [20] = true, [38] = true}, -- Fluorescent Green Mechanostrider
[17459] = {[16] = true, [21] = true, [37] = true}, -- Icy Blue Mechanostrider Mod A
[22719] = {[16] = true, [21] = true, [37] = true}, -- Black Battlestrider
[23222] = {[16] = true, [21] = true, [37] = true}, -- Swift Yellow Mechanostrider
[23223] = {[16] = true, [21] = true, [37] = true}, -- Swift White Mechanostrider
[23225] = {[16] = true, [21] = true, [37] = true}, -- Swift Green Mechanostrider
[33630] = {[14] = true, [20] = true, [38] = true}, -- Blue Mechanostrider
[63638] = {[16] = true, [21] = true, [37] = true}, -- Gnomeregan Mechanostrider (Turbostrider)
[65642] = {[16] = true, [21] = true, [37] = true}, -- Turbostrider
[8395] = {[14] = true, [20] = true, [38] = true}, -- Emerald Raptor
[10795] = {[14] = true, [20] = true, [38] = true}, -- Ivory Raptor
[10796] = {[14] = true, [20] = true, [38] = true}, -- Turquoise Raptor
[10799] = {[14] = true, [20] = true, [38] = true}, -- Violet Raptor
[16084] = {[16] = true, [21] = true, [37] = true}, -- Mottled Red Raptor
[17450] = {[16] = true, [21] = true, [37] = true}, -- Ivory Raptor
[22721] = {[16] = true, [21] = true, [37] = true}, -- Black War Raptor
[23241] = {[16] = true, [21] = true, [37] = true}, -- Swift Blue Raptor
[23242] = {[16] = true, [21] = true, [37] = true}, -- Swift Olive Raptor
[23243] = {[16] = true, [21] = true, [37] = true}, -- Swift Orange Raptor
[24242] = {[16] = true, [21] = true, [37] = true}, -- Swift Razzashi Raptor
[63635] = {[16] = true, [21] = true, [37] = true}, -- Darkspear Raptor (Swift Darkspear Raptor)
[64659] = {[16] = true, [21] = true, [37] = true}, -- Venomhide Ravasaur
[65644] = {[16] = true, [21] = true, [37] = true}, -- Swift Purple Raptor
[43688] = {[11] = true, [21] = true, [37] = true}, -- Amani War Bear
[51412] = {[16] = true, [21] = true, [37] = true}, -- Big Battle Bear
[54753] = {[16] = true, [21] = true, [37] = true}, -- White Polar Bear Mount
[58983] = {[14] = true, [21] = true, [38] = true, [20] = true, [29] = true}, -- Big Blizzard Bear
[59572] = {[16] = true, [21] = true, [37] = true}, -- Black Polar Bear
[59573] = {[16] = true, [21] = true, [37] = true}, -- Brown Polar Bear
[60114] = {[16] = true, [21] = true, [37] = true}, -- Armored Brown Bear
[60116] = {[16] = true, [21] = true, [37] = true}, -- Armored Brown Bear
[60118] = {[16] = true, [21] = true, [37] = true}, -- Black War Bear
[60119] = {[16] = true, [21] = true, [37] = true}, -- Black War Bear
--[64987] = {[14] = true, [20] = true, [21] = true, [29] = true, [38] = true, [999] = true}, --Big Blizzard Bear [PH] - ticket 211
[8394] = {[14] = true, [20] = true, [38] = true}, -- Striped Frostsaber
[10789] = {[14] = true, [20] = true, [38] = true}, -- Spotted Frostsaber
[10793] = {[14] = true, [20] = true, [38] = true}, -- Striped Nightsaber
[16055] = {[16] = true, [21] = true, [37] = true}, -- Black Nightsaber
[16056] = {[16] = true, [21] = true, [37] = true}, -- Ancient Frostsaber
[16058] = {[14] = true, [20] = true, [38] = true}, -- Primal Leopard
[16059] = {[14] = true, [20] = true, [38] = true}, -- Tawny Sabercat
[16060] = {[14] = true, [20] = true, [38] = true}, -- Golden Sabercat
[17229] = {[16] = true, [21] = true, [38] = true}, -- Winterspring Frostsaber
[22723] = {[16] = true, [21] = true, [37] = true}, -- Black War Tiger
[23219] = {[16] = true, [21] = true, [37] = true}, -- Swift Mistsaber
[23220] = {[16] = true, [21] = true, [37] = true}, -- Swift Dawnsaber
[23221] = {[16] = true, [21] = true, [37] = true}, -- Swift Frostsaber
[23338] = {[16] = true, [21] = true, [37] = true}, -- Swift Stormsaber
[24252] = {[16] = true, [21] = true, [37] = true}, -- Swift Zulian Tiger
[42776] = {[14] = true, [20] = true, [38] = true}, -- Spectral Tiger
[42777] = {[16] = true, [21] = true, [37] = true}, -- Swift Spectral Tiger
[63637] = {[16] = true, [21] = true, [37] = true}, -- Darnassian Nightsaber (Swift Darnassian Mistsaber)
[65638] = {[16] = true, [21] = true, [37] = true}, -- Swift Moonsaber
[66847] = {[14] = true, [20] = true, [38] = true}, -- Striped Dawnsaber
[458] = {[14] = true, [20] = true, [38] = true}, -- Brown Horse
[470] = {[14] = true, [20] = true, [38] = true}, -- Black Stallion
[472] = {[14] = true, [20] = true, [38] = true}, -- Pinto
[5784] = {[14] = true, [20] = true, [38] = true}, -- Felsteed
[6648] = {[14] = true, [20] = true, [38] = true}, -- Chestnut Mare
[13819] = {[14] = true, [20] = true, [38] = true}, -- Warhorse
[16082] = {[16] = true, [21] = true, [37] = true}, -- Palomino
[16083] = {[16] = true, [21] = true, [37] = true}, -- White Stallion
[17462] = {[14] = true, [20] = true, [38] = true}, -- Red Skeletal Horse
[17463] = {[14] = true, [20] = true, [38] = true}, -- Blue Skeletal Horse
[17464] = {[14] = true, [20] = true, [38] = true}, -- Brown Skeletal Horse
[17465] = {[16] = true, [21] = true, [37] = true}, -- Green Skeletal Warhorse
[17481] = {[16] = true, [21] = true, [37] = true}, -- Rivendare's Deathcharger
[22717] = {[16] = true, [21] = true, [37] = true}, -- Black War Steed
[22722] = {[16] = true, [21] = true, [37] = true}, -- Red Skeletal Warhorse
[23161] = {[16] = true, [21] = true, [37] = true}, -- Dreadsteed
[23214] = {[16] = true, [21] = true, [37] = true}, -- Charger
[23227] = {[16] = true, [21] = true, [37] = true}, -- Swift Palomino
[23228] = {[16] = true, [21] = true, [37] = true}, -- Swift White Steed
[23229] = {[16] = true, [21] = true, [37] = true}, -- Swift Brown Steed
[23246] = {[16] = true, [21] = true, [37] = true}, -- Purple Skeletal Warhorse
[34767] = {[16] = true, [21] = true, [37] = true}, -- Summon Charger
[34769] = {[14] = true, [20] = true, [38] = true}, -- Summon Warhorse
[36702] = {[16] = true, [21] = true, [37] = true}, -- Fiery Warhorse
[48025] = {[16] = true, [21] = true, [38] = true, [20] = true, [22] = true, [23] = true, [29] = true, [3] = true, [9] = true}, -- Headless Horseman's Mount
[48778] = {[16] = true, [21] = true, [37] = true}, -- Acherus Deathcharger
[58819] = {[16] = true, [21] = true, [37] = true}, -- Swift Brown Steed
[63232] = {[16] = true, [21] = true, [37] = true}, -- Stormwind Steed (Swift Stormwind Steed)
[63643] = {[16] = true, [21] = true, [37] = true}, -- Forsaken Warhorse
[64656] = {[16] = true, [21] = true, [37] = true}, -- Blue Skeletal Warhorse
[64977] = {[14] = true, [20] = true, [38] = true}, -- Black Skeletal Horse
[65640] = {[16] = true, [21] = true, [37] = true}, -- Swift Gray Steed
[65645] = {[16] = true, [21] = true, [37] = true}, -- White Skeletal Warhorse
[66090] = {[16] = true, [21] = true, [37] = true}, -- Quel'dorei Steed
[66846] = {[16] = true, [21] = true, [37] = true}, -- Ochre Skeletal Warhorse
[66906] = {[16] = true, [21] = true, [37] = true}, -- Argent Charger
[66907] = {[14] = true, [20] = true, [38] = true}, -- Argent Warhorse
[67466] = {[16] = true, [21] = true, [37] = true}, -- Argent Warhorse
[68057] = {[16] = true, [21] = true, [37] = true}, -- Swift Alliance Steed
[68187] = {[16] = true, [21] = true, [37] = true}, -- Crusader's White Warhorse
[68188] = {[16] = true, [21] = true, [37] = true}, -- Crusader's Black Warhorse
[72286] = {[9] = true, [3] = true, [14] = true, [20] = true, [21] = true, [22] = true, [29] = true, [23] = true, [38] = true, [24] = true}, -- Invincible
[73313] = {[16] = true, [21] = true, [37] = true}, -- Crimson Deathcharger
[75614] = {[9] = true, [3] = true, [6] = true, [14] = true, [20] = true, [21] = true, [22] = true, [29] = true, [23] = true, [38] = true, [24] = false}, -- Celestial Steed
[34406] = {[14] = true, [20] = true, [38] = true}, -- Brown Elekk
[34407] = {[16] = true, [21] = true, [37] = true}, -- Great Elite Elekk
[35710] = {[14] = true, [20] = true, [38] = true}, -- Gray Elekk
[35711] = {[14] = true, [20] = true, [38] = true}, -- Purple Elekk
[35712] = {[16] = true, [21] = true, [37] = true}, -- Great Green Elekk
[35713] = {[16] = true, [21] = true, [37] = true}, -- Great Blue Elekk
[35714] = {[16] = true, [21] = true, [37] = true}, -- Great Purple Elekk
[47037] = {[16] = true, [21] = true, [37] = true}, -- Swift War Elekk
[48027] = {[16] = true, [21] = true, [37] = true}, -- Black War Elekk
[63639] = {[16] = true, [21] = true, [37] = true}, -- Exodar Elekk (Great Azuremyst Elekk)
[65637] = {[16] = true, [21] = true, [37] = true}, -- Grea Red Elekk (Blizzard typo on PTR?)
[50281] = {[16] = true, [21] = true, [37] = true}, -- Black Warp Stalker
[59785] = {[16] = true, [21] = true, [37] = true, ["mammoth"] = true}, -- Black War Mammoth
[59788] = {[16] = true, [21] = true, [37] = true, ["mammoth"] = true}, -- Black War Mammoth
[59791] = {[16] = true, [21] = true, [37] = true, ["mammoth"] = true}, -- Wooly Mammoth
[59793] = {[16] = true, [21] = true, [37] = true, ["mammoth"] = true}, -- Wooly Mammoth
[59797] = {[16] = true, [21] = true, [37] = true, [73] = true, ["mammoth"] = true}, -- Ice Mammoth
[59799] = {[16] = true, [21] = true, [37] = true, [73] = true, ["mammoth"] = true}, -- Ice Mammoth
[59802] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Ice Mammoth
[59804] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Ice Mammoth
[59810] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Black War Mammoth
[59811] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Black War Mammoth
[60136] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Caravan Mammoth
[60140] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Caravan Mammoth
[61425] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Traveler's Tundra Mammoth
[61447] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Traveler's Tundra Mammoth
[61465] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Black War Mammoth
[61466] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Black War Mammoth
[61467] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Black War Mammoth
[61469] = {[16] = true, [21] = true, [37] = true, [2] = true, ["mammoth"] = true}, -- Grand Ice Mammoth
[61470] = {[16] = true, [21] = true, [37] = true, [2] = true, [73] = true, ["mammoth"] = true}, -- Grand Ice Mammoth
[48954] = {[16] = true, [21] = true, [37] = true}, -- Swift Zhevra
[49322] = {[16] = true, [21] = true, [37] = true}, -- Swift Zhevra
[44151] = {[11] = true, [23] = true, [39] = true, [46] = true, [9] = true}, -- Turbo-Charged Flying Machine
[44153] = {[12] = true, [22] = true, [36] = true, [45] = true, [9] = true}, -- Flying Machine
[55531] = {[17] = true, [21] = true, [37] = true, [2] = true}, -- Mechano-hog
[60424] = {[17] = true, [21] = true, [37] = true, [2] = true}, -- Mekgineer's Chopper
[63796] = {[11] = true, [24] = true, [35] = true, [9] = true}, -- Mimiron's Head
[61309] = {[11] = true, [23] = true, [49] = true, [9] = true, [35] = true}, -- Magnificent Flying Carpet
[61442] = {[11] = true, [47] = true, [9] = true, [23] = true, [35] = true}, -- Swift Mooncloth Carpet
[61444] = {[11] = true, [47] = true, [9] = true, [23] = true, [35] = true}, -- Swift Shadoweave Carpet
[61446] = {[11] = true, [47] = true, [9] = true, [23] = true, [35] = true}, -- Swift Spellfire Carpet
[61451] = {[12] = true, [48] = true, [9] = true, [22] = true, [36] = true}, -- Flying Carpet
[75596] = {[11] = true, [23] = true, [9] = true, [49] = true, [35] = true}, -- Frosty Flying Carpet
-- [????] = {[11] = true, [47] = true, [9] = true, [23] = true, [35] = true}, -- Swift Flying Carpet --- item 39303
[61996] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Blue Dragonhawk
[61997] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Red Dragonhawk
[62048] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Black Dragonhawk Mount
[66088] = {[11] = true, [23] = true, [35] = true, [9] = true}, -- Sunreaver Dragonhawk
[74918] = {[16] = true, [21] = true, [37] = true}, -- Wooly White Rhino
-- [62087] = {[5] = true, [15] = true, [21] = true, [39] = true, [53] = true, [999] = true}, -- Aquatic Riding Ray -- removed from the 3.1 PTR datafiles
-- Below are not used for detection, only used to prevent being reported as unknown mounts
[40120] = {[9] = true, [11] = true, [23] = true}, -- GOGO_DRUID_FAST_FLIGHTFORM
[33943] = {[9] = true, [11] = true, [22] = true}, -- GOGO_DRUID_FLIGHTFORM
[783] = {[28] = true}, -- GOGO_DRUID_TRAVELFORM
[2645] = {[28] = true}, -- GOGO_SHAMAN_GHOSTWOLF
}
GoGo_MountsItems = {
[9] = 33189,
[2] = 37011,
[3] = 33183,
[4] = 33176,
[5] = 33182,
[6] = 33184,
[7] = 44229,
[8] = 44221,
[9] = 37859,
[10] = 37860,
[11] = 37815,
}
--[[
GoGo_FlyCoOrds = { -- x = west / east, y = north / south
["Dalaran"] = {
["Underbelly"] = {
[9] = {0.09200777113437, 0.53064680099487, 0.30007892847061, 0.88580405712128}, -- south west pipe
-- [2] = {0.00000000000000, 0.00000000000000, 0.00000000000000, 0.00000000000000}, -- 3.0.8 PTR the pipe did not have any location co-ordinates as well as other parts of underbelly
},
["Dalaran"] = {
[9] = {0.32762300968170, 0.92964243888855, 0.44406870007515, 0.99999999999999}, -- south floating rock - south part of rock is off dalaran map and zero's out
[2] = {0.00000000000000, 0.00000000000000, 0.00000000000000, 0.00000000000000}, -- south end of south floating rock that's considered off the dalaran map, north end of north floating rock
[3] = {0.84375905990601, 0.53441548347473, 0.92961716651917, 0.56119620800018}, -- east floating rock near Karasus' Landing - north half
[4] = {0.81565266847610, 0.56119620800018, 0.92961716651917, 0.62259274721146}, -- east floating rock near Karasus' Landing - middle section
[5] = {0.82037299871445, 0.62259274721146, 0.92961716651917, 0.65996080636978}, -- east floating rock near Karasus' Landing - south of above middle section
[6] = {0.83119285106659, 0.65996080636978, 0.92961716651917, 0.69355386495590}, -- east floating rock near Karasus' Landing - south half
[7] = {0.24048496782780, 0.00000000000000, 0.35678505897522, 0.06878154724837}, -- north floating rock - middle section
[8] = {0.24048496782780, 0.06878154724837, 0.32650312781334, 0.09258409589529}, -- north floating rock - south section
[9] = {0.73049765825272, 0.58968532085419, 0.82789492607117, 0.69320708513260}, -- outer rim - south of Karasus' Landing
[10] = {0.78565186262131, 0.69320708513260, 0.82789492607117, 0.90059036016464}, -- outer rim - south of above
[11] = {0.19430139660835, 0.73027163743973, 0.82789492607117, 0.91422116756439}, -- outer rim - south end
[12] = {0.07060649325275, 0.27633512020111, 0.26812949776649, 0.73027163743973}, -- outer rim - west end
[13] = {0.12171425670385, 0.13289329409599, 0.29824274778366, 0.34425541758537}, -- outer rim - north end - east from above
[14] = {0.29824274778366, 0.13289329409599, 0.30157667398453, 0.34425541758537}, -- outer rim - north end - east from above
[15] = {0.30157667398453, 0.13289329409599, 0.30533048510551, 0.33688980340958}, -- outer rim - north end - east from above
[16] = {0.30533048510551, 0.13289329409599, 0.30807453393936, 0.32788288593292}, -- outer rim - north end - east from above
[17] = {0.30807453393936, 0.13289329409599, 0.31300327181816, 0.32129821181297}, -- outer rim - north end - east from above
[18] = {0.31300327181816, 0.13289329409599, 0.31939730048180, 0.30955401062965}, -- outer rim - north end - east from above
[19] = {0.31939730048180, 0.05900426954031, 0.42953002452850, 0.27856853604317}, -- outer rim - north end - east from above
[20] = {0.42953002452850, 0.01805531047284, 0.52528887987137, 0.16944953799248}, -- outer rim - north end - east from above
[21] = {0.52528887987137, 0.01805531047284, 0.74681603908539, 0.16944953799248}, -- outer rim - north end - east from above
[22] = {0.67614758014679, 0.16781881451607, 0.82789492607117, 0.73049765825272}, -- outer rim - north east - south east from above to Karasus' Landing
},
["VioletCitadel"] = {
[9] = {0.24813342094431, 0.42324751615524, 0.26391690969467, 0.43607267737389}, -- upper level south part
[2] = {0.25418719649315, 0.41306078433990, 0.26763379573822, 0.42324751615524}, -- upper level north east from above
[3] = {0.25979378819466, 0.40825596451759, 0.26960688829422, 0.41306078433990}, -- upper level north from above
[4] = {0.26259636878967, 0.39096131920815, 0.27175131440163, 0.40825596451759}, -- upper level north from above
[5] = {0.26015603542328, 0.37608715891838, 0.27175131440163, 0.39096131920815}, -- upper level north west from above
[6] = {0.24976442754269, 0.36279606819153, 0.26814296841621, 0.37608715891838}, -- upper level north west from above
[7] = {0.21763536334038, 0.34758481383324, 0.26284533739090, 0.36279606819153}, -- upper level north part
[8] = {0.21075734496117, 0.36279606819153, 0.23006491363049, 0.38133582472801}, -- upper level south west from above
[9] = {0.20883683860302, 0.38133582472801, 0.22105532884598, 0.41938513517380}, -- upper level south from above
},
},
}
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment