aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/ScarletEnclave
diff options
context:
space:
mode:
authorForesterDev <forester.manv@gmail.com>2017-05-23 14:30:27 +0400
committerfunjoker <funjoker109@gmail.com>2020-06-14 23:49:03 +0200
commitc34b83a467975f5d2ed6f8a98b8d6cb0c7710a34 (patch)
tree44a6e4676cea8beb3baf17ae1b5871c4f5d6dfaf /src/server/scripts/EasternKingdoms/ScarletEnclave
parent607c5ad5541bac7ce8a2787ef9c87b4ebea74a5e (diff)
Core/Defines: define faction templates and replace magic numbers from scripts
(cherry picked from commit abea8bf4cb3034f56d833982f951a0742dc36fc7)
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletEnclave')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp28
2 files changed, 19 insertions, 20 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index d7e50807867..9134885bd46 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->SetFaction(FACTION_CREATURE);
me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->LoadEquipment(0, true);
@@ -235,7 +235,7 @@ public:
wait_timer -= diff;
else
{
- me->SetFaction(14);
+ me->SetFaction(FACTION_MONSTER);
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
phase = PHASE_ATTACKING;
@@ -484,8 +484,7 @@ enum Says_VBM
enum Misc_VBN
{
- QUEST_DEATH_CHALLENGE = 12733,
- FACTION_HOSTILE = 2068
+ QUEST_DEATH_CHALLENGE = 12733
};
class npc_death_knight_initiate : public CreatureScript
@@ -563,7 +562,7 @@ public:
{
if (m_uiDuelTimer <= uiDiff)
{
- me->SetFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_UNDEAD_SCOURGE_2);
if (Unit* unit = ObjectAccessor::GetUnit(*me, m_uiDuelerGUID))
AttackStart(unit);
@@ -789,7 +788,7 @@ public:
{
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
caster->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
- caster->SetFaction(35);
+ caster->SetFaction(FACTION_FRIENDLY);
DoCast(caster, SPELL_CALL_DARK_RIDER, true);
if (Creature* Dark_Rider = me->FindNearestCreature(NPC_DARK_RIDER_OF_ACHERUS, 15))
ENSURE_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 255e709ae90..461d326dd3e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -621,7 +621,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_ACHERUS_GHOUL, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiGhoulGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -639,7 +639,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiAbominationGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -657,7 +657,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiWarriorGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -675,7 +675,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiBehemothGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -1507,7 +1507,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiGhoulGUID[i] = temp->GetGUID();
}
}
@@ -1517,7 +1517,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiAbominationGUID[i] = temp->GetGUID();
}
}
@@ -1527,7 +1527,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiWarriorGUID[i] = temp->GetGUID();
}
}
@@ -1537,7 +1537,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2084);
+ temp->SetFaction(FACTION_UNDEAD_SCOURGE_3);
uiBehemothGUID[i] = temp->GetGUID();
}
}
@@ -1549,7 +1549,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiDefenderGUID[i] = temp->GetGUID();
}
@@ -1560,7 +1560,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiEarthshatterGUID[i] = temp->GetGUID();
}
@@ -1569,7 +1569,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiKorfaxGUID = temp->GetGUID();
}
@@ -1577,7 +1577,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiMaxwellGUID = temp->GetGUID();
}
@@ -1585,7 +1585,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiEligorGUID = temp->GetGUID();
}
@@ -1593,7 +1593,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->SetFaction(2089);
+ temp->SetFaction(FACTION_SCARLET_CRUSADE);
me->AddThreat(temp, 0.0f);
uiRayneGUID = temp->GetGUID();
}