mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
fix party member dispel.
This commit is contained in:
@@ -13,3 +13,30 @@ bool MeleeAction::isUseful()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TogglePetSpellAutoCastAction::Execute(Event event) {
|
||||
Pet* pet = bot->GetPet();
|
||||
if (!pet) {
|
||||
return false;
|
||||
}
|
||||
for (PetSpellMap::const_iterator itr = pet->m_spells.begin(); itr != pet->m_spells.end(); ++itr)
|
||||
{
|
||||
if(itr->second.state == PETSPELL_REMOVED)
|
||||
continue;
|
||||
|
||||
uint32 spellId = itr->first;
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (spellInfo->IsPassive())
|
||||
continue;
|
||||
|
||||
// imp's spell, felhunte's intelligence, ghoul's leap
|
||||
if (spellId == 4511 || spellId == 1742 ||
|
||||
spellId == 54424 || spellId == 57564 || spellId == 57565 || spellId == 57566 || spellId == 57567 ||
|
||||
spellId == 47482) {
|
||||
pet->ToggleAutocast(spellInfo, false);
|
||||
} else {
|
||||
pet->ToggleAutocast(spellInfo, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user