mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Defines: cleanup some magic numbers in factions (#23631)
(cherry picked from commit 0c317498a5)
This commit is contained in:
@@ -205,6 +205,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,
|
||||
@@ -220,6 +221,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,
|
||||
@@ -236,7 +238,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)
|
||||
|
||||
@@ -23,13 +23,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,
|
||||
|
||||
@@ -955,7 +955,7 @@ public:
|
||||
{
|
||||
deathcharger->AddNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathcharger->SetFaction(2096);
|
||||
deathcharger->SetFaction(FACTION_SCARLET_CRUSADE_2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -355,7 +355,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);
|
||||
@@ -381,7 +381,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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -235,7 +235,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();
|
||||
}
|
||||
@@ -244,7 +244,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();
|
||||
}
|
||||
|
||||
@@ -438,8 +438,7 @@ public:
|
||||
|
||||
enum zumrahConsts
|
||||
{
|
||||
ZUMRAH_ID = 7271,
|
||||
ZUMRAH_HOSTILE_FACTION = 37
|
||||
ZUMRAH_ID = 7271
|
||||
};
|
||||
|
||||
class at_zumrah : public AreaTriggerScript
|
||||
@@ -454,7 +453,7 @@ public:
|
||||
if (!pZumrah)
|
||||
return false;
|
||||
|
||||
pZumrah->SetFaction(ZUMRAH_HOSTILE_FACTION);
|
||||
pZumrah->SetFaction(FACTION_TROLL_FROSTMANE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -275,8 +275,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};
|
||||
@@ -412,7 +411,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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@ public:
|
||||
|
||||
enum TaskmasterFizzule
|
||||
{
|
||||
FACTION_FRIENDLY_F = 35,
|
||||
SPELL_FLARE = 10113,
|
||||
SPELL_FOLLY = 10137,
|
||||
};
|
||||
@@ -220,7 +219,7 @@ public:
|
||||
EngagementOver();
|
||||
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFaction(FACTION_FRIENDLY_F);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
|
||||
}
|
||||
|
||||
@@ -260,7 +259,7 @@ public:
|
||||
{
|
||||
if (FlareCount >= 2)
|
||||
{
|
||||
if (me->GetFaction() == FACTION_FRIENDLY_F)
|
||||
if (me->GetFaction() == FACTION_FRIENDLY)
|
||||
return;
|
||||
|
||||
DoFriend();
|
||||
@@ -514,7 +513,6 @@ enum Wizzlecrank
|
||||
SAY_END = 6,
|
||||
|
||||
QUEST_ESCAPE = 863,
|
||||
FACTION_RATCHET = 637,
|
||||
NPC_PILOT_WIZZ = 3451,
|
||||
NPC_MERCENARY = 3282,
|
||||
};
|
||||
|
||||
@@ -755,7 +755,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(3min);
|
||||
}
|
||||
@@ -936,7 +936,7 @@ public:
|
||||
if (talbot)
|
||||
{
|
||||
talbot->UpdateEntry(NPC_PRINCE_VALANAR);
|
||||
talbot->SetFaction(14);
|
||||
talbot->SetFaction(FACTION_MONSTER);
|
||||
talbot->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
talbot->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -2242,7 +2242,7 @@ public:
|
||||
|
||||
void AttackPlayer()
|
||||
{
|
||||
me->SetFaction(14);
|
||||
me->SetFaction(FACTION_MONSTER);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID))
|
||||
AttackStart(player);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,6 @@ enum BTGameObjectIds
|
||||
|
||||
enum BlackTempleMisc
|
||||
{
|
||||
AKAMA_FACTION_COMBAT = 1868,
|
||||
AKAMA_INTRO = 1,
|
||||
AKAMA_FIGHT = 2,
|
||||
ACTION_ACTIVE_AKAMA_INTRO = 3,
|
||||
|
||||
Reference in New Issue
Block a user