[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() void MovementAction::UpdateMovementState()
{ {
if (bot->Unit::IsInWater() || bot->Unit::IsUnderWater()) if (bot->Unit::IsUnderWater())
{ {
bot->SetSwim(true); bot->SetSwim(true);
} }

View File

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

View File

@@ -19,6 +19,18 @@
#include "WarriorActions.h" #include "WarriorActions.h"
#include "DruidBearActions.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) float HeiganDanceMultiplier::GetValue(Action* action)
{ {
Unit* boss = AI_VALUE2(Unit*, "find target", "heigan the unclean"); Unit* boss = AI_VALUE2(Unit*, "find target", "heigan the unclean");

View File

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

View File

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