Core/Players: Learn parent skilllines if they are missing while learning child skills

Port From (https://github.com/TrinityCore/TrinityCore/commit/9022f2374884b966c3ecf7199c52498140775668)
This commit is contained in:
hondacrx
2024-02-03 17:39:25 -05:00
parent 5606501071
commit 1d4a30cc2d
4 changed files with 54 additions and 15 deletions
+11
View File
@@ -11686,6 +11686,17 @@ namespace Game
{
public uint Id;
public uint[] Value = new uint[SkillConst.MaxSkillStep];
public uint GetValueForTierIndex(int tierIndex)
{
if (tierIndex >= SkillConst.MaxSkillStep)
tierIndex = (int)SkillConst.MaxSkillStep - 1;
while (Value[tierIndex] == 0 && tierIndex > 0)
--tierIndex;
return Value[tierIndex];
}
}
public class TerrainSwapInfo