WoWInterface SVN Livestock

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 131 to Rev 132
    Reverse comparison

Rev 131 → Rev 132

Livestock/Livestock.lua
363,7 → 363,7
elseif kind == "FLYING" then -- code is the same for flying mounts with the appropriate changes; perhaps this could be a function call?
mounts = 0
for k in orderedPairs(settings) do
if (settings[k].type == "flying" or settings[k].type == "combo") then
if (settings[k].type == "flying" or settings[k].type == "combo" or settings[k].type == "dragon") then
mounts = mounts + 1
tinsert(mountstable, settings[k].index)
end
1149,8 → 1149,10
LivestockSettings.Mounts[name].type = "land"
elseif mountType == 231 or mountType == 232 or mountType == 254 then -- water mount
LivestockSettings.Mounts[name].type = "water"
elseif mountType == 407 then
elseif mountType == 407 or mountType == 412 then
LivestockSettings.Mounts[name].type = "combo" -- land/flying/water mount
elseif mountType == 402 then
LivestockSettings.Mounts[name].type = "dragon" -- dragonriding mount
else
print(format(L.LIVESTOCK_INTERFACE_UNKNOWN, name, mountType))
end
1192,17 → 1194,19
end
end
 
local expertRiding = IsSpellKnown(L.LIVESTOCK_SPELL_EXPERTRIDING) -- Expert Riding
local artisanRiding = IsSpellKnown(L.LIVESTOCK_SPELL_ARTISANRIDING) -- Artisan Riding (pre-squish)
local masterRiding = IsSpellKnown(L.LIVESTOCK_SPELL_MASTERRIDING) -- Master Riding
local expertRiding = IsSpellKnown(L.LIVESTOCK_SPELL_EXPERTRIDING) -- Expert Riding
local artisanRiding = IsSpellKnown(L.LIVESTOCK_SPELL_ARTISANRIDING) -- Artisan Riding (pre-squish)
local masterRiding = IsSpellKnown(L.LIVESTOCK_SPELL_MASTERRIDING) -- Master Riding
 
local bfaFlying = IsSpellKnown(L.LIVESTOCK_SPELL_BFAPATHFINDER) -- Battle for Azeroth Pathfinder, Rank 2
local bfaFlying = IsSpellKnown(L.LIVESTOCK_SPELL_BFAPATHFINDER) -- Battle for Azeroth Pathfinder, Rank 2
local dragonRiding = IsSpellKnown(L.LIVESTOCK_SPELL_DRAGONRIDING) -- Dragonriding Basics
 
if debug then
print("Expert Riding :", expertRiding)
print("Artisan Riding :", artisanRiding)
print("Master Riding :", masterRiding)
print("BfA Flying :", bfaFlying)
print("Dragonriding :", dragonRiding)
end
 
--[[ Updated Continent IDs
1219,6 → 1223,7
875 Zandalar
1355 Nazjatar (zone ID)
1550 The Shadowlands
1978 Dragon Isles
 
]]
 
1252,6 → 1257,12
else
return "LAND"
end
elseif continent == 1978 then -- if we're in the Dragon Isles
if dragonRiding then
return "DRAGON"
else
return "LAND"
end
else
return "LAND" -- anywhere else we should get a land mount
end
1559,6 → 1570,8
Livestock.PickLandMount()
elseif self.mounttype == "WATER" then
Livestock.PickWaterMount()
elseif self.mounttype == "DRAGON" then
Livestock.PickDragonMount()
else
Livestock.PickFlyingMount()
end
1878,6 → 1891,55
C_MountJournal.SummonByID(number)
end
 
function Livestock.PickDragonMount()
if IsFlying() and LivestockSettings.safeflying == 1 then -- if we're already flying, don't do anything; if we're not and mounted, we're on the ground on a flying mount so dismount instead of summoning another mount
return
elseif IsMounted() then
Dismount()
return
elseif UnitInVehicle("player") then
VehicleExit()
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"] 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"] and LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]] then
C_MountJournal.SummonByID(LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index)
return
end
 
Livestock.RecycleTable(temp)
 
for k in pairs(LivestockSettings.Mounts) do -- go through the dragon mounts and add the ones that are selected to the temp table
if (LivestockSettings.Mounts[k].type == "dragon" and LivestockSettings.Mounts[k].enableFlying == 1) then
local _, _, _, _, isUsable = C_MountJournal.GetMountInfoByID(LivestockSettings.Mounts[k].index)
if isUsable == true then
tinsert(temp, LivestockSettings.Mounts[k].index)
end
end
end
 
if #temp == 0 then -- if no mounts are selected, prompt the user to select one (or pick a land mount?)
Livestock.PickLandMount()
return
end
 
