diff options
author | megamage <none@none> | 2009-05-30 00:05:44 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-30 00:05:44 -0500 |
commit | d3e1e1eae60caec9fd5962cf2912fcefb48a7809 (patch) | |
tree | 421d37addb2dadd2ca3acc9f5f9cc75337f8a2bb /src/game/Pet.cpp | |
parent | 4d27b266384cdbe4afe76dcafb69e100448a144e (diff) |
*Fix a bug that pet does not autocast after summoned or log in.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r-- | src/game/Pet.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index cd920852952..5f89d71ff53 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1447,8 +1447,13 @@ void Pet::CleanupActionBar() { for(int i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i) if(UnitActionBarEntry const* ab = m_charmInfo->GetActionBarEntry(i)) - if(ab->SpellOrAction && ab->IsActionBarForSpell() && !HasSpell(ab->SpellOrAction)) - m_charmInfo->SetActionBar(i,0,ACT_DISABLED); + if(ab->SpellOrAction && ab->IsActionBarForSpell()) + { + if(!HasSpell(ab->SpellOrAction)) + m_charmInfo->SetActionBar(i, 0, ACT_PASSIVE); + else if(ab->Type == ACT_ENABLED) + ToggleAutocast(ab->SpellOrAction, true); + } } void Pet::InitPetCreateSpells() |