mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
razuvious strategy
This commit is contained in:
@@ -248,9 +248,9 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
||||
// check activity
|
||||
AllowActivity();
|
||||
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) {
|
||||
return;
|
||||
}
|
||||
// if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) {
|
||||
// return;
|
||||
// }
|
||||
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||
if (currentSpell && currentSpell->getState() == SPELL_STATE_CASTING && currentSpell->GetCastTime())
|
||||
{
|
||||
@@ -2007,6 +2007,12 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) {
|
||||
LOG_DEBUG("playerbot", "CanCastSpell() target name: {}, spellid: {}, bot name: {}, failed because has current channeled spell",
|
||||
target->GetName(), spellid, bot->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bot->HasSpellCooldown(spellid)) {
|
||||
if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
|
||||
LOG_DEBUG("playerbots", "Can cast spell failed. Spell not has cooldown. - target name: {}, spellid: {}, bot name: {}",
|
||||
|
||||
Reference in New Issue
Block a user