/// <summary> /// Stops combat, ignoring restrictions, for the found creatures /// </summary> /// <param name="entry"></param> /// <param name="maxSearchRange"></param> /// <param name="samePhase"></param> /// <param name="reset"></param> void ForceCombatStopForCreatureEntry(uint entry, float maxSearchRange = 250.0f, bool samePhase = true, bool reset = true) { Log.outDebug(LogFilter.ScriptsAi, $"BossAI::ForceStopCombatForCreature: called on {me.GetGUID()}. Debug info: {me.GetDebugInfo()}"); List <Creature> creatures = new(); AllCreaturesOfEntryInRange check = new(me, entry, maxSearchRange); CreatureListSearcher searcher = new(me, creatures, check); if (!samePhase) { PhasingHandler.SetAlwaysVisible(me, true, false); } Cell.VisitGridObjects(me, searcher, maxSearchRange); if (!samePhase) { PhasingHandler.SetAlwaysVisible(me, false, false); } foreach (Creature creature in creatures) { ForceCombatStop(creature, reset); } }