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
committerAokromes <Aokromes@users.noreply.github.com>2017-05-23 12:30:27 +0200
commitabea8bf4cb3034f56d833982f951a0742dc36fc7 (patch)
tree7450b5e623a4ad6e8e2f4e82b2163a6f0a6a3b9a /src/server/scripts/EasternKingdoms/ScarletEnclave
parentd96482b2d49c61fe26533def461276a8038db4ab (diff)
Core/Defines: define faction templates and replace magic numbers from scripts
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 8421c1658ab..0ae96d388a6 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -126,7 +126,7 @@ public:
{
Initialize();
events.Reset();
- me->SetFaction(7);
+ me->SetFaction(FACTION_CREATURE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->LoadEquipment(0, true);
@@ -232,7 +232,7 @@ public:
wait_timer -= diff;
else
{
- me->SetFaction(14);
+ me->SetFaction(FACTION_MONSTER);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
phase = PHASE_ATTACKING;
@@ -475,8 +475,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
@@ -554,7 +553,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);
@@ -780,7 +779,7 @@ public:
{
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
caster->RemoveFlag(UNIT_NPC_FLAGS, 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 24ead674f2b..319ac6b8ad3 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -617,7 +617,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;
}
@@ -635,7 +635,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;
}
@@ -653,7 +653,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;
}
@@ -671,7 +671,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;
}
@@ -1503,7 +1503,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();
}
}
@@ -1513,7 +1513,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();
}
}
@@ -1523,7 +1523,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();
}
}
@@ -1533,7 +1533,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();
}
}
@@ -1545,7 +1545,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();
}
@@ -1556,7 +1556,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();
}
@@ -1565,7 +1565,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();
}
@@ -1573,7 +1573,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();
}
@@ -1581,7 +1581,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();
}
@@ -1589,7 +1589,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();
}