diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-04-18 23:58:18 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-04-18 23:58:18 +0200 |
| commit | 531afa6bcc485db7c115e5ab5d874bda2cbf642e (patch) | |
| tree | b3ee4a4e6d96fe6569f746dcd8a3032b75c01d90 /src/server/game/Entities | |
| parent | a5108d262616e267f549b18eb72ab7245af6bece (diff) | |
Core/DataStores: Convert SkillLineAbilityAcquireMethod to enum class
Diffstat (limited to 'src/server/game/Entities')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e3bfe6de90f..5e73bb3fb20 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3115,7 +3115,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent continue; // Runeforging special case - if ((_spell_idx->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(_spell_idx->second->SkillLine)) || ((_spell_idx->second->SkillLine == SKILL_RUNEFORGING) && _spell_idx->second->TrivialSkillLineRankHigh == 0)) + if ((_spell_idx->second->GetAcquireMethod() == SkillLineAbilityAcquireMethod::AutomaticCharLevel && !HasSkill(_spell_idx->second->SkillLine)) || ((_spell_idx->second->SkillLine == SKILL_RUNEFORGING) && _spell_idx->second->TrivialSkillLineRankHigh == 0)) if (SkillRaceClassInfoEntry const* rcInfo = sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, GetRace(), GetClass())) LearnDefaultSkill(rcInfo); } @@ -25107,7 +25107,7 @@ void Player::LearnQuestRewardedSpells(Quest const* quest) SkillLineAbilityMapBounds skills = sSpellMgr->GetSkillLineAbilityMapBounds(learned_0); for (auto skillItr = skills.first; skillItr != skills.second; ++skillItr) { - if (skillItr->second->AcquireMethod == SKILL_LINE_ABILITY_REWARDED_FROM_QUEST) + if (skillItr->second->GetAcquireMethod() == SkillLineAbilityAcquireMethod::LearnedOrAutomaticCharLevel) { found = true; break; @@ -25147,12 +25147,12 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue, Races r if (!spellInfo) continue; - switch (ability->AcquireMethod) + switch (ability->GetAcquireMethod()) { - case SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE: - case SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN: + case SkillLineAbilityAcquireMethod::AutomaticSkillRank: + case SkillLineAbilityAcquireMethod::AutomaticCharLevel: break; - case SKILL_LINE_ABILITY_REWARDED_FROM_QUEST: + case SkillLineAbilityAcquireMethod::LearnedOrAutomaticCharLevel: if (!ability->GetFlags().HasFlag(SkillLineAbilityFlags::CanFallbackToLearnedOnSkillLearn) || !spellInfo->MeetsFutureSpellPlayerCondition(this)) continue; @@ -25175,7 +25175,7 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue, Races r continue; // need unlearn spell - if (int32(skillValue) < ability->MinSkillLineRank && ability->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) + if (int32(skillValue) < ability->MinSkillLineRank && ability->GetAcquireMethod() == SkillLineAbilityAcquireMethod::AutomaticSkillRank) RemoveSpell(ability->Spell); // need learn else if (!IsInWorld()) |
