From 2dfafa69ebc422feba1aa01e0c4fab76366f552f Mon Sep 17 00:00:00 2001 From: treeston Date: Sun, 9 Jul 2017 02:07:29 +0200 Subject: Hi, I'm Treeston, and welcome to Combat PR Prep Refactors. Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it. New methods on Unit: - void SetImmuneTo(apply, keepCombat = false); - bool IsImmuneTo() const; (cherry picked from commit 74af880217fc567c9949d7557408718af889402f) --- src/server/game/AI/CreatureAI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/game/AI/CreatureAI.cpp') diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 6894f4af091..7e57465443b 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -345,7 +345,8 @@ int32 CreatureAI::VisualizeBoundary(uint32 duration, Unit* owner, bool fill) con if (TempSummon* point = owner->SummonCreature(BOUNDARY_VISUALIZE_CREATURE, Position(startPosition.GetPositionX() + front.first*BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + front.second*BOUNDARY_VISUALIZE_STEP_SIZE, spawnZ), TEMPSUMMON_TIMED_DESPAWN, duration * IN_MILLISECONDS)) { point->SetObjectScale(BOUNDARY_VISUALIZE_CREATURE_SCALE); - point->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_STUNNED | UNIT_FLAG_IMMUNE_TO_NPC)); + point->AddUnitFlag(UNIT_FLAG_STUNNED); + point->SetImmuneToAll(true); if (!hasOutOfBoundsNeighbor) point->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE); } -- cgit v1.2.3