From f93c9f614af5d5bd945b16b52efee993ee9c48fc Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 29 Dec 2017 12:24:54 -0500 Subject: [PATCH] Core/Player: Automatically learn riding spells for certain race/class combinations --- Source/Game/Entities/Player/Player.Spells.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index e5b824838..eee335b5b 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -1575,11 +1575,6 @@ namespace Game.Entities void LearnSkillRewardedSpells(uint skillId, uint skillValue) { - // bad hack to work around data being suited only for the client - AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN for riding - // client uses it to show riding in spellbook as trainable - if (skillId == (uint)SkillType.Riding) - return; - uint raceMask = getRaceMask(); uint classMask = getClassMask(); foreach (var ability in CliDB.SkillLineAbilityStorage.Values) @@ -1594,6 +1589,10 @@ namespace Game.Entities if (ability.AcquireMethod != AbilytyLearnType.OnSkillValue && ability.AcquireMethod != AbilytyLearnType.OnSkillLearn) continue; + // AcquireMethod == 2 && NumSkillUps == 1 --> automatically learn riding skill spell, else we skip it (client shows riding in spellbook as trainable). + if (skillId == (uint)SkillType.Riding && (ability.AcquireMethod != AbilytyLearnType.OnSkillLearn || ability.NumSkillUps != 1)) + continue; + // Check race if set if (ability.RaceMask != 0 && !Convert.ToBoolean(ability.RaceMask & raceMask)) continue;