Skip to content

Commit

Permalink
Add AoE Avoidance for Hot Coals in MC (#6)
Browse files Browse the repository at this point in the history
Majordomo Hot Coals damage avoidance.

(cherry picked from commit 0bd149841185029d19199057e1eb8b9cfe8a73d6)
(cherry picked from commit 79b975d9c91a18f609337c34e6eb8acbde1f0a0d)
  • Loading branch information
trickerer committed May 20, 2024
1 parent 2d3cdd4 commit e5b2110
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5008,6 +5008,18 @@ void bot_ai::CalculateAoeSpots(Unit const* unit, AoeSpotsVec& spots)

//Additional: aoe coming from spawned npcs

//Molten Core
if (unit->GetMapId() == 409)
{
std::list<GameObject*> gListMC;
Trinity::AllGameObjectsWithEntryInRange checkMC(unit, GAMEOBJECT_HOT_COAL, 60.f);
Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInRange> searcherMC(unit, gListMC, checkMC);
Cell::VisitAllObjects(unit, searcherMC, 60.f);

float radius = 15.0f + DEFAULT_PLAYER_COMBAT_REACH;
for (std::list<GameObject*>::const_iterator ci = gListMC.cbegin(); ci != gListMC.cend(); ++ci)
spots.push_back(AoeSpotsVec::value_type(*(*ci), radius));
}
//Aucheai Crypts
else if (unit->GetMapId() == 558)
{
Expand All @@ -5026,7 +5038,7 @@ void bot_ai::CalculateAoeSpots(Unit const* unit, AoeSpotsVec& spots)
}
}
//The Eye of Eternity
if (unit->GetMapId() == 616 && unit->GetVehicle())
else if (unit->GetMapId() == 616 && unit->GetVehicle())
{
std::list<Creature*> cList;
Trinity::AllCreaturesOfEntryInRange check2(unit->GetVehicleBase(), CREATURE_EOE_STATIC_FIELD, 60.f);
Expand Down
1 change: 1 addition & 0 deletions src/server/game/AI/NpcBots/botcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum BotCommonValues
CREATURE_UK_SHADOW_AXE_H = 31835,
CREATURE_EOE_STATIC_FIELD = 30592,
CREATURE_ICC_OOZE_PUDDLE = 37690,
GAMEOBJECT_HOT_COAL = 178164,
//COMMON ENEMY CREATURES
CREATURE_BOSS_EREGOS_N = 27656,
CREATURE_BOSS_EREGOS_H = 31561,
Expand Down

0 comments on commit e5b2110

Please sign in to comment.