From 9924ed7716750a17707489458e065cde0d670020 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Mon, 13 May 2024 03:35:57 -0600 Subject: [PATCH] Add AoE Avoidance for Hot Coals in MC Majordomo Hot Coals damage avoidance. --- src/server/game/AI/NpcBots/bot_ai.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/server/game/AI/NpcBots/bot_ai.cpp b/src/server/game/AI/NpcBots/bot_ai.cpp index 6298983f46bd72..5705fe4062e0fa 100644 --- a/src/server/game/AI/NpcBots/bot_ai.cpp +++ b/src/server/game/AI/NpcBots/bot_ai.cpp @@ -5093,6 +5093,23 @@ void bot_ai::CalculateAoeSpots(Unit const* unit, AoeSpotsVec& spots) spots.push_back(AoeSpotsVec::value_type(*(*ci), radius)); } } + //Molten Core + if (unit->GetMapId() == 409) + { + std::list gListMC; + Acore::AllGameObjectsWithEntryInRange checkMC(unit, 178164, 60.f); + Acore::GameObjectListSearcher searcherMC(unit, gListMC, checkMC); + Cell::VisitAllObjects(unit, searcherMC, 60.f); + + for (auto* gameObject : gListMC) + { + if (!gameObject) + continue; + + float radius = 15.0f + DEFAULT_COMBAT_REACH; + spots.push_back(AoeSpotsVec::value_type(*gameObject, radius)); + } + } //STUB //if (!unit->IsPlayer() || !unit->ToPlayer()->HaveBot())