/trunk
local frame2 = CreateFrame("Frame","LivestockWeightsPreferencesFrame",UIParent,"LivestockBlueFrameTemplate") |
frame2:SetHeight(450) |
frame2:SetHeight(380) |
frame2:SetBackdropColor(0.2, 0.2, 0.6, 1) |
frame2.name = LivestockLocalizations.LIVESTOCK_INTERFACE_PREFSPANEL4 |
frame2.parent = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockWeightsPreferencesFrame) |
local frame = CreateFrame("Frame", "LivestockWeightsInterfacePanel", UIParent, "LivestockBlueFrameTemplate") |
local weightsCheck = CreateFrame("CheckButton", nil, frame2, "UICheckButtonTemplate") |
weightsCheck:SetHeight(30) |
weightsCheck:SetWidth(30) |
weightsCheck:SetPoint("TOPLEFT", 20, -30) |
local wcText = weightsCheck:CreateFontString(nil, "OVERLAY", "ChatFontNormal") |
wcText:SetPoint("LEFT", weightsCheck, "RIGHT", 20, 0) |
wcText:SetText(LivestockLocalizations.LIVESTOCK_INTERFACE_USEWEIGHTS) |
local launchButton = CreateFrame("Button", nil, frame2, "GameMenuButtonTemplate") |
launchButton:SetPoint("TOP", 0, -150) |
launchButton:SetHeight(25) |
launchButton:SetWidth(350) |
launchButton:SetText(LivestockLocalizations.LIVESTOCK_INTERFACE_LAUNCHWEIGHTS) |
launchButton:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockWeightsInterfacePanel) end) |
frame:SetHeight(500) |
frame:SetWidth(600) |
frame:SetPoint("CENTER", 100, 0) |
local fs1 = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge") |
fs1:SetPoint("TOP", 0, -30) |
fs1:SetText(LivestockLocalizations.LIVESTOCK_INTERFACE_PREFSPANEL4) |
local class = select(2, UnitClass("player")) |
local race = select(2, UnitRace("player")) |
local petprefs = CreateFrame("Frame","LivestockPetPreferencesFrame",UIParent,"LivestockBlueFrameTemplate") |
petprefs:SetHeight(450) |
petprefs:SetHeight(380) |
petprefs:SetBackdropColor(0.2, 0.2, 0.6, 1) |
LivestockPetPreferencesFrame.name = LivestockLocalizations.LIVESTOCK_INTERFACE_PREFSPANEL1 |
LivestockPetPreferencesFrame.parent = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockPetPreferencesFrame) |
local pb1 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleAutosummon", petprefs, 5, -10, "LivestockPetPreferencesFrameAutoSummonOnMoveText") |
pb1:SetScript("OnClick", Livestock.ClickedAutoSummon) |
local pb2 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleAutosummonFavorite", petprefs, 5, -28, "LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText") |
pb2:SetScript("OnClick", function() LivestockSettings.summonfaveonmove = 1 - LivestockSettings.summonfaveonmove end) |
local pb3 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameRestrictAutoSummonOnPVP", petprefs, 5, -46, "LivestockPetPreferencesFrameRestrictAutoSummonOnPVPText") |
pb3:SetScript("OnClick", function() |
LivestockSettings.restrictautosummon = 1 - LivestockSettings.restrictautosummon |
if LivestockSettings.restrictautosummon == 0 then |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstances:Disable() |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstancesText:SetTextColor(0.4, 0.4, 0.4) |
else |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstances:Enable() |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstancesText:SetTextColor(1, 1, 1) |
end |
end) |
local pb4 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameIgnorePVPRestrictionInInstances", petprefs, 15, -64, "LivestockPetPreferencesFrameIgnorePVPRestrictionInInstancesText") |
pb4:SetScript("OnClick", function() LivestockSettings.ignorepvprestrictionininstances = 1 - LivestockSettings.ignorepvprestrictionininstances end) |
local pb5 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameRestrictAutoSummonOnRaid", petprefs, 5, -82, "LivestockPetPreferencesFrameRestrictAutoSummonOnRaidText") |
pb5:SetScript("OnClick", function() LivestockSettings.donotsummoninraid = 1 - LivestockSettings.donotsummoninraid end) |
local pb6 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameDismissPetOnMount", petprefs, 5, -100, "LivestockPetPreferencesFrameDismissPetOnMountText") |
pb6:SetScript("OnClick", function() LivestockSettings.dismisspetonmount = 1 - LivestockSettings.dismisspetonmount end) |
local pb7 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleDismissOnStealth", petprefs, 5, -118, "LivestockPetPreferencesFrameAutoDismissOnStealthText") |
pb7:SetScript("OnClick", function() |
LivestockSettings.dismissonstealth = 1 - LivestockSettings.dismissonstealth |
if LivestockSettings.dismissonstealth == 1 then |
LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly:Enable() |
LivestockPetPreferencesFramePVPDismissText:SetTextColor(1, 1, 1) |
else |
LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly:Disable() |
LivestockPetPreferencesFramePVPDismissText:SetTextColor(0.4, 0.4, 0.4) |
end |
end) |
if class ~= "MAGE" and class ~= "ROGUE" and class ~= "DRUID" and class ~= "HUNTER" and race ~= "NightElf" then pb7:Disable() end |
local pb8 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly", petprefs, 10, -136, "LivestockPetPreferencesFramePVPDismissText") |
pb8:SetScript("OnClick", function() LivestockSettings.PVPdismiss = 1 - LivestockSettings.PVPdismiss end) |
local pb10 = CreateFrame("Button", "LivestockPetPreferencesFrameOpenLivestockMenuButton", petprefs, "GameMenuButtonTemplate") |
pb10:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
pb10:SetWidth(145) |
pb10:SetHeight(25) |
pb10:SetPoint("BOTTOM", 0, 15) |
pb10:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockMenuFrame) end) |
local frame = CreateFrame("Frame","LivestockZonePreferencesFrame",UIParent,"LivestockBlueFrameTemplate") |
frame:SetHeight(450) |
frame:SetHeight(380) |
frame:SetBackdropColor(0.2, 0.2, 0.6, 1) |
frame.name = LivestockLocalizations.LIVESTOCK_INTERFACE_PREFSPANEL3 |
frame.parent = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockZonePreferencesFrame) |
frame:RegisterEvent("ZONE_CHANGED") |
frame:RegisterEvent("ZONE_CHANGED_INDOORS") |
frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") |
function Livestock.UpdateZoneTexts(fromDrag) |
LivestockCurrentZoneText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTZONE, GetRealZoneText())) |
if not fromDrag then |
LivestockZonePreferencesFrameZoneBox.texture:SetTexture(nil) |
LivestockZonePreferencesFrameSubZoneBox.texture:SetTexture(nil) |
end |
if GetSubZoneText ~= "" then |
LivestockCurrentSubZoneText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONE, GetSubZoneText())) |
else |
LivestockCurrentSubZoneText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONE, GetRealZoneText())) |
end |
if LivestockSettings.Zones[GetRealZoneText()] and LivestockSettings.Zones[GetRealZoneText()].critter then |
LivestockCurrentZonePetText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTZONEPET, LivestockSettings.Zones[GetRealZoneText()].critter)) |
else |
LivestockCurrentZonePetText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTZONEPET, LivestockLocalizations.LIVESTOCK_INTERFACE_NOPETSELECTED)) |
end |
if LivestockSettings.Zones[GetRealZoneText()] and LivestockSettings.Zones[GetRealZoneText()].mount then |
LivestockCurrentZoneMountText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTZONEMOUNT, LivestockSettings.Zones[GetRealZoneText()].mount)) |
else |
LivestockCurrentZoneMountText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTZONEMOUNT, LivestockLocalizations.LIVESTOCK_INTERFACE_NOMOUNTSELECTED)) |
end |
if LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()].critter then |
LivestockCurrentSubZonePetText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONEPET, LivestockSettings.Zones[GetSubZoneText()].critter)) |
else |
LivestockCurrentSubZonePetText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONEPET, LivestockLocalizations.LIVESTOCK_INTERFACE_NOPETSELECTED)) |
end |
if LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()].mount then |
LivestockCurrentSubZoneMountText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONEPET, LivestockSettings.Zones[GetSubZoneText()].mount)) |
else |
LivestockCurrentSubZoneMountText:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_CURRENTSUBZONEMOUNT, LivestockLocalizations.LIVESTOCK_INTERFACE_NOMOUNTSELECTED)) |
end |
end |
frame:SetScript("OnShow", Livestock.UpdateZoneTexts) |
frame:SetScript("OnEvent", Livestock.UpdateZoneTexts) |
local fs1 = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge") |
fs1:SetPoint("TOP", 0, -20) |
fs1:SetText(LivestockLocalizations.LIVESTOCK_INTERFACE_ZONEFRAMEHEADER) |
local zs1 = frame:CreateFontString("LivestockCurrentZoneText", "OVERLAY", "ChatFontNormal") |
zs1:SetPoint("TOPLEFT", 25, -75) |
local zs2 = frame:CreateFontString("LivestockCurrentZoneMountText", "OVERLAY", "ChatFontNormal") |
zs2:SetPoint("TOPLEFT", 25, -95) |
local zs3 = frame:CreateFontString("LivestockCurrentZonePetText", "OVERLAY", "ChatFontNormal") |
zs3:SetPoint("TOPLEFT", 25, -115) |
local zs4 = frame:CreateFontString("LivestockCurrentSubZoneText", "OVERLAY", "ChatFontNormal") |
zs4:SetPoint("TOPLEFT", 25, -250) |
local zs5 = frame:CreateFontString("LivestockCurrentSubZoneMountText", "OVERLAY", "ChatFontNormal") |
zs5:SetPoint("TOPLEFT", 25, -270) |
local zs6 = frame:CreateFontString("LivestockCurrentSubZonePetText", "OVERLAY", "ChatFontNormal") |
zs6:SetPoint("TOPLEFT", 25, -290) |
local zb = CreateFrame("Button", "LivestockZonePreferencesFrameZoneBox", frame, "LivestockBlueFrameTemplate") |
local szb = CreateFrame("Button", "LivestockZonePreferencesFrameSubZoneBox", frame, "LivestockBlueFrameTemplate") |
local zbs = frame:CreateFontString(nil, "OVERLAY", "ChatFontSmall") |
zbs:SetPoint("TOPLEFT", zb, "TOPRIGHT", 10, 0) |
zbs:SetJustifyH("LEFT") |
zbs:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_DRAGBOXEXPL, "zone")) |
local szbs = frame:CreateFontString(nil, "OVERLAY", "ChatFontSmall") |
szbs:SetPoint("TOPLEFT", szb, "TOPRIGHT", 10, 0) |
szbs:SetJustifyH("LEFT") |
szbs:SetText(format(LivestockLocalizations.LIVESTOCK_INTERFACE_DRAGBOXEXPL, "subzone")) |
for i, button in pairs{zb, szb} do |
button:SetHeight(36) |
button:SetWidth(36) |
button:SetPoint("TOP", -150, i == 1 and -170 or -330) |
button:Show() |
button:RegisterForClicks("RightButtonUp", "LeftButtonUp") |
local t = button:CreateTexture(nil, "ARTWORK") |
button.texture = t |
t:SetAllPoints() |
button:SetScript("OnReceiveDrag", function(self) |
local kind, index, which = GetCursorInfo() |
if kind ~= "companion" then |
print(LivestockLocalizations.LIVESTOCK_INTERFACE_DRAGERROR) |
else |
ClearCursor() |
local _, name, _, texture = GetCompanionInfo(which, index) |
t:SetTexture(texture) |
which = which:lower() |
Livestock.AddToZone(i == 1 and "zone" or "subzone", name, true) |
end |
end) |
button:SetScript("OnClick", function(self, button) |
Livestock.AddToZone(i == 1 and "zone" or "subzone", "no"..(button:match("Right") and "pet" or "mount")) |
t:SetTexture(nil) |
end) |
end |
-- Main preferences panel |
local mainprefs = CreateFrame("Frame","LivestockMainPreferencesFrame",UIParent,"LivestockBlueFrameTemplate") |
mainprefs:SetHeight(450) |
mainprefs:SetHeight(380) |
mainprefs:SetBackdropColor(0.2, 0.2, 0.6, 1) |
LivestockMainPreferencesFrame.name = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockMainPreferencesFrame) |
local mb1 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowLandMounts", mainprefs, "UICheckButtonTemplate") |
mb1:SetHeight(26) |
mb1:SetWidth(26) |
mb1:SetPoint("TOPLEFT", 85, -90) |
mb1:SetScript("OnClick", function() |
LivestockSettings.showland = 1 - LivestockSettings.showland |
if LivestockSettings.showland == 0 then |
LivestockLandMountsButton:Hide() |
else |
LivestockLandMountsButton:Show() |
end |
end) |
local mb2 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowCritters", mainprefs, "UICheckButtonTemplate") |
mb2:SetHeight(26) |
mb2:SetWidth(26) |
mb2:SetPoint("TOPLEFT", 85, -55) |
mb2:SetScript("OnClick", function() |
LivestockSettings.showcritter = 1 - LivestockSettings.showcritter |
if LivestockSettings.showcritter == 0 then |
LivestockCrittersButton:Hide() |
else |
LivestockCrittersButton:Show() |
end |
end) |
local mb3 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowFlyingMounts", mainprefs, "UICheckButtonTemplate") |
mb3:SetHeight(26) |
mb3:SetWidth(26) |
mb3:SetPoint("TOPLEFT", 240, -55) |
mb3:SetScript("OnClick", function() |
LivestockSettings.showflying = 1 - LivestockSettings.showflying |
if LivestockSettings.showflying == 0 then |
LivestockFlyingMountsButton:Hide() |
else |
LivestockFlyingMountsButton:Show() |
end |
end) |
local mb4 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowSmartMounts", mainprefs, "UICheckButtonTemplate") |
mb4:SetHeight(26) |
mb4:SetWidth(26) |
mb4:SetPoint("TOPLEFT", 240, -90) |
mb4:SetScript("OnClick", function() |
LivestockSettings.showsmart = 1 - LivestockSettings.showsmart |
if LivestockSettings.showsmart == 0 then |
LivestockSmartButton:Hide() |
else |
LivestockSmartButton:Show() |
end |
end) |
--local mb5 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowSlowLandMounts", mainprefs, "UICheckButtonTemplate") |
--mb5:SetHeight(26) |
--mb5:SetWidth(26) |
--mb5:SetPoint("TOPLEFT", 15, -275) |
--mb5:SetScript("OnClick", function() |
-- LivestockSettings.useslowland = 1 - LivestockSettings.useslowland |
-- if LivestockSettings.useslowland == 0 then |
-- for k in pairs(LivestockSettings.Mounts) do |
-- if LivestockSettings.Mounts[k].type == "land" and LivestockSettings.Mounts[k].speed == "slow" then |
-- LivestockSettings.Mounts[k].show = 0 |
-- end |
-- end |
-- end |
-- Livestock.RebuildMenu("LAND") |
--end) |
--local mb6 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowSlowFlyingMounts", mainprefs, "UICheckButtonTemplate") |
--mb6:SetHeight(26) |
--mb6:SetWidth(26) |
--mb6:SetPoint("TOPLEFT", 15, -303) |
--mb6:SetScript("OnClick", function() |
-- LivestockSettings.useslowflight = 1 - LivestockSettings.useslowflight |
-- if LivestockSettings.useslowflight == 0 then |
-- for k in pairs(LivestockSettings.Mounts) do |
-- if LivestockSettings.Mounts[k].type == "flying" and LivestockSettings.Mounts[k].speed == "slow" then |
-- LivestockSettings.Mounts[k].show = 0 |
-- end |
-- end |
-- end |
-- Livestock.RebuildMenu("FLYING") |
--end) |
local mb7 = CreateFrame("Button", "LivestockCritterMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb7:SetHeight(25) |
mb7:SetWidth(115) |
mb7:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL) |
mb7:SetPoint("TOP", -133, -180) |
mb7:SetScript("OnClick", function() |
CreateMacro("Critters",1,"/run if GetMouseButtonClicked() == 'RightButton' then Livestock.DismissCritter() else Livestock.PickCritter() end",1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_CRITTERMACROCREATED) |
end) |
local mb8 = CreateFrame("Button", "LivestockLandMountMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb8:SetHeight(25) |
mb8:SetWidth(115) |
mb8:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWLANDLABEL) |
mb8:SetPoint("TOP", 0, -180) |
mb8:SetScript("OnClick", function() |
CreateMacro("LandMounts",1,"/click LivestockLandMountsButton",1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_LANDMACROCREATED) |
end) |
local mb9 = CreateFrame("Button", "LivestockFlyingMountMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb9:SetHeight(25) |
mb9:SetWidth(115) |
mb9:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL) |
mb9:SetPoint("TOP", 133, -180) |
mb9:SetScript("OnClick", function() |
CreateMacro("FlyingMounts",1,"/click LivestockFlyingMountsButton",1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_FLYINGMACROCREATED) |
end) |
local mb10 = CreateFrame("Button", "LivestockComboMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb10:SetHeight(25) |
mb10:SetWidth(115) |
mb10:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL) |
mb10:SetPoint("TOP", 0, -210) |
mb10:SetScript("OnClick", function() |
CreateMacro("ComboMounts",1,"/click LivestockComboButton",1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_SMARTMACROCREATED) |
end) |
local mb11 = CreateFrame("Button", "LivestockMainPreferencesFrameOpenLivestockMenuButton", mainprefs, "GameMenuButtonTemplate") |
mb11:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
mb11:SetWidth(145) |
mb11:SetHeight(25) |
mb11:SetPoint("BOTTOM", 0, 15) |
mb11:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockMenuFrame) end) |
local function PlaceFS(title, template, anchor, xOffset, yOffset) |
local t = mainprefs:CreateFontString(title, "OVERLAY", template) |
t:SetPoint(anchor, xOffset, yOffset) |
t:SetJustifyH("LEFT") |
end |
PlaceFS("LivestockMainPreferencesFrameButtonsToggleTitle", "GameFontNormalLarge", "TOP", 0, -25) |
PlaceFS("LivestockMainPreferencesFrameMacroTitle", "GameFontNormalLarge", "TOP", 0, -120) |
--PlaceFS("LivestockMainPreferencesFrameOtherTitle", "GameFontNormalLarge", "TOP", 0, -250) |
PlaceFS("LivestockMainPreferencesFrameMacroText", "ChatFontNormal", "TOP", 0, -150) |
--PlaceFS("LivestockMainPreferencesFrameUseSlowFlyingText", "ChatFontNormal", "TOPLEFT", 45, -315) |
--PlaceFS("LivestockMainPreferencesFrameUseSlowLandText", "ChatFontNormal", "TOPLEFT", 45, -280) |
PlaceFS("LivestockMainPreferencesFrameShowSmartMountsLabel", "ChatFontNormal", "TOPLEFT", 275, -95) |
PlaceFS("LivestockMainPreferencesFrameShowLandMountsLabel", "ChatFontNormal", "TOPLEFT", 115, -95) |
PlaceFS("LivestockMainPreferencesFrameShowFlyingMountsLabel", "ChatFontNormal", "TOPLEFT", 275, -60) |
PlaceFS("LivestockMainPreferencesFrameShowCrittersLabel", "ChatFontNormal", "TOPLEFT", 115, -60) |
local vfs = mainprefs:CreateFontString("LivestockVersionNumber", "OVERLAY", "ChatFontSmall") |
vfs:SetText(format("Version: %s", LIVESTOCK_VERSION)) |
vfs:SetPoint("BOTTOMRIGHT", -10, 10) |
local class = select(2, UnitClass("player")) |
local race = select(2, UnitRace("player")) |
local smartprefs = CreateFrame("Frame","LivestockSmartPreferencesFrame",UIParent,"LivestockBlueFrameTemplate") |
smartprefs:SetHeight(450) |
smartprefs:SetHeight(380) |
smartprefs:SetBackdropColor(0.2, 0.2, 0.6, 1) |
LivestockSmartPreferencesFrame.name = LivestockLocalizations.LIVESTOCK_INTERFACE_PREFSPANEL2 |
LivestockSmartPreferencesFrame.parent = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockSmartPreferencesFrame) |
local sb1 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleDruidLogic", smartprefs, 5, -10, "LivestockSmartPreferencesFrameDruidToggleText") |
sb1:SetScript("OnClick", function() |
LivestockSettings.druidlogic = 1 - LivestockSettings.druidlogic |
LivestockComboButton:SetAttribute("druidlogic",LivestockSettings.druidlogic) |
end) |
local sb2 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleSafeFlying", smartprefs, 5, -28, "LivestockSmartPreferencesFrameSafeFlightText") |
sb2:SetScript("OnClick", function() |
LivestockSettings.safeflying = 1 - LivestockSettings.safeflying |
LivestockComboButton:SetAttribute("safeflying", LivestockSettings.safeflying) |
LivestockComboButton:SetAttribute("state-smartmap",LivestockComboButton:GetAttribute("state-smartmap")) |
end) |
local sb3 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleMountInStealth", smartprefs, 5, -46, "LivestockSmartPreferencesFrameMountInStealthText") |
sb3:SetScript("OnClick", function() |
LivestockSettings.mountinstealth = 1 - LivestockSettings.mountinstealth |
LivestockComboButton:SetAttribute("mountinstealth", LivestockSettings.mountinstealth) |
LivestockComboButton:SetAttribute("state-smartmap",LivestockComboButton:GetAttribute("state-smartmap")) end) |
if class ~= "MAGE" and class ~= "ROGUE" and class ~= "DRUID" and race ~= "NightElf" then sb3:Disable() end |
local sb4 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleCombatForms", smartprefs, 5, -64, "LivestockSmartPreferencesFrameToggleCombatFormsText") |
sb4:SetScript("OnClick", function() |
LivestockSettings.combatforms = 1 - LivestockSettings.combatforms |
LivestockComboButton:SetAttribute("combatformstoggle",LivestockSettings.combatforms) |
end) |
local sb5 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleMovingForms", smartprefs, 5, -82, "LivestockSmartPreferencesFrameToggleMovingFormsText") |
sb5:SetScript("OnClick", function() LivestockSettings.movingform = 1 - LivestockSettings.movingform end) |
if class ~= "DRUID" and class ~= "SHAMAN" then sb5:Disable() sb4:Disable() end |
local sb6 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleSmartCatForm", smartprefs, 5, -100, "LivestockSmartPreferencesFrameSmartCatFormText") |
sb6:SetScript("OnClick", function() |
LivestockSettings.smartcatform = 1 - LivestockSettings.smartcatform |
LivestockComboButton:SetAttribute("catform",LivestockSettings.smartcatform) |
end) |
if class ~= "DRUID" then sb6:Disable() sb1:Disable() end |
local sb7 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleWaterWalking", smartprefs, 5, -118, "LivestockSmartPreferencesFrameToggleWaterWalkingText") |
sb7:SetScript("OnClick", function() |
LivestockSettings.waterwalking = 1 - LivestockSettings.waterwalking |
LivestockComboButton:SetAttribute("waterwalkingtoggle",LivestockSettings.waterwalking) |
end) |
if class ~= "SHAMAN" and class ~= "DEATHKNIGHT" and class ~= "PRIEST" then sb7:Disable() end |
local sb8 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleCrusaderMount", smartprefs, 5, -136, "LivestockSmartPreferencesFrameToggleCrusaderMountText") |
sb8:SetScript("OnClick", function() LivestockSettings.crusadermount = 1 - LivestockSettings.crusadermount end) |
if class ~= "PALADIN" then sb8:Disable() end |
local sb9 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameIndoorHunterAspects", smartprefs, 5, -154, "LivestockSmartPreferencesFrameIndoorHunterAspectsText") |
sb9:SetScript("OnClick", function() |
LivestockSettings.indooraspects = 1 - LivestockSettings.indooraspects |
LivestockComboButton:SetAttribute("indooraspects",LivestockSettings.indooraspects) |
end) |
local sb10 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameMovingHunterAspects", smartprefs, 5, -172, "LivestockSmartPreferencesFrameMovingHunterAspectsText") |
sb10:SetScript("OnClick", function() |
LivestockSettings.movingaspects = 1 - LivestockSettings.movingaspects |
end) |
if class ~= "HUNTER" then sb9:Disable() sb9.text:SetTextColor(0.4, 0.4, 0.4) sb10:Disable() sb10.text:SetTextColor(0.4, 0.4, 0.4) end |
local sb11 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameSlowFallWhileFalling", smartprefs, 5, -190, "LivestockSmartPreferencesFrameSlowFallWhileFallingText") |
sb11:SetScript("OnClick", function() |
LivestockSettings.slowfall = 1 - LivestockSettings.slowfall |
end) |
if class ~= "MAGE" and class ~= "PRIEST" then sb11:Disable() sb11.text:SetTextColor(0.4, 0.4, 0.4) end |
local sb12 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameToggleWorgenLogic", smartprefs, 5, -208, "LivestockSmartPreferencesFrameWorgenToggleText") |
sb12:SetScript("OnClick", function() |
LivestockSettings.worgenlogic = 1 - LivestockSettings.worgenlogic |
LivestockComboButton:SetAttribute("worgenlogic",LivestockSettings.worgenlogic) |
end) |
if race ~= "Worgen" then sb12:Disable() sb12.text:SetTextColor(0.4, 0.4, 0.4) end |
local sbb = CreateFrame("Button", "LivestockSmartPreferencesFrameOpenLivestockMenuButton", smartprefs, "GameMenuButtonTemplate") |
sbb:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
sbb:SetWidth(145) |
sbb:SetHeight(25) |
sbb:SetPoint("BOTTOM", 0, 15) |
sbb:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockMenuFrame) end) |
<Ui> |
<Frame name="LivestockBlueFrameTemplate" hidden="true" virtual="true" > |
<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" bgfile="Interface\Tooltips\UI-Tooltip-Background" tile="true"> |
<EdgeSize> |
<AbsValue val="15" /> |
</EdgeSize> |
<BackgroundInsets> |
<AbsInset left="2" right="2" top="2" bottom="2"/> |
</BackgroundInsets> |
</Backdrop> |
<Scripts> |
<OnLoad> |
self:SetBackdropColor(0.2, 0.2, 0.6, 1) |
</OnLoad> |
</Scripts> |
</Frame> |
<Frame name="LivestockUpdateFrame"> |
<Size x="1" y="1" /> |
<Anchors> |
<Anchor point="TOPRIGHT" /> |
</Anchors> |
<Scripts> |
<OnLoad> |
self:RegisterEvent("ADDON_LOADED") |
self:RegisterEvent("PLAYER_ENTERING_WORLD") |
</OnLoad> |
<OnEvent> |
Livestock.OnEvent(self,event,...) |
</OnEvent> |
<OnUpdate> |
Livestock.RestoreUI(self, elapsed) |
</OnUpdate> |
</Scripts> |
</Frame> |
<Frame name="LivestockMenuFrame" parent="UIParent" inherits="LivestockBlueFrameTemplate" movable="true" enableMouse="true" frameStrata="LOW" hidden="true"> |
<Size x="580" y="40" /> |
<Anchors> |
<Anchor point="CENTER"> |
<Offset x="-150" y="250" /> |
</Anchor> |
</Anchors> |
<Frames> |
<Button name="LivestockCritterMenuButton" inherits="GameMenuButtonTemplate"> |
<Size x="105" y="25"/> |
<Anchors> |
<Anchor point="LEFT" > |
<Offset x="10" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
Livestock.HeaderButtonOnClick("Critter") |
</OnClick> |
</Scripts> |
</Button> |
<Button name="LivestockLandMountMenuButton" inherits="GameMenuButtonTemplate"> |
<Size x="105" y="25"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="LivestockCritterMenuButton" relativePoint="RIGHT"> |
<Offset x="10" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
Livestock.HeaderButtonOnClick("Land") |
</OnClick> |
</Scripts> |
</Button> |
<Button name="LivestockFlyingMountMenuButton" inherits="GameMenuButtonTemplate"> |
<Size x="105" y="25"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="LivestockLandMountMenuButton" relativePoint="RIGHT"> |
<Offset x="10" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
Livestock.HeaderButtonOnClick("Flying") |
</OnClick> |
</Scripts> |
</Button> |
<Button name="LivestockWaterMountMenuButton" inherits="GameMenuButtonTemplate"> |
<Size x="105" y="25"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="LivestockFlyingMountMenuButton" relativePoint="RIGHT"> |
<Offset x="10" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
Livestock.HeaderButtonOnClick("Water") |
</OnClick> |
</Scripts> |
</Button> |
<CheckButton name="LivestockToggleModel" inherits="UICheckButtonTemplate" > |
<Size x="16" y="16" /> |
<Anchors> |
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="LivestockWaterMountMenuButton"> |
<Offset x="4" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
if LivestockModelFrame:IsVisible() then |
LivestockModelFrame:Hide() |
else |
LivestockModelFrame:Show() |
end |
</OnClick> |
</Scripts> |
</CheckButton> |
<Button name="LivestockMenuFrameClose" inherits="UIPanelCloseButton"> |
<Size x="25" y="25" /> |
<Anchors> |
<Anchor point="RIGHT"> |
<Offset x="-10" y="0" /> |
</Anchor> |
</Anchors> |
<Scripts> |
<OnClick> |
Livestock.HideDropdowns() |
self:GetParent():Hide() |
</OnClick> |
</Scripts> |
</Button> |
</Frames> |
<Layers> |
<Layer level="BACKGROUND"> |
<FontString name="$parent3DLabel" inherits="GameFontHighlightSmall" justifyH="LEFT" > |
<Anchors> |
<Anchor point="LEFT" relativePoint="RIGHT"> |
<Offset x="-100" y="2"/> |
</Anchor> |
</Anchors> |
</FontString> |
</Layer> |
</Layers> |
<Scripts> |
<OnLoad> |
self:RegisterForDrag("LeftButton","RightButton") |
self:SetBackdropColor(0.2,0.2,0.6,1) |
tinsert(UISpecialFrames,self:GetName()) |
</OnLoad> |
<OnDragStart> |
self:StartMoving() |
</OnDragStart> |
<OnDragStop> |
self:StopMovingOrSizing() |
</OnDragStop> |
</Scripts> |
</Frame> |
<Button name="LivestockCrittersButton" inherits="SecureActionButtonTemplate" movable="true" parent="UIParent" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER"> |
<Offset x="-50" y="-150"/> |
</Anchor> |
</Anchors> |
<Attributes> |
<Attribute name="type" value="macro" /> |
<Attribute name="macrotext" value="/run if GetMouseButtonClicked() == 'RightButton' then Livestock.DismissCritter() else if IsModifierKeyDown() then Livestock.SummonFavoritePet() else Livestock.PickCritter() end end" /> |
</Attributes> |
<Layers> |
<Layer level="OVERLAY" > |
<Texture name="LivestockCritterButtonTexture" file="Interface\Addons\Livestock\Textures\critter.tga"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
<Layer level="ARTWORK" > |
<Texture name="LivestockCritterButtonTextureHighlight" file="Interface\Addons\Livestock\Textures\critterhighlight.tga" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
</Layers> |
<Scripts> |
<OnLoad> |
self:RegisterForDrag("LeftButton", "RightButton") |
self:RegisterForClicks("LeftButtonUp","RightButtonUp") |
</OnLoad> |
<OnDragStart> |
if IsModifierKeyDown() then |
self:StartMoving() |
end |
</OnDragStart> |
<OnDragStop> |
self:StopMovingOrSizing() |
LivestockCritterButtonTextureHighlight:Hide() |
</OnDragStop> |
<OnMouseDown> |
LivestockCritterButtonTextureHighlight:Show() |
</OnMouseDown> |
<OnMouseUp> |
LivestockCritterButtonTextureHighlight:Hide() |
</OnMouseUp> |
</Scripts> |
</Button> |
<Button name="LivestockSmartButton" inherits="SecureActionButtonTemplate" movable="true" parent="UIParent" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER"> |
<Offset x="0" y="-190"/> |
</Anchor> |
</Anchors> |
<Attributes> |
<Attribute name="type" value="macro" /> |
<Attribute name="macrotext" value="/click LivestockComboButton" /> |
</Attributes> |
<Layers> |
<Layer level="OVERLAY" > |
<Texture name="LivestockSmartButtonTexture" file="Interface\Addons\Livestock\Textures\smart.tga"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
<Layer level="ARTWORK" > |
<Texture name="LivestockSmartButtonTextureHighlight" file="Interface\Addons\Livestock\Textures\smarthighlight.tga" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
</Layers> |
<Scripts> |
<OnLoad> |
self:RegisterForDrag("LeftButton","RightButton") |
self:RegisterForClicks("LeftButtonUp") |
</OnLoad> |
<OnDragStart> |
if IsModifierKeyDown() then |
self:StartMoving() |
end |
</OnDragStart> |
<OnDragStop> |
self:StopMovingOrSizing() |
LivestockSmartButtonTextureHighlight:Hide() |
</OnDragStop> |
<OnMouseDown> |
LivestockSmartButtonTextureHighlight:Show() |
</OnMouseDown> |
<OnMouseUp> |
LivestockSmartButtonTextureHighlight:Hide() |
</OnMouseUp> |
</Scripts> |
</Button> |
<Button name="LivestockLandMountsButton" inherits="SecureActionButtonTemplate" movable="true" parent="UIParent" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" > |
<Offset x="0" y="-150" /> |
</Anchor> |
</Anchors> |
<Layers> |
<Layer level="ARTWORK" > |
<Texture name="$parentTextureHighlight" file="Interface\Addons\Livestock\Textures\landhighlight.tga" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
<Layer level="OVERLAY" > |
<Texture name="$Texture" file="Interface\Minimap\Tracking\StableMaster"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
</Layers> |
<Scripts> |
<OnLoad> |
self:RegisterForDrag("LeftButton","RightButton") |
self:RegisterForClicks("LeftButtonUp") |
</OnLoad> |
<OnDragStart> |
if IsModifierKeyDown() then |
self:StartMoving() |
end |
</OnDragStart> |
<OnDragStop> |
self:StopMovingOrSizing() |
LivestockLandMountsButtonTextureHighlight:Hide() |
</OnDragStop> |
<OnMouseDown> |
LivestockLandMountsButtonTextureHighlight:Show() |
</OnMouseDown> |
<OnMouseUp> |
LivestockLandMountsButtonTextureHighlight:Hide() |
</OnMouseUp> |
<PreClick> |
Livestock.NonSmartPreClick(self) |
</PreClick> |
<PostClick> |
Livestock.NonSmartPostClick(self) |
</PostClick> |
</Scripts> |
</Button> |
<Button name="LivestockFlyingMountsButton" inherits="SecureActionButtonTemplate" movable="true" parent="UIParent" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER"> |
<Offset x="50" y="-150"/> |
</Anchor> |
</Anchors> |
<Layers> |
<Layer level="ARTWORK" > |
<Texture name="$parentTextureHighlight" file="Interface\Addons\Livestock\Textures\flyinghighlight.tga" hidden="true"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
<Layer level="OVERLAY" > |
<Texture name="$Texture" file="Interface\Minimap\Tracking\FlightMaster"> |
<Size x="36" y="36" /> |
<Anchors> |
<Anchor point="CENTER" /> |
</Anchors> |
</Texture> |
</Layer> |
</Layers> |
<Scripts> |
<OnLoad> |
self:RegisterForDrag("LeftButton","RightButton") |
self:RegisterForClicks("LeftButtonUp") |
</OnLoad> |
<OnDragStart> |
if IsModifierKeyDown() then |
self:StartMoving() |
end |
</OnDragStart> |
<OnDragStop> |
self:StopMovingOrSizing() |
LivestockFlyingMountsButtonTextureHighlight:Hide() |
</OnDragStop> |
<OnMouseDown> |
LivestockFlyingMountsButtonTextureHighlight:Show() |
</OnMouseDown> |
<OnMouseUp> |
LivestockFlyingMountsButtonTextureHighlight:Hide() |
</OnMouseUp> |
<PreClick> |
Livestock.NonSmartPreClick(self) |
</PreClick> |
<PostClick> |
Livestock.NonSmartPostClick(self) |
</PostClick> |
</Scripts> |
</Button> |
<Button name="LivestockComboButton" inherits="SecureActionButtonTemplate" parent="UIParent" hidden="true" > |
<Scripts> |
<PreClick> |
Livestock.SmartPreClick(self) |
</PreClick> |
<PostClick> |
Livestock.SmartPostClick(self) |
</PostClick> |
</Scripts> |
</Button> |
<Button name="LivestockMenuButtonTemplate" virtual="true"> |
<Layers> |
<Layer level="OVERLAY"> |
<FontString name="$parentText" inherits="GameFontHighlightSmall" justifyH="LEFT" /> |
</Layer> |
</Layers> |
<Scripts> |
<OnEnter> |
Livestock.MenuButtonOnEnter(self) |
</OnEnter> |
<OnClick> |
Livestock.MenuButtonOnClick(self, button) |
</OnClick> |
<OnDoubleClick> |
Livestock.MenuButtonOnDoubleClick(self) |
</OnDoubleClick> |
<OnLoad> |
self:RegisterForClicks("LeftButtonUp","RightButtonUp") |
</OnLoad> |
</Scripts> |
</Button> |
<Frame name="LivestockModelFrame" parent="LivestockMenuFrame" inherits="LivestockBlueFrameTemplate" hidden="true"> |
<Size x="275" y="190" /> |
<Anchors> |
<Anchor point="TOPRIGHT" relativePoint="TOPLEFT" > |
<Offset x="-5" y="0" /> |
</Anchor> |
</Anchors> |
<Layers> |
<Layer level="OVERLAY" > |
<FontString name="LivestockEasterEgg" inherits="GameFontNormal"> |
<Color r="0.4" g="1.0" b="0.4" /> |
<Anchors> |
<Anchor point="BOTTOM" > |
<Offset x="0" y="15" /> |
</Anchor> |
</Anchors> |
</FontString> |
</Layer> |
</Layers> |
<Frames> |
<PlayerModel name="LivestockModel" > |
<Size x="225" y="150" /> |
<Anchors> |
<Anchor point="TOP" /> |
</Anchors> |
<Scripts> |
<OnUpdate> |
Livestock.SpinModel(self, elapsed) |
</OnUpdate> |
</Scripts> |
</PlayerModel> |
<Slider name="LivestockSpinSlider" orientation="HORIZONTAL"> |
<Size x="450" y="25" /> |
<Anchors> |
<Anchor point="BOTTOMLEFT" > |
<Offset x="0" y="5" /> |
</Anchor> |
</Anchors> |
<ThumbTexture file="Interface\Buttons\UI-SliderBar-Button-Horizontal" /> |
<Scripts> |
<OnLoad> |
self:SetMinMaxValues(0, 1) |
self:SetValueStep(0.001) |
self:SetValue(0) |
</OnLoad> |
<OnValueChanged> |
Livestock.SpinSliderChanged(self) |
</OnValueChanged> |
</Scripts> |
</Slider> |
</Frames> |
<Scripts> |
<OnLoad> |
self:SetBackdropColor(0.2, 0.2, 0.6, 1) |
</OnLoad> |
</Scripts> |
</Frame> |
</Ui> |
-- Livestock: For summoning random mounts, flying mounts, and critters. |
-- Concept: Khanthal (Uldum) |
-- Copyright (c) 2008 Scott Snowman (Recompense on Uldum(US)), scott.snowman@gmail.com |
-- All rights reserved. |
-- Namespace and saved variable tables |
Livestock = {} |
LivestockSettings = {} |
-- Saved variable default values and version string. |
local defaults = { |
Critters = {}, |
Mounts = {}, |
Zones = {}, |
Weights = {}, |
showcritter = 0, -- show or hide the Vanity Pets button |
showland = 0, -- show or hide the Land Mounts button |
showflying = 0, -- show or hide the Flying Mounts button |
showsmart = 0, -- show or hide the Smart Mounts button |
-- useslowland = 1, -- enable / disable seeing non-epic land mounts in the land mount menu |
-- useslowflight = 1, -- enable / disable seeing non-epic flying mounts in the flying mount menu |
scale = 1, -- scale of the Livestock buttons |
druidlogic = 0, -- enable / disable including Flight Forms in Smart Mount behavior (for druids only) |
worgenlogic = 0, -- enable / disable including Running Wild in Smart Mount behavior (worgens only) |
summononmove = 0, -- enable / disable automatic summoning whenever movement is initiated |
summonfaveonmove = 0, -- change the above setting to summon the favorite pet instead of a random pet |
dismisspetonmount = 0, -- dismiss any critter out when mounting or birdforming |
restrictautosummon = 0, -- restrict autosummoning to only occur when not PVP flagged |
ignorepvprestrictionininstances = 0, -- ignore the PVP restriction in an instance |
safeflying = 1, -- enable /disable the ability to dismount yourself in the air when calling a Livestock mounting function |
dismissonstealth = 0, -- enable / disable the automatic dismissal of vanity pets when you cast Stealth, Vanish, Feign Death, Shadowmeld, or Invisibility |
PVPdismiss = 0, -- restrict the above setting to work only when your PVP flag is enabled |
mountinstealth = 0, -- enable / disable the ability for Livestock mounting to break stealth effects |
smartcatform = 0, -- enable / disable turning into Cat Form indoors when using Smart Mounting (for druids only) |
favoritepet = 0, -- index for a user-defined favorite pet |
waterwalking = 0, -- for shamans to use Water Walking when underwater or not |
combatforms = 1, -- whether or not combat should switch Smart Mounting for shamans / druids |
crusadermount = 0, -- for paladins, toggles if Crusader Aura should trigger a Smart Mount Summon afterward |
donotsummoninraid = 0, -- do not automatically summon a pet if you are in a raid |
movingform = 0, -- check for movement to assume an instant-cast travel form |
indooraspects = 0, -- Smart Mounting casts AotC / AotP when inside |
movingaspects = 0, -- Smart Mounting casts AotC / AotP when outside and moving |
slowfall = 0, -- Smart Mounting casts Slow Fall / Levitate while falling and not in combat |
useweights = 0, -- Whether or not Smart Mounting should use weighted summons |
} |
LIVESTOCK_VERSION = GetAddOnMetadata("Livestock", "Version"); |
-- Localization tables |
local L = LivestockLocalizations |
local stringstable = { -- strings to be localized in the GUI. This table is indexed by the name of the fontstring with each value being the string that should be displayed. This allows for a quick iteration to set the strings correctly. |
["LivestockMenuFrame3DLabel"] = L.LIVESTOCK_FONTSTRING_3DLABEL, |
["LivestockMainPreferencesFrameButtonsToggleTitle"] = L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE, |
["LivestockMainPreferencesFrameMacroTitle"] = L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE, |
--["LivestockMainPreferencesFrameOtherTitle"] = L.LIVESTOCK_FONTSTRING_OTHERTITLE, |
["LivestockMainPreferencesFrameShowCrittersLabel"] = L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL, |
["LivestockMainPreferencesFrameShowLandMountsLabel"] = L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL, |
["LivestockMainPreferencesFrameShowFlyingMountsLabel"] = L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL, |
["LivestockMainPreferencesFrameShowSmartMountsLabel"] = L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL, |
["LivestockMainPreferencesFrameMacroText"] = L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE, |
--["LivestockMainPreferencesFrameUseSlowLandText"] = L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL, |
--["LivestockMainPreferencesFrameUseSlowFlyingText"] = L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL, |
["LivestockMainPreferencesFrameOpenLivestockMenuButton"] = L.LIVESTOCK_FONTSTRING_LIVESTOCKMENU, |
["LivestockPetPreferencesFrameAutoSummonOnMoveText"] = L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL, |
["LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText"] = L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL, |
["LivestockPetPreferencesFrameRestrictAutoSummonOnPVPText"] = L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL, |
["LivestockPetPreferencesFrameIgnorePVPRestrictionInInstancesText"] = L.LIVESTOCK_FONTSTRING_IGNOREPVPRESTRICTIONININSTANCESLABEL, |
["LivestockPetPreferencesFrameRestrictAutoSummonOnRaidText"] = L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL, |
["LivestockPetPreferencesFrameDismissPetOnMountText"] = L.LIVESTOCK_FONTSTRING_DISMISSPETONMOUNTLABEL, |
["LivestockSmartPreferencesFrameDruidToggleText"] = L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL, |
["LivestockSmartPreferencesFrameWorgenToggleText"] = L.LIVESTOCK_FONTSTRING_WORGENTOGGLELABEL, |
["LivestockSmartPreferencesFrameOpenLivestockMenuButton"] = L.LIVESTOCK_FONTSTRING_LIVESTOCKMENU, |
["LivestockCritterMenuButton"] = L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL, |
["LivestockLandMountMenuButton"] = L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL, |
["LivestockFlyingMountMenuButton"] = L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL, |
["LivestockWaterMountMenuButton"] = L.LIVESTOCK_FONTSTRING_SHOWWATERLABEL, |
["LivestockCritterMacroButton"] = L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL, |
["LivestockLandMountMacroButton"] = L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL, |
["LivestockFlyingMountMacroButton"] = L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL, |
["LivestockComboMacroButton"] = L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL, |
["LivestockSmartPreferencesFrameSafeFlightText"] = L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL, |
["LivestockPetPreferencesFrameAutoDismissOnStealthText"] = L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL, |
["LivestockPetPreferencesFramePVPDismissText"] = L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL, |
["LivestockSmartPreferencesFrameMountInStealthText"] = L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL, |
["LivestockSmartPreferencesFrameSmartCatFormText"] = L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL, |
["LivestockSmartPreferencesFrameToggleWaterWalkingText"] = L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL, |
["LivestockSmartPreferencesFrameToggleCombatFormsText"] = L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL, |
["LivestockSmartPreferencesFrameToggleMovingFormsText"] = L.LIVESTOCK_FONTSTRING_USEMOVINGFORMSLABEL, |
["LivestockSmartPreferencesFrameToggleCrusaderMountText"] = L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL, |
["LivestockSmartPreferencesFrameIndoorHunterAspectsText"] = L.LIVESTOCK_FONTSTRING_INDOORHUNTERASPECTSLABEL, |
["LivestockSmartPreferencesFrameMovingHunterAspectsText"] = L.LIVESTOCK_FONTSTRING_MOVINGHUNTERASPECTSLABEL, |
["LivestockSmartPreferencesFrameSlowFallWhileFallingText"] = L.LIVESTOCK_FONTSTRING_SLOWFALLLABEL, |
} |
local restrictSummonForTheseBuffs = { -- buffs that, when present, should prevent autosummoning from happening |
L.LIVESTOCK_SPELL_STEALTH, |
L.LIVESTOCK_SPELL_PROWL, |
L.LIVESTOCK_SPELL_INVISIBILITY, |
L.LIVESTOCK_SPELL_VANISH, |
L.LIVESTOCK_SPELL_CLOAKING, |
L.LIVESTOCK_SPELL_SHADOWMELD, |
L.LIVESTOCK_SPELL_FOOD, |
L.LIVESTOCK_SPELL_DRINK, |
L.LIVESTOCK_SPELL_HAUNTED, |
L.LIVESTOCK_SPELL_FLIGHTFORM, |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM, |
L.LIVESTOCK_SPELL_TWILIGHTSERPENT, |
L.LIVESTOCK_SPELL_RUBYHARE, |
L.LIVESTOCK_SPELL_SAPPHIREOWL, |
} |
local restrictSummonForThisEquipment = { -- equipment that, when worn, should prevent autosummoning from happening |
L.LIVESTOCK_EQUIPMENT_BLOODSAIL, |
L.LIVESTOCK_EQUIPMENT_DONCARLOS, |
} |
local hiddenBuffs = { -- buffs that indicate the player is invisible in some way |
L.LIVESTOCK_SPELL_STEALTH, |
L.LIVESTOCK_SPELL_PROWL, |
L.LIVESTOCK_SPELL_INVISIBILITY, |
L.LIVESTOCK_SPELL_VANISH, |
L.LIVESTOCK_SPELL_CLOAKING, |
L.LIVESTOCK_SPELL_SHADOWMELD, |
} |
-- Variable declaration |
BINDING_HEADER_LIVESTOCKHEADER = "Livestock Summons" -- Keybindings menu |
_G["BINDING_NAME_CLICK LivestockComboButton:LeftButton"] = "Random Smart Mount" -- Keybindings |
_G["BINDING_NAME_CLICK LivestockLandMountsButton:LeftButton"] = "Random Land Mount" |
_G["BINDING_NAME_CLICK LivestockFlyingMountsButton:LeftButton"] = "Random Flying Mount" |
local eastereggtext, currentcritter, createdMaps |
local donotsummon = true |
local debug = false |
local modelcounter, class = 0 |
local NUMBER_OF_CRITTER_MENUS, NUMBER_OF_LAND_MENUS, NUMBER_OF_FLYING_MENUS, NUMBER_OF_WATER_MENUS = 1, 1, 1, 1 -- constants for menu appearance and building |
local crittersText, landText, flyingText, waterText, mountstable, temp = {}, {}, {}, {}, {}, {} -- tables that will be reused |
local buildtable = { -- this table contains information that we will use for building and rebuilding menus as well as hiding menus |
["CRITTER"] = {token = "Critter", text = crittersText, settings = LivestockSettings.Critters}, |
["LAND"] = {token = "Land", text = landText, settings = LivestockSettings.Mounts}, |
["FLYING"] = { token = "Flying", text = flyingText, settings = LivestockSettings.Mounts}, |
["WATER"] = { token = "Water", text = waterText, settings = LivestockSettings.Mounts}, |
} |
local sayings = { |
"Please... no more...", |
"Can I get a new master?", |
"Why did I sign up for this gig?", |
"*HRRRRKKK*", |
"Only you can prevent animal vomit!", |
"We are not amused.", |
"Great job, spin doctor.", |
"You spin me right round,\nbaby right round...", |
"PLEASE put the button back in the box!!", |
"So... dizzy...", |
"You expecting me to\ntake off or something?", |
"Animal cruelty detected.\nContacting PETA... please hold.", |
"Does your mother know you treat\nanimals like this?", |
"Don't you have quests\nto do or something?", |
"I think you're a bit confused. He said\n'spell rotation' NOT 'pet rotation!'", |
"Stop this thing, I want a refund!", |
"When I can see straight again, I'm\nreporting you for being mean.", |
"OK, OK! I'm sorry I\npeed in your backpack!", |
} |
CreateFrame("GameTooltip","LivestockTooltip",UIParent,"GameTooltipTemplate") -- Build our own tooltip to use for scanning. |
--Event handlers: |
function Livestock.OnEvent(self, event, arg1) |
if event == "ADDON_LOADED" and arg1 == "Livestock" then |
for k, v in pairs(defaults) do |
if not LivestockSettings[k] then |
LivestockSettings[k] = v |
end |
end |
for k, v in pairs(LivestockSettings) do |
if not defaults[k] then |
LivestockSettings[k] = nil |
end |
end-- syncs the saved variables to match the structure of the defaults. Keys in the defaults not in the SV will be added from the defaults. Keys in the SV not in the defaults will be set to nil. |
currentcritter = 1 |
hooksecurefunc("MoveForwardStart", Livestock.MoveSummon) -- hooking forward movement to summon a critter if the player has selected the correct option. |
hooksecurefunc("MoveBackwardStart", Livestock.MoveSummon) -- backward movement |
hooksecurefunc("TurnLeftStart", Livestock.MoveSummon) -- turning left |
hooksecurefunc("TurnRightStart", Livestock.MoveSummon) -- turning right |
hooksecurefunc("ToggleAutoRun", Livestock.MoveSummon) -- auto-run |
hooksecurefunc("TurnOrActionStart", Livestock.MoveSummon) -- right-click |
hooksecurefunc("CameraOrSelectOrMoveStart", Livestock.MoveSummon) -- left-click |
elseif event == "PLAYER_ENTERING_WORLD" then |
if not createdMaps then |
Livestock.CreateStateMaps(LivestockComboButton) |
createdMaps = true |
end |
end |
end |
function Livestock.CompanionEvent(self, event, ...) |
--print(format("DEBUG: '%s'", event)) |
if event == "PLAYER_LOGIN" then -- when the player logs in, make sure the map is set right for Smart Detection and sort out the companions |
if GetNumCompanions("CRITTER") == 0 then |
donotsummon = true |
end |
SetMapToCurrentZone() |
self:RegisterEvent("COMPANION_UPDATE") |
class = select(2, UnitClass("player")) |
return |
elseif event == "COMPANION_UPDATE" then |
mountfail = false |
critterfail = false |
Livestock.RenumberCompanions() |
if (not mountfail and not critterfail) then |
self:UnregisterEvent("COMPANION_UPDATE") |
end |
return |
elseif event == "COMPANION_LEARNED" then -- when a new companion is learned, sort out the companions again and then rebuild the three menus |
Livestock.RenumberCompanions() |
Livestock.RebuildMenu("CRITTER") |
Livestock.RebuildMenu("LAND") |
Livestock.RebuildMenu("FLYING") |
Livestock.RebuildMenu("WATER") |
return |
elseif event == "UNIT_SPELLCAST_SUCCEEDED" then |
local unit, spell, rank = ... |
if unit == "player" then |
if spell == L.LIVESTOCK_SPELL_STEALTH or spell == L.LIVESTOCK_SPELL_PROWL or spell == L.LIVESTOCK_SPELL_FEIGNDEATH or spell == L.LIVESTOCK_SPELL_INVISIBILITY or spell == L.LIVESTOCK_SPELL_VANISH or spell == L.LIVESTOCK_SPELL_SHADOWMELD then |
if LivestockSettings.dismissonstealth == 1 then |
if LivestockSettings.PVPdismiss == 0 then |
DismissCompanion("CRITTER") |
elseif UnitIsPVP("player") then |
DismissCompanion("CRITTER") |
end |
end |
elseif spell == L.LIVESTOCK_SPELL_CRUSADERAURA and LivestockSettings.crusadermount == 1 and not IsMounted() then |
if Livestock.LandOrFlying() == "FLYING" then |
Livestock.PickFlyingMount() |
else |
Livestock.PickLandMount() |
end |
elseif (spell == L.LIVESTOCK_SPELL_FLIGHTFORM or spell == L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) and LivestockSettings.dismisspetonmount == 1 then |
DismissCompanion("CRITTER") |
end |
end |
return |
elseif event == "UNIT_SPELLCAST_SENT" then |
local unit, spell = ... |
if unit == "player" then |
if spell == "Living Flare" then |
donotsummon = true |
end |
end |
return |
elseif event == "UI_INFO_MESSAGE" then |
if ... == "Legion Gateway Destroyed (Complete)" then |
donotsummon = nil |
end |
return |
elseif event == "UNIT_ENTERED_VEHICLE" then |
local arg1 = ... |
if arg1 == "player" and LivestockSettings.dismisspetonmount == 1 then |
DismissCompanion("CRITTER") |
end |
end |
end |
-- Menu creation: |
function Livestock.BuildMenu(kind) -- type is a string, either "CRITTER", "LAND", "FLYING", or "WATER" |
local token, texttable = buildtable[kind].token, buildtable[kind].text -- buildtable contains references and variables that are specific to each type of menu, indexed by the same string as the variable type |
local settings, mounts, MENUS = LivestockSettings.Mounts |
Livestock.RecycleTable(mountstable) |
Livestock.RecycleTable(texttable) |
if kind == "CRITTER" then |
settings = LivestockSettings.Critters |
NUMBER_OF_CRITTER_MENUS = math.ceil( GetNumCompanions(kind) / 30 ) -- break the number of critters into groups of 30 |
MENUS = NUMBER_OF_CRITTER_MENUS -- make the local MENUS equal to the constant |
elseif kind == "LAND" then |
mounts = 0 -- reset mounts to 0 so we can start counting land mounts |
for k in pairs(settings) do -- Check the list of mounts, pull out fast land mounts (or slow ones if the filter lets them through), increment mounts, and add the index of the mounts to mountstable |
if (settings[k].type == "land" or settings[k].type == "variable") then |
mounts = mounts + 1 |
tinsert(mountstable, settings[k].index) |
end |
table.sort(mountstable) -- the table indices are all jumbled because of the iteration over the settings table, so this puts them in numerical order (guaranteeing the menu is in alphabetical order) |
end |
NUMBER_OF_LAND_MENUS = math.ceil( mounts / 30 ) -- break land mounts into groups of 30 |
MENUS = NUMBER_OF_LAND_MENUS -- same as above |
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 pairs(settings) do |
if (settings[k].type == "flying" or settings[k].type == "variable") then |
mounts = mounts + 1 |
tinsert(mountstable, settings[k].index) |
end |
table.sort(mountstable) |
end |
NUMBER_OF_FLYING_MENUS = math.ceil( mounts / 30) |
MENUS = NUMBER_OF_FLYING_MENUS -- same as above |
elseif kind == "WATER" then -- code is the same for water mounts with the appropriate changes; perhaps this could be a function call? |
mounts = 0 |
for k in pairs(settings) do |
if (settings[k].type == "water") then |
mounts = mounts + 1 |
tinsert(mountstable, settings[k].index) |
end |
table.sort(mountstable) |
end |
NUMBER_OF_WATER_MENUS = math.ceil( mounts / 30) |
MENUS = NUMBER_OF_WATER_MENUS -- same as above |
end |
for currentMenu = 1, MENUS do -- iterate over however many menus we're going to need |
local menuframe = _G["Livestock"..token.."Menu"..currentMenu] or CreateFrame("Frame","Livestock"..token.."Menu"..currentMenu, LivestockMenuFrame, "LivestockBlueFrameTemplate") -- make the background of the menu (or reference it if it already exists), naming it with the proper token and number |
menuframe:SetID(currentMenu) -- associate the number of the menu with the frame in a way that's unrelated to the name |
if currentMenu == 1 then -- if this is the first menu in a group, we need to parent it to the button that called it |
local header |
if kind == "CRITTER" then |
header = "LivestockCritterMenuButton" |
elseif kind == "LAND" then |
header = "LivestockLandMountMenuButton" |
elseif kind == "FLYING" then |
header = "LivestockFlyingMountMenuButton" |
elseif kind == "WATER" then |
header = "LivestockWaterMountMenuButton" |
end |
menuframe:SetPoint("TOPLEFT", header ,"BOTTOMLEFT",0,-10) -- set the first menu to appear below the associated button |
else |
local lastmenu = "Livestock"..token.."Menu"..(currentMenu-1) |
menuframe:SetPoint("TOPLEFT",lastmenu,"TOPRIGHT",3,0) -- set other menus to appear to the right of the previous menu |
end |
if currentMenu == 1 and MENUS > 1 then -- if there's more than 1 menu and this is the first menu, we'll have 30 animals, 1 "More", and Check / Uncheck All for 33 blocks total - about 615 high |
menuframe:SetHeight(615) |
elseif currentMenu ~= MENUS then -- the middle menus need 31 blocks total. about 580 high (30 animals, 1 More) |
menuframe:SetHeight(580) |
elseif MENUS > 1 then -- the last menu , which doesn't have check / uncheck all, depends on the number of companions. If it's a multiple of 30, we need 30 buttons. If not, it depends on how many there are |
if (mounts or GetNumCompanions("CRITTER")) % 30 ~= 0 then |
menuframe:SetHeight( ( (mounts or GetNumCompanions("CRITTER")) % 30 * 18 ) + 21 ) |
else |
menuframe:SetHeight(561) |
end |
else -- there's only one menu, so no "More", but check and uncheck are needed |
menuframe:SetHeight( ( ( (mounts or GetNumCompanions("CRITTER")) + 2) * 18) + 21) |
end |
local endButton -- this is the number of buttons in the menu... |
if currentMenu ~= MENUS then |
endButton = 30 -- 30 if it's not the last menu |
elseif MENUS > 1 then |
if (mounts or GetNumCompanions("CRITTER")) % 30 ~= 0 then |
endButton = (mounts or GetNumCompanions("CRITTER")) % 30 -- last menu will be the remainder from the other groups of 30 if its not a multiple of 30 |
else |
endButton = 30 -- if it is a multiple of 30, then there will be 30 buttons in the last menu |
end |
elseif MENUS == 1 then |
endButton = (mounts or GetNumCompanions("CRITTER")) -- if there's only one menu, it has the number of mounts or critters in it |
end |
local maxWidth = 100 -- default width of the buttons |
for button = 1, endButton do -- iterate over the buttons we need |
local menubutton = _G["Livestock"..token.."Menu"..currentMenu.."Button"..button] or CreateFrame("Button", "Livestock"..token.."Menu"..currentMenu.."Button"..button, menuframe, "LivestockMenuButtonTemplate") -- create or reference the button, with the appropriate name and number |
menubutton:Show() |
local text = _G["Livestock"..token.."Menu"..currentMenu.."Button"..button.."Text"] -- reference the text of the button |
local id, name |
if kind == "CRITTER" then |
id, name = GetCompanionInfo("CRITTER", (currentMenu - 1) * 30 + button ) |
elseif kind == "LAND" or kind == "FLYING" or kind == "WATER" then |
id, name = GetCompanionInfo("MOUNT", mountstable[(currentMenu - 1) * 30 + button] ) |
end -- get the ID and name of the companion for the button by mapping the position of the button in the menus(s) to the index of the companion |
menubutton.critterID = id |
menubutton.which = "toggle"..kind |
menubutton.name = name -- associate the info for the companion with the frame itself to be used for mousing over / clicking |
text:SetText( name ) |
tinsert(texttable, text) -- set the text of the button to reflect the name of the companion, and store the fontstring itself in a table of fontstrings |
if name and settings[name].show == 1 then -- if the name isn't nil (Blizzard bug sometimes returns nil for companion names >:o) and the settings say this companion is selected then |
text:SetTextColor(1, 1, 1) -- set the color of the text to be white |
elseif name then |
text:SetTextColor(0.4, 0.4, 0.4) -- otherwise set the color to be grey |
elseif not name then -- debug message if the name is nil |
--[[local which, index |
if mounts then |
which = "MOUNT" |
index = mountstable[(currentMenu - 1) * 30 + button] |
else |
which = "CRITTER" |
index = (currentMenu - 1 ) * 30 + button |
end |
local creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo(which, index) |
DEFAULT_CHAT_FRAME:AddMessage("Max "..which.." is " .. (GetNumCompanions(which) or "nil")) |
DEFAULT_CHAT_FRAME:AddMessage(string.format("Error for "..which.." %u at menu build, ID: %s, name: %s, spellID: %s, icon: %s, summoned: %s", index, (creatureID or "nil"), (creatureName or "nil"),(creatureSpellID or "nil"), (icon or "nil"), (issummoned or "nil")))]] |
end |
menubutton:SetHeight(18) -- give the button a height |
if button == 1 then -- parent it to the menu's TOPLEFT corner if it's the first button, else underneath the previous button |
menubutton:SetPoint("TOPLEFT", menuframe, "TOPLEFT", 20, -10) |
else |
menubutton:SetPoint("TOPLEFT", _G[menuframe:GetName().."Button"..(button - 1)], "BOTTOMLEFT") |
end |
if button == endButton then -- set all the buttons to have the same width as the widest button. Do this by iterating over the buttons, getting the width of their text, and then setting the buttons' width to be the width of the text plus a cushion of 50 |
for i = 1, endButton do |
local textwidth = _G["Livestock"..token.."Menu"..currentMenu.."Button"..i.."Text"]:GetWidth() |
if textwidth > maxWidth then |
maxWidth = textwidth + 50 |
end |
end |
for i = 1, endButton do |
_G["Livestock"..token.."Menu"..currentMenu.."Button"..i]:SetWidth(maxWidth) |
end |
end |
menuframe:SetWidth(maxWidth + 30) -- bump up the size of the menu frame background to compensate and make sure the border and background look nice |
end |
if currentMenu ~= MENUS then -- if we're not at the last menu, we need a "More" button |
local moreframe = _G["Livestock"..token.."Menu"..currentMenu.."MoreButton"] or CreateFrame("Button", "Livestock"..token.."Menu"..currentMenu.."MoreButton", _G["Livestock"..token.."Menu"..currentMenu], "LivestockMenuButtonTemplate") -- reference or create the button |
moreframe:SetHeight(18) |
moreframe:SetWidth(maxWidth) -- height and width match those of the other buttons |
local t = _G[moreframe:GetName().."Text"] |
t:SetText(L.LIVESTOCK_MENU_MORE) |
moreframe:SetPoint("TOPLEFT", "Livestock"..token.."Menu"..currentMenu.."Button"..endButton, "BOTTOMLEFT") -- stick it underneath the last button in the menu |
moreframe.which = "more"..kind -- associate a string with the frame to use for mouseover |
end |
if currentMenu == 1 then -- the first menu needs "Select all / none" buttons |
local check = _G["Livestock"..token.."MenuCheckButton"] or CreateFrame("Button", "Livestock"..token.."MenuCheckButton", _G["Livestock"..token.."Menu1"], "LivestockMenuButtonTemplate") |
check.which = "check"..kind |
local uncheck = _G["Livestock"..token.."MenuUncheckButton"] or CreateFrame("Button", "Livestock"..token.."MenuUncheckButton", _G["Livestock"..token.."Menu1"], "LivestockMenuButtonTemplate") |
uncheck.which = "uncheck"..kind |
check:SetHeight(18) |
check:SetWidth(maxWidth) |
uncheck:SetHeight(18) |
uncheck:SetWidth(maxWidth) -- reference them or make them, show them, set their heights and widths, associate info with the frame, etc. |
_G[check:GetName().."Text"]:SetText(L.LIVESTOCK_MENU_SELECTALL) |
_G[check:GetName().."Text"]:SetTextColor(1, 1, 0) |
_G[uncheck:GetName().."Text"]:SetText(L.LIVESTOCK_MENU_SELECTNONE) |
_G[uncheck:GetName().."Text"]:SetTextColor(1, 1, 0) -- set their text and color (yellow to stand out) |
if _G["Livestock"..token.."Menu1MoreButton"] then -- if the first menu has a More button, stick the Check All button under the More button. Otherwise, stick it under the last menu button. |
check:SetPoint("TOPLEFT", _G["Livestock"..token.."Menu1MoreButton"], "BOTTOMLEFT") |
else |
check:SetPoint("TOPLEFT", _G["Livestock"..token.."Menu1Button"..endButton], "BOTTOMLEFT") |
end |
uncheck:SetPoint("TOPLEFT", check, "BOTTOMLEFT") -- stick the Uncheck All button under the Check All button... and we're done! |
end |
end |
end |
function Livestock.BuildMenus() -- call the build menu function on all three menus to initialize them |
Livestock.BuildMenu("CRITTER") |
Livestock.BuildMenu("LAND") |
Livestock.BuildMenu("FLYING") |
Livestock.BuildMenu("WATER") |
end |
function Livestock.RebuildMenu(kind) -- the menus change when you learn new companions, so we need to rebuild them occasionally. kind is a string as before, either "CRITTER", "LAND", "FLYING", or "WATER" |
for i = 1, 8 do -- iterate over 8 menus, which is definitely more than we need right now |
for j = 1, 30 do -- it's easiest just to assume 30 animals in each menu and break when there aren't than to see how many animals there actually are |
if _G["Livestock"..buildtable[kind].token.."Menu"..i.."Button"..j] then -- if the button exists, then hide it |
_G["Livestock"..buildtable[kind].token.."Menu"..i.."Button"..j]:Hide() |
else -- if it doesn't exist, we are out of animals and should stop looping |
break |
end |
end |
if _G["Livestock"..buildtable[kind].token.."Menu"..i] then |
_G["Livestock"..buildtable[kind].token.."Menu"..i]:Hide() -- once all the buttons are hidden, check to see if the menu exists. if it does, hide it as well. If not, stop looping. |
else |
break |
end |
end |
Livestock.BuildMenu(kind) -- call BuildMenu to create the new button, adjust the old ones, resize things if needed, create a new menu if needed, etc. |
end |
-- GUI functions: |
function Livestock.RestoreUI(self, elapsed) |
if InCombatLockdown() then return end |
-- UI elements in tables to make it easier to set up. It's not good to declare these inside a function, but the variables aren't available the right way until after the UI loads so this function needs to have the tables declared here. |
local buttonstable = { |
["LivestockSmartButton"] = LivestockSettings.showsmart, |
["LivestockCrittersButton"] = LivestockSettings.showcritter, |
["LivestockLandMountsButton"] = LivestockSettings.showland, |
["LivestockFlyingMountsButton"] = LivestockSettings.showflying, |
} |
local checkstable = { |
["LivestockMainPreferencesFrameShowSmartMounts"] = LivestockSettings.showsmart, |
["LivestockMainPreferencesFrameShowCritters"] = LivestockSettings.showcritter, |
["LivestockMainPreferencesFrameShowLandMounts"] = LivestockSettings.showland, |
["LivestockMainPreferencesFrameShowFlyingMounts"] = LivestockSettings.showflying, |
--["LivestockMainPreferencesFrameShowSlowLandMounts"] = LivestockSettings.useslowland, |
--["LivestockMainPreferencesFrameShowSlowFlyingMounts"] = LivestockSettings.useslowflight, |
["LivestockPetPreferencesFrameToggleAutosummon"] = LivestockSettings.summononmove, |
["LivestockPetPreferencesFrameToggleAutosummonFavorite"] = LivestockSettings.summonfaveonmove, |
["LivestockPetPreferencesFrameRestrictAutoSummonOnPVP"] = LivestockSettings.restrictautosummon, |
["LivestockPetPreferencesFrameIgnorePVPRestrictionInInstances"] = LivestockSettings.ignorepvprestrictionininstances, |
["LivestockPetPreferencesFrameRestrictAutoSummonOnRaid"] = LivestockSettings.donotsummoninraid, |
["LivestockPetPreferencesFrameDismissPetOnMount"] = LivestockSettings.dismisspetonmount, |
["LivestockSmartPreferencesFrameToggleDruidLogic"] = LivestockSettings.druidlogic, |
["LivestockSmartPreferencesFrameToggleWorgenLogic"] = LivestockSettings.worgenlogic, |
["LivestockSmartPreferencesFrameToggleSafeFlying"] = LivestockSettings.safeflying, |
["LivestockPetPreferencesFrameToggleDismissOnStealth"] = LivestockSettings.dismissonstealth, |
["LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly"] = LivestockSettings.PVPdismiss, |
["LivestockSmartPreferencesFrameToggleMountInStealth"] = LivestockSettings.mountinstealth, |
["LivestockSmartPreferencesFrameToggleSmartCatForm"] = LivestockSettings.smartcatform, |
["LivestockSmartPreferencesFrameToggleWaterWalking"] = LivestockSettings.waterwalking, |
["LivestockSmartPreferencesFrameToggleCombatForms"] = LivestockSettings.combatforms, |
["LivestockSmartPreferencesFrameToggleMovingForms"] = LivestockSettings.movingform, |
["LivestockSmartPreferencesFrameToggleCrusaderMount"] = LivestockSettings.crusadermount, |
["LivestockSmartPreferencesFrameIndoorHunterAspects"] = LivestockSettings.indooraspects, |
["LivestockSmartPreferencesFrameMovingHunterAspects"] = LivestockSettings.movingaspects, |
["LivestockSmartPreferencesFrameSlowFallWhileFalling"] = LivestockSettings.slowfall, |
} |
for k, v in pairs(buttonstable) do -- show and scale each of the buttons if its setting is saved as 1 (shown) |
if v == 1 then |
_G[k]:Show() |
_G[k]:SetScale(LivestockSettings.scale) |
end |
end |
for k, v in pairs(checkstable) do -- check each box if its setting is saved as 1 (checked) |
if v == 1 then |
_G[k]:SetChecked(true) |
end |
end |
for k, v in pairs(stringstable) do -- localize the fontstrings in the GUI |
_G[k]:SetText(v) |
end |
if LivestockSettings.summononmove == 0 then |
LivestockSettings.summononmove = 1 |
Livestock.ClickedAutoSummon() |
end |
if class ~= "DRUID" and class ~= "SHAMAN" then |
LivestockSmartPreferencesFrameToggleCombatFormsText:SetTextColor(0.4, 0.4, 0.4) |
LivestockSmartPreferencesFrameToggleMovingFormsText:SetTextColor(0.4, 0.4, 0.4) |
end |
if class ~= "DRUID" then -- Gray out the text for the druid-only options if the player isn't a druid. The disabling of the button is done in the buttons' OnLoad scripts. |
LivestockSmartPreferencesFrameDruidToggleText:SetTextColor(0.4, 0.4, 0.4) |
LivestockSmartPreferencesFrameSmartCatFormText:SetTextColor(0.4, 0.4, 0.4) |
end |
local text = format(L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL, (class == "PRIEST" and L.LIVESTOCK_SPELL_LEVITATE) or (class == "DEATHKNIGHT" and L.LIVESTOCK_SPELL_PATHOFFROST) or L.LIVESTOCK_SPELL_WATERWALKING) |
LivestockSmartPreferencesFrameToggleWaterWalkingText:SetText(text) |
if class ~= "SHAMAN" and class ~= "DEATHKNIGHT" and class ~= "PRIEST" then |
LivestockSmartPreferencesFrameToggleWaterWalkingText:SetTextColor(0.4, 0.4, 0.4) |
end |
if class ~= "PALADIN" then |
LivestockSmartPreferencesFrameToggleCrusaderMount:Disable() |
LivestockSmartPreferencesFrameToggleCrusaderMountText:SetTextColor(0.4, 0.4, 0.4) |
end |
local race = select(2, UnitRace("player")) |
if class ~= "DRUID" and class ~= "ROGUE" and class ~= "MAGE" and race ~= "NightElf" then |
if class ~= "HUNTER" then |
LivestockPetPreferencesFrameAutoDismissOnStealthText:SetTextColor(0.4, 0.4, 0.4) |
end |
LivestockSmartPreferencesFrameMountInStealthText:SetTextColor(0.4, 0.4, 0.4) |
end |
if (not LivestockPetPreferencesFrameToggleDismissOnStealth:IsEnabled() ) or LivestockSettings.dismissonstealth == 0 then |
LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly:Disable() |
LivestockPetPreferencesFramePVPDismissText:SetTextColor(0.4, 0.4, 0.4) |
end |
if LivestockSettings.favoritepet == 0 then |
LivestockPetPreferencesFrameToggleAutosummonFavorite:Disable() |
LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText:SetTextColor(0.4, 0.4, 0.4) |
end |
if LivestockSettings.restrictautosummon == 0 then |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstances:Disable() |
LivestockPetPreferencesFrameIgnorePVPRestrictionInInstancesText:SetTextColor(0.4, 0.4, 0.4) |
end |
if LivestockSettings.summononmove == 1 then |
donotsummon = nil |
end |
self:Hide() |
end |
function Livestock.HideDropdowns() -- hide all the visible dropdown menus |
for k in pairs(buildtable) do |
for j = 1, 8 do -- the number of menus may change per type, but it's certainly not more than 8 |
if _G["Livestock"..buildtable[k].token.."Menu"..j] and _G["Livestock"..buildtable[k].token.."Menu"..j]:IsVisible() then |
_G["Livestock"..buildtable[k].token.."Menu"..j]:Hide() |
end |
end |
end |
end |
function Livestock.HeaderButtonOnClick(token) -- when we click a main menu button, we should hide all dropdowns (so they don't overlap) and show the relevant menu, but only if it wasn't visible in the first place. This lets the buttons act as true toggles. |
Livestock.RenumberCompanions() |
Livestock.BuildMenus() |
local menu, visible = _G["Livestock"..token.."Menu1"] |
if menu and menu:IsVisible() then |
visible = true |
end |
Livestock.HideDropdowns() |
if menu and not visible then |
menu:Show() |
end |
end |
function Livestock.MenuButtonOnClick(self, button) -- self is the button clicked on, button is the mouse button used |
local action, companionType = strmatch(self.which, "(%l+)"), strmatch(self.which, "(%u+)") -- since the buttons come with a string attached that is of the format "actionTYPE" where action is the function of the button and TYPE is the capitalized animal type, this declaration breaks them apart into two again |
local settings |
if companionType == "CRITTER" then |
settings = LivestockSettings.Critters |
else |
settings = LivestockSettings.Mounts |
end |
if action == "toggle" then -- if this is a toggle type button then |
local name, text = self.name, _G[self:GetName().."Text"] -- name was associated with the frame to be the name of the animal inside, and text is a reference to the text string of the button |
if button == "RightButton" and companionType == "CRITTER" then -- Right-clicking a pet in the menu makes it the favorite pet. |
Livestock.MakeFavoritePet(name) |
return |
end |
settings[name].show = 1 - settings[name].show -- toggle the shown setting |
if settings[name].show == 1 then |
text:SetTextColor(1, 1, 1) |
else |
text:SetTextColor(0.4, 0.4, 0.4) -- color the fontstring according to the new setting |
end |
if settings[name].type == "variable" then -- if this is a variable mount, then the index gets toggled off but the fontstring in the OTHER menu will stay at the previous color and this needs to be fixed. |
local checktext = text:GetText() -- get the relevant text of the button that we just clicked on |
if companionType == "LAND" then |
checktable = flyingText |
else |
checktable = landText |
end -- pick the table that's the opposite of the one that contains the font string we just clicked on |
for _, v in ipairs(checktable) do |
if v:GetText() == checktext then -- find the fontstring in the table whose text matches the text of the button we just clicked on, and change the color accordingly |
if settings[name].show == 1 then |
v:SetTextColor(1, 1, 1) |
else |
v:SetTextColor(0.4, 0.4, 0.4) |
end |
end |
end |
end |
elseif action == "check" then -- if this is a "check all" button |
for k in pairs(settings) do -- if these are critters or if the mounts in the settings have the same type as the companionType, lowercased (either "land" or "flying") then toggle them on |
if companionType == "CRITTER" or settings[k].type == companionType:lower() then |
if companionType == "CRITTER" or settings[k].speed == "epic" then |
settings[k].show = 1 |
end |
end |
end |
for _, v in ipairs(buildtable[companionType].text) do -- iterate over the fontstrings and set them all to white |
v:SetTextColor(1, 1, 1) |
end |
elseif action == "uncheck" then -- otherwise it should be an "uncheck all" button |
for k in pairs(settings) do -- if these or critters or if the mounts in the settings have the same type as the companionType, lowercased (either "land" or "flying") then toggle them on |
if companionType == "CRITTER" or settings[k].type == companionType:lower() then |
settings[k].show = 0 |
end |
end |
for _, v in ipairs(buildtable[companionType].text) do -- iterate over the fontstrings and set them all to grey |
v:SetTextColor(0.4, 0.4, 0.4) |
end |
end |
end |
function Livestock.MenuButtonOnDoubleClick(self) |
local action, companionType = strmatch(self.which, "(%l+)"), strmatch(self.which, "(%u+)") |
local settings = (companionType == "CRITTER" and LivestockSettings.Critters) or LivestockSettings.Mounts |
if action == "toggle" then |
local index = settings[self.name].index |
CallCompanion((companionType ~= "CRITTER" and "MOUNT") or "CRITTER", index) |
end |
Livestock.MenuButtonOnClick(self, "LeftButton") |
end |
function Livestock.MenuButtonOnEnter(self) -- code for mousing over a menu button. self is the menu button |
local which = self.which -- "which" was a string associated with the button |
if strsub(which, 1, 6) == "toggle" then -- if this is a toggle button, when we mouseover, we should show the 3D model if the viewer is visible |
local id = self.critterID -- the id of the creature was associated with the button when the menu was built |
if LivestockModel:IsVisible() then |
LivestockModel:SetCreature(id) |
LivestockModel.angle = 0.71 |
end |
elseif strsub(which, 1, 4) == "more" then -- if this is a more button, mousing over needs to show the next menu |
_G["Livestock"..buildtable[strsub(which, 5, strlen(which))].token.."Menu"..(self:GetParent():GetID() + 1)]:Show() -- find the menu associated with the button by getting its parent, adding 1 to the number of the menu, and then showing the resulting menu. The table reference looks up the right token for the name of the menu based on the end of the "which" string |
end |
end |
function Livestock.ClickedAutoSummon() |
LivestockSettings.summononmove = 1 - LivestockSettings.summononmove |
if LivestockSettings.summononmove == 0 then |
LivestockPetPreferencesFrameToggleAutosummonFavorite:Disable() |
LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText:SetTextColor(0.4, 0.4, 0.4) |
LivestockPetPreferencesFrameRestrictAutoSummonOnPVP:Disable() |
LivestockPetPreferencesFrameRestrictAutoSummonOnPVPText:SetTextColor(0.4, 0.4, 0.4) |
LivestockPetPreferencesFrameRestrictAutoSummonOnRaid:Disable() |
LivestockPetPreferencesFrameRestrictAutoSummonOnRaidText:SetTextColor(0.4, 0.4, 0.4) |
LivestockPetPreferencesFrameDismissPetOnMount:Disable() |
LivestockPetPreferencesFrameDismissPetOnMountText:SetTextColor(0.4, 0.4, 0.4) |
donotsummon = true |
elseif LivestockSettings.favoritepet ~= 0 then |
LivestockPetPreferencesFrameToggleAutosummonFavorite:Enable() |
LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText:SetTextColor(1, 1, 1) |
end |
if LivestockSettings.summononmove == 1 then |
LivestockPetPreferencesFrameRestrictAutoSummonOnPVP:Enable() |
LivestockPetPreferencesFrameRestrictAutoSummonOnPVPText:SetTextColor(1, 1, 1) |
LivestockPetPreferencesFrameRestrictAutoSummonOnRaid:Enable() |
LivestockPetPreferencesFrameRestrictAutoSummonOnRaidText:SetTextColor(1, 1, 1) |
LivestockPetPreferencesFrameDismissPetOnMount:Enable() |
LivestockPetPreferencesFrameDismissPetOnMountText:SetTextColor(1, 1, 1) |
donotsummon = nil |
end |
end |
function Livestock.SpinModel(self, elapsed) -- this is the OnUpdate script for the model |
local angle = self.angle or 0.71 |
modelcounter = modelcounter + elapsed |
if modelcounter > 0.05 then |
angle = angle + LivestockSpinSlider:GetValue() |
self:SetFacing(angle) |
modelcounter = 0 |
end |
self.angle = angle |
end -- while the frame is visible, this code uses a counter to keep track of the total time the frame was last redrawn. Every 0.05 sec, the model rotates according to the value established by the slider in the viewer |
function Livestock.SpinSliderChanged(self) -- easter egg text to show up when you drag the 3D model spin slider so far over it "escapes" the box |
if self:GetValue() > 0.623 and (not eastereggtext) then -- if the slider is dragged above the appropriate value and there's no easteregg text shown |
Livestock.HideDropdowns() -- hide the menus or else the cursor ends up going into one of them which changes the model |
eastereggtext = true |
LivestockEasterEgg:Show() |
LivestockEasterEgg:SetText(sayings[random(#sayings)]) |
elseif self:GetValue() < 0.623 then |
LivestockEasterEgg:Hide() |
eastereggtext = nil |
end |
end |
function Livestock.ScaleButtons(value) -- scale the buttons and reset them to their default positions |
if not LivestockCrittersButton then -- this script fires before the buttons are set, so return early if that's the case |
return |
end |
LivestockSettings.scale = value |
LivestockCrittersButton:SetScale(value) |
LivestockCrittersButton:ClearAllPoints() |
LivestockCrittersButton:SetPoint("CENTER",-50,-150) |
LivestockLandMountsButton:ClearAllPoints() |
LivestockLandMountsButton:SetScale(value) |
LivestockLandMountsButton:SetPoint("CENTER",0,-150) |
LivestockFlyingMountsButton:ClearAllPoints() |
LivestockFlyingMountsButton:SetScale(value) |
LivestockFlyingMountsButton:SetPoint("CENTER",50,-150) |
LivestockSmartButton:ClearAllPoints() |
LivestockSmartButton:SetScale(value) |
LivestockSmartButton:SetPoint("CENTER",0,-190) |
end |
-- Data functions |
function Livestock.RecycleTable(table) |
for k in pairs(table) do |
table[k] = nil |
end |
end |
function Livestock.CreateStateMaps(self) |
-- Smart mounting depends on 6 variables - mounted status, indoors/outdoors status, combat status, flyable/noflyable status, and two user settings that are relevant for druids only. |
-- The first four can be handled with a state map, and while they have 16 possible combinations, there are really only 6 relevant outcomes for Smart Mounting from these combinations. The following states are handled by the "smartmap" state: |
-- 7: In Flight Form: Druids in flight form need to check against the safe flight setting to see if they should be canceling their flight form. |
-- 6: Swimming: Swimming takes precedence over all other settings. Druids use Aquatic Form in this case, and shaman can select to use Water Walking. |
-- 1: Indoors. Should do nothing unless the player is a druid and wants to turn into a cat (or a hunter and wants to use aspect of the pact) |
-- 2: Mounted: Should dismount. This will get checked later against the safe flight setting to see if the player is flying and shouldn't dismount. |
-- 3: In Combat: Should do nothing, unless the player is a druid or a shaman or a hunter, in which case they should cast Travel Form or Ghost Wolf or AOTC if the combat forms option is selected. |
-- 4: Flyable area, not in combat: Should summon a random flying mount, with the possibility of druids shifting into flight forms. If a druid is in a form, they need to cancel it if they're not shifting into a flight form. |
-- 5: Non-flyable area, not in combat; Should summon a random land mount. If a druid is in a form, they need to cancel it. |
-- To handle the form canceling, there is also a "form" map which tracks the druid's current form. (Non-druids change forms as well but these form changes don't affect their ability to CallCompanion() ) |
-- These attributes are set at runtime to transfer settings and localization strings from tables where they can't be accessed in the secure handler to attributes of the secure button where they can be. |
-- Note that druid forms may change, as feral druids only have 5 forms and others can have 6. "form5" and "form6" attempt to figure out which forms are actually present to be able to cancel them effectively. |
self:SetAttribute("catform", LivestockSettings.smartcatform) |
self:SetAttribute("druidlogic", LivestockSettings.druidlogic) |
self:SetAttribute("worgenlogic", LivestockSettings.worgenlogic) |
self:SetAttribute("playerclass", select(2, UnitClass("player"))) |
self:SetAttribute("flightspell", GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_FLIGHTFORM) or "nil") |
self:SetAttribute("bearspell", GetSpellInfo(L.LIVESTOCK_SPELL_DIREBEARFORM) or L.LIVESTOCK_SPELL_BEARFORM) |
self:SetAttribute("form5", GetSpellInfo(L.LIVESTOCK_SPELL_TREEOFLIFE) or GetSpellInfo(L.LIVESTOCK_SPELL_MOONKINFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_FLIGHTFORM) or "nil") |
self:SetAttribute("form6", ( GetSpellInfo(L.LIVESTOCK_SPELL_TREEOFLIFE) or GetSpellInfo(L.LIVESTOCK_SPELL_MOONKINFORM) ) and (GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_FLIGHTFORM))) |
self:SetAttribute("sealspell", L.LIVESTOCK_SPELL_AQUATICFORM) |
self:SetAttribute("catspell", L.LIVESTOCK_SPELL_CATFORM) |
self:SetAttribute("travelspell", L.LIVESTOCK_SPELL_TRAVELFORM) |
self:SetAttribute("wolfspell", L.LIVESTOCK_SPELL_GHOSTWOLF) |
self:SetAttribute("waterwalking", (class == "SHAMAN" and L.LIVESTOCK_SPELL_WATERWALKING) or (class == "PRIEST" and L.LIVESTOCK_SPELL_LEVITATE) or (class == "DEATHKNIGHT" and L.LIVESTOCK_SPELL_PATHOFFROST)) |
self:SetAttribute("waterwalkingtoggle", LivestockSettings.waterwalking) |
self:SetAttribute("combatformstoggle", LivestockSettings.combatforms) |
self:SetAttribute("indooraspects", LivestockSettings.indooraspects) |
self:SetAttribute("aotc", L.LIVESTOCK_SPELL_CHEETAH) |
self:SetAttribute("safeflying", LivestockSettings.safeflying) |
self:SetAttribute("mountinstealth", LivestockSettings.mountinstealth) |
self:SetAttribute("aotp", GetSpellInfo(L.LIVESTOCK_SPELL_PACK) and L.LIVESTOCK_SPELL_PACK) |
self:SetAttribute("movingform", LivestockSettings.movingform) |
self:SetAttribute("movingaspects", LivestockSettings.movingaspects) |
-- Wrap the following script to occur when the attribute of the ComboButton changes. This will happen whenever the user toggles a setting, changes forms, or adjusts their indoor/outdoor, swimming, combat, flyable, or mounted status. |
-- Essentially, it changes the button to have different behaviors according to the classification above of the states. It also sets a flag in the button's mounttype attribute that indicates whether the PostClick handler should summon a mount or not. |
-- When druids change forms, the state is updated again with the same information, but the updated form info is taken into account. This allows for smart mounting to effectively cancel the form that was just cast because the type is usually set to cast the form spell that was just cast. |
SecureHandlerWrapScript(self, "OnAttributeChanged", self, [[ |
local class, catform, druidlogic, bearspell, flightspell, sealspell, catspell, travelspell, wolfspell, worgenlogic = self:GetAttribute("playerclass"), self:GetAttribute("catform"), self:GetAttribute("druidlogic"), self:GetAttribute("bearspell"), self:GetAttribute("flightspell"), self:GetAttribute("sealspell"), self:GetAttribute("catspell"), self:GetAttribute("travelspell"), self:GetAttribute("wolfspell"), self:GetAttribute("worgenlogic") |
local waterwalkingspell = self:GetAttribute("waterwalking") |
local waterwalkingtoggle = self:GetAttribute("waterwalkingtoggle") |
local combatformstoggle = self:GetAttribute("combatformstoggle") |
local safeflying = self:GetAttribute("safeflying") |
local mountinstealth = self:GetAttribute("mountinstealth") |
local indooraspects = self:GetAttribute("indooraspects") |
local movingform = self:GetAttribute("movingform") |
local movingaspects = self:GetAttribute("movingaspects") |
if name == "catform" or name == "state-form" or name == "druidlogic" or name == "waterwalkingtoggle" or name == "combatformstoggle" or name == "indooraspects" then |
self:SetAttribute("state-smartmap",self:GetAttribute("state-smartmap")) |
elseif name == "state-smartmap" then |
self:SetAttribute("type", nil) |
if value == 1 then |
if class == "DRUID" then |
if catform == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", catspell) |
end |
elseif class == "HUNTER" then |
if indooraspects == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", ((PlayerInGroup() and self:GetAttribute("aotp")) or self:GetAttribute("aotc"))) |
end |
elseif class == "SHAMAN" then |
if movingform == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", wolfspell) |
end |
end |
elseif value == 2 then |
self:SetAttribute("type", "macro") |
self:SetAttribute("macrotext", "/run Livestock.Dismount()") |
self:SetAttribute("mounttype", nil) |
elseif value == 3 then |
if class == "DRUID" and combatformstoggle == 1 then |
self:SetAttribute("type", "macro") |
self:SetAttribute("macrotext", "/cast !"..travelspell) |
elseif class == "SHAMAN" and combatformstoggle == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", wolfspell) |
end |
self:SetAttribute("mounttype", nil) |
elseif value == 4 then |
if class == "DRUID" then |
local spell |
if GetShapeshiftForm() == 1 then |
spell = bearspell |
elseif GetShapeshiftForm() == 3 then |
spell = catspell |
elseif GetShapeshiftForm() == 4 then |
spell = travelspell |
elseif GetShapeshiftForm() == 5 then |
spell = self:GetAttribute("form5") |
elseif GetShapeshiftForm() == 6 then |
spell = self:GetAttribute("form6") |
end |
if spell then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", spell) |
end |
end |
elseif value == 5 then |
if class == "DRUID" then |
local spell |
if GetShapeshiftForm() == 1 then |
spell = bearspell |
elseif GetShapeshiftForm() == 3 then |
spell = catspell |
elseif GetShapeshiftForm() == 4 then |
spell = travelspell |
elseif GetShapeshiftForm() == 5 then |
spell = self:GetAttribute("form5") |
elseif GetShapeshiftForm() == 6 then |
spell = self:GetAttribute("form6") |
end |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", spell) |
end |
elseif value == 6 then |
if class == "DRUID" then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", sealspell) |
elseif tonumber(waterwalkingtoggle) == 1 and (class == "SHAMAN" or class == "PRIEST" or class == "DEATHKNIGHT") then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", waterwalkingspell) |
self:SetAttribute("unit", "player") |
elseif IsMounted() then |
self:SetAttribute("type", "macro") |
self:SetAttribute("macrotext", "/run Livestock.Dismount()") |
self:SetAttribute("mounttype", nil) |
end |
elseif value == 7 then |
if class == "DRUID" and safeflying == 1 then |
self:SetAttribute("type", nil) |
self:SetAttribute("spell", nil) |
elseif class == "DRUID" then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", flightspell) |
end |
end |
end |
]]) |
RegisterStateDriver(self, "smartmap", "[form:6] 7; [swimming] 6; [indoors, nomounted] 1; [noindoors, mounted] 2; [combat, noindoors, nomounted] 3; [nocombat, noindoors, nomounted, flyable] 4; [nocombat, noindoors, nomounted, noflyable] 5") |
RegisterStateDriver(self, "form", "[form:1] 1; [form:2] 2; [form:3] 3; [form:4] 4; [form:5] 5; [form:6] 6; 0") |
end |
function Livestock.RenumberCompanions() -- because the game does not distinguish between learning a new mount or a new critter, it's safest just to redo both indices |
for i = 1, GetNumCompanions("CRITTER") do |
local _,name = GetCompanionInfo("CRITTER",i) |
if name and not LivestockSettings.Critters[name] then -- sometimes Blizzard's code returns nil for the name. If we have a valid name but no associated data in the SV, then we need to add it. |
LivestockSettings.Critters[name] = { -- save the index and set the default show value to on |
show = 1, |
index = i, |
} |
elseif name then -- if there is a valid name, then make sure the index matches up because indices change when you learn a new companion |
LivestockSettings.Critters[name].index = i |
else -- debug message if the name is returned as nil |
critterfail = true |
return |
end |
end |
for i = 1, GetNumCompanions("MOUNT") do |
--local outland, northrend, very, fast, changes, location |
local _, name, spellID, icon = GetCompanionInfo("MOUNT",i) -- we need not only the name but also the spellID because we will parse this spell's tooltip |
GameTooltip_SetDefaultAnchor(LivestockTooltip, UIParent) |
LivestockTooltip:SetHyperlink("spell:"..spellID) -- pull up the tooltip object we created and set it to the ID of the spell |
if name and not LivestockSettings.Mounts[name] then -- if the name is valid and we don't have SV data for it, we need to make it |
local flying,variable,water |
for i = 1, LivestockTooltip:NumLines() do -- iterate over the number of lines in the tooltip |
local text = _G["LivestockTooltipTextLeft"..i]:GetText() -- get the text from each line |
for word in string.gmatch(text, "%S+") do -- look at each word in the line. NOT %a+ because that apparently doesn't capture unicode characters, for the localized clients. |
-- check for flying |
for index,value in ipairs(L.LIVESTOCK_FLYING_NAMES) do |
if strfind(word, value) then |
flying = true |
end |
end |
-- check for variable |
for index,value in ipairs(L.LIVESTOCK_VARIABLE_NAMES) do |
if strfind(word, value) then |
variable = true |
end |
end |
-- check for water |
for index,value in ipairs(L.LIVESTOCK_WATER_NAMES) do |
if strfind(word, value) then |
water = true |
end |
end |
end |
end -- parse the tooltip. The variables outland, northrend, very, fast, location, and changes are set to true if the corresponding text is found |
LivestockSettings.Mounts[name] = { index = i, } -- set the index of the mount |
--print(format("New Mount: '%s' is mount-index, flying mount is '%s'", i, name)) |
if flying then -- if the tooltip contains either of these words, it's a flying mount |
LivestockSettings.Mounts[name].type = "flying" |
elseif variable then -- variable |
LivestockSettings.Mounts[name].type = "variable" |
elseif water then -- water |
LivestockSettings.Mounts[name].type = "water" |
else -- otherwise, a land mount |
LivestockSettings.Mounts[name].type = "land" |
end |
LivestockSettings.Mounts[name].speed = "epic" |
LivestockSettings.Mounts[name].show = 1 |
--print(name.." - "..LivestockSettings.Mounts[name].type) |
elseif name then -- if we do have SV data for it, update the index. |
LivestockSettings.Mounts[name].index = i |
--print(format("Old Mount: '%s' is mount-index, flying mount is '%s'", i, name)) |
else |
mountfail = true |
--print(format("Old Mount: '%s' is mount-index", i)) |
return |
end |
LivestockTooltip:Hide() -- hide our dummy tooltip |
end |
end |
function Livestock.LandOrFlying() -- since [flyable] has been fixed, check for flying and CWF and fly unless you're in WG and there's a battle going on. |
SetMapToCurrentZone() -- make sure that the map accurately reflects the zone you're in |
local continent = GetCurrentMapContinent(); |
local mflying = GetSpellInfo(90267); -- flight master's license |
local flightForm = GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_FLIGHTFORM); |
local _,_,_,expertRiding = GetAchievementInfo(890); -- Expert Riding achievement |
if continent == L.LIVESTOCK_CONTINENT_OUTLAND then -- if we're in Outland |
if expertRiding or flightForm then |
return "FLYING" |
else |
return "LAND" |
end |
elseif continent == L.LIVESTOCK_CONTINENT_NORTHREND and IsFlyableArea() then -- if we're in Northrend |
local zone, CWF = GetZoneText(), GetSpellInfo(L.LIVESTOCK_SPELL_COLDWEATHERFLYING) -- Check the zone and if we have CWF |
if not CWF then -- no CWF means no flying |
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.and if so, we're on a land mount. If not, flying mount. |
else -- we are in azeroth |
if IsFlyableArea() and IsUsableSpell(mflying) then -- have flight master's license and in flyable area |
return "FLYING" |
else |
return "LAND" -- anywhere else we should get a land mount. |
end |
end |
end |
function Livestock.SmartPreClick(self) |
local state = self:GetAttribute("state-smartmap") |
local race = select(2, UnitRace("player")) |
if (debug) then |
print(format("PREDEBUG: '%s' is mount-type, state is '%d'", self.mounttype or "nil", self:GetAttribute("state-smartmap"))) |
end |
if not InCombatLockdown() then |
if IsFalling() and LivestockSettings.slowfall == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", (class == "PRIEST" and L.LIVESTOCK_SPELL_LEVITATE) or L.LIVESTOCK_SPELL_SLOWFALL) |
self:SetAttribute("unit", "player") |
return |
end |
if class == "SHAMAN" then -- Clear out Ghost Wolf from combat if it's there |
if not IsIndoors() and self:GetAttribute("spell") == L.LIVESTOCK_SPELL_GHOSTWOLF then |
self:SetAttribute("spell", nil) |
end |
elseif (class == "PRIEST" or class == "DEATHKNIGHT") and state ~= 6 then -- clear out any possible remnant of underwater spells if we're out of the water. No need to compare to the spell because these classes only ever have one spell in their Smart Button. |
if self:GetAttribute("spell") then |
self:SetAttribute("spell", nil) |
end |
elseif class == "HUNTER" then -- clear out Aspects if we're not inside |
if not IsIndoors() and self:GetAttribute("spell") then |
self:SetAttribute("spell", nil) |
end |
end |
end |
if state == 2 then -- if mounted, clear out any mounted attributes and return, which will lead to a dismount (in the Click handler) and nothing in the PostClick. Druids go to flight form if they have it. |
self.mounttype = nil |
if class == "DRUID" and not InCombatLockdown() and Livestock.LandOrFlying() == "FLYING" and LivestockSettings.druidlogic == 1 then |
if GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or GetSpellInfo(L.LIVESTOCK_SPELL_FLIGHTFORM) then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM or L.LIVESTOCK_SPELL_FLIGHTFORM) |
end |
end |
return |
elseif state == 3 then -- maybe in combat |
if not InCombatLockdown() then |
self.mounttype = Livestock.LandOrFlying() |
if LivestockSettings.movingaspects == 1 and GetUnitSpeed("player") ~= 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", (GetRealNumPartyMembers() ~= 0 and GetSpellInfo(L.LIVESTOCK_SPELL_PACK) and L.LIVESTOCK_SPELL_PACK) or L.LIVESTOCK_SPELL_CHEETAH) |
self.mounttype = nil |
end |
if LivestockSettings.dismisspetonmount == 1 and self.mounttype == "FLYING" then |
DismissCompanion("CRITTER") |
end |
end |
elseif state == 4 then -- handle "flyable" areas |
self.mounttype = Livestock.LandOrFlying() |
if LivestockSettings.movingaspects == 1 and GetUnitSpeed("player") ~= 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", (GetRealNumPartyMembers() ~= 0 and GetSpellInfo(L.LIVESTOCK_SPELL_PACK) and L.LIVESTOCK_SPELL_PACK) or L.LIVESTOCK_SPELL_CHEETAH) |
self.mounttype = nil |
end |
if LivestockSettings.dismisspetonmount == 1 and self.mounttype == "FLYING" then |
DismissCompanion("CRITTER") |
end |
if class == "SHAMAN" then |
if LivestockSettings.movingform == 1 and GetUnitSpeed("player") ~= 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_GHOSTWOLF) |
self.mounttype = nil |
self.clearmovingform = true |
return |
end |
end |
if class == "DRUID" then |
if LivestockSettings.movingform == 1 and GetUnitSpeed("player") ~= 0 then |
if self.mounttype == "LAND" or (self.mounttype == "FLYING" and LivestockSettings.druidlogic == 0) then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_TRAVELFORM) |
self.mounttype = nil |
self.clearmovingform = true |
return |
end |
end |
if LivestockSettings.druidlogic == 1 and self.mounttype == "FLYING" then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", GetSpellInfo(L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM) or L.LIVESTOCK_SPELL_FLIGHTFORM) |
self.mounttype = nil |
end |
end |
if self.mounttype == "LAND" and race == "Worgen" and LivestockSettings.worgenlogic == 1 and GetUnitSpeed("player") == 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_RUNNINGWILD) |
self.mounttype = nil |
end |
elseif state == 5 then -- if in a land area, set the button to mount a land mount or possibly cast an instant travel form spell |
local _, _, isActive = GetWorldPVPAreaInfo(1) |
if LivestockSettings.movingform == 1 and GetUnitSpeed("player") ~= 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", (class == "SHAMAN" and L.LIVESTOCK_SPELL_GHOSTWOLF) or L.LIVESTOCK_SPELL_TRAVELFORM) |
self.clearmovingform = true |
elseif LivestockSettings.movingaspects == 1 and GetUnitSpeed("player") ~= 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", (GetRealNumPartyMembers() ~= 0 and GetSpellInfo(L.LIVESTOCK_SPELL_PACK) and L.LIVESTOCK_SPELL_PACK) or L.LIVESTOCK_SPELL_CHEETAH) |
elseif race == "Worgen" and LivestockSettings.worgenlogic == 1 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_RUNNINGWILD) |
self.mounttype = nil |
elseif (GetZoneText() == L.LIVESTOCK_ZONE_WINTERGRASP and isActive == false) then |
self.mounttype = "FLYING" |
else |
self.mounttype = "LAND" |
end |
return |
elseif state == 6 then -- swimming |
self.mounttype = "WATER" |
end |
end |
function Livestock.SmartPostClick(self) |
if (debug) then |
print(format("POSTDEBUG: '%s' is mount-type, state is '%d'", self.mounttype or "nil", self:GetAttribute("state-smartmap"))) |
end |
if Recompense.CheckBuffsAgainstTable(hiddenBuffs) and LivestockSettings.mountinstealth == 0 then -- respect the setting to not mount in stealth |
return |
end |
if self.mounttype then |
if self.mounttype == "LAND" then |
Livestock.PickLandMount() |
elseif self.mounttype == "WATER" then |
Livestock.PickWaterMount() |
else |
Livestock.PickFlyingMount() |
end |
end |
self.mounttype = nil |
if self.clearmovingform then |
self.clearmovingform = nil |
self:SetAttribute("type", nil) |
self:SetAttribute("spell", nil) |
self:SetAttribute("macrotext", nil) |
end |
end |
function Livestock.NonSmartPreClick(self) |
local race = select(2, UnitRace("player")) |
if IsFlying() and LivestockSettings.safeflying == 1 then -- trying to summon a land or flying mount in the air should fail to set any attributes and not flag anything for summoning. No smush deaths. |
return |
end |
if IsMounted() then -- if we're mounted or in a vehicle, dismount / get out and don't set any attributes or flag anything for summoning. No dismount only to try and resummon. |
Dismount() |
return |
elseif UnitInVehicle("player") then |
VehicleExit() |
return |
elseif InCombatLockdown() then -- get out of this function if we can't set attributes, because we can't mount in combat anyway. We've already dismounted by this point. |
return |
end |
if ( IsStealthed() and LivestockSettings.mountinstealth == 0 ) then -- respect the setting to not mount up if you're stealthed |
return |
end |
if IsIndoors() then -- can't mount indoors, and this isn't smart mount |
return |
end |
if strfind(self:GetName(), "Flying") then -- now that dismounting is out of the way, we can assume we need to summon a mount. Attach the kind of mount needed to the button. |
self.typeofmount = "flying" |
if LivestockSettings.dismisspetonmount == 1 then |
DismissCompanion("CRITTER") |
end |
else |
self.typeofmount = "land" |
end |
if class == "SHAMAN" then |
local buffs, name = 0 |
repeat |
buffs = buffs + 1 |
name = UnitBuff("player", buffs) |
until not name or name == L.LIVESTOCK_SPELL_GHOSTWOLF |
if name then -- name will be the name of the form at this point |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell",name) -- by casting the spell that we had on in the first place, we effectively remove the spell. |
end |
end |
if class == "DRUID" then -- see if we need to cancel a form to summon a mount. |
local buffs, name = 0 |
repeat |
buffs = buffs + 1 |
name = UnitBuff("player", buffs) |
until not name or name == L.LIVESTOCK_SPELL_BEARFORM or name == L.LIVESTOCK_SPELL_DIREBEARFORM or name == L.LIVESTOCK_SPELL_CATFORM or name == L.LIVESTOCK_SPELL_TRAVELFORM or name == L.LIVESTOCK_SPELL_TREEOFLIFE or name == L.LIVESTOCK_SPELL_MOONKINFORM or name == L.LIVESTOCK_SPELL_FLIGHTFORM or name == L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM |
if name then -- name will be the name of the form at this point |
self:SetAttribute("type","spell") |
self:SetAttribute("spell",name) -- by casting the spell that we had on in the first place, we effectively remove the spell. |
end |
end |
if self.typeofmount == "land" and race == "Worgen" and LivestockSettings.worgenlogic == 1 and GetUnitSpeed("player") == 0 then |
self:SetAttribute("type", "spell") |
self:SetAttribute("spell", L.LIVESTOCK_SPELL_RUNNINGWILD) |
self.typeofmount = nil |
end |
end |
function Livestock.NonSmartPostClick(self) |
if InCombatLockdown() then -- exit setting attributes if we're in combat. Past here is mounting code, which can't be done in combat anyway. |
return |
end |
if self.typeofmount then -- summon the relevant mount |
if self.typeofmount == "land" then |
Livestock.PickLandMount() |
elseif self.typeofmount == "flying" then |
Livestock.PickFlyingMount() |
end |
self.typeofmount = nil -- clear the mount flag |
end |
self:SetAttribute("type", nil) -- clear the attributes of the button in case they were used |
self:SetAttribute("spell", nil) |
end |
function Livestock.MakeFavoritePet(name) |
LivestockSettings.favoritepet = name |
print(format(L.LIVESTOCK_INTERFACE_LISTFAVEPET, LivestockSettings.favoritepet)) |
LivestockPetPreferencesFrameToggleAutosummonFavorite:Enable() |
LivestockPetPreferencesFrameAutoSummonOnMoveFavoriteText:SetTextColor(1, 1, 1) |
end |
function Livestock.AddToZone(which, item, fromDrag) |
local where = (which == "zone") and GetRealZoneText() or GetSubZoneText() |
if item == "whatpet" or item == "whatmount" then |
local whatKind = (item == "whatpet" and "critter") or "mount" |
if LivestockSettings.Zones[where] and LivestockSettings.Zones[where][whatKind] then |
print(format(L.LIVESTOCK_INTERFACE_DISPLAYZONEPET, LivestockSettings.Zones[where][whatKind], whatKind == "mount" and "mount" or "pet", which, where)) |
return |
else |
print(format(L.LIVESTOCK_INTERFACE_NOZONEPET, (whatKind == "mount" and "mount" or "pet"), which, where)) |
return |
end |
elseif item == "nomount" or item == "nopet" then |
print(format(L.LIVESTOCK_INTERFACE_CONFIRMZONEREMOVE, item:match("no(.+)"), which, where)) |
if LivestockSettings.Zones[where] then |
LivestockSettings.Zones[where][item:match("no(.+)") == "pet" and "critter" or "mount"] = nil |
Livestock.UpdateZoneTexts() |
end |
return |
elseif (not item:match("spell:") and not fromDrag) then |
print(L.LIVESTOCK_INTERFACE_USEITEMLINK) |
return |
end |
if not fromDrag then |
item = item:match("%[(.+)%]") |
end |
if not (LivestockSettings.Critters[item] or LivestockSettings.Mounts[item]) then |
print(format(L.LIVESTOCK_INTERFACE_HAVENOTLEARNED, item)) |
return |
end |
local whatKind = (LivestockSettings.Critters[item] and "critter") or "mount" |
if not LivestockSettings.Zones[where] then |
LivestockSettings.Zones[where] = {} |
end |
LivestockSettings.Zones[where][whatKind] = item |
print(format(L.LIVESTOCK_INTERFACE_CONFIRMZONEADD, item, whatKind, which, where)) |
Livestock.UpdateZoneTexts(fromDrag) |
end |
-- Summon functions |
function Livestock.PickCritter() |
local shown = 0 |
Livestock.RecycleTable(temp) |
for k in pairs(LivestockSettings.Critters) do -- go throuh all the critters |
if LivestockSettings.Critters[k].show == 1 and not select(5, GetCompanionInfo("CRITTER",LivestockSettings.Critters[k].index)) then |
tinsert(temp, LivestockSettings.Critters[k].index) -- if a critter is marked as selected and it's NOT currently out in the game world, add its index to the temp table |
elseif LivestockSettings.Critters[k].show == 1 then |
shown = shown + 1 -- count the total number of critters marked as selected |
end |
end |
if #temp == 0 and shown ~= 1 then -- if there are no critters in the list AND the number of critters selected isn't 1, then there must be 0 critters selected. Prompt user to select some. |
print(L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED) |
elseif #temp ~= 0 then -- otherwise, there are some critters in the list. |
currentcritter = temp[random(#temp)] -- set the newest critter to be one of the random indices among those in the temp table. |
CallCompanion("CRITTER",currentcritter) -- call the critter |
end |
end |
function Livestock.DismissCritter() |
DismissCompanion("CRITTER") |
end |
function Livestock.SummonFavoritePet() |
if LivestockSettings.favoritepet ~= 0 then |
CallCompanion("CRITTER", LivestockSettings.Critters[LivestockSettings.favoritepet].index) |
else |
print(L.LIVESTOCK_INTERFACE_NOFAVEPET) |
end |
end |
function Livestock.PickLandMount() |
if IsMounted() and ( not IsFlying() or LivestockSettings.safeflying == 0 ) then -- if we're already mounted and NOT flying (no accidents, please!) then dismount and don't pick another mount |
Dismount() |
return |
end |
if UnitInVehicle("player") and not IsFlying() then |
VehicleExit() |
return |
end |
if LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
Livestock.RecycleTable(temp) |
for k in pairs(LivestockSettings.Mounts) do -- go through the land mounts and add the ones that are selected to the temp table |
if (LivestockSettings.Mounts[k].type == "land" or LivestockSettings.Mounts[k].type == "variable") and LivestockSettings.Mounts[k].show == 1 then |
--print(format("DEBUG: '%s' is mount-index, land mount is '%s'", LivestockSettings.Mounts[k].index, k)) |
tinsert(temp, LivestockSettings.Mounts[k].index) |
end |
end |
--for index in pairs(LivestockSettings.Mounts) do DEFAULT_CHAT_FRAME:AddMessage(LivestockSettings.Mounts[index].index.." "..tostring(index)) end |
if #temp == 0 then -- if no mounts are selected, prompt the user to select one |
print(L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED) |
return |
end |
if (debug) then |
local number = temp[random(#temp)] |
local _, creatureName = GetCompanionInfo("MOUNT",number) |
print(format("MOUNT: '%s' is mount-index, land mount is '%s'", number, creatureName)) |
CallCompanion("MOUNT",number) -- call a random mount |
else |
CallCompanion("MOUNT",temp[random(#temp)]) -- call a random mount |
end |
end |
function Livestock.PickWaterMount() |
if IsMounted() and ( not IsFlying() or LivestockSettings.safeflying == 0 ) then -- if we're already mounted and NOT flying (no accidents, please!) then dismount and don't pick another mount |
Dismount() |
return |
end |
if UnitInVehicle("player") and not IsFlying() then |
VehicleExit() |
return |
end |
if LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
Livestock.RecycleTable(temp) |
local breath = false |
for count = 1, MIRRORTIMER_NUMTIMERS do |
local timer, _, _, scale = GetMirrorTimerInfo(count) |
if timer == "BREATH" and scale == -1 then |
breath = true |
end |
end |
local spellName = UnitBuff("player", L.LIVESTOCK_SPELL_SEALEGS, nil ); |
if (spellName) then |
tinsert(temp, LivestockSettings.Mounts["Abyssal Seahorse"].index) |
elseif (breath == false) then |
Livestock.PickFlyingMount() |
return |
else |
for k in pairs(LivestockSettings.Mounts) do -- go through the water mounts and add the ones that are selected to the temp table |
if (LivestockSettings.Mounts[k].type == "water" and LivestockSettings.Mounts[k].show == 1 and k ~= "Abyssal Seahorse") then |
--print(format("DEBUG: '%s' is mount-index, water mount is '%s'", LivestockSettings.Mounts[k].index, k)) |
tinsert(temp, LivestockSettings.Mounts[k].index) |
end |
end |
--for index in pairs(LivestockSettings.Mounts) do DEFAULT_CHAT_FRAME:AddMessage(LivestockSettings.Mounts[index].index.." "..tostring(index)) end |
end |
if #temp == 0 then -- if no mounts are selected, choose a land mount instead |
Livestock.PickLandMount() |
return |
end |
if (debug) then |
local number = temp[random(#temp)] |
local _, creatureName = GetCompanionInfo("MOUNT",number) |
print(format("MOUNT: '%s' is mount-index, land mount is '%s'", number, creatureName)) |
CallCompanion("MOUNT",number) -- call a random mount |
else |
CallCompanion("MOUNT",temp[random(#temp)]) -- call a random mount |
end |
end |
function Livestock.PickFlyingMount() |
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 LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetSubZoneText()]["mount"]].index) |
return |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["mount"] then |
CallCompanion("MOUNT", LivestockSettings.Mounts[LivestockSettings.Zones[GetZoneText()]["mount"]].index) |
return |
end |
Livestock.RecycleTable(temp) |
for k in pairs(LivestockSettings.Mounts) do -- go through the flying mounts and add the ones that are selected to the temp table |
if (LivestockSettings.Mounts[k].type == "flying" or LivestockSettings.Mounts[k].type == "variable") and LivestockSettings.Mounts[k].show == 1 then |
--print(format("DEBUG: '%s' is mount-index, flying mount is '%s'", LivestockSettings.Mounts[k].index, k)) |
tinsert(temp, LivestockSettings.Mounts[k].index) |
end |
end |
if #temp == 0 then -- if no mounts are selected, prompt the user to select one (or pick a land mount?) |
--print(L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED) |
Livestock.PickLandMount() |
return |
end |
if (debug) then |
local number = temp[random(#temp)] |
local _, creatureName = GetCompanionInfo("MOUNT",number) |
print(format("MOUNT: '%s' is mount-index, flying mount is '%s'", number, creatureName)) |
CallCompanion("MOUNT",number) -- call a random mount |
else |
CallCompanion("MOUNT",temp[random(#temp)]) -- call a random mount |
end |
end |
function Livestock.Dismount() |
if UnitIsDeadOrGhost("player") then |
return |
end |
if IsFlying() and LivestockSettings.safeflying == 0 then |
Dismount() |
return |
elseif not IsFlying() and IsMounted() then |
Dismount() |
return |
elseif UnitInVehicle("player") and not IsFlying() then |
VehicleExit() |
return |
end |
end |
function Livestock.MoveSummon() -- idea and code provided by Mikhael of Doomhammer on the WoWInterface forums, modified by Scott Snowman (author). Checks to see if you have a vanity pet out, and if you don't, it summons one (or your favorite). Used as a hook on movement functions. |
if LivestockSettings.summononmove == 0 or donotsummon or UnitChannelInfo("player") or UnitCastingInfo("player") or IsFalling() or Recompense.CheckBuffsAgainstTable(restrictSummonForTheseBuffs) or Recompense.CheckEquipmentAgainstTable(restrictSummonForThisEquipment) then |
return -- return if the flag to not summon is checked, if you're channeling or casting, or if you have a buff on you that indicates you're in a situation where you shouldn't be summoning. |
else |
if LivestockSettings.restrictautosummon == 1 and UnitIsPVP("player") == 1 then -- if the setting to ignore summoning when flagged is set, then check for PVP status. |
if LivestockSettings.ignorepvprestrictionininstances == 0 then -- if the PVP restriction is absolute, then return from the hook. |
return |
else -- if the option for ignoring in an instance is set, check the instance status to see if we're in a PVE instance. |
local inInstance, instanceType = IsInInstance() |
if not inInstance or instanceType == "arena" or instanceType == "pvp" then |
return |
end |
end |
end |
if LivestockSettings.donotsummoninraid == 1 and GetRealNumRaidMembers() > 0 then |
return |
end |
local anyCritterOut |
for i = 1, GetNumCompanions("CRITTER") do |
local _, _, _, _, isSummoned = GetCompanionInfo("CRITTER", i) |
if ( isSummoned ) then |
anyCritterOut = true |
break |
end |
end |
if anyCritterOut then |
return |
else |
local index |
if not UnitIsDeadOrGhost("player") and not InCombatLockdown() and not IsMounted() and not IsStealthed() then -- long conditional, only summon if the checkbox is checked (check this first for performance) and not stealthed, mounted, dead, or in combat. |
if (LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["critter"]) or (LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["critter"]) then -- check to see if we have pet data for the current zone or subzone |
if LivestockSettings.Zones[GetSubZoneText()] and LivestockSettings.Zones[GetSubZoneText()]["critter"] then |
index = LivestockSettings.Critters[LivestockSettings.Zones[GetSubZoneText()]["critter"]].index |
elseif LivestockSettings.Zones[GetZoneText()] and LivestockSettings.Zones[GetZoneText()]["critter"] then |
index = LivestockSettings.Critters[LivestockSettings.Zones[GetZoneText()]["critter"]].index |
end |
elseif LivestockSettings.summonfaveonmove == 1 then -- check to see if it's the favorite we want to summon. |
index = LivestockSettings.Critters[LivestockSettings.favoritepet].index -- retrieve the index of the favorite pet |
end |
if index then |
local _, _, _, _, isSummoned = GetCompanionInfo("CRITTER", index) |
if isSummoned then -- check to see if the favorite / zone pet is summoned already, and summon it if it isn't |
return |
else |
local sound = GetCVar("Sound_EnableSFX") |
SetCVar("Sound_EnableSFX", "0") -- set the sound off after retrieving the sound setting so that error messages don't sound from trying to summon the pet when you can't |
CallCompanion("CRITTER",index) -- summon the favorite |
UIErrorsFrame:Clear() -- clear any error text |
SetCVar("Sound_EnableSFX", sound) -- set the sound setting back to its previous value |
end |
else -- no index means no favorite or no saved info |
local sound = GetCVar("Sound_EnableSFX") |
SetCVar("Sound_EnableSFX", "0") |
Livestock.PickCritter() |
UIErrorsFrame:Clear() |
SetCVar("Sound_EnableSFX", sound) |
end |
end |
end |
end |
end |
-- Slash handler |
function Livestock.Slash(arg) |
local cmd, args = arg:match("(%S+)%s*(.-)$") |
if cmd == "reset" then -- Clear all the points of the Livestock buttons and set them back to their original locations |
LivestockCrittersButton:ClearAllPoints() |
LivestockCrittersButton:SetPoint("CENTER",-50,-150) |
LivestockLandMountsButton:ClearAllPoints() |
LivestockLandMountsButton:SetPoint("CENTER",0,-150) |
LivestockFlyingMountsButton:ClearAllPoints() |
LivestockFlyingMountsButton:SetPoint("CENTER",50,-150) |
LivestockSmartButton:ClearAllPoints() |
LivestockSmartButton:SetPoint("CENTER",0,-190) |
elseif cmd == "scale" then -- clear all the points of the Livestock buttons, set them back to their original locations, and then set the scale |
LivestockCrittersButton:ClearAllPoints() |
LivestockCrittersButton:SetPoint("CENTER",-50,-150) |
LivestockLandMountsButton:ClearAllPoints() |
LivestockLandMountsButton:SetPoint("CENTER",0,-150) |
LivestockFlyingMountsButton:ClearAllPoints() |
LivestockFlyingMountsButton:SetPoint("CENTER",50,-150) |
LivestockSmartButton:ClearAllPoints() |
LivestockSmartButton:SetPoint("CENTER",0,-190) |
Livestock.ScaleButtons(tonumber(arg:sub(7,13))) |
elseif cmd == "redo" then |
print(L.LIVESTOCK_INTERFACE_RESETSAVEDDATA) |
LivestockSettings.Mounts = {} |
Livestock.RenumberCompanions() |
Livestock.RebuildMenu("CRITTER") |
Livestock.RebuildMenu("LAND") |
Livestock.RebuildMenu("FLYING") |
Livestock.RebuildMenu("WATER") |
elseif cmd == "zone" or cmd == "subzone" then |
Livestock.AddToZone(cmd, args) |
elseif cmd == "prefs" then |
InterfaceOptionsFrame:Show() -- bring up the options frame |
InterfaceOptionsFrameTab2:Click() -- click on the Addons tab |
local button = 1 |
while _G["InterfaceOptionsFrameAddOnsButton"..button] do |
if _G["InterfaceOptionsFrameAddOnsButton"..button].element.name == "Livestock" then -- search through the buttons, find the one marked Livestock, and click it |
_G["InterfaceOptionsFrameAddOnsButton"..button]:Click() |
break |
end |
button = button + 1 |
end |
return |
elseif cmd == "debug" then |
debug = not(debug) |
else -- toggle the Livestock menu frame |
if LivestockMenuFrame:IsVisible() then |
LivestockMenuFrame:Hide() |
else |
LivestockMenuFrame:Show() |
end |
end |
end |
-- Companion Frame declaration and slash handler setup |
local companionframe = CreateFrame("Frame") |
companionframe:RegisterEvent("COMPANION_LEARNED") |
companionframe:RegisterEvent("PLAYER_LOGIN") |
companionframe:RegisterEvent("PLAYER_ENTERING_WORLD") |
companionframe:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") |
companionframe:RegisterEvent("UNIT_SPELLCAST_SENT") |
companionframe:RegisterEvent("UNIT_ENTERED_VEHICLE") |
companionframe:RegisterEvent("UI_INFO_MESSAGE") |
companionframe:SetScript("OnEvent", Livestock.CompanionEvent) |
SLASH_LIVESTOCK1 = LIVESTOCK_INTERFACE_SLASHSTRING |
SlashCmdList["LIVESTOCK"] = Livestock.Slash |
Recompense = Recompense or {} |
function Recompense.RecycleTable(table) -- empty a table by setting its keys to nil |
for k in pairs(table) do |
table[k] = nil |
end |
end |
function Recompense.ShowTableContents(table) -- debug function to dump a table, not very sophisticated and doesn't handle nested tables well |
for k, v in pairs(table) do |
if type(v) ~= "table" then |
print(format("Key '%s' has value '%s'.", k, v)) |
else |
print(format("Key '%s' has a table value.", k)) |
--[[for subKey, subValue in pairs(v) do |
print(format("Table in '%s': Key '%s' has value '%s'.", k, subKey, tostring(subValue))) |
end]] |
end |
end |
end |
function Recompense.CheckBuffsAgainstTable(table) -- given a table of buff names, returns the name of a buff if it is present on the player. If none of the buffs on the table are present on the player, it returns nil. |
local buffs, name, buffMatched = 0 |
repeat |
buffs = buffs + 1 |
name = UnitBuff("player", buffs) |
for _, v in pairs(table) do |
if name == v then |
buffMatched = name |
break |
end |
end |
if buffMatched then |
break |
end |
until not name |
return buffMatched |
end |
function Recompense.CheckEquipmentAgainstTable(table) -- given a table of item names, returns the name of the first item in the table that is currently equipped. |
local equippedItem |
for _, v in pairs(table) do |
if IsEquippedItem(v) then |
equippedItem = v |
break |
end |
end |
return equippedItem |
end |
function Recompense.CheckStringAgainstTable(inputString, table) -- given a string and a table, check to see if the provided string is contained in the table of strings |
local matchedString |
for _, v in pairs(table) do |
if inputString == v then |
matchedString = inputString |
break |
end |
return matchedString |
end |
end |
function Recompense.CreateButtonAndText(buttonName, parent, xOffset, yOffset, stringName) |
local button = CreateFrame("CheckButton", buttonName, parent, "UICheckButtonTemplate") |
button:SetHeight(20) |
button:SetWidth(20) |
button:SetPoint("TOPLEFT", xOffset, yOffset) |
if _G[buttonName.."Text"] then |
_G[buttonName.."Text"] = nil |
end |
local text = parent:CreateFontString(stringName, "OVERLAY", "ChatFontSmall") |
text:SetPoint("TOPLEFT", ( xOffset + 24 ), ( yOffset - 2 ) ) |
button.text = text |
return button, text |
end |
function Recompense.TransitionFromInterfaceOptionsToFrame(frame) |
InterfaceOptionsFrameOkay_OnClick() |
HideUIPanel(GameMenuFrame) |
frame:Show() |
end |
## Interface: 40200 |
## Title: Livestock |
## Notes: Enables easy random summoning of vanity pets and mounts, including the option of "smart mounting." |
## Author: Recompense - Uldum(US) |
## X-eMail: scott.snowman@gmail.com |
## Version: 1.4.2 |
## SavedVariablesPerCharacter: LivestockSettings |
LibRecompense\RecompenseTools.lua |
Localizations\Localization-enUS.lua |
Localizations\Localization-deDE.lua |
Localizations\Localization-frFR.lua |
Localizations\Localization-ruRU.lua |
Localizations\Localization-esES.lua |
Livestock.lua |
Livestock.xml |
Preferences\Main.lua |
Preferences\Pets.lua |
Preferences\Mounts.lua |
Preferences\Zones.lua |
LIVESTOCK_INTERFACE_SLASHSTRING = "/livestock" |
LIVESTOCK_HEADER = "|cFF4444DDLivestock:|r " |
LivestockLocalizations = {} |
local L = LivestockLocalizations |
L.LIVESTOCK_FONTSTRING_LIVESTOCKMENU = "Livestock Menu" |
L.LIVESTOCK_FONTSTRING_3DLABEL = "3D Model" |
L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE = "Show / Hide Buttons" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE = "Livestock Macro Generator" |
L.LIVESTOCK_FONTSTRING_OTHERTITLE = "Filter Options" |
L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL = "Critters" |
L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL = "Land" |
L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL = "Flying" |
L.LIVESTOCK_FONTSTRING_SHOWWATERLABEL = "Water" |
L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL = "Smart" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE = "Please read the documentation before clicking these buttons!" |
L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL = "Include non-epic mounts in the land mount menu." |
L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL = "Include non-epic mounts in the flying mount menu." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL = "Automatically summon a vanity pet when you move." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL = "Summon your favorite pet instead of a random pet." |
L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL = "Do not automatically summon a pet if you are flagged for PVP." |
L.LIVESTOCK_FONTSTRING_IGNOREPVPRESTRICTIONININSTANCESLABEL = "...unless you are in a PVE instance." |
L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL = "Do not automatically summon a pet if you are in a raid." |
L.LIVESTOCK_FONTSTRING_DISMISSPETONMOUNTLABEL = "Dismiss your pet whenever you mount a flying mount or cast a flying form." |
L.LIVESTOCK_FONTSTRING_CYCLETIMERTOGGLELABEL = "Automatically change your pet after seconds." |
L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL = "Enable Flight Form behavior with Smart Mounting." |
L.LIVESTOCK_FONTSTRING_WORGENTOGGLELABEL = "Enable Running Wild behavior with Smart Mounting." |
L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL = "Safe Flight: Mounting while in the air will not dismount you." |
L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL = "Dismiss your vanity pet when you Stealth, Feign Death, or cast Invisibility." |
L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL = "Only dismiss when you are flagged for PVP." |
L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL = "Allow Livestock mounting to break Stealth effects." |
L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL = "Smart Mounting casts Ghost Wolf / Travel Form in combat." |
L.LIVESTOCK_FONTSTRING_USEMOVINGFORMSLABEL = "Smart Mounting casts Ghost Wolf / Travel Form while moving (out of combat)." |
L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL = "Smart Mounting shifts you from caster form into Cat Form indoors." |
L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL = "Smart Mounting casts %s when underwater." |
L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL = "Automatically summon a Smart Mount after casting Crusader Aura." |
L.LIVESTOCK_FONTSTRING_INDOORHUNTERASPECTSLABEL = "Smart Mounting casts AotC / AotP when indoors." |
L.LIVESTOCK_FONTSTRING_MOVINGHUNTERASPECTSLABEL = "Smart Mounting casts AotC / AotP when moving (outdoors, out of combat)" |
L.LIVESTOCK_FONTSTRING_SLOWFALLLABEL = "Smart Mounting casts Levitate / Slow Fall when falling (out of combat)" |
L.LIVESTOCK_FLYING_NAMES = {"Drake", "Wind", "Gryph", "gryph", "Al'ar", "Frostbrood", "Dragon", "Ray", "Phoenix", "Wyrm", "Mimiron", "Ebon"} |
L.LIVESTOCK_VARIABLE_NAMES = {"Celestial", "Headless", "Invincible", "Carpet", "Touring", "Guardian", "X-51", "Machine", "Love"} |
L.LIVESTOCK_WATER_NAMES = {"Sea"} |
L.LIVESTOCK_MENU_MORE = "More >>>" |
L.LIVESTOCK_MENU_SELECTALL = "Select all" |
L.LIVESTOCK_MENU_SELECTNONE = "Select none" |
L.LIVESTOCK_ZONE_WINTERGRASP = "Wintergrasp" |
L.LIVESTOCK_SPELL_COLDWEATHERFLYING = "Cold Weather Flying" |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM = "Swift Flight Form" |
L.LIVESTOCK_SPELL_FLIGHTFORM = "Flight Form" |
L.LIVESTOCK_SPELL_TRAVELFORM = "Travel Form" |
L.LIVESTOCK_SPELL_BEARFORM = "Bear Form" |
L.LIVESTOCK_SPELL_DIREBEARFORM = "Dire Bear Form" |
L.LIVESTOCK_SPELL_CATFORM = "Cat Form" |
L.LIVESTOCK_SPELL_TREEOFLIFE = "Tree of Life" |
L.LIVESTOCK_SPELL_MOONKINFORM = "Moonkin Form" |
L.LIVESTOCK_SPELL_GHOSTWOLF = "Ghost Wolf" |
L.LIVESTOCK_SPELL_STEALTH = "Stealth" |
L.LIVESTOCK_SPELL_FEIGNDEATH = "Feign Death" |
L.LIVESTOCK_SPELL_CHEETAH = "Aspect of the Cheetah" |
L.LIVESTOCK_SPELL_PACK = "Aspect of the Pack" |
L.LIVESTOCK_SPELL_INVISIBILITY = "Invisibility" |
L.LIVESTOCK_SPELL_VANISH = "Vanish" |
L.LIVESTOCK_SPELL_CLOAKING = "Cloaking" |
L.LIVESTOCK_SPELL_PROWL = "Prowl" |
L.LIVESTOCK_SPELL_SHADOWMELD = "Shadowmeld" |
L.LIVESTOCK_SPELL_AQUATICFORM = "Aquatic Form" |
L.LIVESTOCK_SPELL_WATERWALKING = "Water Walking" |
L.LIVESTOCK_SPELL_LEVITATE = "Levitate" |
L.LIVESTOCK_SPELL_SLOWFALL = "Slow Fall" |
L.LIVESTOCK_SPELL_PATHOFFROST = "Path of Frost" |
L.LIVESTOCK_SPELL_FOOD = "Food" |
L.LIVESTOCK_SPELL_DRINK = "Drink" |
L.LIVESTOCK_SPELL_CRUSADERAURA = "Crusader Aura" |
L.LIVESTOCK_SPELL_HAUNTED = "Haunted" |
L.LIVESTOCK_SPELL_TWILIGHTSERPENT = "Twilight Serpent" |
L.LIVESTOCK_SPELL_SAPPHIREOWL = "Sapphire Owl" |
L.LIVESTOCK_SPELL_RUBYHARE = "Ruby Hare" |
L.LIVESTOCK_SPELL_RUNNINGWILD = "Running Wild" |
L.LIVESTOCK_SPELL_SEALEGS = "Sea Legs" |
L.LIVESTOCK_TOOLTIP_VERY = "very" |
L.LIVESTOCK_TOOLTIP_EXTREMELY = "extremely" |
L.LIVESTOCK_TOOLTIP_FAST = "fast" |
L.LIVESTOCK_TOOLTIP_LOCATION = "location" |
L.LIVESTOCK_TOOLTIP_CHANGES = "changes" |
L.LIVESTOCK_TOOLTIP_NORTHREND = "Northrend" |
L.LIVESTOCK_TOOLTIP_OUTLAND = "Outland" |
L.LIVESTOCK_INTERFACE_CRITTERMACROCREATED = LIVESTOCK_HEADER.."Random critter summon macro created in character specific macros!" |
L.LIVESTOCK_INTERFACE_LANDMACROCREATED = LIVESTOCK_HEADER.."Random land mount summon macro created in character specific macros!" |
L.LIVESTOCK_INTERFACE_FLYINGMACROCREATED = LIVESTOCK_HEADER.."Random flying mount summon macro created in character specific macros!" |
L.LIVESTOCK_INTERFACE_SMARTMACROCREATED = LIVESTOCK_HEADER.."Random flying/land mount smart summon macro created in character specific macros!" |
L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED = LIVESTOCK_HEADER.."There are no critters in your list. Please type "..LIVESTOCK_INTERFACE_SLASHSTRING.." and click on the Critters button to select your checklist." |
L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED = LIVESTOCK_HEADER.."There are no land mounts in your list. Please type "..LIVESTOCK_INTERFACE_SLASHSTRING.." and click on the Land Mounts button to select your checklist." |
L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED = LIVESTOCK_HEADER.."There are no flying mounts in your list. Please type "..LIVESTOCK_INTERFACE_SLASHSTRING.." and click on the Flying Mounts button to select your checklist." |
L.LIVESTOCK_INTERFACE_RESETSAVEDDATA = LIVESTOCK_HEADER.."Saved data cleared and menus rewritten. You should go through your vanity pet and mount menus to uncheck the companions you do not want summoned." |
L.LIVESTOCK_INTERFACE_NOFAVEPET = LIVESTOCK_HEADER.."You haven't selected a favorite pet yet! Right-click a pet in the pet dropdown menu to set it as your favorite." |
L.LIVESTOCK_INTERFACE_LISTFAVEPET = LIVESTOCK_HEADER.."Your favorite pet is currently %s." |
L.LIVESTOCK_INTERFACE_HAVENOTLEARNED = LIVESTOCK_HEADER.."You have not learned %s yet." |
L.LIVESTOCK_INTERFACE_USEITEMLINK = LIVESTOCK_HEADER.."Please use "..LIVESTOCK_INTERFACE_SLASHSTRING.." [zone/subzone] <itemlink> to add your mount or pet for this area. To delete a saved pet or mount, use /livestock [zone/subzone] [nopet/nomount]. To view your current pet or mount, use /livestock [zone/subzone] [whatpet/whatmount] or use Livestock's Zones and Subzones user interface through /livestock prefs" |
L.LIVESTOCK_INTERFACE_CONFIRMZONEADD = LIVESTOCK_HEADER.."You will now summon %s for your %s in the %s %s." |
L.LIVESTOCK_INTERFACE_CONFIRMZONEREMOVE = LIVESTOCK_HEADER.."You no longer have a %s selected for the %s %s." |
L.LIVESTOCK_INTERFACE_DISPLAYZONEPET = LIVESTOCK_HEADER.."You have selected %s for your %s in the %s %s." |
L.LIVESTOCK_INTERFACE_NOZONEPET = LIVESTOCK_HEADER.."You have not selected a %s for the %s %s." |
L.LIVESTOCK_INTERFACE_ZONEFRAMEHEADER = "Zone and Subzone Pets and Mounts" |
L.LIVESTOCK_INTERFACE_CURRENTZONE = "|cFFEEEE00Current Zone:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONE = "|cFFEEEE00Current Subzone:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTZONEPET = "|cFFEEEE00Current Zone Pet:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONEPET = "|cFFEEEE00Current Subzone Pet:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTZONEMOUNT = "|cFFEEEE00Current Zone Mount:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONEMOUNT = "|cFFEEEE00Current Subzone Mount:|r %s" |
L.LIVESTOCK_INTERFACE_NOPETSELECTED = "No pet currently selected." |
L.LIVESTOCK_INTERFACE_NOMOUNTSELECTED = "No mount currently selected." |
L.LIVESTOCK_INTERFACE_DRAGERROR = LIVESTOCK_HEADER.."You can only drag pets and mounts to this box." |
L.LIVESTOCK_INTERFACE_DRAGBOXEXPL = "Drag a pet or mount to this box to set it as your desired companion\nfor the current %s. Right-click the box to erase your saved pet\nsetting; left-click to erase your saved mount setting." |
L.LIVESTOCK_INTERFACE_LAUNCHWEIGHTS = "Open the Weighted Random Mounts interface" |
L.LIVESTOCK_INTERFACE_USEWEIGHTS = "Use weights for random mounts with Smart Mounting." |
L.LIVESTOCK_INTERFACE_MAINPANEL = "Livestock" |
L.LIVESTOCK_INTERFACE_PREFSPANEL1 = "Vanity Pets" |
L.LIVESTOCK_INTERFACE_PREFSPANEL2 = "Travel & Mounts" |
L.LIVESTOCK_INTERFACE_PREFSPANEL3 = "Zones and Subzones" |
L.LIVESTOCK_INTERFACE_PREFSPANEL4 = "Random Mount Weight Assignment" |
L.LIVESTOCK_CONTINENT_OUTLAND = 3 |
L.LIVESTOCK_CONTINENT_NORTHREND = 4 |
L.LIVESTOCK_EQUIPMENT_DONCARLOS = "Don Carlos' Famous Hat" |
L.LIVESTOCK_EQUIPMENT_BLOODSAIL = "Bloodsail Admiral's Hat" |
if GetLocale() == "ruRU" then |
if not LivestockLocalizations then |
LivestockLocalizations = {} |
end |
local L = LivestockLocalizations |
L.LIVESTOCK_FONTSTRING_3DLABEL = "3D ÐоделÑ" |
L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE = "ÐоказаÑÑ / СпÑÑÑаÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ¸" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE = "ÐенеÑаÑÐ¸Ñ Ð¼Ð°ÐºÑоÑа Livestock" |
L.LIVESTOCK_FONTSTRING_OTHERTITLE = "ÐпÑии ÑилÑÑÑа" |
L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL = "СпÑÑники" |
L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL = "ÐаземнÑй ÑÑанÑпоÑÑ" |
L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL = "ÐеÑаÑÑий ÑÑанÑпоÑÑ" |
L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL = "Smart" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE = "ÐзнакомÑÑеÑÑ Ñ Ð´Ð¾ÐºÑменÑаÑией пÑежде Ñем нажимаÑÑ ÑÑи кнопки!" |
L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL = "ÐклÑÑаÑÑ Ð¼ÐµÐ´Ð»ÐµÐ½Ð½Ñй ÑÑаÑпоÑÑ Ð² Ð¼ÐµÐ½Ñ Ð½Ð°Ð·ÐµÐ¼Ð½ÑÑ ." |
L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL = "ÐклÑÑаÑÑ Ð¼ÐµÐ´Ð»ÐµÐ½Ð½Ð¹ ÑÑанÑпоÑÑ Ð² Ð¼ÐµÐ½Ñ Ð»ÐµÑаÑÑÐ¸Ñ ." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL = "ÐвÑомаÑиÑеÑки вÑзÑваÑÑ ÑпÑника пÑи движении." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL = "ÐÑзÑваÑÑ Ð²ÑбÑанного ÑпÑÑника вмеÑÑо ÑлÑÑайного." |
L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL = "Ðе вÑзÑваÑÑ ÑпÑÑника авÑомаÑиÑеÑки, еÑли ÑÑÐ¾Ð¸Ñ ÐвÐ-Ñлаг." |
L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL = "Ðе вÑзÑваÑÑ ÑпÑÑника пÑи Ð½Ð°Ñ Ð¾Ð¶Ð´ÐµÐ½Ð¸Ð¸ в Ñейде." |
L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL = "ÐÑполÑзоваÑÑ 'Ðблик пÑиÑÑ' пÑи иÑполÑзовании ÑÑнкÑии Smart." |
L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL = "ÐезопаÑнÑй полеÑ: ÑлезÑÑ Ñ Ð»ÐµÐ°ÑÑего ÑÑанÑпоÑÑа возможно ÑолÑко на земле." |
L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL = "ÐÑзÑв ÑпÑника во вÑÐµÐ¼Ñ Ð¸ÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñмений 'ÐÑиÑвоÑиÑÑÑÑ Ð¼ÐµÑÑвÑм', 'ÐезамеÑноÑÑÑ' или 'ÐевидимоÑÑÑ'." |
L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL = "ÐÑзÑваÑÑ ÑпÑÑника ÑолÑко еÑли ÑÑÐ¾Ð¸Ñ ÐвÐ-Ñлаг." |
L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL = "РазÑеÑиÑÑ Livestock пÑеÑÑваÑÑ Ð´ÐµÐ¹ÑÑвие 'незамеÑноÑÑи'." |
L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL = "ФÑнкÑÐ¸Ñ Smart должна иÑполÑзоваÑÑ 'ÐÑизÑаÑного волка' или 'ÐÐ¾Ñ Ð¾Ð´Ð½ÑÑ ÑоÑмÑ' в боÑ." L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL = "ФÑнкÑÐ¸Ñ Smart Ð¼Ð¾Ð¶ÐµÑ Ð¸ÑполÑзоваÑÑ 'Ðблик коÑки' в помеÑениÑÑ ." |
L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL = "ФÑнкÑÐ¸Ñ Smart Ð¼Ð¾Ð¶ÐµÑ Ð¸ÑполÑзоваÑÑ Ð·Ð°ÐºÐ»Ð¸Ð½Ð°Ð½Ð¸Ðµ 'Хождение по воде' под водой." |
L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL = "ÐвÑомаÑиÑеÑки вÑзÑваÑÑ Smart-ÑÑанÑпоÑÑ Ð¿Ð¾Ñле иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ 'ÐÑÑÑ Ð²Ð¾Ð¸Ð½Ð° СвеÑа'." |
L.LIVESTOCK_MENU_MORE = "ÐÑе >>>" |
L.LIVESTOCK_MENU_SELECTALL = "ÐклÑÑиÑÑ Ð²Ñе" |
L.LIVESTOCK_MENU_SELECTNONE = "ÐÑклÑÑиÑÑ Ð²Ñе" |
L.LIVESTOCK_ZONE_DALARAN = "ÐалаÑан" |
L.LIVESTOCK_ZONE_WINTERGRASP = "ÐедÑнÑÑ Ðков" |
L.LIVESTOCK_SUBZONE_LANDING = "ÐлоÑадка ÐÑаÑа" |
L.LIVESTOCK_SUBZONE_UNDERBELLY = "Ðлоака" |
L.LIVESTOCK_SPELL_COLDWEATHERFLYING = "ÐолеÑÑ Ð² непогодÑ" |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM = "Ðблик ÑÑÑемиÑелÑной пÑиÑÑ" |
L.LIVESTOCK_SPELL_FLIGHTFORM = "Ðблик пÑиÑÑ" |
L.LIVESTOCK_SPELL_TRAVELFORM = "ÐÐ¾Ñ Ð¾Ð´Ð½Ñй облик" |
L.LIVESTOCK_SPELL_BEARFORM = "Ðблик медведÑ" |
L.LIVESTOCK_SPELL_DIREBEARFORM = "Ðблик лÑÑого медведÑ" |
L.LIVESTOCK_SPELL_CATFORM = "Ðблик коÑки" |
L.LIVESTOCK_SPELL_TREEOFLIFE = "ÐÑево жизни" |
L.LIVESTOCK_SPELL_MOONKINFORM = "Ðблик лÑнного ÑовÑÑ Ð°" |
L.LIVESTOCK_SPELL_GHOSTWOLF = "ÐÑизÑаÑнÑй волк" |
L.LIVESTOCK_SPELL_STEALTH = "ÐезамеÑноÑÑÑ" |
L.LIVESTOCK_SPELL_FEIGNDEATH = "ÐÑиÑвоÑиÑÑÑÑ Ð¼ÐµÑÑвÑм" |
L.LIVESTOCK_SPELL_INVISIBILITY = "ÐевидимоÑÑÑ" |
L.LIVESTOCK_SPELL_VANISH = "ÐзÑезновение" |
L.LIVESTOCK_SPELL_CLOAKING = "ÐезÑимоÑÑÑ" |
L.LIVESTOCK_SPELL_PROWL = "ÐÑадÑÑийÑÑ Ð·Ð²ÐµÑÑ" |
L.LIVESTOCK_SPELL_SHADOWMELD = "СлиÑÑÑÑ Ñ ÑенÑÑ" |
L.LIVESTOCK_SPELL_AQUATICFORM = "ÐоднÑй облик" |
L.LIVESTOCK_SPELL_WATERWALKING = "Хождение по воде" |
L.LIVESTOCK_SPELL_CRUSADERAURA = "ÐÑÑа воина СвеÑа" |
L.LIVESTOCK_SPELL_FOOD = "Food" |
L.LIVESTOCK_SPELL_DRINK = "Drink" |
L.LIVESTOCK_TOOLTIP_VERY = "оÑенÑ" |
L.LIVESTOCK_TOOLTIP_EXTREMELY = "невеÑоÑÑно" |
L.LIVESTOCK_TOOLTIP_FAST = "бÑÑÑÑое" |
L.LIVESTOCK_TOOLTIP_LOCATION = "меÑÑÐ°Ð½Ð°Ñ Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ" |
L.LIVESTOCK_TOOLTIP_CHANGES = "менÑеÑÑÑ" |
L.LIVESTOCK_TOOLTIP_NORTHREND = "ÐоÑдÑкол" |
L.LIVESTOCK_TOOLTIP_OUTLAND = "ÐапÑеделÑе" |
L.LIVESTOCK_INTERFACE_CRITTERMACROCREATED = "|cFF4444DDLivestock:|r ÐакÑÐ¾Ñ Ð²Ñзова ÑлÑÑайного ÑпÑÑника Ñоздан ÑÑеди макÑоÑов пеÑÑонажа!" |
L.LIVESTOCK_INTERFACE_LANDMACROCREATED = "|cFF4444DDLivestock:|r ÐакÑÐ¾Ñ Ð²Ñзова ÑлÑÑайного наземного ÑÑанÑпоÑÑа Ñоздан ÑÑеди макÑоÑов пеÑÑонажа!" |
L.LIVESTOCK_INTERFACE_FLYINGMACROCREATED = "|cFF4444DDLivestock:|r ÐакÑÐ¾Ñ Ð²Ñзова ÑлÑÑайного леÑаÑÑего ÑÑанÑпоÑÑа Ñоздан ÑÑеди макÑоÑов пеÑÑонажа!" |
L.LIVESTOCK_INTERFACE_SMARTMACROCREATED = "|cFF4444DDLivestock:|r 'Smart' макÑÐ¾Ñ Ð²ÑбоÑа наземного/леÑаÑÑего ÑÑанÑпоÑÑа Ñоздан ÑÑеди макÑоÑов пеÑÑонажа!" |
L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED = "|cFF4444DDLivestock:|r РваÑем ÑпиÑке оÑÑÑÑÑÑвÑÑÑ ÑпÑники. ÐожалÑйÑÑа набеÑиÑе "..LIVESTOCK_INTERFACE_SLASHSTRING.." и ÐажмиÑе на ÐºÐ½Ð¾Ð¿ÐºÑ ÑпÑÑников в поÑвивÑемÑÑ Ð¼ÐµÐ½Ñ." |
L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED = "|cFF4444DDLivestock:|r РваÑем ÑпиÑке оÑÑÑÑÑÑвÑÐµÑ Ð½Ð°Ð·ÐµÐ¼Ð½Ñй ÑÑанÑпоÑÑ. ÐожалÑйÑÑа набеÑиÑе "..LIVESTOCK_INTERFACE_SLASHSTRING.." и ÐажмиÑе на ÐºÐ½Ð¾Ð¿ÐºÑ Ð½Ð°Ð·ÐµÐ¼Ð½ÑÑ Ð² поÑвивÑемÑÑ Ð¼ÐµÐ½Ñ." |
L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED = "|cFF4444DDLivestock:|r РваÑем ÑпиÑке оÑÑÑÑÑÑвÑÑÑ Ð»ÐµÑаÑÑий ÑÑанÑпоÑÑ. ÐожалÑйÑÑа набеÑиÑе "..LIVESTOCK_INTERFACE_SLASHSTRING.." и ÐажмиÑе на ÐºÐ½Ð¾Ð¿ÐºÑ Ð»ÐµÑаÑÑÐ¸Ñ Ð² поÑвивÑемÑÑ Ð¼ÐµÐ½Ñ." |
L.LIVESTOCK_INTERFACE_RESETSAVEDDATA = "|cFF4444DDLivestock:|r Ð¡Ð¾Ñ ÑаннÑе даннÑе бÑли пеÑезапиÑанÑ, а Ð¼ÐµÐ½Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ñ. ÐожалÑйÑÑа, вÑбеÑиÑе в ÑооÑÑÑвеÑÑÑвÑÑÑÐ¸Ñ Ð¼ÐµÐ½Ñ ÑпÑÑников и ÑÑанÑпоÑÑ, коÑоÑÑй Ð²Ñ Ñ Ð¾ÑиÑе иÑполÑзоваÑÑ." |
L.LIVESTOCK_INTERFACE_NOFAVEPET = "|cFF4444DDLivestock:|r ÐÑ ÐµÑе не вÑбÑали ÑпÑÑника. ÐажмиÑе на нÑжном ÑпÑÑнике пÑавÑÑ ÐºÐ½Ð¾Ð¿ÐºÑ Ð¼ÑÑи в Ð¼ÐµÐ½Ñ Ð¡Ð¿ÑÑников." |
L.LIVESTOCK_INTERFACE_LISTFAVEPET = "|cFF4444DDLivestock: |r Ðа даннÑй Ð¼Ð¾Ð¼ÐµÐ½Ñ Ð²ÑбÑаннÑй Ðами ÑпÑÑник: %s." |
L.LIVESTOCK_INTERFACE_PREFSPANEL = "ÐаÑÑÑойки Livestock" |
end |
-- Credit for the Spanish translation goes to madbit (WoWInterface) |
if GetLocale() == "esES" then |
if not LivestockLocalizations then |
LivestockLocalizations = {} |
end |
local L = LivestockLocalizations |
L.LIVESTOCK_FONTSTRING_LIVESTOCKMENU = "Livestock Menu" |
L.LIVESTOCK_FONTSTRING_3DLABEL = "Modelo 3D" |
L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE = "Mostrar / Ocultar Botones" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE = "Livestock Macro Generator" |
L.LIVESTOCK_FONTSTRING_OTHERTITLE = "Opciones de filtro" |
L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL = "Criaturas" |
L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL = "Terrestres" |
L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL = "Voladoras" |
L.LIVESTOCK_FONTSTRING_SHOWWATERLABEL = "Agua" |
L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL = "Inteligente" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE = "Por favor, lea la documentaci\195\179n antes de pulsar estos botontes!" |
L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL = "Incluir monturas no epicas en el menu de monturas terrestres." |
L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL = "Incluir monturas no \195\169picas en el menu de monturas voladoras." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL = "Invocar una mascota de compa\195\177ia cuando te muevas." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL = "Invocar tu mascota favorita en lugar de una aleatoria." |
L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL = "No invocar mascota si estas maracado con JcJ." |
L.LIVESTOCK_FONTSTRING_IGNOREPVPRESTRICTIONININSTANCESLABEL = "...salvo que est\195\169s en una instancia JcE." |
L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL = "No invocar una mascotas autom\195\161ticamente si est\195\161s en una banda." |
L.LIVESTOCK_FONTSTRING_DISMISSPETONMOUNTLABEL = "Guarda tu mascota cuando saques una montura voladora o uses una forma de vuelo." |
L.LIVESTOCK_FONTSTRING_CYCLETIMERTOGGLELABEL = "Cambiar automaticamente de mascota tras segundos." |
L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL = "Habilitar foma de vuelo con la montura inteligente." |
L.LIVESTOCK_FONTSTRING_WORGENTOGGLELABEL = "Habilitar comportamiento de Galopada salvaje con Montura Inteligente." |
L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL = "Vuelo seguro: usar montar cuando estas en el aire no te desmontar\195\161." |
L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL = "Guardar la mascota cuando estes en oculto, fingiendo muerte o lances invisibilidad." |
L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL = "Solo desinvocar cuando estas marcado para JcJ." |
L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL = "Permitir a montar Livestoc que rompa los efectos de ocultaci\195\179n." |
L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL = "Montura Inteligente lanza Lobo Fantasma / Forma de vuelo en combate." |
L.LIVESTOCK_FONTSTRING_USEMOVINGFORMSLABEL = "Montura Inteligente lanza Lobo Fantasma / Forma de vuelo mientras te mueves (fuera de combate)." |
L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL = "Montura Inteligente te cambia desde otra forma a Forma de Gato en interiores." |
L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL = "Montura Inteligente lanza %s cuando est\195\161s bajo el agua." |
L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL = "Se invoca una montura automaticamente tras lanza Aura de Cruzado." |
L.LIVESTOCK_FONTSTRING_INDOORHUNTERASPECTSLABEL = "Montura Inteligente lanza Aspecto de la Manada/Guepardo en interiores." |
L.LIVESTOCK_FONTSTRING_MOVINGHUNTERASPECTSLABEL = "Montura Inteligente lanza Aspecto de la Manada cuando te mueves (exteriores, fuera de combate)" |
L.LIVESTOCK_FONTSTRING_SLOWFALLLABEL = "Montura Inteligente lanza Levitar / Ca\195\173da lenta cuando caes (fuera de combate)" |
L.LIVESTOCK_FLYING_NAMES = {"Draco", "Viento", "Grifo", "grifo", "Al'ar", "Razaescarcha", "Drag\195\179n", "Raya", "F\195\169nix", "Vermis", "Mimiron", "Ébano"} |
L.LIVESTOCK_VARIABLE_NAMES = {"celestial", "decapitado", "Invencible", "Alfombra", "paseo", "Guardián", "X-51", "M\195\161quina", "Amor"} |
L.LIVESTOCK_WATER_NAMES = {"Caballito","marina"} |
L.LIVESTOCK_MENU_MORE = "M\195\161s >>>" |
L.LIVESTOCK_MENU_SELECTALL = "Seleccionar todos" |
L.LIVESTOCK_MENU_SELECTNONE = "Seleccionar ninguno" |
L.LIVESTOCK_ZONE_WINTERGRASP = "Conquista del Invierno" |
L.LIVESTOCK_SPELL_COLDWEATHERFLYING = "Vuelo en clima fr\195\173o" |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM = "Forma de vuelo presto" |
L.LIVESTOCK_SPELL_FLIGHTFORM = "Forma de vuelo" |
L.LIVESTOCK_SPELL_TRAVELFORM = "Froma de viaje" |
L.LIVESTOCK_SPELL_BEARFORM = "Forma de oso" |
L.LIVESTOCK_SPELL_DIREBEARFORM = "Forma de oso temible" |
L.LIVESTOCK_SPELL_CATFORM = "Forma felina" |
L.LIVESTOCK_SPELL_TREEOFLIFE = "\195\161rbol de vida" |
L.LIVESTOCK_SPELL_MOONKINFORM = "Forma de lech\195\186cico lunar" |
L.LIVESTOCK_SPELL_GHOSTWOLF = "Lobo fantasmal" |
L.LIVESTOCK_SPELL_STEALTH = "Sigilo" |
L.LIVESTOCK_SPELL_FEIGNDEATH = "Fingir muerte" |
L.LIVESTOCK_SPELL_CHEETAH = "Aspecto del guepardo" |
L.LIVESTOCK_SPELL_PACK = "Aspecto de la manada" |
L.LIVESTOCK_SPELL_INVISIBILITY = "Invisibilidad" |
L.LIVESTOCK_SPELL_VANISH = "Esfumarse" |
L.LIVESTOCK_SPELL_CLOAKING = "Hacerse invisible" |
L.LIVESTOCK_SPELL_PROWL = "Acechar" |
L.LIVESTOCK_SPELL_SHADOWMELD = "Fusi\195\179n de las Sombras" |
L.LIVESTOCK_SPELL_AQUATICFORM = "Forma acu\195\161tica" |
L.LIVESTOCK_SPELL_WATERWALKING = "Caminar sobre el agua" |
L.LIVESTOCK_SPELL_LEVITATE = "Levitar" |
L.LIVESTOCK_SPELL_SLOWFALL = "Ca\195\173da lenta" |
L.LIVESTOCK_SPELL_PATHOFFROST = "Camino de hielo" |
L.LIVESTOCK_SPELL_FOOD = "Comer" |
L.LIVESTOCK_SPELL_DRINK = "Beber" |
L.LIVESTOCK_SPELL_CRUSADERAURA = "Aura de cruzado" |
L.LIVESTOCK_SPELL_HAUNTED = "Encantado" |
L.LIVESTOCK_SPELL_TWILIGHTSERPENT = "Serpiente Crepuscular" |
L.LIVESTOCK_SPELL_SAPPHIREOWL = "B\195\186ho de zafiro" |
L.LIVESTOCK_SPELL_RUBYHARE = "Liebre rub\195\173" |
L.LIVESTOCK_SPELL_RUNNINGWILD = "Galopada Salvaje" |
L.LIVESTOCK_SPELL_SEALEGS = "Piernas de mar" |
L.LIVESTOCK_TOOLTIP_VERY = "muy" |
L.LIVESTOCK_TOOLTIP_EXTREMELY = "extremadamente" |
L.LIVESTOCK_TOOLTIP_FAST = "veloz" |
L.LIVESTOCK_TOOLTIP_LOCATION = "zona" |
L.LIVESTOCK_TOOLTIP_CHANGES = "cambia" |
L.LIVESTOCK_TOOLTIP_NORTHREND = "Rasganorte" |
L.LIVESTOCK_TOOLTIP_OUTLAND = "Terrallende" |
L.LIVESTOCK_INTERFACE_CRITTERMACROCREATED = "|cFF4444DDLivestock:|r Macro para invocar criatura aleatoria creada en las macros espec\195\173ficas del jugador!" |
L.LIVESTOCK_INTERFACE_LANDMACROCREATED = "|cFF4444DDLivestock:|r Macro para invocar montura terrestre aleatoria creada en las macros espec\195\173ficas del jugador!" |
L.LIVESTOCK_INTERFACE_FLYINGMACROCREATED = "|cFF4444DDLivestock:|r Macro para invocar montura voladora aleatoria creada en las macros espec\195\173ficas del jugador!" |
L.LIVESTOCK_INTERFACE_SMARTMACROCREATED = "|cFF4444DDLivestock:|r Macro para invocar de forma inteligente monturas terrestres/voladoras creada en las macros espec\195\173ficas del jugador!" |
L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED = "|cFF4444DDLivestock:|r No hay criaturas en la lista. Escribe "..LIVESTOCK_INTERFACE_SLASHSTRING.." y haz click en el bot\195\179n de Criaturas para seleccionarlas." |
L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED = "|cFF4444DDLivestock:|r No hay monturas terrestres en tu lista. Please type "..LIVESTOCK_INTERFACE_SLASHSTRING.." y haz click en el bot\195\179n de Monturas terrestres para seleccionarlas." |
L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED = "|cFF4444DDLivestock:|r No hay monturas voladoras en tu lista. Please type "..LIVESTOCK_INTERFACE_SLASHSTRING.." y haz click en el bot\195\179n de Monturas voladoras para seleccionarlas." |
L.LIVESTOCK_INTERFACE_RESETSAVEDDATA = "|cFF4444DDLivestock:|r Se ha borrada la informaci\195\179n guardada y reescrito los men\195\186s. Ve a los men\195\186s de mascotas y monturas para deseleccionar aquellos que no quieres usar." |
L.LIVESTOCK_INTERFACE_NOFAVEPET = "|cFF4444DDLivestock:|r No has seleccionado una mascota favorita! Pulsa click derecho con el rat\195\179n en la lista para seleccionarla." |
L.LIVESTOCK_INTERFACE_LISTFAVEPET = "|cFF4444DDLivestock: |r Tu mascota favoria actualmente es %s." |
L.LIVESTOCK_INTERFACE_HAVENOTLEARNED = LIVESTOCK_HEADER.."No has aprendido %s todavía." |
L.LIVESTOCK_INTERFACE_USEITEMLINK = LIVESTOCK_HEADER.."Por favor, use "..LIVESTOCK_INTERFACE_SLASHSTRING.." [zone/subzone] <itemlink> para añadir dos mascota o montura a este area. Para eliminar su mascota o muntura, use /livestock [zone/subzone] [nopet/nomount]. Para ver su mascota o montura actual, use /livestock [zone/subzone] [whatpet/whatmount] o use la interfaz de usuario de Zonas y subzonas de Livestock a través de /livestock prefs" |
L.LIVESTOCK_INTERFACE_CONFIRMZONEADD = LIVESTOCK_HEADER.."Ahora invocar\195\161s %s para tu %s en la %s %s." |
L.LIVESTOCK_INTERFACE_CONFIRMZONEREMOVE = LIVESTOCK_HEADER.."Ya no tienes una %s seleccionada para la %s %s." |
L.LIVESTOCK_INTERFACE_DISPLAYZONEPET = LIVESTOCK_HEADER.."Haz seleccionado %s para tu %s en la %s %s." |
L.LIVESTOCK_INTERFACE_NOZONEPET = LIVESTOCK_HEADER.."No has seleccionado una %s para la %s %s." |
L.LIVESTOCK_INTERFACE_ZONEFRAMEHEADER = "Monturas y Mascotas de Zona y Subzona" |
L.LIVESTOCK_INTERFACE_CURRENTZONE = "|cFFEEEE00Zona actual:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONE = "|cFFEEEE00Subzona actual:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTZONEPET = "|cFFEEEE00Mascota de zona actual:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONEPET = "|cFFEEEE00Mascot de subzona actual:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTZONEMOUNT = "|cFFEEEE00Montura de zona actual:|r %s" |
L.LIVESTOCK_INTERFACE_CURRENTSUBZONEMOUNT = "|cFFEEEE00Montura de subzona actual:|r %s" |
L.LIVESTOCK_INTERFACE_NOPETSELECTED = "Sin mascota seleccionada." |
L.LIVESTOCK_INTERFACE_NOMOUNTSELECTED = "Sin montura seleccionada." |
L.LIVESTOCK_INTERFACE_DRAGERROR = LIVESTOCK_HEADER.."Solo puedes arrastras monturas y mascotas a esta caja." |
L.LIVESTOCK_INTERFACE_DRAGBOXEXPL = "Arrastra una monturas o mascota a esta caja para establecerla como tu compañero deseado\npara la actual %s. Click-derecho sobre la caja para eliminar tu mascota guardada;\nClick izquierdo para eliminar tu montura guardada." |
L.LIVESTOCK_INTERFACE_LAUNCHWEIGHTS = "Abre la interfaz de Prioridades de monturas aleatorias" |
L.LIVESTOCK_INTERFACE_USEWEIGHTS = "Usar prioridades para monturas aleatorias con Montura Inteligente." |
L.LIVESTOCK_INTERFACE_MAINPANEL = "Livestock" |
L.LIVESTOCK_INTERFACE_PREFSPANEL1 = "Mascotas de compa\195\177ia" |
L.LIVESTOCK_INTERFACE_PREFSPANEL2 = "Viaje y monturas" |
L.LIVESTOCK_INTERFACE_PREFSPANEL3 = "Zonas y Subzonas" |
L.LIVESTOCK_INTERFACE_PREFSPANEL4 = "Asignacion de prioridades para Montura Aleatoria" |
L.LIVESTOCK_CONTINENT_OUTLAND = 3 |
L.LIVESTOCK_CONTINENT_NORTHREND = 4 |
L.LIVESTOCK_EQUIPMENT_DONCARLOS = "El famoso sombrero de Don Carlos" |
L.LIVESTOCK_EQUIPMENT_BLOODSAIL = "Sombrero de almirante Velasangre" |
end |
-- Credit for French localization goes to Vastilia (WoWInterface) with support from Vorgl(Curse) |
if GetLocale() == "frFR" then |
if not LivestockLocalizations then |
LivestockLocalizations = {} |
end |
local L = LivestockLocalizations |
L.LIVESTOCK_FONTSTRING_3DLABEL = "Mod\195\168le 3D" |
L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE = "Commuter les boutons" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE = "G\195\169n\195\169rateur des macros de Livestock" |
L.LIVESTOCK_FONTSTRING_OTHERTITLE = "Filtre" |
L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL = "Compagnons" |
L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL = "Terrestres" |
L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL = "Volantes" |
L.LIVESTOCK_FONTSTRING_SHOWWATERLABEL = "Aquatiques" |
L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL = "Smart" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE = "Merci de lire la documentation avant de cliquer sur ces boutons!" |
L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL = "Inclure les montures non-\195\169piques dans la liste." |
L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL = "Inclure les montures volantes non-\195\169piques dans la liste." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL = "Invoquer automatiquement un compagnon quand vous vous d\195\169placez." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL = "Invoque votre favori plut\195\180t qu'un compagnon al\195\169atoire." |
L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL = "Ne pas invoquer automatiquement de compagnon en mode JcJ." |
L.LIVESTOCK_FONTSTRING_IGNOREPVPRESTRICTIONININSTANCESLABEL = "...sauf en instance JcE." |
L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL = "Ne pas invoquer automatiquement de compagnon en raid." |
L.LIVESTOCK_FONTSTRING_DISMISSPETONMOUNTLABEL = "Renvoyer le compagnon avant de prendre une monture volante ou d'invoquer la forme de vol." |
L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL = "Permettre la forme de vol avec le 'Smart Mounting.'" |
L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL = "Anti-chute: Activer une monture ne vous fait pas chuter en vol." |
L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL = "Renvoyer le compagnon avec Camouflage, Feindre la mort, ou Invisibilit\195\169." |
L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL = "Renvoie uniquement quand vous \195\170tes en mode JcJ." |
L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL = "Permettre \195\160 Livestock de stopper Camouflage lors de la monte." |
L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL = "'Smart Mounting' vous bascule en Loup fant\195\180me / Forme de voyage en combat." |
L.LIVESTOCK_FONTSTRING_USEMOVINGFORMSLABEL = "'Smart Mounting' vous bascule en Loup fant\195\180me / Forme de voyage en bougeant (hors combat)." |
L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL = "'Smart Mounting' bascule le lanceur de sorts en forme f\195\169line \195\160 l'int\195\169rieur." |
L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL = "'Smart Mounting' invoque %s quand vous \195\170tes sous l'eau." |
L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL = "Lance automatiquement 'Smart Mounting' apr\195\168s l'invocation d'Aura de crois\195\169." |
L.LIVESTOCK_FLYING_NAMES = {"Drake", "Coursier", "Griffon", "griffon", "Al'ar", "couvegivre", "Faucon", "Raie", "Phénix", "Wyrm", "Mimiron", "d'ébène", "Hippogriffe"} |
L.LIVESTOCK_VARIABLE_NAMES = {"céleste", "sans tête", "Invincible", "Tapis", "X-53", "Gardien", "X-51", "volante", "Fusée", "fusée"} |
L.LIVESTOCK_WATER_NAMES = {"Hippocampe", "Tortue"} |
L.LIVESTOCK_MENU_MORE = "Plus..." |
L.LIVESTOCK_MENU_SELECTALL = "Tout s\195\169lectionner" |
L.LIVESTOCK_MENU_SELECTNONE = "Tout d\195\169s\195\169lectionner" |
L.LIVESTOCK_ZONE_DALARAN = "Dalaran" |
L.LIVESTOCK_ZONE_WINTERGRASP = "Joug-d'hiver" |
L.LIVESTOCK_SUBZONE_LANDING = "Aire de Krasus" |
L.LIVESTOCK_SUBZONE_UNDERBELLY = "Entrailles de Dalaran" |
L.LIVESTOCK_SPELL_COLDWEATHERFLYING = "Vol par temps froid" |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM = "Forme de vol rapide" |
L.LIVESTOCK_SPELL_FLIGHTFORM = "Forme de vol" |
L.LIVESTOCK_SPELL_TRAVELFORM = "Forme de voyage" |
L.LIVESTOCK_SPELL_BEARFORM = "Forme d'ours" |
L.LIVESTOCK_SPELL_DIREBEARFORM = "Forme d'ours redoutable" |
L.LIVESTOCK_SPELL_CATFORM = "Forme de f\195\169lin" |
L.LIVESTOCK_SPELL_TREEOFLIFE = "Arbre de vie" |
L.LIVESTOCK_SPELL_MOONKINFORM = "Forme de s\195\169l\195\169nien" |
L.LIVESTOCK_SPELL_GHOSTWOLF = "Loup fant\195\180me" |
L.LIVESTOCK_SPELL_STEALTH = "Camouflage" |
L.LIVESTOCK_SPELL_FEIGNDEATH = "Feindre la mort" |
L.LIVESTOCK_SPELL_CHEETAH = "Aspect du gu\195\169pard" |
L.LIVESTOCK_SPELL_PACK = "Aspect de la meute" |
L.LIVESTOCK_SPELL_INVISIBILITY = "Invisibilit\195\169" |
L.LIVESTOCK_SPELL_VANISH = "Disparition" |
L.LIVESTOCK_SPELL_CLOAKING = "Occultation" |
L.LIVESTOCK_SPELL_PROWL = "R\195\180der" |
L.LIVESTOCK_SPELL_SHADOWMELD = "Camouflage dans l'ombre" |
L.LIVESTOCK_SPELL_AQUATICFORM = "Forme aquatique" |
L.LIVESTOCK_SPELL_WATERWALKING = "Marche sur l'eau" |
L.LIVESTOCK_SPELL_LEVITATE = "L\195\169vitation" |
L.LIVESTOCK_SPELL_SLOWFALL = "Chute lente" |
L.LIVESTOCK_SPELL_PATHOFFROST = "Passage de givre" |
L.LIVESTOCK_SPELL_FOOD = "Nourriture" |
L.LIVESTOCK_SPELL_DRINK = "Boisson" |
L.LIVESTOCK_SPELL_CRUSADERAURA = "Aura de crois\195\169" |
L.LIVESTOCK_SPELL_HAUNTED = "Hant\195\169" |
L.LIVESTOCK_SPELL_TWILIGHTSERPENT = "Serpent du cr\195\169puscule" |
L.LIVESTOCK_SPELL_SAPPHIREOWL = "Chouette de saphir" |
L.LIVESTOCK_SPELL_RUBYHARE = "Li\195\168vre de rubis" |
L.LIVESTOCK_TOOLTIP_VERY = "tr\195\168s" |
L.LIVESTOCK_TOOLTIP_EXTREMELY = "extr\195\170mement" |
L.LIVESTOCK_TOOLTIP_FAST = "rapide" |
L.LIVESTOCK_TOOLTIP_FAST2 = "vite" |
L.LIVESTOCK_TOOLTIP_LOCATION = "endroit" |
L.LIVESTOCK_TOOLTIP_CHANGES = "change" |
L.LIVESTOCK_TOOLTIP_NORTHREND = "Norfendre" |
L.LIVESTOCK_TOOLTIP_OUTLAND = "Outreterre" |
L.LIVESTOCK_INTERFACE_CRITTERMACROCREATED = "|cFF4444DDLivestock:|r La macro des compagnons al\195\169atoires a \195\169t\195\169 cr\195\169\195\169e dans l'onglet des macros de votre personnage!" |
L.LIVESTOCK_INTERFACE_LANDMACROCREATED = "|cFF4444DDLivestock:|r La macro des montures al\195\169atoires a \195\169t\195\169 cr\195\169\195\169e dans l'onglet des macros de votre personnage!" |
L.LIVESTOCK_INTERFACE_FLYINGMACROCREATED = "|cFF4444DDLivestock:|r La macro des montures volantes al\195\169atoires a \195\169t\195\169 cr\195\169\195\169e dans l'onglet des macros de votre personnage!" |
L.LIVESTOCK_INTERFACE_SMARTMACROCREATED = "|cFF4444DDLivestock:|r La macro 'Smart Mounting' a \195\169t\195\169 cr\195\169\195\169e dans l'onglet des macros de votre personnage!" |
L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED = "|cFF4444DDLivestock:|r Il n'y a pas de compagnons dans votre liste. Tapez "..LIVESTOCK_INTERFACE_SLASHSTRING.." et cliquez sur le bouton "..L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL.." pour faire votre s\195\169lection." |
L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED = "|cFF4444DDLivestock:|r Il n'y a pas de montures terrestres dans votre liste. Tapez "..LIVESTOCK_INTERFACE_SLASHSTRING.." et cliquez sur le bouton "..L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL.." pour faire votre s\195\169lection." |
L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED = "|cFF4444DDLivestock:|r Il n'y a pas de montures volantes dans votre liste. Tapez "..LIVESTOCK_INTERFACE_SLASHSTRING.." et cliquez sur le bouton "..L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL.." pour faire votre s\195\169lection." |
L.LIVESTOCK_INTERFACE_RESETSAVEDDATA = "|cFF4444DDLivestock:|r Les donn\195\169es ont \195\169t\195\169 effac\195\169es et menus reconstruits. Vous devez aller dans les menus des compagnons et des montures pour d\195\169s\195\169lectionner ceux que vous ne voulez pas invoquer." |
L.LIVESTOCK_INTERFACE_NOFAVEPET = "|cFF4444DDLivestock:|r Vous n'avez pas encore choisi votre compagnon favori! Faites un clic droit sur un familier dans le menu d\195\169roulant pour en faire votre favori." |
L.LIVESTOCK_INTERFACE_LISTFAVEPET = "|cFF4444DDLivestock: |r Votre compagnon favori actuel est %s." |
L.LIVESTOCK_INTERFACE_MAINPANEL = "Livestock" |
L.LIVESTOCK_INTERFACE_PREFSPANEL1 = "Compagnons" |
L.LIVESTOCK_INTERFACE_PREFSPANEL2 = "Smart et Mouvement" |
L.LIVESTOCK_CONTINENT_OUTLAND = 3 |
L.LIVESTOCK_CONTINENT_NORTHREND = 4 |
L.LIVESTOCK_EQUIPMENT_DONCARLOS = "C\195\169l\195\168bre chapeau de don Carlos" |
L.LIVESTOCK_EQUIPMENT_BLOODSAIL = "Bicorne d'amiral de la Voile sanglante" |
end |
-- Credit for German Localization goes to kdkunde on the WoWInterface forums. |
if GetLocale() == "deDE" then |
if not LivestockLocalizations then |
LivestockLocalizations = {} |
end |
local L = LivestockLocalizations |
L.LIVESTOCK_FONTSTRING_3DLABEL = "3D Modell" |
L.LIVESTOCK_FONTSTRING_BUTTONSTOGGLETITLE = "Zeige / Verstecke Buttons" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONTITLE = "Livestock Makro Generator" |
L.LIVESTOCK_FONTSTRING_OTHERTITLE = "Filter Optionen" |
L.LIVESTOCK_FONTSTRING_SHOWCRITTERSLABEL = "Haustier" |
L.LIVESTOCK_FONTSTRING_SHOWLANDLABEL = "Land" |
L.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL = "Flug" |
L.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL = "Smart" |
L.LIVESTOCK_FONTSTRING_MACROBUTTONSTITLE = "Bitte die Dokumentation vor dem Klicken dieser Buttons lesen!" |
L.LIVESTOCK_FONTSTRING_USESLOWLANDLABEL = "Nicht-epische Reittiere im Landreittier Men\195\188 anzeigen." |
L.LIVESTOCK_FONTSTRING_USESLOWFLYINGLABEL = "Nicht-epische Reittiere im Flugreittier Men\195\188 anzeigen." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVELABEL = "Automatisch ein Haustier herbeirufen, wenn du dich bewegst." |
L.LIVESTOCK_FONTSTRING_AUTOSUMMONONMOVEFAVELABEL = "Dein bevorzugtes Haustier statt eines zuf\195\163lligen herbeirufen." |
L.LIVESTOCK_FONTSTRING_RESTRICTAUTOSUMMONLABEL = "Kein Haustier automatisch herbeirufen, wenn du PVP gekennzeichnet bist." |
L.LIVESTOCK_FONTSTRING_IGNOREPVPRESTRICTIONININSTANCESLABEL = "...es sei denn du bist in einer PVE Instanz." |
L.LIVESTOCK_FONTSTRING_DONOTRAIDSUMMONLABEL = "Kein Haustier automatisch herbeirufen, wenn du in einem Schlachtzug bist." |
L.LIVESTOCK_FONTSTRING_DISMISSPETONMOUNTLABEL = "Das Haustier wegschicken wenn ein Flugreittier bestiegen wird oder in eine Fluggestalt gewechselt wird" |
L.LIVESTOCK_FONTSTRING_DRUIDTOGGLELABEL = "Ber\195\188cksichtige die Fluggestalt bei Smart Mounting." |
L.LIVESTOCK_FONTSTRING_SAFEFLIGHTLABEL = "Sicherer Flug: In der Luft wird durch einen Aufsteigen-Befehl nicht abgestiegen." |
L.LIVESTOCK_FONTSTRING_AUTODISMISSONSTEALTHLABEL = "Hasutier beim Schleichen, Totstellen oder bei Unsichtbarkeit wegschicken." |
L.LIVESTOCK_FONTSTRING_PVPDISMISSLABEL = "Nur wegschicken wenn du PVP gekennzeichnet bist." |
L.LIVESTOCK_FONTSTRING_MOUNTINSTEALTHLABEL = "Schleicheffekte d\195\188rfen beim Aufsteigen abgebrochen werden." |
L.LIVESTOCK_FONTSTRING_USECOMBATFORMSLABEL = "Smart Mounting wechselt im Kampf zum Geisterwolf bzw. in die Reisegestalt." |
L.LIVESTOCK_FONTSTRING_USEMOVINGFORMSLABEL = "Smart Mount wechselt in den Geisterwolf/die Reisegestalt w\195\164hrend man sich bewegt (ausserhalb des Kampfes)" |
L.LIVESTOCK_FONTSTRING_SMARTCATFORMLABEL = "Smart Mounting wechselt in Innenr\195\164umen in die Katzengestalt." |
L.LIVESTOCK_FONTSTRING_WATERWALKINGLABEL = "Smart Mounting wirkt %s wenn du unterwasser bist." |
L.LIVESTOCK_FONTSTRING_CRUSADERSUMMONLABEL = "Ein geeignetes Reittier herbeirufen, nach dem Wirken von Aura des Kreuzfahrers." |
L.LIVESTOCK_MENU_MORE = "Mehr >>>" |
L.LIVESTOCK_MENU_SELECTALL = "Alle ausw\195\164hlen" |
L.LIVESTOCK_MENU_SELECTNONE = "Keine ausw\195\164hlen" |
L.LIVESTOCK_ZONE_DALARAN = "Dalaran" |
L.LIVESTOCK_ZONE_WINTERGRASP = "Tausendwinter" |
L.LIVESTOCK_SUBZONE_LANDING = "Krasus' Landeplatz" |
L.LIVESTOCK_SUBZONE_UNDERBELLY = "Der Unterbauch" |
L.LIVESTOCK_SPELL_COLDWEATHERFLYING = "Kaltwetterflug" |
L.LIVESTOCK_SPELL_SWIFTFLIGHTFORM = "Schnelle Fluggestalt" |
L.LIVESTOCK_SPELL_FLIGHTFORM = "Fluggestalt" |
L.LIVESTOCK_SPELL_TRAVELFORM = "Reisegestalt" |
L.LIVESTOCK_SPELL_BEARFORM = "B\195\164rengestalt" |
L.LIVESTOCK_SPELL_DIREBEARFORM = "Terrorb\195\164rengestalt" |
L.LIVESTOCK_SPELL_CATFORM = "Katzengestalt" |
L.LIVESTOCK_SPELL_TREEOFLIFE = "Baum des Lebens" |
L.LIVESTOCK_SPELL_MOONKINFORM = "Mondkingestalt" |
L.LIVESTOCK_SPELL_GHOSTWOLF = "Geisterwolf" |
L.LIVESTOCK_SPELL_STEALTH = "Schleichen" |
L.LIVESTOCK_SPELL_FEIGNDEATH = "Totstellen" |
L.LIVESTOCK_SPELL_INVISIBILITY = "Unsichtbarkeit" |
L.LIVESTOCK_SPELL_VANISH = "Verschwinden" |
L.LIVESTOCK_SPELL_CLOAKING = "Verbergen" |
L.LIVESTOCK_SPELL_PROWL = "Schleichen" |
L.LIVESTOCK_SPELL_SHADOWMELD = "Schattenmimik" |
L.LIVESTOCK_SPELL_AQUATICFORM = "Wassergestalt" |
L.LIVESTOCK_SPELL_WATERWALKING = "Wasserwandeln" |
L.LIVESTOCK_SPELL_LEVITATE = "Levitieren" |
L.LIVESTOCK_SPELL_SLOWFALL = "Langsamer Fall" |
L.LIVESTOCK_SPELL_PATHOFFROST = "Eisige Pfade" |
L.LIVESTOCK_SPELL_FOOD = "Essen" |
L.LIVESTOCK_SPELL_DRINK = "Trinken" |
L.LIVESTOCK_SPELL_CRUSADERAURA = "Aura des Kreuzfahrers" |
L.LIVESTOCK_SPELL_HAUNTED = "Heimgesucht" |
L.LIVESTOCK_SPELL_TWILIGHTSERPENT = "Zwielichtschlange" |
L.LIVESTOCK_SPELL_SAPPHIREOWL = "Saphireule" |
L.LIVESTOCK_SPELL_RUBYHARE = "Rubinhase" |
L.LIVESTOCK_TOOLTIP_VERY = "sehr" |
L.LIVESTOCK_TOOLTIP_EXTREMELY = "extrem" |
L.LIVESTOCK_TOOLTIP_FAST = "schnell" |
L.LIVESTOCK_TOOLTIP_LOCATION = "Position" |
L.LIVESTOCK_TOOLTIP_CHANGES = "ver\195\164ndert" |
L.LIVESTOCK_TOOLTIP_NORTHREND = "Nordend" |
L.LIVESTOCK_TOOLTIP_OUTLAND = "Scherbenwelt" |
L.LIVESTOCK_INTERFACE_CRITTERMACROCREATED = "|cFF4444DDLivestock:|r Charakterspezifisches Makro zum Herbeirufen eines zuf\195\164lligen Haustiers erstellt!" |
L.LIVESTOCK_INTERFACE_LANDMACROCREATED = "|cFF4444DDLivestock:|r Charakterspezifisches Makro zum Herbeirufen eines zuf\195\164lligen Landreittiers erstellt!" |
L.LIVESTOCK_INTERFACE_FLYINGMACROCREATED = "|cFF4444DDLivestock:|r Charakterspezifisches Makro zum Herbeirufen eines zuf\195\164lligen Flugreittiers erstellt!" |
L.LIVESTOCK_INTERFACE_SMARTMACROCREATED = "|cFF4444DDLivestock:|r Charakterspezifisches Makro zum Herbeirufen eines zuf\195\164lligen Land-/Flugreittiers erstellt!" |
L.LIVESTOCK_INTERFACE_NOCRITTERSCHECKED = "|cFF4444DDLivestock:|r Es sind keine Haustiere in deiner Liste. Bitte tippe "..LIVESTOCK_INTERFACE_SLASHSTRING.." und klicke auf den Haustier Button um eine Auswahl zu treffen." |
L.LIVESTOCK_INTERFACE_NOLANDMOUNTSCHECKED = "|cFF4444DDLivestock:|r Es sind keine Landreittiere in deiner Liste. Bitte tippe "..LIVESTOCK_INTERFACE_SLASHSTRING.." und klicke auf den Landreittier-Button um eine Auswahl zu treffen." |
L.LIVESTOCK_INTERFACE_NOFLYINGMOUNTSCHECKED = "|cFF4444DDLivestock:|r Es sind keine Flugreittiere in deiner Liste. Bitte tippe "..LIVESTOCK_INTERFACE_SLASHSTRING.." und klicke auf den Flugreittier-Button um eine Auswahl zu treffen." |
L.LIVESTOCK_INTERFACE_RESETSAVEDDATA = "|cFF4444DDLivestock:|r Gespeicherte Einstellungen wurden gel\195\182scht und die Men\195\188s zur\195\188ckgesetzt. Bitte kontrolliere die Men\195\188s f\195\188r Haustiere und Reittiere und w\195\164hle die Begleiter ab, die du nicht herbeirufen willst." |
L.LIVESTOCK_INTERFACE_NOFAVEPET = "|cFF4444DDLivestock:|r Du hast noch kein bevorzugtes Haustier ausgew\195\163hlt! Ein Rechtsklick auf ein Haustier im Livestock-Men\195\188, macht es zum bevorzugten." |
L.LIVESTOCK_INTERFACE_LISTFAVEPET = "|cFF4444DDLivestock: |r Dein bevorzugtes Haustier ist jetzt %s." |
L.LIVESTOCK_INTERFACE_MAINPANEL = "Livestock" |
L.LIVESTOCK_INTERFACE_PREFSPANEL1 = "Haustiers" |
L.LIVESTOCK_INTERFACE_PREFSPANEL2 = "Smart und Bewegung" |
L.LIVESTOCK_CONTINENT_OUTLAND = 3 |
L.LIVESTOCK_CONTINENT_NORTHREND = 4 |
L.LIVESTOCK_EQUIPMENT_DONCARLOS = "Don Carlos' ber\195\188hmter Hut" |
L.LIVESTOCK_EQUIPMENT_BLOODSAIL = "Blutsegeladmiralshut" |
end |
Livestock - Commands, Preferences, and General Questions |
How Livestock Works: |
Livestock lets you create lists of land mounts, flying mounts, and vanity pets (also called non-combat pets, or critters) and provides |
several ways to let you randomly summon one of the list. There are also ways to tailor the circumstances for summoning, such as always |
summoning a certain mount or pet in a certain zone or always having a specific pet out, regardless of the zone. |
Livestock has four summoning commands: |
- Summon a vanity pet from your list |
- Summon a land mount from your list |
- Summon a flying mount from your list |
- Summon a smart mount, which will select a random land mount in areas where you cannot fly and a flying mount otherwise. |
If you are mounted, using any of the "mount" commands will dismount you. |
For classes that have other travel options, such as Druids' Flight Form, Hunters' Aspect of the Cheetah, and Shamans' Ghost Wolf, Livestock's |
Smart Mount can be configured to give access to those spells as well in certain circumstances. See the "Options and Preferences" section |
below, under Travel and Mounts, for more details. |
Starting Out: Building your Lists |
Type /livestock to bring up the menu frame. There are three buttons which correspond to your learned pets, flying mounts, and land mounts. |
Clicking each menu button brings up a menu with the list of learned mounts or pets. By default, all are selected. When you activate one of |
Livestock's summons, it will choose one of the selected mounts or pets and summon it for you. To remove an item from the list, click it and it |
will turn gray. |
You can see what your pet or mount looks like by selecting the check box on the right hand side of the main menu. The slider underneath the 3D |
model controls the rotation speed of your pet / mount so you can view it from all angles. Please note that excessive rotation speeds will not be |
tolerated. |
For pets, you can also designate a favorite by right-clicking its name in the menu. If you have selected a favorite pet, it will always |
be selected when your pet auto-summons (see below under Options and Preferences), regardless of what other pets might be selected. |
Using Livestock: Controlling your Summons |
Livestock provides three main ways to activate the four summoning commands. |
Keybinding: |
Open the Blizzard keybind interface by hitting Escape, selecting Key Bindings, and scrolling down until you see Livestock Summons. There, |
you can select keys to activate the four main summon commands, as well as additional ones to dismiss your pet and select your favorite pet. |
Buttons: |
Livestock provides four buttons to click on for summoning a land mount, flying mount, smart mount, or pet. They are disabled by default, |
but can be enabled by bringing up the Livestock Options (/livestock prefs) and checking the appropriate boxes under Show / Hide Buttons. |
The buttons can be moved by holding down Shift, Ctrl, or Alt and dragging them somewhere else. /livestock reset will put them back where |
they started. You can change the size of the buttons by using /livestock scale <scale>, which will adjust the size AND position of the |
buttons. Tip: select the size first, then move them. |
For the pet button, right clicking will dismiss your pet and left clicking will summon it. |
Macros: |
** IF YOU ARE CREATING A LIVESTOCK MACRO, MAKE SURE TO CLOSE YOUR MACRO WINDOW BEFORE PROCEEDING! ** |
For those who prefer to use action bars, Livestock will create macros for you to place on your bars. Open the main menu (/livestock prefs) |
and click the macro for the desired summon. It will be created in your character-specific macro spots. Make sure you have an open slot |
before you click these! |
The macros don't have icons attached, and will show up as the red ? icon, but you can easily adjust them to have a representative pet or mount. |
Simply insert an empty line at the beginning of the macro, and put "#showtooltip XXXXX" as the first line. Remove the quotes first, and change |
XXXXX to be the name of the pet or mount whose icon you want to see. |
For the pet macro, right clicking the macro will dismiss your pet and left clicking will summon it. |
To have a macro that summons your favorite pet, you can use "/run Livestock.SummonFavoritePet()" without quotes in a macro of your choosing. |
(Advanced macro writers: The macros work by issuing click commands to the buttons, which activate even if they're hidden. This means you can |
use conditionals such as [mounted], [combat], and [btn] to create various conditions for your usage.) |
Fine-tuning Livestock: Options and Preferences |
Livestock has many options for adjusting its behavior to your liking. There are four categories of options: display / interface options, pet options, |
travel / mount options, and zone / subzone options. (The zone / subzone options may be accessed through slash commands as well: see "Slash Commands" |
for more information.) |
Display / Interface Options: Reach these by typing /livestock prefs, or by selecting Livestock under the AddOns list of the Interface options |
menu. The options to show / hide the Livestock buttons are here, as well as to create Livestock Macros. Finally, there are filters to adjust whether |
or not the Livestock dropdown lists contain your slow (non-epic) land and flying mounts. If you un-select these, the names will disappear and the |
mounts will be unselected from your lists. |
Vanity Pets: These options relate to Livestock's ability to summon a pet when you move (i.e. always have a pet out). You must check the first option |
to access most of the other options. Some of the options may not be available to your race and class -- for example, only Night Elves, Hunters, Mages, |
Rogues, and Druids can access the option involving Stealth / Feign Death / Invisibility. |
Travel and Mounts: These options relate to Livestock's ability to get you onto a mount. Some of them place restrictions on when Livestock can and |
cannot mount or dismount you, while others provide options for certain classes to expand what can be done with Smart Mounting. |
** For an in-depth explanation of the preferences, visit http://recompense.wowinterface.com/portal.php?id=474&a=faq&faqid=344 ** |
Zones and Subzones: These options let you control what pet you will automatically summon in specific zones or subzones. You can also control what |
mount is summoned for you when you use the SmartMount feature. To designate a pet or mount for a specific zone or subzone, drag it from your Companion |
window (usually keybound to Shift-P) to the desired box. To erase a saved pet or mount, follow the directions on the options screen. |
Slash Commands for Livestock |
There are a few slash commands for Livestock, and are listed below. |
"/livestock" - This will bring up the menu bar containing the Livestock dropdown lists for mounts and pets as well as the 3D viewer. |
"/livestock prefs" - This will bring up the menu in the Interface Options containing the main preferences and settings for the addon. |
"/livestock scale <scale>" - This is used to set the scale of the Livestock Buttons, if used. Replace <scale> with a number, but be warned that |
large numbers (larger than 2.0) may scale off of your screen before you can move them. |
"/livestock reset" - Moves the Livestock buttons back to the middle of the screen if you lose them. |
"/livestock <'zone' / 'subzone'> <[itemLink] / nopet / whatpet / nomount / whatmount>" - This is the non-graphical interface for designating pets and |
mounts to be used in specific zones or subzones. Note that this *will* override favorite pets if you're in a zone with a designated pet. The pets |
portion works only if you've selected the option to automatically summon a pet when you move. (To use the graphical interface, type /livestock prefs, |
expand the options menu by clicking on the "+" button, and click on Zones and Subzones.) |
The first argument is either "zone" or "subzone" and designates whether you are changing / viewing the pet or mount for the zone or subzone that |
you're in. |
The second argument can either be an itemLink of one of your learned pets or mounts or one of the words "nopet", "nomount", "whichpet", or |
"whichmount". If it is an itemLink, then Livestock will designate that pet or mount for the zone or suzone you're in, depending on the first |
argument. If it's "nomount" or "nopet", it will clear out the designated pet or mount for the zone. "whichpet" and "whichmount" display the |
stored pet or mount for that zone. |
Example: While standing in Orgrimmar, "/livestock zone [Brown Snake]" will set the Brown Snake to be used whenever you don't have a pet out in |
Orgrimmar. When in the Violet Hold subzone of Dalaran, "/livestock subzone whichmount" will tell you what mount you've told Livestock to use in |
the Violet Hold subzone of Dalaran. |
Subzones take priorities over zones. This lets you, for example, specify a land mount to use in Dalaran but a flying mount to use specifically |
in the subzone of Krasus's Landing. |
"/livestock redo" - Sometimes Livestock starts behaving funny and summoning mounts you haven't checked in your list. When this happens, it's a bug. |
The fastest way to eliminate the issue is to use the "/livestock redo" command. This resets everything back to default, so you have to reset your |
settings and select your mounts again, but usually resolves the problem. (This is a sloppy fix for a bug that I still can't find quite yet.) |
"/livestock debug" - Prints out useful debugging information that can assist the developers in solving problems. Use the command again to turn off |
the debugging output. |