/
SetMapToCurrentZone() -- make sure that the map accurately reflects the zone you're in |
local continent = GetCurrentMapContinent() |
local areaID = GetCurrentMapAreaID() |
local expertRiding = IsUsableSpell(L.LIVESTOCK_SPELL_EXPERTRIDING) -- Expert Riding |
local artisanRiding = IsUsableSpell(L.LIVESTOCK_SPELL_ARTISANRIDING) -- Artisan Riding |
local masterRiding = IsUsableSpell(L.LIVESTOCK_SPELL_MASTERRIDING) -- Master Riding |
return "LAND" |
end |
local _, _, isActive = GetWorldPVPAreaInfo(1) |
return ((zone == L.LIVESTOCK_ZONE_WINTERGRASP and isActive == true) and "LAND") or "FLYING" -- check to see if a battle is in progress and if so, we're on a land mount. If not, flying mount. |
return ((zone == L.LIVESTOCK_ZONE_WINTERGRASP and isActive == true) and "LAND") or "FLYING" -- check to see if a battle is in progress and if so, we're on a land mount. If not, flying mount. |
else |
return "LAND" |
end |
else |
return "LAND" |
end |
else |
if IsFlyableArea() then |
elseif continent == -1 then |
if areaID == 1177 then -- The Deaths of Chromie scenario |
return "FLYING" |
else |
return "LAND" |
end |
else |
return "LAND" -- anywhere else we should get a land mount |
end |
end |
if GetNumGroupMembers() ~= 0 and LivestockSettings.partyfave == 1 and LivestockSettings.Party and LivestockSettings.Party["mount"] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Party["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
if GetNumGroupMembers() ~= 0 and LivestockSettings.partyfave == 1 and LivestockSettings.Party and LivestockSettings.Party["mount"] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Party["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
if GetNumGroupMembers() ~= 0 and LivestockSettings.partyfave == 1 and LivestockSettings.Party and LivestockSettings.Party["mount"] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Party["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]] then |
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
if (debug) then |
print(format("Timer = '%s' and value = '%s'", timer, scale)) |
end |
if timer == "BREATH" and scale == -1 then |
if IsSubmerged() then |
breath = true |
end |
end |
Version 2.6.4 |
- Better error handling for zone mounts |
- Better water mount handling (flying from water's surface will require macro) |
Ex: /click [modifier:alt]LivestockLandMountsButton;[button:2]LivestockFlyingMountsButton;LivestockComboButton |
- Fix for flying mounts in class halls |
Version 2.6.3 |
- Fix for flying in Chromie scenario |
## Title: Livestock |
## Notes: Enables easy random summoning of vanity pets and mounts, including the option of "smart mounting" |
## Author: Kharthus - Deathwing(US) |
## Version: 2.6.3 |
## Version: 2.6.4 |
## SavedVariablesPerCharacter: LivestockSettings |
LibRecompense\RecompenseTools.lua |