feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227)

This commit is contained in:
Kitzunu
2022-03-30 12:59:42 +02:00
committed by GitHub
parent 54c06eb72e
commit 856aed6fc6
243 changed files with 1205 additions and 1191 deletions

View File

@@ -71,7 +71,7 @@ public:
EventMap events2;
void Reset() override
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
EventStage = EVENT_STAGE_NONE;
PeonEngagedCount = 0;
PeonKilledCount = 0;
@@ -194,7 +194,7 @@ public:
{
Talk(SAY_AGGRO);
EventStage = EVENT_STAGE_MAIN;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
if (Unit* target = me->SelectNearestPlayer(50.0f))
AttackStart(target);

View File

@@ -70,7 +70,7 @@ public:
BossAI::InitializeAI();
if (instance)
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
executioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
executioner->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
void JustDied(Unit* /*killer*/) override
@@ -80,7 +80,7 @@ public:
if (instance)
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
executioner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
executioner->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
void EnterCombat(Unit* /*who*/) override