miscs(raid strategy, distance triggers, etc)

This commit is contained in:
Yunfan Li
2023-06-06 00:11:35 +08:00
parent 516366a74d
commit 98e46a3d02
32 changed files with 2711 additions and 76 deletions

View File

@@ -108,11 +108,11 @@ bool CastSpellAction::isUseful()
if (!spellTarget->IsInWorld() || spellTarget->GetMapId() != bot->GetMapId())
return false;
float combatReach = bot->GetCombatReach() + spellTarget->GetCombatReach();
if (!botAI->IsRanged(bot))
combatReach += 4.0f / 3.0f;
// float combatReach = bot->GetCombatReach() + spellTarget->GetCombatReach();
// if (!botAI->IsRanged(bot))
// combatReach += 4.0f / 3.0f;
return spellTarget && AI_VALUE2(bool, "spell cast useful", spell) && sServerFacade->GetDistance2d(bot, spellTarget) <= (range + combatReach);
return spellTarget && AI_VALUE2(bool, "spell cast useful", spell); // && sServerFacade->GetDistance2d(bot, spellTarget) <= (range + combatReach);
}
CastMeleeSpellAction::CastMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastSpellAction(botAI, spell)