mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
Enable new rpg strategy by default (#1192)
* Add RandomBotMinLevelChance * Save mana only for healer * Disable addclass dk for low level player * Target selection and debuff cast with less players in group * Change default rpg strategy and bots count in config * Logs clean up * Improve init=auto * Remove login logs after initialization * Rndbots stats for quest * Prediction chase in reach combat * Poor & Normal items ensurence for init=auto
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
#include "CreatureAI.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
enum PetSpells
|
||||
{
|
||||
PET_PROWL_1 = 24450,
|
||||
PET_PROWL_2 = 24452,
|
||||
PET_PROWL_3 = 24453,
|
||||
PET_COWER = 1742,
|
||||
PET_LEAP = 47482
|
||||
};
|
||||
|
||||
static std::vector<uint32> disabledPetSpells = {PET_PROWL_1, PET_PROWL_2, PET_PROWL_3, PET_COWER, PET_LEAP};
|
||||
|
||||
bool MeleeAction::isUseful()
|
||||
{
|
||||
// do not allow if can't attack from vehicle
|
||||
@@ -44,18 +55,20 @@ bool TogglePetSpellAutoCastAction::Execute(Event event)
|
||||
{
|
||||
if (itr->second.state == PETSPELL_REMOVED)
|
||||
continue;
|
||||
|
||||
|
||||
uint32 spellId = itr->first;
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo->IsAutocastable())
|
||||
continue;
|
||||
|
||||
bool shouldApply = true;
|
||||
if (spellId == 1742 /*cower*/ || spellId == 24450 /*Prowl*/ ||
|
||||
spellId == 47482 /*Leap*/ /* || spellId == 47481 Gnaw*/)
|
||||
for (uint32 disabledSpell : disabledPetSpells)
|
||||
{
|
||||
|
||||
shouldApply = false;
|
||||
if (spellId == disabledSpell)
|
||||
{
|
||||
shouldApply = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool isAutoCast = false;
|
||||
for (unsigned int& m_autospell : pet->m_autospells)
|
||||
|
||||
Reference in New Issue
Block a user