aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp6
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp8
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp12
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp31
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp4
-rw-r--r--src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp4
-rw-r--r--src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp10
-rw-r--r--src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp10
-rw-r--r--src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp4
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp4
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp8
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp6
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp6
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp8
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp4
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp22
-rw-r--r--src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_desolace.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_felwood.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_moonglade.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp24
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp12
-rw-r--r--src/server/scripts/Kalimdor/zone_winterspring.cpp6
36 files changed, 129 insertions, 130 deletions
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index c5efcf8d9fa..cb8eda7fd7c 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -60,7 +60,7 @@ public:
if (instance)
{
go->SetGoState(GO_STATE_ACTIVE);
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
instance->SetData(DATA_FIRE, instance->GetData(DATA_FIRE) + 1);
return true;
}
@@ -189,7 +189,7 @@ public:
npc_morriduneAI(Creature* creature) : npc_escortAI(creature)
{
Talk(SAY_MORRIDUNE_1);
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
Start(false);
}
@@ -200,7 +200,7 @@ public:
case 4:
SetEscortPaused(true);
me->SetFacingTo(1.775791f, true);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
Talk(SAY_MORRIDUNE_2);
break;
}
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
index 8f627581763..0e8bfa1cd10 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
@@ -100,12 +100,12 @@ public:
case GO_SHRINE_OF_GELIHAST:
shrineOfGelihastGUID = go->GetGUID();
if (GetBossState(DATA_GELIHAST) != DONE)
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
break;
case GO_ALTAR_OF_THE_DEEPS:
altarOfTheDeepsGUID = go->GetGUID();
if (GetBossState(DATA_AKU_MAI) != DONE)
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
break;
case GO_AKU_MAI_DOOR:
if (GetBossState(DATA_AKU_MAI) == DONE)
@@ -176,13 +176,13 @@ public:
case DATA_GELIHAST:
if (state == DONE)
if (GameObject* go = instance->GetGameObject(shrineOfGelihastGUID))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
break;
case DATA_AKU_MAI:
if (state == DONE)
if (GameObject* go = instance->GetGameObject(altarOfTheDeepsGUID))
{
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
go->SummonCreature(NPC_MORRIDUNE, SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index fbe35df5c96..a7b4305ede4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -128,7 +128,7 @@ public:
ArchimondeGUID = instance->GetGuidData(DATA_ARCHIMONDE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
void EnterCombat(Unit* /*who*/) override { }
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 7f27c2e5166..28bc1a2f90f 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -405,7 +405,7 @@ void hyjalAI::Reset()
}
//Flags
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
//Reset Instance Data for trash count
if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
@@ -598,7 +598,7 @@ void hyjalAI::StartEvent(Player* player)
CheckTimer = 5000;
PlayerGUID = player->GetGUID();
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
@@ -630,7 +630,7 @@ void hyjalAI::Retreat()
Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000);
if (JainaDummy)
{
- JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ JainaDummy->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
ENSURE_AI(hyjalAI, JainaDummy->AI())->IsDummy = true;
DummyGuid = JainaDummy->GetGUID();
}
@@ -640,7 +640,7 @@ void hyjalAI::Retreat()
}
SpawnVeins();
Overrun = true;
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);//cant talk after overrun event started
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);//cant talk after overrun event started
}
void hyjalAI::SpawnVeins()
@@ -834,7 +834,7 @@ void hyjalAI::UpdateAI(uint32 diff)
}
EventBegun = false;
CheckTimer = 0;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
BossGUID[i].Clear();
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
}
@@ -997,7 +997,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
{
(*itr)->CastSpell(*itr, SPELL_TELEPORT_VISUAL, true);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
- (*itr)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ (*itr)->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
}
DoCast(me, SPELL_TELEPORT_VISUAL);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index b69fd874832..2f1fad60e10 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -404,7 +404,7 @@ void hyjal_trashAI::JustDied(Unit* /*killer*/)
instance->SetData(DATA_TRASH, 0);//signal trash is dead
if ((instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !me->isWorldBoss()) || (damageTaken < me->GetMaxHealth()/4 && me->isWorldBoss()))
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//no loot
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);//no loot
}
class npc_giant_infernal : public CreatureScript
@@ -420,8 +420,8 @@ public:
meteor = false;//call once!
CanMove = false;
Delay = rand32() % 30000;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(MODEL_INVIS);
go = false;
Reset();
@@ -479,9 +479,9 @@ public:
} else if (!CanMove){
if (spawnTimer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetDisplayId(me->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ me->SetDisplayId(me->GetNativeDisplayId());
CanMove = true;
if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT))
{
@@ -674,7 +674,7 @@ public:
}
if (waypointId == LastOverronPos && IsOverrun)
{
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED);
+ me->SetEmoteState(EMOTE_ONESHOT_ATTACK_UNARMED);
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
{
me->setDeathState(DEAD);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index a64a6cab3b8..94bd1acab74 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -148,7 +148,7 @@ public:
if (HealthBelowPct(1))
{
//Handle Escape Event: Don't forget to add Player::RewardPlayerAndGroupAtEvent
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
uiOutroStep = 1;
Phase = OUTRO;
return;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 2390193473e..9caca258c5e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -297,7 +297,7 @@ public:
}
CloseGossipMenuFor(player);
ai->SetDespawnAtFar(false);
- creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
return true;
}
@@ -420,14 +420,14 @@ public:
bStepping = true;
step = 0;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
bossEvent = DATA_MEATHOOK;
gossipStep = 0;
}
void AttackStart(Unit* who) override
{
- if (who && !who->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
+ if (who && !who->HasUnitFlag(UNIT_FLAG_IMMUNE_TO_PC))
npc_escortAI::AttackStart(who);
}
@@ -451,7 +451,7 @@ public:
if (Creature* temp = me->SummonCreature((uint32)RiftAndSpawnsLocations[i][0], RiftAndSpawnsLocations[timeRiftID][1], RiftAndSpawnsLocations[timeRiftID][2], RiftAndSpawnsLocations[timeRiftID][3], RiftAndSpawnsLocations[timeRiftID][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
guidVector[i-timeRiftID-1] = temp->GetGUID();
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ temp->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
temp->SetReactState(REACT_PASSIVE);
temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH)
@@ -508,7 +508,7 @@ public:
break;
case 8:
gossipStep = 1;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 12:
@@ -533,7 +533,7 @@ public:
break;
case 20:
gossipStep = 2;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetRun(false);
SetHoldState(true);
break;
@@ -579,7 +579,7 @@ public:
case 45:
SetRun(true);
gossipStep = 4;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 48:
@@ -595,7 +595,7 @@ public:
break;
case 51:
gossipStep = 5;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
}
@@ -1043,7 +1043,7 @@ public:
{
disguised2->UpdateEntry(NPC_INFINITE_HUNTER);
//Make them unattackable
- disguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised2->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
disguised2->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1053,7 +1053,7 @@ public:
{
disguised1->UpdateEntry(NPC_INFINITE_AGENT);
//Make them unattackable
- disguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised1->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
disguised1->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1063,7 +1063,7 @@ public:
{
disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY);
//Make them unattackable
- disguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised0->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
disguised0->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1077,7 +1077,7 @@ public:
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, infiniteDraconianGUID[i]))
{
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ temp->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
temp->SetReactState(REACT_AGGRESSIVE);
}
JumpToNextStep(5000);
@@ -1135,8 +1135,7 @@ public:
if (Creature* epoch = ObjectAccessor::GetCreature(*me, epochGUID))
{
//Make Epoch attackable
- epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ epoch->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NON_ATTACKABLE));
epoch->SetReactState(REACT_AGGRESSIVE);
}
@@ -1147,7 +1146,7 @@ public:
if (instance->GetBossState(DATA_EPOCH) == DONE)
{
gossipStep = 3;
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
bStepping = false;
bossEvent = DATA_MAL_GANIS;
JumpToNextStep(15000);
@@ -1186,7 +1185,7 @@ public:
case 87:
if (Creature* malganis = ObjectAccessor::GetCreature(*me, malganisGUID))
{
- malganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
+ malganis->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15));
malganis->SetReactState(REACT_AGGRESSIVE);
}
JumpToNextStep(1000);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
index 88aabb8a1c6..a6c7f10b6ac 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
@@ -208,7 +208,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
if (state == DONE)
{
if (GameObject* go = instance->GetGameObject(_malGanisChestGUID))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
instance->SummonCreature(NPC_CHROMIE_3, ChromieSummonPos[1]);
}
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index cb040c983be..ae3a81cb489 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -342,7 +342,7 @@ public:
break;
case 30:
SetEscortPaused(true);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetRun(false);
break;
case 31:
@@ -366,7 +366,7 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
//make horsie run off
SetEscortPaused(true);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
instance->SetData(TYPE_THRALL_PART2, DONE);
SetRun();
break;
@@ -475,7 +475,7 @@ public:
}
void StartWP()
{
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
SetEscortPaused(false);
}
void DoMount()
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
index c26c1ad1772..05c2f45d736 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
@@ -299,8 +299,8 @@ public:
TEMPSUMMON_CORPSE_DESPAWN, 0);
if (temp)
{
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ temp->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ temp->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
if (Creature* boss = SummonedPortalBoss(temp))
{
diff --git a/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp b/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
index 016768cc777..01142499089 100644
--- a/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
+++ b/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
@@ -181,7 +181,7 @@ class npc_harbinger_of_flame : public CreatureScript
void EnterCombat(Unit* /*target*/) override
{
- for (ObjectGuid const& birdGuid : me->GetChannelObjects())
+ for (ObjectGuid const& birdGuid : me->m_unitData->ChannelObjects)
if (Creature* bird = ObjectAccessor::GetCreature(*me, birdGuid))
DoZoneInCombat(bird, 200.0f);
@@ -298,7 +298,7 @@ class npc_blazing_monstrosity : public CreatureScript
// Our passenger is another vehicle (boardable by players)
DoCast(passenger, SPELL_SHARE_HEALTH, true);
passenger->setFaction(35);
- passenger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ passenger->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
// Hack to relocate vehicle on vehicle so exiting players are not moved under map
Movement::MoveSplineInit init(passenger);
diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
index 6d97bc54bdc..3041202201e 100644
--- a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
+++ b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
@@ -151,7 +151,7 @@ public:
if (instance->GetData(DATA_DEAD_ELEMENTALS) == 4)
{
// Set to combat automatically, Brann's event won't repeat
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
events.SetPhase(PHASE_COMBAT);
ScheduleCombatEvents();
me->SetHomePosition(AnraphetActivatePos);
@@ -235,7 +235,7 @@ public:
events.ScheduleEvent(EVENT_ANRAPHET_READY, 6000, 0, PHASE_INTRO);
break;
case EVENT_ANRAPHET_READY:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
events.SetPhase(PHASE_COMBAT);
ScheduleCombatEvents();
break;
@@ -341,7 +341,7 @@ class npc_brann_bronzebeard_anraphet : public CreatureScript
_instance->SetBossState(DATA_VAULT_OF_LIGHTS, IN_PROGRESS);
_currentPoint = 0;
events.Reset();
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->SetWalk(true);
Talk(BRANN_SAY_DOOR_INTRO);
events.ScheduleEvent(EVENT_BRANN_UNLOCK_DOOR, 7500);
@@ -365,7 +365,7 @@ class npc_brann_bronzebeard_anraphet : public CreatureScript
break;
}
case ACTION_ANRAPHET_DIED:
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
events.ScheduleEvent(EVENT_BRANN_MOVE_INTRO, 1000);
break;
}
@@ -412,7 +412,7 @@ class npc_brann_bronzebeard_anraphet : public CreatureScript
break;
case EVENT_BRANN_SAY_GET_IT:
Talk(BRANN_SAY_GET_IT);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
break;
case EVENT_BRANN_SET_ORIENTATION_4:
me->SetFacingTo(3.141593f);
diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp
index c18c53c04af..0a2c688adbe 100644
--- a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp
+++ b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp
@@ -233,7 +233,7 @@ public:
// Spell not in DBC, it is not cast either, according to sniffs
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
if (Creature* quicksand = me->SummonCreature(NPC_QUICKSAND, *target))
- quicksand->SetUInt32Value(UNIT_CREATED_BY_SPELL, SPELL_SUMMON_QUICKSAND);
+ quicksand->SetCreatedBySpell(SPELL_SUMMON_QUICKSAND);
events.ScheduleEvent(EVENT_QUICKSAND, 10000, 0, PHASE_DISPERSE);
break;
}
@@ -293,8 +293,8 @@ public:
{
if (Unit* ptah = GetCaster())
{
- ptah->SetFlag(UNIT_FIELD_FLAGS, uint32(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_29 | UNIT_FLAG_UNK_31));
- ptah->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
+ ptah->AddUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_29 | UNIT_FLAG_UNK_31));
+ ptah->AddUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
}
}
@@ -302,8 +302,8 @@ public:
{
if (Unit* ptah = GetCaster())
{
- ptah->RemoveFlag(UNIT_FIELD_FLAGS, uint32(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_29 | UNIT_FLAG_UNK_31));
- ptah->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
+ ptah->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_29 | UNIT_FLAG_UNK_31));
+ ptah->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
}
}
diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp
index b16a15b0507..bfd043ea9ef 100644
--- a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp
+++ b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp
@@ -131,7 +131,7 @@ public:
DoCast(me, SPELL_TELEPORT);
DoCast(me, SPELL_SHIELD_OF_LIGHT);
- me->SetFlag(UNIT_FIELD_FLAGS, uint32(UNIT_FLAG_UNK_31));
+ me->AddUnitFlag(UNIT_FLAG_UNK_31);
DoCastAOE(SPELL_ACTIVATE_BEACONS);
@@ -357,7 +357,7 @@ class spell_anhuur_activate_beacons : public SpellScriptLoader
void Activate(SpellEffIndex index)
{
PreventHitDefaultEffect(index);
- GetHitGObj()->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ GetHitGObj()->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
}
void Register() override
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index 737f4153fc1..f538da49848 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -84,7 +84,7 @@ public:
{
//Become visible again
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
//Noxxion model
me->SetDisplayId(11172);
Invisible = false;
@@ -124,7 +124,7 @@ public:
//me->m_canMove = true;
me->InterruptNonMeleeSpells(false);
me->setFaction(35);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
// Invisible Model
me->SetDisplayId(11686);
SummonAdds(me->GetVictim());
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
index 48dbac93455..8c63c588727 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
@@ -230,7 +230,7 @@ public:
case 9:
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetAnimTier(UNIT_BYTE1_FLAG_NONE, false);
if (Creature* trigger = ObjectAccessor::GetCreature(*me, triggerGUID))
me->Kill(trigger);
me->SetReactState(REACT_AGGRESSIVE);
@@ -248,7 +248,7 @@ public:
case 10:
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetAnimTier(UnitBytes1_Flags(UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER), false);
me->SetFacingTo(me->GetOrientation() + float(M_PI), true);
if (Creature * trigger = me->SummonCreature(NPC_TRIGGER, MiddleRoomLocation, TEMPSUMMON_CORPSE_DESPAWN))
triggerGUID = trigger->GetGUID();
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
index f56a67c2046..17000ec1477 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
@@ -71,7 +71,7 @@ public:
case GO_GONG:
goGongGUID = gameObject->GetGUID();
if (GetBossState(DATA_TUTEN_KASH) == DONE)
- gameObject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ gameObject->AddFlag(GO_FLAG_NOT_SELECTABLE);
break;
case GO_IDOL_OVEN_FIRE:
case GO_IDOL_CUP_FIRE:
@@ -114,7 +114,7 @@ public:
case IN_PROGRESS:
{
if (GameObject* go = instance->GetGameObject(goGongGUID))
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
switch (gongWave)
{
@@ -148,7 +148,7 @@ public:
{
fiendsKilled = 0;
if (GameObject* go = instance->GetGameObject(goGongGUID))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
}
break;
case NPC_TOMB_REAVER:
@@ -156,7 +156,7 @@ public:
{
reaversKilled = 0;
if (GameObject* go = instance->GetGameObject(goGongGUID))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
}
break;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index 2ca11c6508b..080373b1197 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -107,7 +107,7 @@ public:
channeling = false;
eventProgress = 0;
spawnerCount = 0;
- me->SetFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
+ me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
}
}
@@ -136,7 +136,7 @@ public:
{
eventInProgress = true;
Talk(SAY_QUEST_ACCEPTED);
- me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_ESCORT);
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index 8cd91b4e8f5..ab0a57bfbff 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -58,7 +58,7 @@ public:
switch (go->GetEntry())
{
case 21099: DoorWardGUID = go->GetGUID(); break;
- case 20920: go->SetUInt32Value(GAMEOBJECT_FACTION, 0); break; // big fat fugly hack
+ case 20920: go->SetFaction(0); break; // big fat fugly hack
}
}
@@ -67,7 +67,7 @@ public:
if (WardKeeperDeath == WARD_KEEPERS_NR)
if (GameObject* go = instance->GetGameObject(DoorWardGUID))
{
- go->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
+ go->AddFlag(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN));
go->SetGoState(GO_STATE_ACTIVE);
}
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 4b345425881..16bccda22a1 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -104,7 +104,7 @@ public:
break;
case 45:
Talk(SAY_WIN, player);
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
player->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
break;
case 46:
@@ -177,7 +177,7 @@ public:
{
go->SetRespawnTime(5 * MINUTE);
go->Refresh();
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ go->RemoveFlag(GO_FLAG_INTERACT_COND);
}
IsMovementActive = false;
@@ -196,7 +196,7 @@ public:
tubbersInRange.remove_if([](GameObject* go)
{
- return go->isSpawned() || !go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ return go->isSpawned() || !go->HasFlag(GO_FLAG_INTERACT_COND);
});
tubbersInRange.sort(Trinity::ObjectDistanceOrderPred(me));
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
index 4f609ce0991..2c1d743ff75 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
@@ -93,7 +93,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
}
@@ -187,7 +187,7 @@ public:
{
instance->SetData(DATA_VEM_DEATH, 0);
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
}
@@ -281,7 +281,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
- me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
for (uint8 i = 0; i < 10; ++i)
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 892d2b8dc64..fe80c09eb10 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -210,7 +210,7 @@ public:
//Reset flags
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
- 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->SetVisible(true);
//Reset Phase
@@ -421,7 +421,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
//Reset to normal emote state and prevent select and attack
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
//Remove Target field
me->SetTarget(ObjectGuid::Empty);
@@ -527,7 +527,7 @@ public:
//Reset flags
me->RemoveAurasDueToSpell(SPELL_TRANSFORM);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
me->SetVisible(false);
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
@@ -641,7 +641,7 @@ public:
me->SetFullHealth();
me->SetVisible(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE));
//Emerging phase
//AttackStart(ObjectAccessor::GetUnit(*me, HoldpPlayer));
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
index 0215634ee99..7b1f448b6fd 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
@@ -111,7 +111,7 @@ public:
{
//Cast
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->setFaction(35);
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
@@ -134,7 +134,7 @@ public:
//Back_Timer
if (Submerged && Back_Timer <= diff)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->setFaction(14);
DoCastVictim(SPELL_GROUND_RUPTURE);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index f296d78878a..31c00a7aaa0 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -126,7 +126,7 @@ struct boss_twinemperorsAI : public ScriptedAI
if (ohealth <= 0)
{
pOtherBoss->setDeathState(JUST_DIED);
- pOtherBoss->SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ pOtherBoss->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
}
}
}
@@ -138,7 +138,7 @@ struct boss_twinemperorsAI : public ScriptedAI
{
pOtherBoss->SetHealth(0);
pOtherBoss->setDeathState(JUST_DIED);
- pOtherBoss->SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ pOtherBoss->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
ENSURE_AI(boss_twinemperorsAI, pOtherBoss->AI())->DontYellWhenDead = true;
}
if (!DontYellWhenDead) // I hope AI is not threaded
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index a8eb3f0b3b2..c4b7538d988 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -99,7 +99,7 @@ public:
creature->AI()->Talk(SAY_MAKE_PREPARATIONS);
creature->setFaction(250);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
ENSURE_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
ENSURE_AI(npc_escortAI, (creature->AI()))->SetDespawnAtFar(false);
@@ -144,7 +144,7 @@ public:
currentEvent = 0;
eventProgress = 0;
me->setActive(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
}
uint32 eventTimer;
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index 070f68f1897..d92f0ab0574 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -98,7 +98,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);
break;
@@ -246,7 +246,7 @@ public:
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
{
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
SetEscortPaused(true);
}
break;
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index f1ddefb28f7..31c97ea5305 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -86,8 +86,8 @@ public:
DoCastSelf(SPELL_IRRIDATION, true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
+ me->AddUnitFlag(UNIT_FLAG_PVP_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
me->SetHealth(me->CountPctFromMaxHealth(10));
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
@@ -116,7 +116,7 @@ public:
_canAskForHelp = false;
_canUpdateEvents = true;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_PVP_ATTACKABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
_playerGUID = caster->GetGUID();
@@ -203,7 +203,7 @@ public:
{
Initialize();
NormFaction = creature->getFaction();
- NpcFlags = creature->GetUInt32Value(UNIT_NPC_FLAGS);
+ NpcFlags = NPCFlags(creature->m_unitData->NpcFlags[0]);
}
void Initialize()
@@ -222,7 +222,7 @@ public:
Initialize();
me->setFaction(NormFaction);
- me->SetUInt32Value(UNIT_NPC_FLAGS, NpcFlags);
+ me->SetNpcFlags(NpcFlags);
}
void EnterCombat(Unit* who) override
@@ -265,7 +265,7 @@ public:
private:
uint32 NormFaction;
- uint32 NpcFlags;
+ NPCFlags NpcFlags;
uint32 DynamiteTimer;
uint32 EmoteTimer;
bool IsTreeEvent;
@@ -292,7 +292,7 @@ public:
void Reset() override
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
+ me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
me->SetHealth(me->CountPctFromMaxHealth(15));
switch (urand(0, 1))
{
@@ -413,7 +413,7 @@ public:
_events.ScheduleEvent(EVENT_STAND, Seconds(2));
break;
case EVENT_STAND: // Remove kneel standstate. Using a separate delayed event because it causes unwanted delay before starting waypoint movement.
- me->SetByteValue(UNIT_FIELD_BYTES_1, 0, 0);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
break;
case EVENT_TALK_END:
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
@@ -510,7 +510,7 @@ public:
{
SparkGUID = Spark->GetGUID();
Spark->setActive(true);
- Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ Spark->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
}
SayTimer = 8000;
}
@@ -640,7 +640,7 @@ public:
{
if (Creature* ravager = go->FindNearestCreature(NPC_DEATH_RAVAGER, 5.0f, true))
{
- ravager->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ ravager->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
ravager->SetReactState(REACT_AGGRESSIVE);
ravager->AI()->AttackStart(player);
}
@@ -674,7 +674,7 @@ public:
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
}
diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
index 303d2192fb8..13fe48efc7f 100644
--- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
@@ -631,7 +631,7 @@ public:
_explosivesGuids.clear();
if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
{
- sironas->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ sironas->RemoveUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
me->SetFacingToObject(sironas);
}
_moveTimer = 1 * IN_MILLISECONDS;
diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp
index d972cd9d0fe..eb2aab5c353 100644
--- a/src/server/scripts/Kalimdor/zone_desolace.cpp
+++ b/src/server/scripts/Kalimdor/zone_desolace.cpp
@@ -94,7 +94,7 @@ public:
}
else if (spell->Id == SPELL_KODO_KOMBO_GOSSIP)
{
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index 6f211b6865c..7932f19317a 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -203,7 +203,7 @@ public:
return;
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
SetCombatMovement(true);
if (me->IsInCombat())
diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp
index 7482c2f92b8..ddc37d07c60 100644
--- a/src/server/scripts/Kalimdor/zone_felwood.cpp
+++ b/src/server/scripts/Kalimdor/zone_felwood.cpp
@@ -63,10 +63,10 @@ public:
}
else
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ me->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
me->CastSpell(me, SPELL_STAND);
me->GetMotionMaster()->MoveRandom(8.0f);
events.ScheduleEvent(EVENT_CHECK_OOC, 20000);
@@ -234,7 +234,7 @@ public: spell_ruumbos_silly_dance() : SpellScriptLoader("spell_ruumbos_silly_dan
{
if (Player* player = GetHitPlayer())
{
- player->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE);
+ player->SetEmoteState(EMOTE_STATE_DANCE);
if (player->GetMapId() == MAP_KALIMDOR)
{
diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp
index 7a22f94cac6..70b5574f95f 100644
--- a/src/server/scripts/Kalimdor/zone_moonglade.cpp
+++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp
@@ -52,7 +52,7 @@ public:
{
npc_omenAI(Creature* creature) : ScriptedAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->GetMotionMaster()->MovePoint(1, 7549.977f, -2855.137f, 456.9678f);
}
@@ -66,7 +66,7 @@ public:
if (pointId == 1)
{
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
if (Player* player = me->SelectNearestPlayer(40.0f))
AttackStart(player);
}
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 70b99347cf8..7b7f94a63f3 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -360,7 +360,7 @@ public:
{
Initialize();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
void HandleAnimation()
@@ -844,7 +844,7 @@ public:
if (Creature* spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer))
{
if (spawn->GetEntry() == NPC_KALDOREI_INFANTRY)
- spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15427 + rand32() % 4);
+ spawn->SetDisplayId(15427 + rand32() % 4);
if (i >= 30) WaveCount = 1;
if (i >= 33) WaveCount = 2;
if (i >= 45) WaveCount = 3;
@@ -978,25 +978,25 @@ public:
if (Merithra)
{
- Merithra->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, MERITHRA_NIGHT_ELF_FORM);
+ Merithra->SetNpcFlags(UNIT_NPC_FLAG_NONE);
+ Merithra->SetStandState(UNIT_STAND_STATE_STAND);
+ Merithra->SetDisplayId(MERITHRA_NIGHT_ELF_FORM);
Merithra->setFaction(35);
}
if (Caelestrasz)
{
- Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, CAELESTRASZ_NIGHT_ELF_FORM);
+ Caelestrasz->SetNpcFlags(UNIT_NPC_FLAG_NONE);
+ Caelestrasz->SetStandState(UNIT_STAND_STATE_STAND);
+ Caelestrasz->SetDisplayId(CAELESTRASZ_NIGHT_ELF_FORM);
Caelestrasz->setFaction(35);
}
if (Arygos)
{
- Arygos->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, ARYGOS_GNOME_FORM);
+ Arygos->SetNpcFlags(UNIT_NPC_FLAG_NONE);
+ Arygos->SetStandState(UNIT_STAND_STATE_STAND);
+ Arygos->SetDisplayId(ARYGOS_GNOME_FORM);
Arygos->setFaction(35);
}
@@ -1224,7 +1224,7 @@ class go_wind_stone : public GameObjectScript
summons->AI()->Talk(YELL_ROYAL_AGGRO);
break;
}
- summons->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ summons->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
summons->SendMeleeAttackStart(player);
summons->CombatStart(player);
}
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index 16ea0c3d5b4..c071bfd0088 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -321,8 +321,8 @@ public:
{
creature->setFaction(113);
creature->SetFullHealth();
- creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ creature->SetStandState(UNIT_STAND_STATE_STAND);
+ creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
creature->AI()->Talk(SAY_OOX_START);
if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI()))
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index 5a6380e8289..1090d3e7c21 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -421,8 +421,8 @@ public:
if (!creature)
continue;
creature->setFaction(35);
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
AffrayChallenger[i] = creature->GetGUID();
}
@@ -458,8 +458,8 @@ public:
Creature* creature = ObjectAccessor::GetCreature(*me, AffrayChallenger[Wave]);
if (creature && (creature->IsAlive()))
{
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
creature->setFaction(14);
creature->AI()->AttackStart(warrior);
@@ -490,8 +490,8 @@ public:
}
else if (creature) // Makes BIG WILL attackable.
{
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
creature->setFaction(14);
creature->AI()->AttackStart(warrior);
diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp
index 6c2548e3889..224321fc03b 100644
--- a/src/server/scripts/Kalimdor/zone_winterspring.cpp
+++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp
@@ -362,13 +362,13 @@ public:
{
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_ELUNE_ALTAR, 10.0f))
{
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
me->SetFacingToObject(go);
_altarGUID = go->GetGUID();
}
}
else if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_ELUNE_FIRE, 10.0f))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
// Yell and set escort to pause
Talk(SAY_REACH_TORCH);
@@ -617,7 +617,7 @@ public:
if (npc_ranshalla::npc_ranshallaAI* escortAI = dynamic_cast<npc_ranshalla::npc_ranshallaAI*>(ranshalla->AI()))
escortAI->DoContinueEscort(isAltar);
}
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->AddFlag(GO_FLAG_NOT_SELECTABLE);
return false;
}