Shaman maelstrom weapon

This commit is contained in:
Yunfan Li
2024-09-01 14:37:35 +08:00
parent 3f9165a714
commit 0c71ae5c61
4 changed files with 13 additions and 9 deletions

View File

@@ -51,11 +51,14 @@ bool CastMagmaTotemAction::isUseful() {
}
bool CastFireNovaAction::isUseful() {
Unit* target = AI_VALUE(Unit*, "current target");
if (!target)
return false;
Creature* fireTotem = bot->GetMap()->GetCreature(bot->m_SummonSlot[1]);
if (!fireTotem)
return false;
if (bot->GetDistance(fireTotem) > 8.0f)
if (target->GetDistance(fireTotem) > 8.0f)
return false;
return CastMeleeSpellAction::isUseful();