mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Fix a bug that pet does not autocast after summoned or log in.
--HG-- branch : trunk
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user