aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 6a7d809da03..4071cfb50bb 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1858,19 +1858,12 @@ void Pet::CastPetAura(PetAura const* aura)
CastSpell(this, auraId, true);
}
-struct DoPetLearnSpell
-{
- DoPetLearnSpell(Pet& _pet) : pet(_pet) {}
- void operator() (uint32 spell_id) { pet.learnSpell(spell_id); }
- Pet& pet;
-};
-
void Pet::learnSpellHighRank(uint32 spellid)
{
learnSpell(spellid);
- DoPetLearnSpell worker(*this);
- spellmgr.doForHighRanks(spellid,worker);
+ if(uint32 next = spellmgr.GetNextSpellInChain(spellid))
+ learnSpellHighRank(next);
}
void Pet::SynchronizeLevelWithOwner()