diff options
author | ForesterDev <11771800+ForesterDev@users.noreply.github.com> | 2019-07-25 14:54:49 +0400 |
---|---|---|
committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-07-25 12:54:49 +0200 |
commit | 0c317498a57b3983de61d381d684a77176b281e4 (patch) | |
tree | ea5ce29a5470e89df1e16a2957502def728ba0a0 /src | |
parent | b9756de7e5b8147569faebb31caad91d3d0cd7dd (diff) |
Scripts/Defines: cleanup some magic numbers in factions (#23631)
Diffstat (limited to 'src')
13 files changed, 23 insertions, 36 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h index 137f5a1ae38..f376c9f7583 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h @@ -24,13 +24,6 @@ #define BRDScriptName "instance_blackrock_depths" #define DataHeader "BRD" -enum BRDFactionIds -{ - FACTION_NEUTRAL = 734, - FACTION_HOSTILE = 754, - FACTION_FRIEND = 35 -}; - enum BRDDataTypes { TYPE_RING_OF_LAW = 1, diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 6dc2459321d..58d82908a06 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -948,7 +948,7 @@ public: { deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); deathcharger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - deathcharger->SetFaction(2096); + deathcharger->SetFaction(FACTION_SCARLET_CRUSADE_2); } } }; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 94a29a98637..d780167c13a 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -354,7 +354,7 @@ public: { if (GameObject* pOrb = GetOrb(i)) { - if (pOrb->GetFaction() == 35) + if (pOrb->GetFaction() == FACTION_FRIENDLY) { pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES); pOrb->setActive(true); @@ -380,7 +380,7 @@ class go_orb_of_the_blue_flight : public GameObjectScript bool GossipHello(Player* player) override { - if (me->GetFaction() == 35) + if (me->GetFaction() == FACTION_FRIENDLY) { 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); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 26770f1b641..7b80d7f56f7 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -226,7 +226,7 @@ class instance_uldaman : public InstanceMapScript for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i) { Creature* target = instance->GetCreature(*i); - if (!target || target->isDead() || target->GetFaction() != 14) + if (!target || target->isDead() || target->GetFaction() != FACTION_MONSTER) continue; target->DespawnOrUnsummon(); @@ -236,7 +236,7 @@ class instance_uldaman : public InstanceMapScript for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i) { Creature* target = instance->GetCreature(*i); - if (!target || target->isDead() || target->GetFaction() != 14) + if (!target || target->isDead() || target->GetFaction() != FACTION_MONSTER) continue; target->DespawnOrUnsummon(); @@ -246,7 +246,7 @@ class instance_uldaman : public InstanceMapScript for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i) { Creature* target = instance->GetCreature(*i); - if (!target || target->isDead() || target->GetFaction() != 14) + if (!target || target->isDead() || target->GetFaction() != FACTION_MONSTER) continue; target->DespawnOrUnsummon(); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 249b53c9fa5..d8c19922c37 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -439,8 +439,7 @@ public: enum zumrahConsts { - ZUMRAH_ID = 7271, - ZUMRAH_HOSTILE_FACTION = 37 + ZUMRAH_ID = 7271 }; class at_zumrah : public AreaTriggerScript @@ -455,7 +454,7 @@ public: if (!pZumrah) return false; - pZumrah->SetFaction(ZUMRAH_HOSTILE_FACTION); + pZumrah->SetFaction(FACTION_TROLL_FROSTMANE); return true; } diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index 00e071cbf4f..9ff9a03b3e1 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -53,8 +53,7 @@ enum Kerlonian SPELL_SLEEP_VISUAL = 25148, SPELL_AWAKEN = 17536, QUEST_SLEEPER_AWAKENED = 5321, - NPC_LILADRIS = 11219, //attackers entries unknown - FACTION_KER_ESCORTEE = 113 + NPC_LILADRIS = 11219 //attackers entries unknown }; /// @todo make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road. @@ -162,7 +161,7 @@ public: { me->SetStandState(UNIT_STAND_STATE_STAND); Talk(SAY_KER_START, player); - StartFollow(player, FACTION_KER_ESCORTEE, quest); + StartFollow(player, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, quest); } } }; diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp index ea08b807389..e1bbd291c02 100644 --- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp @@ -28,8 +28,6 @@ enum Kaya { - FACTION_ESCORTEE_H = 775, - NPC_GRIMTOTEM_RUFFIAN = 11910, NPC_GRIMTOTEM_BRUTE = 11912, NPC_GRIMTOTEM_SORCERER = 11913, diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index 4dfab9d4653..728aef81fef 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -279,8 +279,7 @@ enum Tooga QUEST_TOOGA = 1560, NPC_TORTA = 6015, - POINT_ID_TO_WATER = 1, - FACTION_TOOG_ESCORTEE = 113 + POINT_ID_TO_WATER = 1 }; Position const ToWaterLoc = {-7032.664551f, -4906.199219f, -1.606446f, 0.0f}; @@ -417,7 +416,7 @@ public: void QuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_TOOGA) - StartFollow(player, FACTION_TOOG_ESCORTEE, quest); + StartFollow(player, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, quest); } }; diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 3bf0afe1c7d..ccd97e5cd0d 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -176,7 +176,6 @@ public: enum TaskmasterFizzule { - FACTION_FRIENDLY_F = 35, SPELL_FLARE = 10113, SPELL_FOLLY = 10137, }; @@ -226,7 +225,7 @@ public: EngagementOver(); me->GetMotionMaster()->MoveIdle(); - me->SetFaction(FACTION_FRIENDLY_F); + me->SetFaction(FACTION_FRIENDLY); me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); } @@ -266,7 +265,7 @@ public: { if (FlareCount >= 2) { - if (me->GetFaction() == FACTION_FRIENDLY_F) + if (me->GetFaction() == FACTION_FRIENDLY) return; DoFriend(); @@ -520,7 +519,6 @@ enum Wizzlecrank SAY_END = 6, QUEST_ESCAPE = 863, - FACTION_RATCHET = 637, NPC_PILOT_WIZZ = 3451, NPC_MERCENARY = 3282, }; diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp index 4f4701caa77..41401fb8c7c 100644 --- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp @@ -171,8 +171,7 @@ enum Ringo SPELL_REVIVE_RINGO = 15591, QUEST_A_LITTLE_HELP = 4491, - NPC_SPRAGGLE = 9997, - FACTION_ESCORTEE = 113 + NPC_SPRAGGLE = 9997 }; class npc_ringo : public CreatureScript @@ -341,7 +340,7 @@ public: if (quest->GetQuestId() == QUEST_A_LITTLE_HELP) { me->SetStandState(UNIT_STAND_STATE_STAND); - StartFollow(player, FACTION_ESCORTEE, quest); + StartFollow(player, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, quest); } } }; diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 396f5d52c5d..0341ab62efb 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -757,7 +757,7 @@ public: owner->GetMotionMaster()->MoveFollow(GetCaster(), 4.0f, 0.0f); owner->CastSpell(owner, SPELL_SUBDUED, true); GetCaster()->CastSpell(GetCaster(), SPELL_DRAKE_HATCHLING_SUBDUED, true); - owner->SetFaction(35); + owner->SetFaction(FACTION_FRIENDLY); owner->SetImmuneToAll(true); owner->DespawnOrUnsummon(3 * MINUTE*IN_MILLISECONDS); } @@ -938,7 +938,7 @@ public: if (talbot) { talbot->UpdateEntry(NPC_PRINCE_VALANAR); - talbot->SetFaction(14); + talbot->SetFaction(FACTION_MONSTER); talbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); talbot->SetReactState(REACT_PASSIVE); } @@ -2244,7 +2244,7 @@ public: void AttackPlayer() { - me->SetFaction(14); + me->SetFaction(FACTION_MONSTER); if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID)) AttackStart(player); } diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index 7600c9343d5..63ded22843d 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -133,7 +133,6 @@ enum BTGameObjectIds enum BlackTempleMisc { - AKAMA_FACTION_COMBAT = 1868, AKAMA_INTRO = 1, AKAMA_FIGHT = 2, ACTION_ACTIVE_AKAMA_INTRO = 3, diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index 32dd46cdb09..0b9fd44844e 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -220,6 +220,7 @@ enum FactionTemplates FACTION_PREY = 31, FACTION_ESCORTEE_H_NEUTRAL_PASSIVE = 33, FACTION_FRIENDLY = 35, + FACTION_TROLL_FROSTMANE = 37, FACTION_OGRE = 45, FACTION_ORC_DRAGONMAW = 62, FACTION_HORDE_GENERIC = 83, @@ -235,6 +236,7 @@ enum FactionTemplates FACTION_ESCORTEE_N_FRIEND_PASSIVE = 290, FACTION_TITAN = 415, FACTION_ESCORTEE_N_FRIEND_ACTIVE = 495, + FACTION_RATCHET = 637, FACTION_GOBLIN_DARK_IRON_BAR_PATRON = 736, FACTION_DARK_IRON_DWARVES = 754, FACTION_ESCORTEE_A_PASSIVE = 774, @@ -251,7 +253,8 @@ enum FactionTemplates FACTION_ESCORTEE_H_ACTIVE = 2046, FACTION_UNDEAD_SCOURGE_2 = 2068, FACTION_UNDEAD_SCOURGE_3 = 2084, - FACTION_SCARLET_CRUSADE = 2089 + FACTION_SCARLET_CRUSADE = 2089, + FACTION_SCARLET_CRUSADE_2 = 2096 }; #define MIN_REPUTATION_RANK (REP_HATED) |