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:
Yunfan Li
2025-04-11 20:31:38 +08:00
committed by GitHub
parent 0d19f298da
commit 19447c3914
18 changed files with 175 additions and 73 deletions

View File

@@ -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)