diff options
| author | Matan Shukry <matanshukry@gmail.com> | 2021-02-10 00:06:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-09 23:06:45 +0100 |
| commit | b4bdc4eea678628ffdfda9bf2c1f8c9f02b7b7f1 (patch) | |
| tree | a0b51d569d0d94f9e008d9ff2e75f470a2ebbdbc /src/server/game/Spells | |
| parent | 9e9fb667ecef8263f6184d194c3aceafd4d89e71 (diff) | |
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 (#26036)
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 10 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellInfo.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index c005bfab5bd..c58ae80fa1a 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1127,6 +1127,7 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S IconFileDataId = _misc ? _misc->SpellIconFileDataID : 0; ActiveIconFileDataId = _misc ? _misc->ActiveIconFileDataID : 0; ContentTuningId = _misc ? _misc->ContentTuningID : 0; + ShowFutureSpellPlayerConditionID = _misc ? _misc->ShowFutureSpellPlayerConditionID : 0; _visuals = std::move(visuals); @@ -4532,3 +4533,12 @@ void SpellInfo::_UnloadImplicitTargetConditionLists() } } } + +bool SpellInfo::MeetsFutureSpellPlayerCondition(Player const* player) const +{ + if (ShowFutureSpellPlayerConditionID == 0) + return false; + + PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(ShowFutureSpellPlayerConditionID); + return !playerCondition || ConditionMgr::IsPlayerMeetingCondition(player, playerCondition); +} diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index aa5c6400a3f..be0dda67508 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -509,6 +509,7 @@ class TC_GAME_API SpellInfo uint32 IconFileDataId; uint32 ActiveIconFileDataId; uint32 ContentTuningId; + uint32 ShowFutureSpellPlayerConditionID; LocalizedString const* SpellName; float ConeAngle; float Width; @@ -686,6 +687,9 @@ class TC_GAME_API SpellInfo uint32 GetAllowedMechanicMask() const; + // Player Condition + bool MeetsFutureSpellPlayerCondition(Player const* player) const; + private: // loading helpers void _InitializeExplicitTargetMask(); |
