Skip to content

Commit

Permalink
NPCBots: Add AoE evasion logic for Shirrak the Dead Watcher (Auchen…
Browse files Browse the repository at this point in the history
…ai Crypts)
  • Loading branch information
trickerer committed Mar 20, 2024
1 parent aca56bf commit bc3dec3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4990,6 +4990,23 @@ void bot_ai::CalculateAoeSpots(Unit const* unit, AoeSpotsVec& spots)

//Additional: aoe coming from spawned npcs

//Aucheai Crypts
else if (unit->GetMapId() == 558)
{
Creature* creature = nullptr;
static const auto focus_fire_check = [](Creature const* c) {
return (c->GetEntry() == CREATURE_FOCUS_FIRE_N || c->GetEntry() == CREATURE_FOCUS_FIRE_H);
};
Trinity::CreatureSearcher searcher2(unit, creature, focus_fire_check);
Cell::VisitAllObjects(unit, searcher2, 50.f);

if (creature)
{
spellInfo = sSpellMgr->GetSpellInfo(32302); //Fiery Blast
float radius = spellInfo->_effects[0].CalcRadius() + DEFAULT_PLAYER_COMBAT_REACH * 2.0f;
spots.push_back(AoeSpotsVec::value_type(*creature, radius));
}
}
//The Eye of Eternity
if (unit->GetMapId() == 616 && unit->GetVehicle())
{
Expand Down
2 changes: 2 additions & 0 deletions src/server/game/AI/NpcBots/botcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ enum BotCommonValues
CREATURE_ICC_MUTATED_ABOMINATION7 = 38786,
CREATURE_ICC_MUTATED_ABOMINATION8 = 38787,
//COMMON AOE TRIGGERS
CREATURE_FOCUS_FIRE_N = 18374,
CREATURE_FOCUS_FIRE_H = 20308,
CREATURE_ZA_FIRE_BOMB = 23920,
CREATURE_UK_SHADOW_AXE_N = 23997,
CREATURE_UK_SHADOW_AXE_H = 31835,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ struct boss_shirrak_the_dead_watcher : public BossAI
{
// Summon Focus Fire & Emote
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
//npcbot
/*
//end npcbot
if (target && target->GetTypeId() == TYPEID_PLAYER && target->IsAlive())
//npcbot
*/
if (target && target->IsAlive())
//end npcbot
{
FocusedTargetGUID = target->GetGUID();
me->SummonCreature(NPC_FOCUS_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 5500ms);
Expand Down

0 comments on commit bc3dec3

Please sign in to comment.