mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user