default defense is 0 on korean client
echoi92 opened this issue · 2 comments
Hey @echoi92 iirc there was an issue on SoM with UnitDefense
but I might be mistaken 🤔
I'll look into it, thanks for pointing it out!
Any reason we can't just use
UnitDefense("player")
instead of this long block
for i = 1, MAX_SKILL_LINES do
local skillName, isHeader, _, rank, _, modifier = GetSkillLineInfo(i)
if (not skillName) then
-- We exceeded the available skill lines
break
end
if (not isHeader) and (skillName == DEFENSE) then
skillRank = rank
skillModifier = modifier
break
end
end
if ECS.IsWotlk then
skillModifier = skillModifier + math.floor(GetCombatRatingBonus(CR_DEFENSE_SKILL))
end
on defense.lua?