Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Dracthyr start #354

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion APR-Core/ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ end

function APR.changelog:SetChangeLog()
local news = {
{ "v4.5.3", "2024-10-29" },
"#Features",
"- Added new starting route for other Dracthyr classes",

"#Bugs",
"- Fixed starting coordinates for first quest of Dracthyr Evoker route",
"- Changed 'Scourge' to 'Undead' in route names",

{ "v4.5.2", "2024-10-23" },
"#Bugs",
"- Fixed starting zone route for troll",

"#WoW",
"- Update TOC Interface for 11.0.5",

Expand Down
2 changes: 1 addition & 1 deletion APR-Core/Config_Route.lua
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ function APR.routeconfig:GetStartingZonePrefab()
tinsert(APRCustomPath[APR.PlayerID], "Troll Start")
tinsert(APRCustomPath[APR.PlayerID], "Durotar")
elseif (APR.Race == "Scourge") then --Undead
tinsert(APRCustomPath[APR.PlayerID], "Scourge Start")
tinsert(APRCustomPath[APR.PlayerID], "Undead Start")
elseif (APR.Race == "BloodElf") then
tinsert(APRCustomPath[APR.PlayerID], "Blood Elf Start") -- missing part 2
-- ALLIANCE
Expand Down
33 changes: 17 additions & 16 deletions APR-Core/CurrentStep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -693,25 +693,26 @@ end
function APR.currentStep:UpdateStepButtonCooldowns()
for id, questContainer in pairs(self.questsList) do
local IconButton = questContainer.IconButton
if IconButton then
if IconButton:IsShown() then
local start = 0
local duration = 0
if IconButton.attribute == 'spell' then
start, duration = C_Spell.GetSpellCooldown(tonumber(IconButton.itemID))
else
start, duration = C_Container.GetItemCooldown(tonumber(IconButton.itemID))
end
if start then
if IconButton.cooldown:GetCooldownDuration() == 0 or not IconButton.cooldown:IsShown() then
IconButton.cooldown:SetCooldown(start, duration)
end
else
IconButton.cooldown:Clear()
end
if IconButton and IconButton:IsShown() then
local startTime, duration, enable = 0, 0, 0
local isCooldownShown = IconButton.cooldown:IsShown()
local cooldownDuration = IconButton.cooldown:GetCooldownDuration()

if IconButton.attribute == 'spell' then
local spellCooldownInfo = C_Spell.GetSpellCooldown(tonumber(IconButton.itemID))
startTime, duration = spellCooldownInfo.startTime, spellCooldownInfo.duration
enable = spellCooldownInfo.isEnabled and 1 or 0
else
startTime, duration, enable = C_Container.GetItemCooldown(tonumber(IconButton.itemID))
end

if enable > 0 and startTime > 0 and (cooldownDuration == 0 or not isCooldownShown) then
IconButton.cooldown:SetCooldown(start, duration)
else
IconButton.cooldown:Clear()
end
elseif IconButton then
IconButton.cooldown:Clear()
end
end
end
Expand Down
89 changes: 53 additions & 36 deletions APR-Core/database/AllianceRoutes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,48 +120,65 @@ if (APR.Faction == "Alliance") then
}
APR.RouteList.Custom = {}

-- Starting Route or custom
---
local function assignRoute(expansion, key, label)
APR.RouteList[expansion][key] = label
end

local startRoutes = {
Dwarf = { expansion = "Vanilla", key = "27-ColdridgeValleyDwarf", label = "Dwarf Start" },
Gnome = { expansion = "Vanilla", key = "30-NewTinkertown", label = "Gnome Start" },
Human = { expansion = "Vanilla", key = "37-NorthshireHuman", label = "Human Start" },
NightElf = { expansion = "Vanilla", key = "57-ShadowglenNightElf", label = "Night Elf Start" },
Draenei = { expansion = "TheBurningCrusade", key = "97-AmmenVale", label = "Draenei Start" },
["Death Knight"] = {
allied = { expansion = "WrathOfTheLichKing", key = "118-Allied_Icecrown Citadel", label = "Allied Death Knight Start" },
default = { expansion = "WrathOfTheLichKing", key = "23-ScarletEnclave", label = "Death Knight Start" }
},
Worgen = { expansion = "Cataclysm", key = "179-Gilneas", label = "Worgen Start" },
["Demon Hunter"] = { expansion = "Legion", key = "672-Mardum", label = "Demon Hunter Start" },
LightforgedDraenei = { expansion = "Legion", key = "940-LightforgedDraenei-intro", label = "Lightforged Draenei Start" },
VoidElf = { expansion = "Legion", key = "971-VoidElf-intro", label = "Void Elf Start" },
DarkIronDwarf = { expansion = "BattleForAzeroth", key = "1186-DarkIronDwarf-intro", label = "Dark Iron Dwarf Start" },
KulTiran = { expansion = "BattleForAzeroth", key = "1161-KulTiran-intro", label = "Kul Tiran Start" },
Mechagnome = { expansion = "BattleForAzeroth", key = "1573-Mechagnome-intro", label = "Mechagnome Start" },
Dracthyr = {
evoker = { expansion = "Dragonflight", key = "2118-DracthyrStart-Evo", label = "Dracthyr Start" },
default = { expansion = "Dragonflight", key = "2118-DracthyrStart-Other", label = "Dracthyr Start" }
},
EarthenDwarf = { expansion = "TheWarWithin", key = "2248-TWW-Earthen", label = "Earthen Dwarf Start" }
}

