diff options
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d610031da00..6c7fb40c3fa 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20563,12 +20563,19 @@ bool Player::IsAllowUseFlyMountsHere() const return v_map == 530 || v_map == 571 && HasSpell(54197) && zoneId != 4197; } +struct DoPlayerLearnSpell +{ + DoPlayerLearnSpell(Player& _player) : player(_player) {} + void operator() (uint32 spell_id) { player.learnSpell(spell_id,false); } + Player& player; +}; + void Player::learnSpellHighRank(uint32 spellid) { learnSpell(spellid,false); - if(uint32 next = spellmgr.GetNextSpellInChain(spellid)) - learnSpellHighRank(next); + DoPlayerLearnSpell worker(*this); + spellmgr.doForHighRanks(spellid,worker); } void Player::_LoadSkills() |
