mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
Fix spell allowing dead target
This commit is contained in:
parent
87978d6cd8
commit
35c5353b6a
@ -315,7 +315,8 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||||
if (currentSpell && currentSpell->getState() == SPELL_STATE_PREPARING)
|
if (currentSpell && currentSpell->getState() == SPELL_STATE_PREPARING)
|
||||||
{
|
{
|
||||||
if (currentSpell->m_targets.GetUnitTarget() && !currentSpell->m_targets.GetUnitTarget()->IsAlive())
|
if (currentSpell->m_targets.GetUnitTarget() && !currentSpell->m_targets.GetUnitTarget()->IsAlive() &&
|
||||||
|
currentSpell->GetSpellInfo() && !currentSpell->GetSpellInfo()->IsAllowingDeadTarget())
|
||||||
{
|
{
|
||||||
bot->InterruptSpell(CURRENT_GENERIC_SPELL);
|
bot->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||||
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
|
SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user