Skip to content

Commit

Permalink
Merge pull request #194 from Bestride/develop
Browse files Browse the repository at this point in the history
Fixes issue with Paladins in WotLK
  • Loading branch information
DanSheps authored Nov 3, 2022
2 parents 0bafa91 + 8ecc131 commit 1db0b70
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
14 changes: 7 additions & 7 deletions Versions/Common/BeStride_Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@ BeStride_Constants = {
},
[33391] = {
name = "Journeyman Riding",
depends = 33388,
--depends = 33388,
level = 150,
active = true,
},
[34090] = {
name = "Expert Riding",
unlocks = "flying",
depends = 33391,
--depends = 33391,
level = 225,
active = true,
},
[34091] = {
name = "Artisan Riding",
depends = 34090,
--depends = 34090,
level = 300,
active = true,
},
[90265] = {
name = "Master Riding",
depends = 34091,
--depends = 34091,
level = 375,
active = true,
},
Expand All @@ -75,20 +75,20 @@ BeStride_Constants = {
},
[33392] = {
name = "Journeyman Riding",
depends = 33389,
--depends = 33389,
level = 150,
active = true,
},
[34092] = {
name = "Expert Riding",
unlocks = "flying",
depends = 33391,
--depends = 33391,
level = 225,
active = true,
},
[34093] = {
name = "Artisan Riding",
depends = 34092,
--depends = 34092,
level = 300,
active = true,
},
Expand Down
7 changes: 6 additions & 1 deletion Versions/Common/BeStride_Mount.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ function BeStride_Mount:Paladin()
end

function BeStride_Mount:PaladinDivineSteed()
return self:MountSpell("[@player] "..SpellToName(190784).."\n/cancelaura "..SpellToName(190784))
spell = SpellToName(190784)
if spell then
return self:MountSpell("[@player] " .. spell .. "\n/cancelaura " .. spell)
else
return nil
end
end

function BeStride_Mount:Shaman()
Expand Down
4 changes: 2 additions & 2 deletions Versions/Common/mounting.class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function BeStride:Mage()
elseif self:MageBlink() and self:MovementCheck() then
return BeStride_Mount:MageBlink()
end
BeStride_Debug:Error("This is a error. Please report to the maintainer at https://www.github.com/dansheps/bestride/issues/. ID: MABSL")
end

function BeStride:Monk()
Expand All @@ -83,9 +84,8 @@ end
function BeStride:Paladin()
if not IsFlying() and self:MovementCheck() and self:PaladinDivineSteed() then
return BeStride_Mount:Paladin()
else
--BeStride_Debug:Error("This is a error. Please report to the maintainer at https://www.github.com/dansheps/bestride/issues/")
end
BeStride_Debug:Error("This is a error. Please report to the maintainer at https://www.github.com/dansheps/bestride/issues/. ID: PABSL")
end

function BeStride:Priest()
Expand Down
6 changes: 4 additions & 2 deletions Versions/Wrath/MountTable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ function BeStride:AddNewMount(mountId)
local mountID,name,spellID,icon,isSummoned = GetCompanionInfo("MOUNT", mountId)
if not BeStride_MountDB[spellID] then
print("Mount not in DB:")
print("\tName: " .. name)
print("\tMount ID:" .. mountID)
print("\tMount Number:" .. mountId)
print("\tSpell ID:" .. spellID)
print("\tMount ID:" .. mountID)
if name then
print("\tName: " .. name)
return
end

Expand Down
12 changes: 2 additions & 10 deletions Versions/Wrath/logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,11 @@ function BeStride:GetRidingSkill()
local ridingSkillLevel = 0
local ridingSpells = {}

for skillIndex = 1, GetNumSkillLines() do
local skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier, skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType, skillDescription = GetSkillLineInfo(skillIndex)

if BeStride_Locale.Skills.Riding.Name and skillName == BeStride_Locale.Skills.Riding.Name then
ridingSkillLevel = skillRank
end
end

for spellID,skill in pairsByKeys(BeStride_Constants.Riding.Skill) do
if IsSpellKnown(spellID) and skill.level ~= nil and skill.level > ridingSkillLevel then
if (IsSpellKnown(spellID) or IsPlayerSpell(spellID)) and skill.level ~= nil and skill.level > ridingSkillLevel then
ridingSkillLevel = skill.level
ridingSpells[spellID] = true
elseif IsSpellKnown(spellID) and skill.level == nil then
elseif (IsSpellKnown(spellID) or IsPlayerSpell(spellID)) and skill.level == nil then
ridingSpells[spellID] = true
end
end
Expand Down

0 comments on commit 1db0b70

Please sign in to comment.