Core/Players: - Fixed auto learning class abilities that are rewarded from quests if starting Exile's Reach in case player chose not to start there

Port From (https://github.com/TrinityCore/TrinityCore/commit/b4bdc4eea678628ffdfda9bf2c1f8c9f02b7b7f1)
This commit is contained in:
hondacrx
2021-02-13 20:50:56 -05:00
parent 6ceeb9e31e
commit 593ac992bc
4 changed files with 30 additions and 3 deletions
+13 -2
View File
@@ -1580,8 +1580,19 @@ namespace Game.Entities
if (spellInfo == null)
continue;
if (ability.AcquireMethod != AbilityLearnType.OnSkillValue && ability.AcquireMethod != AbilityLearnType.OnSkillLearn)
continue;
switch (ability.AcquireMethod)
{
case AbilityLearnType.OnSkillValue:
case AbilityLearnType.OnSkillLearn:
break;
case AbilityLearnType.RewardedFromQuest:
if (!ability.Flags.HasAnyFlag(SkillLineAbilityFlags.CanFallbackToLearnedOnSkillLearn) ||
!spellInfo.MeetsFutureSpellPlayerCondition(this))
continue;
break;
default:
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 != AbilityLearnType.OnSkillLearn || ability.NumSkillUps != 1))