[Raid] Naxx grobbulus

This commit is contained in:
Yunfan Li
2024-06-05 19:37:39 +08:00
parent be3b2c82f8
commit d0ee39aa3a
5 changed files with 32 additions and 9 deletions

View File

@@ -829,7 +829,7 @@ bool MovementAction::Follow(Unit* target, float distance)
void MovementAction::UpdateMovementState()
{
if (bot->Unit::IsInWater() || bot->Unit::IsUnderWater())
if (bot->Unit::IsUnderWater())
{
bot->SetSwim(true);
}

View File

@@ -234,6 +234,8 @@ class CastDeathAndDecayAction : public CastSpellAction
{
public:
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") { }
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
};
class CastHornOfWinterAction : public CastSpellAction

View File

@@ -19,6 +19,18 @@
#include "WarriorActions.h"
#include "DruidBearActions.h"
float GrobbulusMultiplier::GetValue(Action* action)
{
Unit* boss = AI_VALUE2(Unit*, "find target", "grobbulus");
if (!boss) {
return 1.0f;
}
if (dynamic_cast<AvoidAoeAction*>(action)) {
return 0.0f;
}
return 1.0f;
}
float HeiganDanceMultiplier::GetValue(Action* action)
{
Unit* boss = AI_VALUE2(Unit*, "find target", "heigan the unclean");

View File

@@ -5,22 +5,30 @@
#include "Multiplier.h"
#include "raids/naxxramas/RaidNaxxBossHelper.h"
class GrobbulusMultiplier : public Multiplier
{
public:
GrobbulusMultiplier(PlayerbotAI* ai) : Multiplier(ai, "grobbulus") {}
public:
virtual float GetValue(Action* action);
};
class HeiganDanceMultiplier : public Multiplier
{
public:
HeiganDanceMultiplier(PlayerbotAI* ai) : Multiplier(ai, "helgan dance") {}
public:
HeiganDanceMultiplier(PlayerbotAI* ai) : Multiplier(ai, "helgan dance") {}
public:
virtual float GetValue(Action* action);
public:
virtual float GetValue(Action* action);
};
class LoathebGenericMultiplier : public Multiplier
{
public:
LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {}
public:
LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {}
public:
virtual float GetValue(Action* action);
public:
virtual float GetValue(Action* action);
};
class ThaddiusGenericMultiplier : public Multiplier

View File

@@ -112,6 +112,7 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
void RaidNaxxStrategy::InitMultipliers(std::vector<Multiplier*> &multipliers)
{
multipliers.push_back(new GrobbulusMultiplier(botAI));
multipliers.push_back(new HeiganDanceMultiplier(botAI));
multipliers.push_back(new LoathebGenericMultiplier(botAI));
multipliers.push_back(new ThaddiusGenericMultiplier(botAI));