aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2014-10-26 01:46:28 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2014-10-26 01:46:28 +0200
commita951af7b52992b47d6bf02a0f44561dcc079da6b (patch)
treef92f24fb15af59803781773fe22f39bb860b63e1 /src/server/scripts/EasternKingdoms
parent395bcaa2153dac4010c9fe89c34faeb68398a13a (diff)
Scripts: replaced various Location struct defines with proper Position or G3D::Vector3
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp105
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/zone_hinterlands.cpp25
3 files changed, 61 insertions, 78 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index d67c28a3552..d2c0ae88590 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -217,11 +217,6 @@ enum mograine
SPELL_THUNDER = 53630
};
-struct Location
-{
- float x, y, z, o;
-};
-
void UpdateWorldState(Map* map, uint32 id, uint32 state)
{
Map::PlayerList const& players = map->GetPlayers();
@@ -236,10 +231,10 @@ void UpdateWorldState(Map* map, uint32 id, uint32 state)
}
}
-static Location LightofDawnLoc[]=
+Position const LightofDawnLoc[] =
{
{2281.335f, -5300.409f, 85.170f, 0}, // 0 Tirion Fordring loc
- {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
+ {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
{2281.461f, -5263.014f, 81.164f, 0}, // 2 Tirion charges
{2262.277f, -5293.477f, 82.167f, 0}, // 3 Tirion run
{2270.286f, -5287.73f, 82.262f, 0}, // 4 Tirion relocate
@@ -540,30 +535,30 @@ public:
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19].x, LightofDawnLoc[19].y, LightofDawnLoc[19].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21].x, LightofDawnLoc[21].y, LightofDawnLoc[21].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetWalk(true);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10].x, LightofDawnLoc[10].y, LightofDawnLoc[10].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13].x, LightofDawnLoc[13].y, LightofDawnLoc[13].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16]);
}
JumpToNextStep(10000);
}
@@ -729,30 +724,30 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
JumpToNextStep(5000);
break;
@@ -782,7 +777,7 @@ public:
break;
case 15: // summon gate
- if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22].x, LightofDawnLoc[22].y, LightofDawnLoc[22].z, LightofDawnLoc[22].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
@@ -796,7 +791,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23].x, LightofDawnLoc[23].y, LightofDawnLoc[23].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23]);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN32);
}
SetHoldState(false); // makes darion turns back
@@ -810,7 +805,7 @@ public:
break;
case 18: // Darion's spirit out
- if (Creature* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24].x, LightofDawnLoc[24].y, LightofDawnLoc[24].z, LightofDawnLoc[24].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->AI()->Talk(SAY_LIGHT_OF_DAWN35);
temp->SetWalk(false);
@@ -823,7 +818,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN07);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25].x, LightofDawnLoc[25].y, LightofDawnLoc[25].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25]);
}
JumpToNextStep(4000);
break;
@@ -857,7 +852,7 @@ public:
temp->AI()->Talk(SAY_LIGHT_OF_DAWN39);
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1].x, LightofDawnLoc[1].y, LightofDawnLoc[1].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1]);
JumpToNextStep(15000);
break;
@@ -887,7 +882,7 @@ public:
break;
case 29: // lich king spawns
- if (Creature* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26].x, LightofDawnLoc[26].y, LightofDawnLoc[26].z, LightofDawnLoc[26].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->AI()->Talk(SAY_LIGHT_OF_DAWN43);
uiLichKingGUID = temp->GetGUID();
@@ -920,7 +915,7 @@ public:
case 32:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27].x, LightofDawnLoc[27].y, LightofDawnLoc[27].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27]);
JumpToNextStep(6000);
break;
@@ -999,7 +994,7 @@ public:
if (fLichPositionX && fLichPositionY)
{
- Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
+ Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
@@ -1007,7 +1002,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
uiDefenderGUID[0] = temp->GetGUID();
- temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
+ temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
@@ -1051,33 +1046,33 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14].x, LightofDawnLoc[14].y, LightofDawnLoc[14].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11].x, LightofDawnLoc[11].y, LightofDawnLoc[11].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17].x, LightofDawnLoc[17].y, LightofDawnLoc[17].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }));
}
JumpToNextStep(3000);
break;
@@ -1160,9 +1155,9 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2].x, LightofDawnLoc[2].y, LightofDawnLoc[2].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2]);
if (Creature* lktemp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
- lktemp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
+ lktemp->Relocate(LightofDawnLoc[28]); // workarounds, he should kick back by Tirion, but here we relocate him
}
JumpToNextStep(1500);
break;
@@ -1178,7 +1173,7 @@ public:
{
temp->SetSpeed(MOVE_RUN, 1.0f);
me->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[29].x, LightofDawnLoc[29].y, LightofDawnLoc[29].z); // 26
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[29]); // 26
}
JumpToNextStep(4000);
break;
@@ -1214,7 +1209,7 @@ public:
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 1.0f);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6].x, LightofDawnLoc[6].y, LightofDawnLoc[6].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6]);
}
JumpToNextStep(2500);
break;
@@ -1238,7 +1233,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7].x, LightofDawnLoc[7].y, LightofDawnLoc[7].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7]);
}
JumpToNextStep(5500);
break;
@@ -1246,7 +1241,7 @@ public:
case 63:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8].x, LightofDawnLoc[8].y, LightofDawnLoc[8].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8]);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN61);
}
JumpToNextStep(15000);
@@ -1401,7 +1396,7 @@ public:
if (uiFight_duration <= diff + 5000)
{
if (!uiTirionGUID)
- if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].x, LightofDawnLoc[0].y, LightofDawnLoc[0].z, 1.528f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
+ if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].GetPositionWithOffset({ 0.0f, 0.0f, 0.0f, 1.528f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
{
temp->setFaction(me->getFaction());
temp->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
@@ -1443,7 +1438,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9].x, LightofDawnLoc[9].y, LightofDawnLoc[9].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
@@ -1454,7 +1449,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12].x, LightofDawnLoc[12].y, LightofDawnLoc[12].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
@@ -1465,7 +1460,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15].x, LightofDawnLoc[15].y, LightofDawnLoc[15].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15]);
}
DespawnNPC(uiRayneGUID);
@@ -1477,7 +1472,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18].x, LightofDawnLoc[18].y, LightofDawnLoc[18].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
@@ -1492,7 +1487,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20].x, LightofDawnLoc[20].y, LightofDawnLoc[20].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
@@ -1539,7 +1534,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
uiGhoulGUID[i] = temp->GetGUID();
}
@@ -1549,7 +1544,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
uiAbominationGUID[i] = temp->GetGUID();
}
@@ -1559,7 +1554,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
uiWarriorGUID[i] = temp->GetGUID();
}
@@ -1569,7 +1564,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
uiBehemothGUID[i] = temp->GetGUID();
}
@@ -1581,7 +1576,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
me->AddThreat(temp, 0.0f);
uiDefenderGUID[i] = temp->GetGUID();
@@ -1592,7 +1587,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
me->AddThreat(temp, 0.0f);
uiEarthshatterGUID[i] = temp->GetGUID();
@@ -1601,7 +1596,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ 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);
me->AddThreat(temp, 0.0f);
uiKorfaxGUID = temp->GetGUID();
@@ -1609,7 +1604,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ 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);
me->AddThreat(temp, 0.0f);
uiMaxwellGUID = temp->GetGUID();
@@ -1617,7 +1612,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiEligorGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ 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);
me->AddThreat(temp, 0.0f);
uiEligorGUID = temp->GetGUID();
@@ -1625,7 +1620,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiRayneGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ 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);
me->AddThreat(temp, 0.0f);
uiRayneGUID = temp->GetGUID();
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index ac7f4c0aad4..5b154d9d6be 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -95,12 +95,7 @@ enum Spells
SPELL_DEATH = 42566 //not correct spell
};
-struct Locations
-{
- float x, y, z;
-};
-
-static Locations FlightPoint[]=
+G3D::Vector3 const FlightPoint[]=
{
{1754.00f, 1346.00f, 17.50f},
{1765.00f, 1347.00f, 19.00f},
@@ -125,7 +120,7 @@ static Locations FlightPoint[]=
{1758.00f, 1367.00f, 19.51f}
};
-static Locations Spawn[]=
+G3D::Vector3 const Spawn[]=
{
{1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
{1765.28f, 1347.46f, 17.55f} //spawn point for smoke
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
index 268a78bb491..98074a54408 100644
--- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
@@ -152,21 +152,16 @@ enum Rinji
GO_RINJI_CAGE = 142036
};
-struct Location
+Position const AmbushSpawn[] =
{
- float posX, posY, posZ;
+ { 191.296204f, -2839.329346f, 107.388f, 0.0f },
+ { 70.972466f, -2848.674805f, 109.459f, 0.0f }
};
-Location AmbushSpawn[] =
+Position const AmbushMoveTo[] =
{
- { 191.296204f, -2839.329346f, 107.388f },
- { 70.972466f, -2848.674805f, 109.459f }
-};
-
-Location AmbushMoveTo[] =
-{
- { 166.630386f, -2824.780273f, 108.153f },
- { 70.886589f, -2874.335449f, 116.675f }
+ { 166.630386f, -2824.780273f, 108.153f, 0.0f },
+ { 70.886589f, -2874.335449f, 116.675f, 0.0f }
};
class npc_rinji : public CreatureScript
@@ -226,20 +221,18 @@ public:
if (!_first)
spawnId = 1;
- me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
- TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
for (int i = 0; i < 2; ++i)
{
- me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
- TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
}
}
void JustSummoned(Creature* summoned) override
{
summoned->SetWalk(false);
- summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId].posX, AmbushMoveTo[spawnId].posY, AmbushMoveTo[spawnId].posZ);
+ summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId]);
}
void sQuestAccept(Player* player, Quest const* quest)