-- WARNING Class before race
if (APR.ClassId == APR.Classes["Demon Hunter"]) then
APR.RouteList.Legion["672-Mardum"] = "Demon Hunter Start"
elseif (APR.ClassId == APR.Classes["Death Knight"] and APR.RaceID >= 23) then
APR.RouteList.WrathOfTheLichKing["118-Allied_Icecrown Citadel"] = "Allied Death Knight Start"
elseif (APR.ClassId == APR.Classes["Death Knight"]) then
APR.RouteList.WrathOfTheLichKing["23-ScarletEnclave"] = "Death Knight Start"
elseif (APR.Race == "Dracthyr") then
APR.RouteList.Dragonflight["2118-DracthyrStart-A"] = "Dracthyr Start"
elseif (APR.Race == "NightElf") then
APR.RouteList.Vanilla["57-ShadowglenNightElf"] = "Night Elf Start"
elseif (APR.Race == "Dwarf") then
APR.RouteList.Vanilla["27-ColdridgeValleyDwarf"] = "Dwarf Start"
elseif (APR.Race == "Human") then
APR.RouteList.Vanilla["37-NorthshireHuman"] = "Human Start"
elseif (APR.Race == "Gnome") then
APR.RouteList.Vanilla["30-NewTinkertown"] = "Gnome Start"
elseif (APR.Race == "Draenei") then
APR.RouteList.TheBurningCrusade["97-AmmenVale"] = "Draenei Start"
elseif (APR.Race == "Worgen") then
APR.RouteList.Cataclysm["179-Gilneas"] = "Worgen Start"
elseif (APR.Race == "VoidElf") then
APR.RouteList.Legion["971-VoidElf-intro"] = "Void Elf Start"
elseif (APR.Race == "LightforgedDraenei") then
APR.RouteList.Legion["940-LightforgedDraenei-intro"] = "Lightforged Draenei Start"
elseif (APR.Race == "DarkIronDwarf") then
APR.RouteList.BattleForAzeroth["1186-DarkIronDwarf-intro"] = "DarkIron Dwarf Start"
elseif (APR.Race == "Mechagnome") then
APR.RouteList.BattleForAzeroth["1573-Mechagnome-intro"] = "Mechagnome Start"
elseif (APR.Race == "KulTiran") then
APR.RouteList.BattleForAzeroth["1161-KulTiran-intro"] = "Kul Tiran Start"
elseif (APR.Race == "KulTiran") then
APR.RouteList.BattleForAzeroth["1161-KulTiran-intro"] = "Kul Tiran Start"
elseif (APR.Race == "EarthenDwarf") then
APR.RouteList.TheWarWithin["2248-TWW-Earthen"] = "Earthen Dwarf Start"
---
local function applyStartingRoute()
local route
if APR.ClassId == APR.Classes["Demon Hunter"] then
route = startRoutes["Demon Hunter"]
elseif APR.ClassId == APR.Classes["Death Knight"] then
-- Use allied start if race ID is >= 23; otherwise, default Death Knight start
route = APR.RaceID >= 23 and startRoutes["Death Knight"].allied or startRoutes["Death Knight"].default
elseif APR.Race == "Dracthyr" then
-- Check for Dracthyr Evoker-specific start, else use general Dracthyr start
route = APR.ClassId == APR.Classes.Evoker and startRoutes.Dracthyr.evoker or
startRoutes.Dracthyr.default
else
route = startRoutes[APR.Race]
end
if route then
assignRoute(route.expansion, route.key, route.label)
end
end

-- Apply starting route based on class and race
applyStartingRoute()

