mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 18:13:48 +00:00
feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user