Improve class spell and use trinket

This commit is contained in:
Yunfan Li
2024-08-14 18:18:01 +08:00
parent c778e303df
commit a1cb9dea05
47 changed files with 377 additions and 108 deletions

View File

@@ -6,6 +6,7 @@
#include "ShamanActions.h"
#include "Playerbots.h"
#include "Totem.h"
bool CastTotemAction::isUseful()
{
@@ -41,7 +42,24 @@ bool CastSearingTotemAction::isUseful()
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", "flametongue totem");
}
bool CastMagmaTotemAction::isUseful() { return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", name); }
bool CastMagmaTotemAction::isUseful() {
Unit* target = AI_VALUE(Unit*, "current target");
if (!target || !bot->IsWithinMeleeRange(target))
return false;
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", name);
}
bool CastFireNovaAction::isUseful() {
Creature* fireTotem = bot->GetMap()->GetCreature(bot->m_SummonSlot[1]);
if (!fireTotem)
return false;
if (bot->GetDistance(fireTotem) > 8.0f)
return false;
return CastMeleeSpellAction::isUseful();
}
bool CastCleansingTotemAction::isUseful()
{