From d3e1e1eae60caec9fd5962cf2912fcefb48a7809 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 30 May 2009 00:05:44 -0500 Subject: *Fix a bug that pet does not autocast after summoned or log in. --HG-- branch : trunk --- src/game/Pet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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() -- cgit v1.2.3