mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Cone of Cold isUseful check
This commit is contained in:
@@ -15,3 +15,10 @@ bool CastFrostNovaAction::isUseful()
|
||||
{
|
||||
return sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
|
||||
}
|
||||
|
||||
bool CastConeOfColdAction::isUseful()
|
||||
{
|
||||
bool facingTarget = AI_VALUE2(bool, "facing", "current target");
|
||||
bool targetClose = sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
|
||||
return facingTarget && targetClose;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class CastConeOfColdAction : public CastSpellAction
|
||||
public:
|
||||
CastConeOfColdAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "cone of cold") { }
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
// bool isUseful() override;
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastArcaneIntellectAction : public CastBuffSpellAction
|
||||
|
||||
Reference in New Issue
Block a user