Skip to content

Commit

Permalink
Core/Misc: use enum for UNIIT_NPC_FLAGS' zero values
Browse files Browse the repository at this point in the history
  • Loading branch information
SnapperRy committed Jul 10, 2016
1 parent 8e721e1 commit ebb33bb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/server/game/Entities/Player/Player.cpp
Expand Up @@ -26381,7 +26381,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction());

pet->setPowerType(POWER_MANA);
pet->SetUInt32Value(UNIT_NPC_FLAGS, 0);
pet->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
pet->InitStatsForLevel(getLevel());

Expand Down
Expand Up @@ -206,7 +206,7 @@ class boss_victor_nefarius : public CreatureScript
Talk(SAY_GAMESBEGIN_2);

me->setFaction(103);
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->SetUInt32Value(UNIT_NPC_FLAGS, 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);
Expand Down
6 changes: 3 additions & 3 deletions src/server/scripts/Kalimdor/zone_silithus.cpp
Expand Up @@ -1059,23 +1059,23 @@ class go_crystalline_tear : public GameObjectScript

if (Merithra)
{
Merithra->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Merithra->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420);
Merithra->setFaction(35);
}

if (Caelestrasz)
{
Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419);
Caelestrasz->setFaction(35);
}

if (Arygos)
{
Arygos->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Arygos->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418);
Arygos->setFaction(35);
Expand Down
2 changes: 1 addition & 1 deletion src/server/scripts/Northrend/zone_borean_tundra.cpp
Expand Up @@ -2274,7 +2274,7 @@ class npc_hidden_cultist : public CreatureScript
void DoAction(int32 /*iParam*/) override
{
me->StopMoving();
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID))
me->SetFacingToObject(player);
Expand Down
2 changes: 1 addition & 1 deletion src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
Expand Up @@ -1436,7 +1436,7 @@ class npc_akama_illidan : public CreatureScript

KillAllElites();

me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); // Database sometimes has strange values..
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->setActive(false);
me->SetVisible(false);
Expand Down
Expand Up @@ -537,7 +537,7 @@ class npc_zerekethvoidzone : public CreatureScript

void Reset() override
{
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
me->setFaction(16);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);

Expand Down

0 comments on commit ebb33bb

Please sign in to comment.