local number = temp[fastrandom(#temp)]
 
if (debug) then
local name = C_MountJournal.GetMountInfoByID(number)
local _, _, _, _, mountType = C_MountJournal.GetMountInfoExtraByID(number)
print(format("MOUNT: flying mount is '%s', index '%s', mountType '%s'", name, number, mountType))
end
 
C_MountJournal.SummonByID(number)
end
 
local deltaT = 1
local lastDryTime = 0
local f = CreateFrame("Frame")
Livestock/Change Log.txt
1,3 → 1,7
Version 3.2.7
 
- Initial dragonriding support.
 
Version 3.2.6
 
- Fixed cat form, ghost wolf, etc.
Livestock/Livestock.toc
2,7 → 2,7
## Title: Livestock
## Notes: Enables easy random summoning of vanity pets and mounts, including the option of "smart mounting"
## Author: Kharthus - Deathwing(US)
## Version: 3.2.6
## Version: 3.2.7
## SavedVariablesPerCharacter: LivestockSettings
 
LibRecompense\RecompenseTools.lua
Livestock/Localizations/Localization-enUS.lua
58,24 → 58,25
L.LIVESTOCK_SPELL_ARTISANRIDING = 34091 -- "Artisan Riding"
L.LIVESTOCK_SPELL_MASTERRIDING = 90265 -- "Master Riding"
 
L.LIVESTOCK_SPELL_BFAPATHFINDER = 278833 -- "Battle for Azeroth Pathfinder, Rank 2"
L.LIVESTOCK_SPELL_BFAPATHFINDER = 278833 -- "Battle for Azeroth Pathfinder, Rank 2"
L.LIVESTOCK_SPELL_DRAGONRIDING = 376777 -- "Dragonriding Basics"
 
L.LIVESTOCK_SPELL_TRAVELFORM = GetSpellInfo(783) -- "Travel Form"
L.LIVESTOCK_SPELL_TRAVELFORM = GetSpellInfo(783) -- "Travel Form"
L.LIVESTOCK_SPELL_FLIGHTFORM = GetSpellInfo(165962) -- "Flight Form"
L.LIVESTOCK_SPELL_BEARFORM = GetSpellInfo(5487) -- "Bear Form"
L.LIVESTOCK_SPELL_CATFORM = GetSpellInfo(768) -- "Cat Form"
L.LIVESTOCK_SPELL_TREEOFLIFE = GetSpellInfo(33891) -- "Tree of Life"
L.LIVESTOCK_SPELL_MOONKINFORM = GetSpellInfo(24858) -- "Moonkin Form"
L.LIVESTOCK_SPELL_TREANTFORM = GetSpellInfo(114282) -- "Treant Form"
L.LIVESTOCK_SPELL_STAGFORM = GetSpellInfo(210053) -- "Stag Form"
L.LIVESTOCK_SPELL_GHOSTWOLF = GetSpellInfo(2645) -- "Ghost Wolf"
L.LIVESTOCK_SPELL_STAGFORM = GetSpellInfo(210053) -- "Stag Form"
L.LIVESTOCK_SPELL_GHOSTWOLF = GetSpellInfo(2645) -- "Ghost Wolf"
L.LIVESTOCK_SPELL_STEALTH = GetSpellInfo(1784) -- "Stealth"
L.LIVESTOCK_SPELL_FEIGNDEATH = GetSpellInfo(5384) -- "Feign Death"
L.LIVESTOCK_SPELL_CHEETAH = GetSpellInfo(186257) -- "Aspect of the Cheetah"
L.LIVESTOCK_SPELL_INVISIBILITY = GetSpellInfo(66) -- "Invisibility"
L.LIVESTOCK_SPELL_FEIGNDEATH = GetSpellInfo(5384) -- "Feign Death"
L.LIVESTOCK_SPELL_CHEETAH = GetSpellInfo(186257) -- "Aspect of the Cheetah"
L.LIVESTOCK_SPELL_INVISIBILITY = GetSpellInfo(66) -- "Invisibility"
L.LIVESTOCK_SPELL_VANISH = GetSpellInfo(1856) -- "Vanish"
L.LIVESTOCK_SPELL_CLOAKING = GetSpellInfo(4079) -- "Cloaking"
L.LIVESTOCK_SPELL_PROWL = GetSpellInfo(5215) -- "Prowl"
L.LIVESTOCK_SPELL_PROWL = GetSpellInfo(5215) -- "Prowl"
L.LIVESTOCK_SPELL_SHADOWMELD = GetSpellInfo(58984) -- "Shadowmeld"
L.LIVESTOCK_SPELL_WATERWALKING = GetSpellInfo(546) -- "Water Walking"
L.LIVESTOCK_SPELL_LEVITATE = GetSpellInfo(1706) -- "Levitate"
83,10 → 84,10
L.LIVESTOCK_SPELL_PATHOFFROST = GetSpellInfo(3714) -- "Path of Frost"
L.LIVESTOCK_SPELL_FOOD = GetSpellInfo(108030) -- "Food"
L.LIVESTOCK_SPELL_DRINK = GetSpellInfo(430) -- "Drink"
L.LIVESTOCK_SPELL_HAUNTED = GetSpellInfo(101168) -- "Haunted"
L.LIVESTOCK_SPELL_HAUNTED = GetSpellInfo(101168) -- "Haunted"
L.LIVESTOCK_SPELL_TWILIGHTSERPENT = GetSpellInfo(56184) -- "Twilight Serpent"
L.LIVESTOCK_SPELL_SAPPHIREOWL = GetSpellInfo(56186) -- "Sapphire Owl"
L.LIVESTOCK_SPELL_RUBYHARE = GetSpellInfo(56121) -- "Ruby Hare"
L.LIVESTOCK_SPELL_RUBYHARE = GetSpellInfo(56121) -- "Ruby Hare"
L.LIVESTOCK_SPELL_RUNNINGWILD = GetSpellInfo(87840) -- "Running Wild"
L.LIVESTOCK_SPELL_SEALEGS = GetSpellInfo(76377) -- "Sea Legs"
L.LIVESTOCK_SPELL_CAMOUFLAGE = GetSpellInfo(199483) -- "Camouflage"
99,7 → 100,7
L.LIVESTOCK_SKILL_ENGR = GetSpellInfo(4036) -- "Engineering"
L.LIVESTOCK_SKILL_LW = GetSpellInfo(2108) -- "Leatherworking"
 
L.LIVESTOCK_SKILL_GARRISON = GetSpellInfo(161691) -- "Garrison Ability"
L.LIVESTOCK_SKILL_GARRISON = GetSpellInfo(161691) -- "Garrison Ability"
 
L.LIVESTOCK_TOOLTIP_VERY = "very"
L.LIVESTOCK_TOOLTIP_EXTREMELY = "extremely"