diff options
author | Mihapro <Mihapro@users.noreply.github.com> | 2017-12-28 22:34:33 +0000 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-12-28 23:34:33 +0100 |
commit | 02022d3cd65f072874e9f5de061e0b158b6eb634 (patch) | |
tree | 33e3340fc32161466b6c300d925e71b393c9fe8c | |
parent | 071b23d606ae0837e414f647f680c7ec8adaf191 (diff) |
Core/Player: Automatically learn riding spells for certain race/class combinations
* Paladins, Warlocks, Druids and Worgens automatically learn Apprentice Riding at level 20
* Death Knights start with Journeyman Riding
* Demon Hunters start with Artisian Riding + Flight Master's License
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 35f768c8338..6983f0b8c49 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -23965,11 +23965,6 @@ void Player::LearnQuestRewardedSpells() void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 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 == SKILL_RIDING) - return; - uint32 raceMask = getRaceMask(); uint32 classMask = getClassMask(); for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) @@ -23985,6 +23980,10 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) if (ability->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; + // AcquireMethod == 2 && NumSkillUps == 1 --> automatically learn riding skill spell, else we skip it (client shows riding in spellbook as trainable). + if (skillId == SKILL_RIDING && (ability->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN || ability->NumSkillUps != 1)) + continue; + // Check race if set if (ability->RaceMask && !(ability->RaceMask & raceMask)) continue; |