mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227)
This commit is contained in:
@@ -1557,7 +1557,7 @@ struct npc_coren_direbrew : public ScriptedAI
|
||||
{
|
||||
_events.Reset();
|
||||
_summons.DespawnAll();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
_events.SetPhase(PHASE_ALL);
|
||||
|
||||
@@ -1596,7 +1596,7 @@ struct npc_coren_direbrew : public ScriptedAI
|
||||
if (action == ACTION_START_FIGHT)
|
||||
{
|
||||
_events.SetPhase(PHASE_ONE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetFaction(FACTION_GOBLIN_DARK_IRON_BAR_PATRON);
|
||||
DoZoneInCombat();
|
||||
|
||||
@@ -1830,7 +1830,7 @@ struct npc_direbrew_antagonist : public ScriptedAI
|
||||
Talk(SAY_ANTAGONIST_2);
|
||||
break;
|
||||
case ACTION_ANTAGONIST_HOSTILE:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetFaction(FACTION_GOBLIN_DARK_IRON_BAR_PATRON);
|
||||
DoZoneInCombat();
|
||||
break;
|
||||
|
||||
@@ -654,7 +654,7 @@ struct npc_hallows_end_soh : public ScriptedAI
|
||||
events.ScheduleEvent(3, 63000);
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
@@ -733,7 +733,7 @@ struct npc_hallows_end_soh : public ScriptedAI
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Unit* target = me->SelectNearestPlayer(30.0f))
|
||||
AttackStart(target);
|
||||
@@ -1038,7 +1038,7 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
|
||||
else if (point == 11)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
||||
me->StopMoving();
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
@@ -1255,7 +1255,7 @@ struct boss_headless_horseman_head : public ScriptedAI
|
||||
if (Player* player = me->SelectNearestPlayer(50.0f))
|
||||
me->GetMotionMaster()->MoveFleeing(player);
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
timer = 26000;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user