Reduce delay time

This commit is contained in:
Yunfan Li
2024-01-06 17:53:36 +08:00
parent 600228e3fd
commit 5fbd55dc56
2 changed files with 5 additions and 5 deletions

View File

@@ -2435,7 +2435,7 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
if (failWithDelay)
{
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
// if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && HasRealPlayerMaster())) {
// LOG_DEBUG("playerbots", "Spell cast fail with delay - target name: {}, spellid: {}, bot name: {}",
// target->GetName(), spellId, bot->GetName());
@@ -2502,7 +2502,7 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
if (bot->isMoving() && spell->GetCastTime())
{
// bot->StopMoving();
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
spell->cancel();
delete spell;
return false;
@@ -2656,7 +2656,7 @@ bool PlayerbotAI::CastSpell(uint32 spellId, float x, float y, float z, Item* ite
if (bot->isMoving() && spell->GetCastTime())
{
// bot->StopMoving();
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
spell->cancel();
delete spell;
return false;
@@ -2842,7 +2842,7 @@ bool PlayerbotAI::CastVehicleSpell(uint32 spellId, Unit* target)
if (failWithDelay)
{
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
return false;
}