-- Lumbermill Wod route
-- Special case for Warlords of Draenor route based on quest completion
if C_QuestLog.IsQuestFlaggedCompleted(35049) then
APR.RouteList.WarlordsOfDraenor["543-DesMephisto-Gorgrond-Lumbermill"] = "WOD04 - Gorgrond"
assignRoute("WarlordsOfDraenor", "543-DesMephisto-Gorgrond-Lumbermill", "WOD04 - Gorgrond")
else
APR.RouteList.WarlordsOfDraenor["543-DesMephisto-Gorgrond"] = "WOD04 - Gorgrond"
assignRoute("WarlordsOfDraenor", "543-DesMephisto-Gorgrond", "WOD04 - Gorgrond")
end
end
126 changes: 74 additions & 52 deletions APR-Core/database/HordeRoutes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,63 +96,85 @@ if (APR.Faction == "Horde") then
}
APR.RouteList.Custom = {}

-- Starting Route or custom
---
local function assignRoute(expansion, key, label)
APR.RouteList[expansion][key] = label
end

local startRoutes = {
Orc = { expansion = "Vanilla", key = "1-ValleyOfTrialsOrc", label = "Orc Start" },
Scourge = { expansion = "Vanilla", key = "465-TirisfalGladesUndead", label = "Undead Start" },
Tauren = { expansion = "Vanilla", key = "462-MulgoreTauren", label = "Tauren Start" },
Troll = {
Warrior = { expansion = "Vanilla", key = "463-EchoIslesTrollWar", label = "Troll Start" },
Hunter = { expansion = "Vanilla", key = "463-EchoIslesTrollHunter", label = "Troll Start" },
Rogue = { expansion = "Vanilla", key = "463-EchoIslesTrollRogue", label = "Troll Start" },
Priest = { expansion = "Vanilla", key = "463-EchoIslesTrollPriest", label = "Troll Start" },
Shaman = { expansion = "Vanilla", key = "463-EchoIslesTrollShaman", label = "Troll Start" },
Mage = { expansion = "Vanilla", key = "463-EchoIslesTrollMage", label = "Troll Start" },
Warlock = { expansion = "Vanilla", key = "463-EchoIslesTrollWarlock", label = "Troll Start" },
Monk = { expansion = "Vanilla", key = "463-EchoIslesTrollMonk", label = "Troll Start" },
Druid = { expansion = "Vanilla", key = "463-EchoIslesTrollDruid", label = "Troll Start" }
},
BloodElf = { expansion = "TheBurningCrusade", key = "467-BloodElf-intro", label = "Blood Elf Start" },
["Death Knight"] = {
default = { expansion = "WrathOfTheLichKing", key = "23-ScarletEnclave", label = "Death Knight Start" },
allied = { expansion = "WrathOfTheLichKing", key = "118-Allied_Icecrown Citadel", label = "Allied Death Knight Start" }
},
Goblin = {
main = { expansion = "Cataclysm", key = "194-Kezan", label = "Goblin Start" },
secondary = { expansion = "Cataclysm", key = "174-LostIsles", label = "Goblin - Lost Isles" }
},
["Demon Hunter"] = { expansion = "Legion", key = "672-Mardum", label = "Demon Hunter Start" },
HighmountainTauren = { expansion = "Legion", key = "652-HighmountainTauren-intro", label = "Highmountain Tauren Start" },
Nightborne = { expansion = "Legion", key = "680-Nightborne-intro", label = "Nightborne Start" },
MagharOrc = { expansion = "BattleForAzeroth", key = "85-MagharOrc-intro", label = "Maghar Orc Start" },
Vulpera = { expansion = "BattleForAzeroth", key = "85-Vulpera-intro", label = "Vulpera Start" },
ZandalariTroll = { expansion = "BattleForAzeroth", key = "1165-Zandalari-intro", label = "Zandalari Troll Start" },
Dracthyr = {
evoker = { expansion = "Dragonflight", key = "2118-DracthyrStart-Evo", label = "Dracthyr Start" },
default = { expansion = "Dragonflight", key = "2118-DracthyrStart-Other", label = "Dracthyr Start" }
},
EarthenDwarf = { expansion = "TheWarWithin", key = "2248-TWW-Earthen", label = "Earthen Dwarf Start" }
}

