Code Base
Code Base
#ifndef _PLAYERBOT_RAIDNAXXACTIONCONTEXT_H
#define _PLAYERBOT_RAIDNAXXACTIONCONTEXT_H
#include "Action.h"
#include "NamedObjectContext.h"
#include "RaidNaxxActions.h"
private:
static Action* go_behind_the_boss(PlayerbotAI* ai) { return new
GrobbulusGoBehindAction(ai); }
static Action* rotate_grobbulus(PlayerbotAI* ai) { return new
GrobbulusRotateAction(ai); }
static Action* grobbulus_move_center(PlayerbotAI* ai) { return new
GrobblulusMoveCenterAction(ai); }
static Action* heigan_dance_melee(PlayerbotAI* ai) { return new
HeiganDanceMeleeAction(ai); }
static Action* heigan_dance_ranged(PlayerbotAI* ai) { return new
HeiganDanceRangedAction(ai); }
static Action* thaddius_attack_nearest_pet(PlayerbotAI* ai) { return new
ThaddiusAttackNearestPetAction(ai); }
// static Action* thaddius_tank_to_place(PlayerbotAI* ai) { return new
ThaddiusMeleeToPlaceAction(ai); }
// static Action* thaddius_ranged_to_place(PlayerbotAI* ai) { return new
ThaddiusRangedToPlaceAction(ai); }
static Action* thaddius_move_to_platform(PlayerbotAI* ai) { return new
ThaddiusMoveToPlatformAction(ai); }
static Action* thaddius_move_polarity(PlayerbotAI* ai) { return new
ThaddiusMovePolarityAction(ai); }
static Action* razuvious_target(PlayerbotAI* ai) { return new
RazuviousTargetAction(ai); }
static Action* razuvious_use_obedience_crystal(PlayerbotAI* ai)
{
return new RazuviousUseObedienceCrystalAction(ai);
}
static Action* horseman_attract_alternatively(PlayerbotAI* ai)
{
return new HorsemanAttractAlternativelyAction(ai);
}
static Action* horseman_attack_in_order(PlayerbotAI* ai) { return new
HorsemanAttactInOrderAction(ai); }
// static Action* sapphiron_ground_main_tank_position(PlayerbotAI* ai)
{ return new
// SapphironGroundMainTankPositionAction(ai); }
static Action* sapphiron_ground_position(PlayerbotAI* ai) { return new
SapphironGroundPositionAction(ai); }
static Action* sapphiron_flight_position(PlayerbotAI* ai) { return new
SapphironFlightPositionAction(ai); }
// static Action* sapphiron_avoid_chill(PlayerbotAI* ai) { return new
SapphironAvoidChillAction(ai); }
static Action* kelthuzad_choose_target(PlayerbotAI* ai) { return new
KelthuzadChooseTargetAction(ai); }
static Action* kelthuzad_position(PlayerbotAI* ai) { return new
KelthuzadPositionAction(ai); }
static Action* anubrekhan_choose_target(PlayerbotAI* ai) { return new
AnubrekhanChooseTargetAction(ai); }
static Action* anubrekhan_position(PlayerbotAI* ai) { return new
AnubrekhanPositionAction(ai); }
static Action* gluth_choose_target(PlayerbotAI* ai) { return new
GluthChooseTargetAction(ai); }
static Action* gluth_position(PlayerbotAI* ai) { return new
GluthPositionAction(ai); }
static Action* gluth_slowdown(PlayerbotAI* ai) { return new
GluthSlowdownAction(ai); }
static Action* loatheb_position(PlayerbotAI* ai) { return new
LoathebPositionAction(ai); }
static Action* loatheb_choose_target(PlayerbotAI* ai) { return new
LoathebChooseTargetAction(ai); }
};
#endif
#ifndef _PLAYERBOT_RAIDNAXXACTIONS_H
#define _PLAYERBOT_RAIDNAXXACTIONS_H
#include "Action.h"
#include "AttackAction.h"
#include "GenericActions.h"
#include "MovementActions.h"
#include "PlayerbotAI.h"
#include "Playerbots.h"
#include "RaidNaxxBossHelper.h"
#include "RaidNaxxScripts.h"
// public:
// virtual bool Execute(Event event);
// };
protected:
float distance, delta_angle;
};
protected:
bool CalculateSafe();
void ResetSafe()
{
curr_safe = 0;
curr_dir = 1;
}
void NextSafe()
{
curr_safe += curr_dir;
if (curr_safe == 3 || curr_safe == 0)
{
curr_dir = -curr_dir;
}
}
uint32 prev_phase, prev_erupt, prev_timer;
uint32 curr_safe, curr_dir;
std::vector<std::pair<float, float>> waypoints;
};
protected:
std::pair<float, float> platform;
};
private:
ThaddiusBossHelper helper;
};
private:
RazuviousBossHelper helper;
};
protected:
FourhorsemanBossHelper helper;
};
protected:
FourhorsemanBossHelper helper;
};
protected:
SapphironBossHelper helper;
};
protected:
SapphironBossHelper helper;
bool MoveToNearestIcebolt();
};
private:
KelthuzadBossHelper helper;
};
private:
KelthuzadBossHelper helper;
};
private:
GluthBossHelper helper;
};
private:
GluthBossHelper helper;
};
private:
GluthBossHelper helper;
};
private:
LoathebBossHelper helper;
};
private:
LoathebBossHelper helper;
};
#endif
#include "RaidNaxxStrategy.h"
#include "RaidNaxxMultipliers.h"
triggers.push_back(
new TriggerNode("mutating injection removed",
NextAction::array(0, new NextAction("grobbulus move
center", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode(
"grobbulus cloud", NextAction::array(0, new NextAction("rotate
grobbulus", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode(
"heigan ranged", NextAction::array(0, new NextAction("heigan dance
ranged", ACTION_RAID + 1), nullptr)));
// Kel'Thuzad
triggers.push_back(new TriggerNode(
"kel'thuzad", NextAction::array(0, new NextAction("kel'thuzad position",
ACTION_RAID + 2),
new NextAction("kel'thuzad choose
target", ACTION_RAID + 1), nullptr)));
// Anub'Rekhan
triggers.push_back(new TriggerNode(
"anub'rekhan", NextAction::array(0, new NextAction("anub'rekhan
position", ACTION_RAID + 1), nullptr)));
// Thaddius
triggers.push_back(
new TriggerNode("thaddius phase pet",
NextAction::array(0, new NextAction("thaddius attack
nearest pet", ACTION_RAID + 1), nullptr)));
triggers.push_back(
new TriggerNode("thaddius phase transition",
NextAction::array(0, new NextAction("thaddius move to
platform", ACTION_RAID + 1), nullptr)));
triggers.push_back(
new TriggerNode("thaddius phase thaddius",
NextAction::array(0, new NextAction("thaddius move
polarity", ACTION_RAID + 1), nullptr)));
// Instructor Razuvious
triggers.push_back(new TriggerNode(
"razuvious tank",
NextAction::array(0, new NextAction("razuvious use obedience crystal",
ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode(
"razuvious nontank", NextAction::array(0, new NextAction("razuvious
target", ACTION_RAID + 1), nullptr)));
// four horseman
triggers.push_back(new TriggerNode(
"horseman attractors",
NextAction::array(0, new NextAction("horseman attract alternatively",
ACTION_RAID + 1), nullptr)));
triggers.push_back(
new TriggerNode("horseman except attractors",
NextAction::array(0, new NextAction("horseman attack in
order", ACTION_RAID + 1), nullptr)));
// sapphiron
triggers.push_back(
new TriggerNode("sapphiron ground",
NextAction::array(0, new NextAction("sapphiron ground
position", ACTION_RAID + 1), nullptr)));
triggers.push_back(
new TriggerNode("sapphiron flight",
NextAction::array(0, new NextAction("sapphiron flight
position", ACTION_RAID + 1), nullptr)));
// Gluth
triggers.push_back(
new TriggerNode("gluth", NextAction::array(0, new NextAction("gluth
choose target", ACTION_RAID + 1),
new NextAction("gluth
position", ACTION_RAID + 1),
new NextAction("gluth
slowdown", ACTION_RAID), nullptr)));
// Loatheb
triggers.push_back(new TriggerNode(
"loatheb", NextAction::array(0, new NextAction("loatheb position",
ACTION_RAID + 1),
new NextAction("loatheb choose target",
ACTION_RAID + 1), nullptr)));
}
#ifndef _PLAYERBOT_RAIDNAXXBOSSHELPER_H
#define _PLAYERBOT_RAIDNAXXBOSSHELPER_H
#include <string>
#include "AiObject.h"
#include "AiObjectContext.h"
#include "EventMap.h"
#include "Log.h"
#include "NamedObjectContext.h"
#include "ObjectGuid.h"
#include "Player.h"
#include "PlayerbotAI.h"
#include "Playerbots.h"
#include "RaidNaxxScripts.h"
#include "ScriptedCreature.h"
#include "SharedDefines.h"
protected:
std::string _name;
Unit* _unit = nullptr;
Creature* _target = nullptr;
BossAiType* _ai = nullptr;
EventMap* _event_map = nullptr;
uint32 _timer = 0;
};
private:
const uint32 POSITION_TIME_AFTER_LANDED = 5000;
const uint32 EVENT_FLIGHT_INTERVAL = 45000;
uint32 lastEventGround = 0;
};
protected:
Unit* sir = nullptr;
Unit* lady = nullptr;
FourHorsemen::boss_four_horsemen::boss_four_horsemenAI* ladyAI = nullptr;
EventMap* ladyEvent = nullptr;
uint32 lastEventVoidZone = 0;
uint32 voidZoneCounter = 0;
int posToGo = 0;
};
class ThaddiusBossHelper : public
GenericBossHelper<Thaddius::boss_thaddius::boss_thaddiusAI>
{
public:
const std::pair<float, float> tankPosFeugen = {3522.94f, -3002.60f};
const std::pair<float, float> tankPosStalagg = {3436.14f, -2919.98f};
const std::pair<float, float> rangedPosFeugen = {3500.45f, -2997.92f};
const std::pair<float, float> rangedPosStalagg = {3441.01f, -2942.04f};
const float tankPosZ = 312.61f;
ThaddiusBossHelper(PlayerbotAI* botAI) : GenericBossHelper(botAI,
"thaddius") {}
bool UpdateBossAI() override
{
if (!GenericBossHelper::UpdateBossAI())
{
return false;
}
feugen = AI_VALUE2(Unit*, "find target", "feugen");
stalagg = AI_VALUE2(Unit*, "find target", "stalagg");
return true;
}
bool IsPhasePet() { return (feugen && feugen->IsAlive()) || (stalagg &&
stalagg->IsAlive()); }
bool IsPhaseTransition()
{
if (IsPhasePet())
{
return false;
}
return _unit->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
bool IsPhaseThaddius() { return !IsPhasePet() && !IsPhaseTransition(); }
Unit* GetNearestPet()
{
Unit* unit = nullptr;
if (feugen && feugen->IsAlive())
{
unit = feugen;
}
if (stalagg && stalagg->IsAlive() && (!feugen || bot-
>GetDistance(stalagg) < bot->GetDistance(feugen)))
{
unit = stalagg;
}
return unit;
}
std::pair<float, float> PetPhaseGetPosForTank()
{
if (GetNearestPet() == feugen)
{
return tankPosFeugen;
}
return tankPosStalagg;
}
std::pair<float, float> PetPhaseGetPosForRanged()
{
if (GetNearestPet() == feugen)
{
return rangedPosFeugen;
}
return rangedPosStalagg;
}
protected:
Unit* feugen = nullptr;
Unit* stalagg = nullptr;
};
#endif
#ifndef _PLAYERRBOT_RAIDNAXXMULTIPLIERS_H_
#define _PLAYERRBOT_RAIDNAXXMULTIPLIERS_H_
#include "Multiplier.h"
#include "raids/naxxramas/RaidNaxxBossHelper.h"
public:
virtual float GetValue(Action* action);
};
class HeiganDanceMultiplier : public Multiplier
{
public:
HeiganDanceMultiplier(PlayerbotAI* ai) : Multiplier(ai, "helgan dance") {}
public:
virtual float GetValue(Action* action);
};
public:
virtual float GetValue(Action* action);
};
public:
virtual float GetValue(Action* action);
private:
ThaddiusBossHelper helper;
};
private:
SapphironBossHelper helper;
};
private:
RazuviousBossHelper helper;
};
private:
KelthuzadBossHelper helper;
};
public:
virtual float GetValue(Action* action);
};
public:
virtual float GetValue(Action* action);
};
// public:
// virtual float GetValue(Action* action);
// };
private:
GluthBossHelper helper;
};
#endif
#include "RaidNaxxActions.h"
#include "LastMovementValue.h"
#include "ObjectGuid.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
#include "RaidNaxxBossHelper.h"
#include "RaidNaxxStrategy.h"
#include "ScriptedCreature.h"
#include "SharedDefines.h"
uint32 RotateAroundTheCenterPointAction::FindNearestWaypoint()
{
float minDistance = 0;
int ret = -1;
for (int i = 0; i < intervals; i++)
{
float w_x = waypoints[i].first, w_y = waypoints[i].second;
float dis = bot->GetDistance2d(w_x, w_y);
if (ret == -1 || dis < minDistance)
{
ret = i;
minDistance = dis;
}
}
return ret;
}
uint32 GrobbulusRotateAction::GetCurrWaypoint()
{
Unit* boss = AI_VALUE(Unit*, "boss target");
if (!boss)
{
return false;
}
auto* boss_ai =
dynamic_cast<Grobbulus::boss_grobbulus::boss_grobbulusAI*>(boss->GetAI());
EventMap* eventMap = &boss_ai->events;
const uint32 event_time = eventMap->GetNextEventTime(2);
return (event_time / 15000) % intervals;
}
bool HeiganDanceAction::CalculateSafe()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "heigan the unclean");
if (!boss)
{
return false;
}
auto* boss_ai = dynamic_cast<Heigan::boss_heigan::boss_heiganAI*>(boss-
>GetAI());
EventMap* eventMap = &boss_ai->events;
uint32 curr_phase = boss_ai->currentPhase;
uint32 curr_erupt = eventMap->GetNextEventTime(3);
uint32 curr_dance = eventMap->GetNextEventTime(4);
uint32 curr_timer = eventMap->GetTimer();
if ((curr_phase == 0 && curr_dance - curr_timer >= 85000) || (curr_phase ==
1 && curr_dance - curr_timer >= 40000))
{
ResetSafe();
}
else if (curr_erupt != prev_erupt)
{
NextSafe();
}
prev_phase = curr_phase;
prev_erupt = curr_erupt;
return true;
}
bool ThaddiusAttackNearestPetAction::isUseful()
{
if (!helper.UpdateBossAI())
{
return false;
}
if (!helper.IsPhasePet())
{
return false;
}
Unit* target = helper.GetNearestPet();
if (bot->GetDistance(target) > 50.0f)
{
return false;
}
return true;
}
bool ThaddiusMovePolarityAction::isUseful()
{
return !botAI->IsMainTank(bot) || AI_VALUE2(bool, "has aggro", "current
target");
}
bool SapphironFlightPositionAction::MoveToNearestIcebolt()
{
Group* group = bot->GetGroup();
if (!group)
{
return false;
}
Group::MemberSlotList const& slots = group->GetMemberSlots();
Player* playerWithIcebolt = nullptr;
float minDistance;
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
{
Player* member = ref->GetSource();
if (botAI->HasAura("icebolt", member, false, false, -1, true))
{
if (!playerWithIcebolt || minDistance > bot->GetDistance(member))
{
playerWithIcebolt = member;
minDistance = bot->GetDistance(member);
}
}
}
if (playerWithIcebolt)
{
Unit* boss = AI_VALUE2(Unit*, "find target", "sapphiron");
if (boss)
{
float angle = boss->GetAngle(playerWithIcebolt);
return MoveTo(NAXX_MAP_ID, playerWithIcebolt->GetPositionX() +
cos(angle) * 3.0f,
playerWithIcebolt->GetPositionY() + sin(angle) * 3.0f,
helper.GENERIC_HEIGHT, false, false, false, false,
MovementPriority::MOVEMENT_COMBAT);
}
}
return false;
}
#include "ChooseTargetActions.h"
#include "DKActions.h"
#include "DruidActions.h"
#include "DruidBearActions.h"
#include "FollowActions.h"
#include "GenericActions.h"
#include "GenericSpellActions.h"
#include "HunterActions.h"
#include "MageActions.h"
#include "MovementActions.h"
#include "PaladinActions.h"
#include "PriestActions.h"
#include "RaidNaxxActions.h"
#include "ReachTargetActions.h"
#include "RogueActions.h"
#include "ScriptedCreature.h"
#include "ShamanActions.h"
#include "UseMeetingStoneAction.h"
#include "WarriorActions.h"
if (botAI->IsMainTank(bot))
{
Aura* aura = botAI->GetAura("mortal wound", bot, false, true);
if (aura && aura->GetStackAmount() >= 5)
{
if (dynamic_cast<CastTauntAction*>(action) ||
dynamic_cast<CastDarkCommandAction*>(action) ||
dynamic_cast<CastHandOfReckoningAction*>(action) ||
dynamic_cast<CastGrowlAction*>(action))
{
return 0.0f;
}
}
}
if (dynamic_cast<PetAttackAction*>(action))
{
Unit* target = AI_VALUE(Unit*, "current target");
if (target && target->GetEntry() == Gluth::NPC_ZOMBIE_CHOW)
{
return 0.0f;
}
}
return 1.0f;
}
#ifndef _PLAYERBOT_RAIDNAXXSCRIPTS_H
#define _PLAYERBOT_RAIDNAXXSCRIPTS_H
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_faerlina.h"
#include
"../../../../src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_gluth.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_gothik.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_grobbulus.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_heigan.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_loatheb.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_maexxna.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_noth.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_patchwerk.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_razuvious.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_sapphiron.h"
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_thaddius.h"
#endif
#ifndef _PLAYERBOT_RAIDNAXXSTRATEGY_H
#define _PLAYERBOT_RAIDNAXXSTRATEGY_H
#include "AiObjectContext.h"
#include "Multiplier.h"
#include "RaidNaxxScripts.h"
#include "Strategy.h"
#endif
// /*
// * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU
GPL v2 license, you may redistribute it
// and/or modify it under version 2 of the License, or (at your option), any
later version.
// */
#ifndef _PLAYERBOT_RAIDNAXXTRIGGERCONTEXT_H
#define _PLAYERBOT_RAIDNAXXTRIGGERCONTEXT_H
#include "AiObjectContext.h"
#include "NamedObjectContext.h"
#include "RaidNaxxTriggers.h"
creators["horseman attractors"] =
&RaidNaxxTriggerContext::horseman_attractors;
creators["horseman except attractors"] =
&RaidNaxxTriggerContext::horseman_except_attractors;
creators["sapphiron ground"] =
&RaidNaxxTriggerContext::sapphiron_ground;
creators["sapphiron flight"] =
&RaidNaxxTriggerContext::sapphiron_flight;
creators["kel'thuzad"] = &RaidNaxxTriggerContext::kelthuzad;
creators["anub'rekhan"] = &RaidNaxxTriggerContext::anubrekhan;
creators["gluth"] = &RaidNaxxTriggerContext::gluth;
creators["gluth main tank mortal wound"] =
&RaidNaxxTriggerContext::gluth_main_tank_mortal_wound;
creators["loatheb"] = &RaidNaxxTriggerContext::loatheb;
}
private:
static Trigger* mutating_injection(PlayerbotAI* ai) { return new
MutatingInjectionTrigger(ai); }
static Trigger* mutating_injection_removed(PlayerbotAI* ai) { return new
MutatingInjectionRemovedTrigger(ai); }
static Trigger* grobbulus_cloud(PlayerbotAI* ai) { return new
GrobbulusCloudTrigger(ai); }
static Trigger* heigan_melee(PlayerbotAI* ai) { return new
HeiganMeleeTrigger(ai); }
static Trigger* heigan_ranged(PlayerbotAI* ai) { return new
HeiganRangedTrigger(ai); }
#endif
#include "RaidNaxxTriggers.h"
#include "EventMap.h"
#include "Playerbots.h"
#include "ScriptedCreature.h"
#include "Trigger.h"
bool AuraRemovedTrigger::IsActive()
{
bool check = botAI->HasAura(name, bot, false, false, -1, true);
bool ret = false;
if (prev_check && !check)
{
ret = true;
}
prev_check = check;
return ret;
}
bool MutatingInjectionRemovedTrigger::IsActive()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "grobbulus");
if (!boss)
{
return false;
}
return HasNoAuraTrigger::IsActive() && botAI->GetState() == BOT_STATE_COMBAT
&& botAI->IsRanged(bot);
}
bool GrobbulusCloudTrigger::IsActive()
{
Unit* boss = AI_VALUE(Unit*, "boss target");
if (!boss || boss->GetEntry() != boss_entry)
{
return false;
}
if (!botAI->IsMainTank(bot))
{
return false;
}
// bot->Yell("has aggro on " + boss->GetName() + " : " +
to_string(AI_VALUE2(bool, "has aggro", "boss target")),
// LANG_UNIVERSAL);
return AI_VALUE2(bool, "has aggro", "boss target");
}
bool HeiganMeleeTrigger::IsActive()
{
Unit* heigan = AI_VALUE2(Unit*, "find target", "heigan the unclean");
if (!heigan)
{
return false;
}
return !botAI->IsRanged(bot);
}
bool HeiganRangedTrigger::IsActive()
{
Unit* heigan = AI_VALUE2(Unit*, "find target", "heigan the unclean");
if (!heigan)
{
return false;
}
return botAI->IsRanged(bot);
}
bool RazuviousTankTrigger::IsActive()
{
Difficulty diff = bot->GetRaidDifficulty();
if (diff == RAID_DIFFICULTY_10MAN_NORMAL)
{
return helper.UpdateBossAI() && botAI->IsTank(bot);
}
return helper.UpdateBossAI() && bot->getClass() == CLASS_PRIEST;
}
bool RazuviousNontankTrigger::IsActive()
{
Difficulty diff = bot->GetRaidDifficulty();
if (diff == RAID_DIFFICULTY_10MAN_NORMAL)
{
return helper.UpdateBossAI() && !(botAI->IsTank(bot));
}
return helper.UpdateBossAI() && !(bot->getClass() == CLASS_PRIEST);
}
bool HorsemanAttractorsTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsAttracter(bot);
}
bool HorsemanExceptAttractorsTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return !helper.IsAttracter(bot);
}
bool SapphironGroundTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsPhaseGround();
}
bool SapphironFlightTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsPhaseFlight();
}
// bool SapphironGroundExceptMainTankTrigger::IsActive()
// {
// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot);
// }
// bool SapphironFlightTrigger::IsActive()
// {
// return BossPhaseTrigger::IsActive();
// }
// bool SapphironGroundChillTrigger::IsActive()
// {
// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot) && botAI-
>HasAura("chill", bot);
// }
bool GluthMainTankMortalWoundTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
if (!botAI->IsAssistTankOfIndex(bot, 0))
{
return false;
}
Unit* mt = AI_VALUE(Unit*, "main tank");
if (!mt)
{
return false;
}
Aura* aura = botAI->GetAura("mortal wound", mt, false, true);
if (!aura || aura->GetStackAmount() < 5)
{
return false;
}
return true;
}
bool ThaddiusPhasePetTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsPhasePet();
}
bool ThaddiusPhaseTransitionTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsPhaseTransition();
}
bool ThaddiusPhaseThaddiusTrigger::IsActive()
{
if (!helper.UpdateBossAI())
{
return false;
}
return helper.IsPhaseThaddius();
}
template bool
BossEventTrigger<Grobbulus::boss_grobbulus::boss_grobbulusAI>::IsActive();
template bool
BossPhaseTrigger<Anubrekhan::boss_anubrekhan::boss_anubrekhanAI>::IsActive();
#ifndef _PLAYERBOT_RAIDNAXXTRIGGERS_H
#define _PLAYERBOT_RAIDNAXXTRIGGERS_H
#include "EventMap.h"
#include "GenericTriggers.h"
#include "PlayerbotAIConfig.h"
#include "RaidNaxxBossHelper.h"
#include "RaidNaxxScripts.h"
#include "Trigger.h"
protected:
bool prev_check;
};
protected:
uint32 boss_entry, event_id, last_event_time;
};
protected:
std::string boss_name;
uint32 phase_mask;
};
private:
RazuviousBossHelper helper;
};
private:
RazuviousBossHelper helper;
};
class KelthuzadTrigger : public Trigger
{
public:
KelthuzadTrigger(PlayerbotAI* ai) : Trigger(ai, "kel'thuzad trigger"),
helper(ai) {}
bool IsActive() override;
private:
KelthuzadBossHelper helper;
};
private:
ThaddiusBossHelper helper;
};
private:
ThaddiusBossHelper helper;
};
private:
ThaddiusBossHelper helper;
};
private:
FourhorsemanBossHelper helper;
};
private:
FourhorsemanBossHelper helper;
};
private:
SapphironBossHelper helper;
};
private:
SapphironBossHelper helper;
};
private:
GluthBossHelper helper;
};
private:
GluthBossHelper helper;
};
private:
LoathebBossHelper helper;
};