aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp46
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/zone_ghostlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp4
44 files changed, 197 insertions, 205 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index c932ad0d666..7f284220ecf 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
@@ -168,7 +168,7 @@ public:
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
/// @todo move them to center
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
index 6bbbc6583e8..38699c2865a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
@@ -142,7 +142,7 @@ public:
void Reset() override
{
_Reset();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->setFaction(COREN_DIREBREW_FACTION_FRIEND);
events.SetPhase(PHASE_ALL);
@@ -165,7 +165,7 @@ public:
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(COREN_DIREBREW_FACTION_HOSTILE);
me->SetInCombatWithZone();
@@ -398,7 +398,7 @@ public:
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(COREN_DIREBREW_FACTION_HOSTILE);
me->SetInCombatWithZone();
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
index 7e4e4d63893..eab17b1ea88 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -136,7 +136,7 @@ class boss_doomrel : public CreatureScript
CloseGossipMenuFor(player);
//start event here
creature->setFaction(FACTION_HOSTILE);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
creature->AI()->AttackStart(player);
InstanceScript* instance = creature->GetInstanceScript();
if (instance)
@@ -174,12 +174,12 @@ class boss_doomrel : public CreatureScript
me->setFaction(FACTION_FRIEND);
// was set before event start, so set again
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
if (_instance->GetData(DATA_GHOSTKILL) >= 7)
- me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
+ me->SetNpcFlags(UNIT_NPC_FLAG_NONE);
else
- me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->SetNpcFlags(UNIT_NPC_FLAG_GOSSIP);
}
void EnterCombat(Unit* /*who*/) override
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index f7544d47daa..cefcd51f333 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -356,7 +356,7 @@ public:
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
{
boss->setFaction(FACTION_HOSTILE);
- boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ boss->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
if (Unit* target = boss->SelectNearestTarget(500))
boss->AI()->AttackStart(target);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 3ad71bb5b6a..663f3ff84fb 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -82,7 +82,7 @@ public:
void Reset() override
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE));
events.Reset();
// Apply auras on spawn and reset
// DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible
@@ -160,7 +160,7 @@ public:
me->CastSpell(me, SPELL_EMBERSEER_FULL_STRENGTH);
Talk(EMOTE_FREE_OF_BONDS);
Talk(YELL_FREE_OF_BONDS);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE));
events.ScheduleEvent(EVENT_ENTER_COMBAT, 2000);
}
}
@@ -343,7 +343,7 @@ public:
void Reset() override
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true))
Emberseer->AI()->SetData(1, 3);
}
@@ -357,7 +357,7 @@ public:
{
if (data == 1 && value == 1)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
_events.CancelEvent(EVENT_ENCAGED_EMBERSEER);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
index c6929446e1b..42fb5170252 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
@@ -192,7 +192,7 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
DoZoneInCombat();
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index f00edd0a9a7..b6541ec6328 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -190,7 +190,7 @@ public:
_Reset();
me->SetVisible(true);
- me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
+ me->SetNpcFlags(UNIT_NPC_FLAG_GOSSIP);
me->setFaction(35);
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
me->RemoveAura(SPELL_NEFARIANS_BARRIER);
@@ -209,10 +209,10 @@ public:
Talk(SAY_GAMESBEGIN_2);
me->setFaction(103);
- me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
+ me->SetNpcFlags(UNIT_NPC_FLAG_NONE);
DoCast(me, SPELL_NEFARIANS_BARRIER);
me->SetStandState(UNIT_STAND_STATE_STAND);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
AttackStart(target);
events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000));
events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000));
@@ -225,7 +225,7 @@ public:
if (summon->GetEntry() != NPC_NEFARIAN)
{
summon->UpdateEntry(NPC_BONE_CONSTRUCT);
- summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ summon->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
summon->SetReactState(REACT_PASSIVE);
summon->SetStandState(UNIT_STAND_STATE_DEAD);
}
@@ -575,7 +575,7 @@ public:
{
(*itr)->Respawn();
(*itr)->SetInCombatWithZone();
- (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ (*itr)->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
(*itr)->SetReactState(REACT_AGGRESSIVE);
(*itr)->SetStandState(UNIT_STAND_STATE_STAND);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
index 89f3f7673bc..57dae09267c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
@@ -75,9 +75,9 @@ public:
boss_vaelAI(Creature* creature) : BossAI(creature, DATA_VAELASTRAZ_THE_CORRUPT)
{
Initialize();
- creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
creature->setFaction(35);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
void Initialize()
@@ -114,7 +114,7 @@ public:
void BeginSpeech(Unit* target)
{
PlayerGUID = target->GetGUID();
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
events.ScheduleEvent(EVENT_SPEECH_1, 1000);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
index 4a534dbe662..1607588cff2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
@@ -166,7 +166,7 @@ class boss_majordomo : public CreatureScript
{
case EVENT_OUTRO_1:
me->NearTeleportTo(RagnarosTelePos.GetPositionX(), RagnarosTelePos.GetPositionY(), RagnarosTelePos.GetPositionZ(), RagnarosTelePos.GetOrientation());
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
break;
case EVENT_OUTRO_2:
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
@@ -185,7 +185,7 @@ class boss_majordomo : public CreatureScript
{
if (action == ACTION_START_RAGNAROS)
{
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
Talk(SAY_SUMMON_MAJ);
events.ScheduleEvent(EVENT_OUTRO_2, 8000);
events.ScheduleEvent(EVENT_OUTRO_3, 24000);
@@ -193,7 +193,7 @@ class boss_majordomo : public CreatureScript
else if (action == ACTION_START_RAGNAROS_ALT)
{
me->setFaction(FACTION_FRIENDLY);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
index 9522c40338c..515e1d26315 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
@@ -88,7 +88,7 @@ class boss_ragnaros : public CreatureScript
Initialize();
_introState = 0;
me->SetReactState(REACT_PASSIVE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
SetCombatMovement(false);
}
@@ -104,7 +104,7 @@ class boss_ragnaros : public CreatureScript
{
BossAI::Reset();
Initialize();
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
+ me->SetEmoteState(EMOTE_ONESHOT_NONE);
}
void EnterCombat(Unit* victim) override
@@ -162,7 +162,7 @@ class boss_ragnaros : public CreatureScript
break;
case EVENT_INTRO_5:
me->SetReactState(REACT_AGGRESSIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC));
_introState = 2;
break;
default:
@@ -177,8 +177,8 @@ class boss_ragnaros : public CreatureScript
//Become unbanished again
me->SetReactState(REACT_AGGRESSIVE);
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ me->SetEmoteState(EMOTE_ONESHOT_NONE);
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
AttackStart(target);
@@ -255,8 +255,8 @@ class boss_ragnaros : public CreatureScript
//Root self
//DoCast(me, 23973);
me->setFaction(35);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ me->SetEmoteState(EMOTE_STATE_SUBMERGED);
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
instance->SetData(DATA_RAGNAROS_ADDS, 0);
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
index 67b8a6852ca..f249aa097f3 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
@@ -178,7 +178,7 @@ class instance_deadmines : public InstanceMapScript
void LeverStucked()
{
if (GameObject* pDoorLever = instance->GetGameObject(DoorLeverGUID))
- pDoorLever->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
+ pDoorLever->AddFlag(GO_FLAG_INTERACT_COND);
}
void OnGameObjectCreate(GameObject* go) override
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index 31f3aeebcbf..13133405643 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -312,7 +312,7 @@ public:
if (GameObject* go = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0.f, QuaternionData(), 1))
{
GoSummonList.push_back(go->GetGUID());
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it!
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
}
Summon(3);
break;
@@ -327,7 +327,7 @@ public:
if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0.f, QuaternionData(), 1))
{
GoSummonList.push_back(go->GetGUID());
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
}
break;
case 5:
@@ -341,7 +341,7 @@ public:
if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0.f, QuaternionData(), 1))
{
GoSummonList.push_back(go->GetGUID());
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it!
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
Summon(5);
}
break;
@@ -349,7 +349,7 @@ public:
if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0.f, QuaternionData(), 1))
{
GoSummonList.push_back(go->GetGUID());
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it!
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
}
break;
case 8:
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index 57e0d36b40d..1f6d1dc5336 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -159,8 +159,8 @@ public:
{
if (spell->Id == SPELL_INFERNAL_RELAY)
{
- me->SetDisplayId(me->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetDisplayId(me->GetNativeDisplayId());
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
HellfireTimer = 4000;
CleanupTimer = 170000;
}
@@ -449,7 +449,7 @@ public:
Creature* axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
if (axe)
{
- axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ axe->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
axe->setFaction(me->getFaction());
axes[i] = axe->GetGUID();
if (target)
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 3bd9c7c9097..c469d8130da 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -344,7 +344,7 @@ public:
PortalGUID[PortalsCount] = summoned->GetGUID();
++PortalsCount;
- if (summoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
+ if (summoned->m_unitData->CreatedBySpell == SPELL_FIENDISH_PORTAL_1)
{
Talk(SAY_SUMMON);
SummonedPortals = true;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index e093d1007b2..8f933ec4859 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -183,7 +183,7 @@ public:
void AttackStart(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -192,7 +192,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -204,7 +204,7 @@ public:
{
if (AggroTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
AggroTimer = 0;
} else AggroTimer -= diff;
}
@@ -348,7 +348,7 @@ public:
void AttackStart(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -357,7 +357,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -404,7 +404,7 @@ public:
{
if (AggroTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
AggroTimer = 0;
} else AggroTimer -= diff;
}
@@ -482,7 +482,7 @@ public:
void AttackStart(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -491,7 +491,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -515,7 +515,7 @@ public:
{
if (AggroTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
AggroTimer = 0;
} else AggroTimer -= diff;
}
@@ -586,7 +586,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -594,7 +594,7 @@ public:
void AttackStart(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -628,7 +628,7 @@ public:
{
if (AggroTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
AggroTimer = 0;
} else AggroTimer -= diff;
}
@@ -684,7 +684,7 @@ public:
// Anyway, I digress.
// @todo This line below is obviously a hack. Duh. I'm just coming in here to hackfix the encounter to actually be completable.
// It needs a rewrite. Badly. Please, take good care of it.
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE));
CycloneTimer = 30000;
ChainLightningTimer = 10000;
}
@@ -1020,7 +1020,7 @@ void PretendToDie(Creature* creature)
creature->InterruptNonMeleeSpells(true);
creature->RemoveAllAuras();
creature->SetHealth(0);
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
creature->GetMotionMaster()->MovementExpired(false);
creature->GetMotionMaster()->MoveIdle();
creature->SetStandState(UNIT_STAND_STATE_DEAD);
@@ -1028,7 +1028,7 @@ void PretendToDie(Creature* creature)
void Resurrect(Creature* target)
{
- target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ target->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
target->SetFullHealth();
target->SetStandState(UNIT_STAND_STATE_STAND);
target->CastSpell(target, SPELL_RES_VISUAL, true);
@@ -1116,7 +1116,7 @@ public:
void AttackStart(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -1125,7 +1125,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -1253,12 +1253,12 @@ public:
{
if (Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID)))
{
- Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ Julianne->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
Julianne->GetMotionMaster()->Clear();
Julianne->setDeathState(JUST_DIED);
Julianne->CombatStop(true);
Julianne->DeleteThreatList();
- Julianne->SetUInt32Value(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ Julianne->SetDynamicFlags(UNIT_DYNFLAG_LOOTABLE);
}
return;
}
@@ -1294,7 +1294,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -1382,7 +1382,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
if (AggroYellTimer <= diff)
{
Talk(SAY_JULIANNE_AGGRO);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->setFaction(16);
AggroYellTimer = 0;
} else AggroYellTimer -= diff;
@@ -1523,12 +1523,12 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
{
if (Creature* Romulo = (ObjectAccessor::GetCreature((*me), RomuloGUID)))
{
- Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ Romulo->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
Romulo->GetMotionMaster()->Clear();
Romulo->setDeathState(JUST_DIED);
Romulo->CombatStop(true);
Romulo->DeleteThreatList();
- Romulo->SetUInt32Value(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ Romulo->SetDynamicFlags(UNIT_DYNFLAG_LOOTABLE);
}
return;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
index 9e0fcc8f4c3..5c4ac116ba1 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
@@ -158,7 +158,7 @@ public:
HandleGameObject(StageDoorLeftGUID, true);
HandleGameObject(StageDoorRightGUID, true);
if (GameObject* sideEntrance = instance->GetGameObject(SideEntranceDoor))
- sideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
+ sideEntrance->RemoveFlag(GO_FLAG_LOCKED);
UpdateEncounterStateForKilledCreature(16812, NULL);
}
break;
@@ -220,9 +220,9 @@ public:
case GO_SIDE_ENTRANCE_DOOR:
SideEntranceDoor = go->GetGUID();
if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE)
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
+ go->AddFlag(GO_FLAG_LOCKED);
else
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
+ go->RemoveFlag(GO_FLAG_LOCKED);
break;
case GO_DUST_COVERED_CHEST:
DustCoveredChest = go->GetGUID();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index b2bb79ddcf4..6a431713222 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -200,7 +200,7 @@ public:
me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
{
- spotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ spotlight->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
spotlight->CastSpell(spotlight, SPELL_SPOTLIGHT, false);
m_uiSpotlightGUID = spotlight->GetGUID();
}
@@ -276,11 +276,7 @@ public:
float PosX = Spawns[index][1];
if (Creature* creature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
- {
- // In case database has bad flags
- creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }
+ creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
RaidWiped = false;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 22e372aa158..dbae2e7a5b5 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -170,7 +170,7 @@ public:
// Enable the Translocation Orb Exit
if (GameObject* escapeOrb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ESCAPE_ORB)))
- escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ escapeOrb->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage) override
@@ -315,7 +315,7 @@ public:
Creature* Phoenix = me->SummonCreature(CREATURE_PHOENIX, x, y, LOCATION_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
if (Phoenix)
{
- Phoenix->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
+ Phoenix->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
SetThreatList(Phoenix);
Phoenix->AI()->AttackStart(target);
}
@@ -454,7 +454,7 @@ public:
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->setFaction(14);
DoCast(me, SPELL_FLAMESTRIKE2, true);
@@ -508,7 +508,7 @@ public:
void Reset() override
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
me->SetDisableGravity(true);
DoCast(me, SPELL_PHOENIX_BURN, true);
Initialize();
@@ -540,7 +540,7 @@ public:
me->RemoveAllAurasOnDeath();
me->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->ClearAllReactives();
me->SetTarget(ObjectGuid::Empty);
me->GetMotionMaster()->Clear();
@@ -658,7 +658,7 @@ public:
DespawnTimer = 30000;
ChangeTargetTimer = urand(6000, 12000);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisableGravity(true);
me->setFaction(14);
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index b2e22c91a66..f1eb2dbe0d6 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -250,10 +250,7 @@ public:
if (instance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY)
instance->SetBossState(DATA_DELRISSA, DONE);
else
- {
- if (me->HasFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
- }
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
}
void UpdateAI(uint32 diff) override
@@ -444,8 +441,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
//time to make her lootable and complete event if she died before lackeys
if (!pDelrissa->IsAlive())
{
- if (!pDelrissa->HasFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
- pDelrissa->SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ pDelrissa->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
instance->SetBossState(DATA_DELRISSA, DONE);
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 85d5ac638e0..b121b58793e 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -87,7 +87,7 @@ class boss_selin_fireheart : public CreatureScript
if (!creature->IsAlive())
creature->Respawn();
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
_Reset();
@@ -168,7 +168,7 @@ class boss_selin_fireheart : public CreatureScript
Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->IsAlive())
{
- CrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ CrystalChosen->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
CrystalChosen->CastSpell(me, SPELL_MANA_RAGE, true);
events.ScheduleEvent(EVENT_EMPOWER, 10000, PHASE_DRAIN);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 06a3a6d2877..a2229b234ad 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -129,7 +129,7 @@ public:
Initialize();
events.Reset();
me->setFaction(7);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->LoadEquipment(0, true);
}
@@ -235,7 +235,7 @@ public:
else
{
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
phase = PHASE_ATTACKING;
if (Player* target = ObjectAccessor::GetPlayer(*me, playerGUID))
@@ -499,8 +499,8 @@ public:
return true;
}
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
+ creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
+ creature->RemoveUnitFlag(UNIT_FLAG_UNK_15);
player->CastSpell(creature, SPELL_DUEL, false);
player->CastSpell(player, SPELL_DUEL_FLAG, true);
@@ -550,7 +550,7 @@ public:
me->RestoreFaction();
CombatAI::Reset();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
+ me->AddUnitFlag(UNIT_FLAG_UNK_15);
}
void SpellHit(Unit* pCaster, const SpellInfo* pSpell) override
@@ -779,7 +779,7 @@ public:
if (charmer->HasAura(SPELL_EFFECT_STOLEN_HORSE))
{
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
- caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ caster->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
caster->setFaction(35);
DoCast(caster, SPELL_CALL_DARK_RIDER, true);
if (Creature* Dark_Rider = me->FindNearestCreature(NPC_DARK_RIDER_OF_ACHERUS, 15))
@@ -856,8 +856,8 @@ public:
return;
deathcharger->RestoreFaction();
- deathcharger->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
- deathcharger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ deathcharger->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
+ deathcharger->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
if (!me->GetVehicle() && deathcharger->IsVehicle() && deathcharger->GetVehicleKit()->HasEmptySeat(0))
me->EnterVehicle(deathcharger);
}
@@ -870,8 +870,8 @@ public:
if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle())
{
- deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
- deathcharger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ deathcharger->AddNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
+ deathcharger->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
deathcharger->setFaction(2096);
}
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 6b5192556f0..b5bec78509a 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -236,7 +236,7 @@ public:
me->LoadEquipment(0, true);
me->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
me->RemoveAurasDueToSpell(SPELL_KOLTIRA_TRANSFORM);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
}
@@ -257,7 +257,7 @@ public:
break;
case 3:
SetEscortPaused(true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
Talk(SAY_BREAKOUT2);
DoCast(me, SPELL_ANTI_MAGIC_ZONE);
@@ -282,7 +282,7 @@ public:
if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
valrothGUID = summoned->GetGUID();
- summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ summoned->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
}
void SummonAcolyte(uint32 uiAmount)
@@ -340,7 +340,7 @@ public:
case 5:
Talk(SAY_BREAKOUT9);
me->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
waveTimer = 2500;
break;
case 6:
@@ -655,7 +655,7 @@ public:
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
}
bool MeetQuestCondition(Player* player)
@@ -753,7 +753,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_6, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -783,7 +783,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_8, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -813,7 +813,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_3, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -843,7 +843,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_7, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -873,7 +873,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_4, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -903,7 +903,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_9, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -933,7 +933,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_5, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -963,7 +963,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_10, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -993,7 +993,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_1, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
@@ -1023,7 +1023,7 @@ public:
case 9:
Talk(SAY_EXEC_TIME_2, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
Talk(SAY_EXEC_WAITING, player);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 0d4574cc2cb..adaad6b0f9f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -551,7 +551,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetWalk(true);
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
+ temp->SetEmoteState(EMOTE_STATE_READY2H);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
@@ -625,7 +625,7 @@ public:
//UpdateWorldState(me->GetMap(), WORLD_STATE_REMAINS, 1);
UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 0);
UpdateWorldState(me->GetMap(), WORLD_STATE_EVENT_BEGIN, 1);
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
JumpToNextStep(3000);
break;
@@ -783,7 +783,7 @@ public:
case 15: // summon gate
if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ temp->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN06);
uiAlexandrosGUID = temp->GetGUID();
@@ -794,7 +794,7 @@ public:
case 16: // Alexandros out
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
{
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ temp->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23]);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN32);
}
@@ -999,7 +999,7 @@ public:
if (fLichPositionX && fLichPositionY)
{
Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
+ temp->SetEmoteState(EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
temp->setFaction(me->getFaction());
@@ -1007,7 +1007,7 @@ public:
uiDefenderGUID[0] = temp->GetGUID();
temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
+ temp->SetEmoteState(EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
temp->setFaction(me->getFaction());
@@ -1016,7 +1016,7 @@ public:
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
+ temp->SetEmoteState(EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
@@ -1024,7 +1024,7 @@ public:
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
+ temp->SetEmoteState(EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
temp->HandleEmoteCommand(EMOTE_STATE_ATTACK_UNARMED);
@@ -1032,7 +1032,7 @@ public:
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
+ temp->SetEmoteState(EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
@@ -1047,21 +1047,21 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ temp->SetEmoteState(EMOTE_ONESHOT_NONE);
temp->SetSpeedRate(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ temp->SetEmoteState(EMOTE_ONESHOT_NONE);
temp->SetSpeedRate(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ temp->SetEmoteState(EMOTE_ONESHOT_NONE);
temp->SetSpeedRate(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17]);
@@ -1156,7 +1156,7 @@ public:
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN16);
temp->CastSpell(temp, SPELL_TIRION_CHARGE, false); // jumping charge
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
+ temp->SetEmoteState(EMOTE_STATE_READY2H);
temp->SetSpeedRate(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2]);
@@ -1211,7 +1211,7 @@ public:
temp->CastSpell(temp, SPELL_TELEPORT_VISUAL, false);
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) // Tirion runs to Darion
{
- temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ temp->SetEmoteState(EMOTE_ONESHOT_NONE);
temp->SetSpeedRate(MOVE_RUN, 1.0f);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6]);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
index c10cea4183e..d1226d58811 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
@@ -70,7 +70,7 @@ public:
{
me->setActive(true);
me->SetVisible(false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetCanFly(true);
me->GetPosition(x, y, z);
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index ec5195ee49e..797003b13c7 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -293,7 +293,7 @@ public:
withbody = true;
wait = 300;
damage = me->GetHealth() - me->CountPctFromMaxHealth(1);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->StopMoving();
//me->GetMotionMaster()->MoveIdle();
DoCast(me, SPELL_HEAD_IS_DEAD);
@@ -318,7 +318,7 @@ public:
if (!bodyGUID)
bodyGUID = caster->GetGUID();
me->RemoveAllAuras();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_HEAD_LANDS, true);
DoCast(me, SPELL_HEAD, false);
SaySound(SAY_LOST_HEAD);
@@ -446,14 +446,14 @@ public:
headGUID.Clear();
}
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
//instance->SetBossState(DATA_HORSEMAN_EVENT, NOT_STARTED);
}
void FlyMode()
{
me->SetVisible(false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetDisableGravity(true);
me->SetSpeedRate(MOVE_WALK, 5.0f);
wp_reached = false;
@@ -493,7 +493,7 @@ public:
Phase = 1;
IsFlying = false;
wp_reached = false;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
SaySound(SAY_ENTRANCE);
if (Unit* player = ObjectAccessor::GetUnit(*me, PlayerGUID))
DoStartMovement(player);
@@ -631,7 +631,7 @@ public:
Unit* Head = ObjectAccessor::GetUnit(*me, headGUID);
if (Head && Head->IsAlive())
{
- Head->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ Head->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
//Head->CastSpell(Head, SPELL_HEAD_INVIS, false);
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_IMMUNE, true);
@@ -819,7 +819,7 @@ public:
sprouted = false;
DoCast(me, SPELL_PUMPKIN_AURA, true);
DoCast(me, SPELL_SPROUTING);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ me->AddUnitFlag(UNIT_FLAG_STUNNED);
}
void EnterCombat(Unit* /*who*/) override { }
@@ -830,7 +830,7 @@ public:
{
sprouted = true;
me->RemoveAllAuras();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ me->RemoveUnitFlag(UNIT_FLAG_STUNNED);
DoCast(me, SPELL_SPROUT_BODY, true);
me->UpdateEntry(PUMPKIN_FIEND);
DoStartMovement(me->GetVictim());
@@ -924,8 +924,8 @@ void npc_head::npc_headAI::Disappear()
body->RemoveAurasDueToSpell(SPELL_IMMUNE);//hack, SpellHit doesn't calls if body has immune aura
DoCast(body, SPELL_FLYING_HEAD);
me->SetFullHealth();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->GetMotionMaster()->MoveIdle();
ENSURE_AI(boss_headless_horseman::boss_headless_horsemanAI, body->AI())->returned = true;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
index 47152b972be..865037d098b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -102,8 +102,8 @@ public:
Initialize();
//Incase wipe during phase that mograine fake death
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
if (me->IsAlive())
@@ -152,7 +152,7 @@ public:
me->RemoveAllAuras();
me->ClearAllReactives();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_DEAD);
_bHasDied = true;
@@ -184,7 +184,7 @@ public:
//On resurrection, stop fake death and heal whitemane and resume fight
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(Whitemane, SPELL_LAYONHANDS);
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index ecbfe0748e0..85d4aac547f 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -89,14 +89,14 @@ public:
break;
case EVENT_ILLUSION:
DoCast(SPELL_ILLUSION);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(11686); // Invisible Model
DoModifyThreatPercent(me->GetVictim(), -99);
events.ScheduleEvent(EVENT_SET_VISIBILITY, 3000);
events.ScheduleEvent(EVENT_ILLUSION, 25000);
break;
case EVENT_SET_VISIBILITY:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(11073); //Jandice Model
break;
default:
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
index 0bb98a2dda5..9bc6cfde5b1 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
@@ -128,7 +128,7 @@ class boss_kirtonos_the_herald : public CreatureScript
events.ScheduleEvent(INTRO_1, 500);
me->SetDisableGravity(true);
me->SetReactState(REACT_PASSIVE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
Talk(EMOTE_SUMMONED);
}
@@ -180,7 +180,7 @@ class boss_kirtonos_the_herald : public CreatureScript
case INTRO_5:
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
me->SetVirtualItem(0, uint32(WEAPON_KIRTONOS_STAFF));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
me->SetReactState(REACT_AGGRESSIVE);
events.ScheduleEvent(INTRO_6, 5000);
break;
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 2a4b86baae6..55e47a19bc6 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -259,7 +259,7 @@ public:
case 1:
{
Creature* summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000);
- summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ summon->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
summon->SetReactState(REACT_DEFENSIVE);
summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true);
summon->AI()->Talk(SAY_ARCHMAGE);
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index f2159aac93a..5881f9ccd7f 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -154,7 +154,7 @@ class instance_stratholme : public InstanceMapScript
break;
case GO_GAUNTLET_GATE1:
//weird, but unless flag is set, client will not respond as expected. DB bug?
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
+ go->AddFlag(GO_FLAG_LOCKED);
gauntletGate1GUID = go->GetGUID();
break;
case GO_ZIGGURAT1:
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
index 6f6284a6c22..69906ba6ed9 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
@@ -168,7 +168,7 @@ public:
void UseStatue(GameObject* go)
{
go->SummonGameObject(GO_ATALAI_LIGHT1, *go, QuaternionData::fromEulerAnglesZYX(go->GetOrientation(), 0.0f, 0.0f), 0);
- go->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
+ go->AddFlag(GO_FLAG_INTERACT_COND);
}
/*
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index 47d92199e95..5b1961191fb 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -157,7 +157,7 @@ public:
IsIntro = true;
Madrigosa->SetMaxHealth(me->GetMaxHealth());
Madrigosa->SetHealth(me->GetMaxHealth());
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->Attack(Madrigosa, true);
Madrigosa->Attack(me, true);
}
@@ -171,7 +171,7 @@ public:
void EndIntro()
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
Intro = false;
IsIntro = false;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index b1e2822c5d3..647c5a1417a 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -159,7 +159,7 @@ public:
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
}
else
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
@@ -435,7 +435,7 @@ public:
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
}
else
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
@@ -669,7 +669,7 @@ public:
void Reset() override
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
Initialize();
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index 3d30972e39e..0edada91c6b 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -147,8 +147,8 @@ public:
events.Reset();
me->SetDisableGravity(true);
- me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
- me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
+ me->SetBoundingRadius(10);
+ me->SetCombatReach(10);
DespawnSummons(NPC_VAPOR_TRAIL);
me->setActive(false);
@@ -526,7 +526,7 @@ public:
{
npc_felmyst_vaporAI(Creature* creature) : ScriptedAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetSpeedRate(MOVE_RUN, 0.8f);
}
@@ -560,10 +560,10 @@ public:
{
npc_felmyst_trailAI(Creature* creature) : ScriptedAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_TRAIL_TRIGGER, true);
me->SetTarget(me->GetGUID());
- me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.01f); // core bug
+ me->SetBoundingRadius(0.01f); // core bug
}
void Reset() override { }
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 2bc8748de93..8f9ac1aa871 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -163,7 +163,7 @@ public:
me->setFaction(14);
if (!bJustReset) //first reset at create
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
me->SetDisableGravity(false);
me->SetVisible(true);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
@@ -178,7 +178,7 @@ public:
bJustReset = true;
me->SetVisible(false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
ScriptedAI::EnterEvadeMode(why);
}
@@ -203,7 +203,7 @@ public:
{
if (!TalkSequence)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
me->InterruptNonMeleeSpells(true);
me->RemoveAllAuras();
me->DeleteThreatList();
@@ -225,7 +225,7 @@ public:
{
if (ResetTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
me->SetDisableGravity(false);
me->SetVisible(true);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 7efc6f31600..b8e8bb91aae 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -263,7 +263,7 @@ public:
{
Initialize();
me->SetDisableGravity(true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->setActive(true);
for (uint8 i = 0; i < 4; ++i)
@@ -293,7 +293,7 @@ public:
me->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
for (uint8 i = 0; i < 4; ++i)
if (GameObject* pOrb = GetOrb(i))
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 0);
+ pOrb->SetFaction(0);
}
void EmpowerOrb(bool all)
@@ -310,7 +310,7 @@ public:
if (GameObject* pOrb = GetOrb(i))
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 35);
+ pOrb->SetFaction(35);
pOrb->setActive(true);
pOrb->Refresh();
}
@@ -322,7 +322,7 @@ public:
if (GameObject* pOrb = GetOrb(urand(0, 3)))
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 35);
+ pOrb->SetFaction(35);
pOrb->setActive(true);
pOrb->Refresh();
@@ -351,7 +351,7 @@ public:
{
if (GameObject* pOrb = GetOrb(i))
{
- if (pOrb->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
+ if (pOrb->GetFaction() == 35)
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
pOrb->setActive(true);
@@ -370,12 +370,12 @@ public:
bool OnGossipHello(Player* player, GameObject* go) override
{
- if (go->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
+ if (go->GetFaction() == 35)
{
InstanceScript* instance = go->GetInstanceScript();
player->SummonCreature(NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false);
- go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
+ go->SetFaction(0);
if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_KALECGOS_KJ)))
ENSURE_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->SetRingOfBlueFlames();
@@ -428,8 +428,8 @@ public:
void InitializeAI() override
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->AddUnitState(UNIT_STATE_STUNNED);
ScriptedAI::InitializeAI();
@@ -454,7 +454,7 @@ public:
case NPC_ANVEENA:
summoned->SetDisableGravity(true);
summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
- summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ summoned->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
break;
case NPC_KILJAEDEN:
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
@@ -576,7 +576,7 @@ public:
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KALECGOS_KJ)))
pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- me->SetFloatValue(UNIT_FIELD_COMBATREACH, 12);
+ me->SetCombatReach(12.0f);
summons.DespawnAll();
}
@@ -603,8 +603,8 @@ public:
{
if (summoned->GetEntry() == NPC_ARMAGEDDON_TARGET)
{
- summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ summoned->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ summoned->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
// summoned->SetVisibility(VISIBILITY_OFF); //with this we cant see the armageddon visuals
}
else
@@ -1031,7 +1031,7 @@ public:
void Reset() override
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
}
void JustSummoned(Creature* summoned) override
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index e9613d70aac..4ba225aa9fd 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -248,7 +248,7 @@ public:
{
_Reset();
Initialize();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(true);
}
@@ -295,7 +295,7 @@ public:
_phase = PHASE_TWO;
me->RemoveAllAuras();
DoCast(me, SPELL_OPEN_ALL_PORTALS, true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
scheduler.Schedule(Seconds(6), [this](TaskContext /*context*/)
{
@@ -409,7 +409,7 @@ public:
_scheduler.Schedule(Seconds(2), [this](TaskContext /*context*/)
{
me->SetReactState(REACT_AGGRESSIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
if (Creature* _summoner = ObjectAccessor::GetCreature(*me, _summonerGUID))
if (Unit* target = _summoner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index 473135f8cbf..5fe9366f036 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -100,7 +100,7 @@ class boss_archaedas : public CreatureScript
instance->SetData(0, 5); // respawn any dead minions
me->setFaction(35);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->AddAura(SPELL_FREEZE_ANIM, me);
}
@@ -113,7 +113,7 @@ class boss_archaedas : public CreatureScript
{
DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag);
minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true);
- minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ minion->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
minion->SetControlled(false, UNIT_STATE_ROOT);
minion->setFaction(14);
minion->RemoveAura(SPELL_MINION_FREEZE_ANIM);
@@ -123,7 +123,7 @@ class boss_archaedas : public CreatureScript
void EnterCombat(Unit* /*who*/) override
{
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
}
@@ -263,7 +263,7 @@ class npc_archaedas_minions : public CreatureScript
Initialize();
me->setFaction(35);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->RemoveAllAuras();
me->AddAura(SPELL_MINION_FREEZE_ANIM, me);
@@ -273,7 +273,7 @@ class npc_archaedas_minions : public CreatureScript
{
me->setFaction (14);
me->RemoveAllAuras();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
bAmIAwake = true;
}
@@ -352,7 +352,7 @@ class npc_stonekeepers : public CreatureScript
void Reset() override
{
me->setFaction(35);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->RemoveAllAuras();
me->AddAura(SPELL_MINION_FREEZE_ANIM, me);
@@ -361,7 +361,7 @@ class npc_stonekeepers : public CreatureScript
void EnterCombat(Unit* /*who*/) override
{
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index f6e00183f7c..0dfb5cfe69d 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -122,7 +122,7 @@ class instance_uldaman : public InstanceMapScript
case GO_ANCIENT_VAULT_DOOR:
go->SetGoState(GO_STATE_READY);
- go->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
+ go->SetFlags(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN));
ancientVaultDoor = go->GetGUID();
if (m_auiEncounter[1] == DONE)
@@ -142,7 +142,7 @@ class instance_uldaman : public InstanceMapScript
if (m_auiEncounter[2] == DONE)
{
HandleGameObject(ObjectGuid::Empty, true, go);
- go->SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ go->AddFlag(GO_FLAG_INTERACT_COND);
}
break;
}
@@ -152,7 +152,7 @@ class instance_uldaman : public InstanceMapScript
{
creature->setFaction(35);
creature->RemoveAllAuras();
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
creature->SetControlled(true, UNIT_STATE_ROOT);
creature->AddAura(SPELL_MINION_FREEZE_ANIM, creature);
}
@@ -172,7 +172,7 @@ class instance_uldaman : public InstanceMapScript
if (!go)
return;
- go->SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ go->AddFlag(GO_FLAG_INTERACT_COND);
}
void ActivateStoneKeepers()
@@ -186,7 +186,7 @@ class instance_uldaman : public InstanceMapScript
continue;
target->SetControlled(false, UNIT_STATE_ROOT);
target->setFaction(14);
- target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ target->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
target->RemoveAura(SPELL_MINION_FREEZE_ANIM);
return; // only want the first one we find
@@ -209,7 +209,7 @@ class instance_uldaman : public InstanceMapScript
if (!target || !target->IsAlive() || target->getFaction() == 14)
continue;
target->SetControlled(false, UNIT_STATE_ROOT);
- target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ target->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
target->setFaction(14);
target->RemoveAura(SPELL_MINION_FREEZE_ANIM);
archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true);
@@ -275,7 +275,7 @@ class instance_uldaman : public InstanceMapScript
ironaya->setFaction(415);
ironaya->SetControlled(false, UNIT_STATE_ROOT);
- ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ ironaya->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
ironaya->GetMotionMaster()->Clear();
ironaya->GetMotionMaster()->MovePoint(0, IronayaPoint);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index 3a46af6845d..8f585e0a8aa 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -93,7 +93,7 @@ class npc_voljin_zulaman : public CreatureScript
{
me->SetDisplayFromModel(0);
if (_instance->GetData(DATA_ZULAMAN_STATE) == NOT_STARTED)
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
}
void Reset() override
@@ -109,9 +109,9 @@ class npc_voljin_zulaman : public CreatureScript
if (me->GetCreatureTemplate()->GossipMenuId == menuId && !gossipListId)
{
_events.Reset();
- me->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- me->SetUInt32Value(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
+ me->SetMountDisplayId(0);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
+ me->SetDynamicFlags(UNIT_DYNFLAG_NONE);
_events.ScheduleEvent(EVENT_INTRO_MOVEPOINT_1, 1000);
Talk(SAY_INTRO_1, player);
me->SetWalk(true);
@@ -149,7 +149,7 @@ class npc_voljin_zulaman : public CreatureScript
case EVENT_BANGING_THE_GONG:
DoCast(me, SPELL_BANGING_THE_GONG);
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
- strangeGong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ strangeGong->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
me->SetVirtualItem(0, uint32(ITEM_VIRTUAL_ITEM));
break;
case EVENT_START_DOOR_OPENING_1:
@@ -159,7 +159,7 @@ class npc_voljin_zulaman : public CreatureScript
case EVENT_START_DOOR_OPENING_2:
me->SetVirtualItem(0, uint32(0));
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
- strangeGong->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ strangeGong->AddFlag(GO_FLAG_NOT_SELECTABLE);
_events.ScheduleEvent(EVENT_START_DOOR_OPENING_3, 500);
break;
case EVENT_START_DOOR_OPENING_3:
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index d28425b2e86..f5177c98a97 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -246,7 +246,7 @@ class boss_mandokir : public CreatureScript
switch (eventId)
{
case EVENT_SUMMON_OHGAN:
- me->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
+ me->SetMountDisplayId(0);
DoCast(me, SPELL_SUMMON_OHGAN, true);
break;
case EVENT_DECAPITATE:
diff --git a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp
index a09363aae8c..79ad74fb8bd 100644
--- a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp
@@ -68,8 +68,8 @@ public:
{
_tapped = true;
_playerGUID = caster->GetGUID();
- me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
- me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
_events.ScheduleEvent(EVENT_TURN_TO_PLAYER, Seconds(2));
}
}
diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
index 95012fd1878..83b8b834df9 100644
--- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
@@ -75,7 +75,7 @@ public:
switch (waypointId)
{
case 0:
- me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
Cage->SetGoState(GO_STATE_ACTIVE);
Talk(SAY_START, player);
diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
index 982c9a412b6..4709617f801 100644
--- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
@@ -73,7 +73,7 @@ public:
void Reset() override
{
Initialize();
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
+ me->SetEmoteState(EMOTE_STATE_NONE);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
@@ -85,7 +85,7 @@ public:
{
if (player->GetQuestStatus(QUEST_SAVING_YENNIKU) == QUEST_STATUS_INCOMPLETE) // Yenniku's Release
{
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
+ me->SetEmoteState(EMOTE_STATE_STUN);
me->CombatStop(); // stop combat
me->DeleteThreatList(); // unsure of this
me->setFaction(FACTION_HORDE_GENERIC); // horde generic