-- WARNING Class before race
if (APR.ClassId == APR.Classes["Demon Hunter"]) then
APR.RouteList.Legion["672-Mardum"] = "Demon Hunter Start"
elseif (APR.ClassId == APR.Classes["Death Knight"] and APR.RaceID >= 23) then
APR.RouteList.WrathOfTheLichKing["118-Allied_Icecrown Citadel"] = "Allied Death Knight Start"
elseif (APR.ClassId == APR.Classes["Death Knight"]) then
APR.RouteList.WrathOfTheLichKing["23-ScarletEnclave"] = "Death Knight Start"
elseif (APR.Race == "Dracthyr") then
APR.RouteList.Dragonflight["2118-DracthyrStart-H"] = "Dracthyr Start"
elseif (APR.Race == "Orc") then
APR.RouteList.Vanilla["1-ValleyOfTrialsOrc"] = "Orc Start"
elseif (APR.Race == "Tauren") then
APR.RouteList.Vanilla["462-MulgoreTauren"] = "Tauren Start"
elseif (APR.ClassId == APR.Classes["Warrior"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollWar"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Hunter"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollHunter"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Rogue"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollRogue"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Priest"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollPriest"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Shaman"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollShaman"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Mage"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollMage"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Warlock"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollWarlock"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Monk"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollMonk"] = "Troll Start"
elseif (APR.ClassId == APR.Classes["Druid"] and APR.Race == "Troll") then
APR.RouteList.Vanilla["463-EchoIslesTrollDruid"] = "Troll Start"
elseif (APR.Race == "Scourge") then --Undead
APR.RouteList.Vanilla["465-TirisfalGladesUndead"] = "Scourge Start"
elseif (APR.Race == "BloodElf") then
APR.RouteList.TheBurningCrusade["467-BloodElf-intro"] = "Blood Elf Start"
elseif (APR.Race == "Goblin") then
APR.RouteList.Cataclysm["194-Kezan"] = "Goblin Start"
APR.RouteList.Cataclysm["174-LostIsles"] = "Goblin - Lost Isles"
elseif APR.Race == "Nightborne" then
APR.RouteList.Legion["680-Nightborne-intro"] = "Nightborne Start"
elseif APR.Race == "HighmountainTauren" then
APR.RouteList.Legion["652-HighmountainTauren-intro"] = "Highmountain Tauren Start"
elseif APR.Race == "ZandalariTroll" then
APR.RouteList.BattleForAzeroth["1165-Zandalari-intro"] = "Zandalari Troll Start"
elseif APR.Race == "Vulpera" then
APR.RouteList.BattleForAzeroth["85-Vulpera-intro"] = "Vulpera Start"
elseif APR.Race == "MagharOrc" then
APR.RouteList.BattleForAzeroth["85-MagharOrc-intro"] = "Maghar Orc Start"
elseif APR.Race == "EarthenDwarf" then
APR.RouteList.TheWarWithin["2248-TWW-Earthen"] = "Earthen Dwarf Start"
---
local function applyStartingRoute()
local route
if APR.ClassId == APR.Classes["Demon Hunter"] then
route = startRoutes["Demon Hunter"]
elseif APR.ClassId == APR.Classes["Death Knight"] then
-- Use allied start if race ID is >= 23; otherwise, default Death Knight start
route = APR.RaceID >= 23 and startRoutes["Death Knight"].allied or startRoutes["Death Knight"].default
elseif APR.Race == "Dracthyr" then
-- Check for Dracthyr Evoker-specific start, else use general Dracthyr start
route = APR.ClassId == APR.Classes.Evoker and startRoutes.Dracthyr.evoker or
startRoutes.Dracthyr.default
elseif APR.Race == "Goblin" then
local gob = startRoutes.Goblin
assignRoute(gob.main.expansion, gob.main.key, gob.main.label)
route = gob.secondary
elseif APR.Race == "Troll" and startRoutes.Troll[APR.ClassId] then
local trollRoute = startRoutes.Troll[APR.ClassId]
assignRoute(trollRoute.expansion, trollRoute.key, trollRoute.label)
else
route = startRoutes[APR.Race]
end
if route then
assignRoute(route.expansion, route.key, route.label)
end
end

-- Apply starting route based on class and race
applyStartingRoute()

-- Lumbermill Wod route
if C_QuestLog.IsQuestFlaggedCompleted(34992) then
APR.RouteList.WarlordsOfDraenor["543-DesMephisto-Gorgrond-Lumbermill"] = "WOD04 - Gorgrond"
-- Special case for Warlords of Draenor route based on quest completion
if C_QuestLog.IsQuestFlaggedCompleted(35049) then
assignRoute("WarlordsOfDraenor", "543-DesMephisto-Gorgrond-Lumbermill", "WOD04 - Gorgrond")
else
APR.RouteList.WarlordsOfDraenor["543-DesMephisto-Gorgrond-p1"] = "WOD04 - Gorgrond"
assignRoute("WarlordsOfDraenor", "543-DesMephisto-Gorgrond-p1", "WOD04 - Gorgrond")
end
end
2 changes: 1 addition & 1 deletion APR-Core/helpers/classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ APR.Classes = {
Monk = 10,
Druid = 11,
["Demon Hunter"] = 12,
Dracthyr = 13,
Evoker = 13,
}
Loading