diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-04-25 21:19:30 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-04-25 21:19:30 +0200 |
| commit | 2585e799f95f259dd4b422daf15ef7963173c408 (patch) | |
| tree | 96335cb3da64afc64af4ad3c3e994f441059832d /src/server/scripts/EasternKingdoms | |
| parent | dc8a7a6fa5a3afb8f95958db2bdc0888361e56f8 (diff) | |
Core/Misc: Change how Position struct is retrieved
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf910430cdf3070987ce085da3c2666da changes by return a Position object instead of accepting a Position parameter by reference.
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
4 files changed, 5 insertions, 9 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 92cdb40dc7b..4caeafb681e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -353,7 +353,7 @@ public: InfernalPoint *point = NULL; Position pos; if ((me->GetMapId() != 532) || positions.empty()) - me->GetRandomNearPosition(pos, 60); + pos = me->GetRandomNearPosition(60); else { point = Trinity::Containers::SelectRandomContainerElement(positions); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 108aceebb90..f0ca568f0fd 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -740,8 +740,7 @@ public: if (MoveTimer <= diff) { - Position pos; - me->GetRandomNearPosition(pos, 10); + Position pos = me->GetRandomNearPosition(10); me->GetMotionMaster()->MovePoint(0, pos); MoveTimer = urand(5000, 8000); } else MoveTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 9ceaf8cb85b..fb9f71a51bc 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -235,8 +235,7 @@ class instance_stratholme : public InstanceMapScript EncounterState[0] = data; if (Creature* ysidaTrigger = instance->GetCreature(ysidaTriggerGUID)) { - Position ysidaPos; - ysidaTrigger->GetPosition(&ysidaPos); + Position ysidaPos = ysidaTrigger->GetPosition(); ysidaTrigger->SummonCreature(NPC_YSIDA, ysidaPos, TEMPSUMMON_TIMED_DESPAWN, 1800000); } events.CancelEvent(EVENT_BARON_RUN); diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index 9db6a6b4d19..76452fd2ed0 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -112,8 +112,7 @@ public: for (uint8 i = 0; i < 3; ++i) { const Position src = {147.927444f, -3851.513428f, 130.893f, 0}; - Position dst; - me->GetRandomPoint(src, 7.0f, dst); + Position dst = me->GetRandomPoint(src, 7.0f); DoSummon(NPC_MARAUDING_OWL, dst, 25000, TEMPSUMMON_CORPSE_TIMED_DESPAWN); } break; @@ -121,8 +120,7 @@ public: for (uint8 i = 0; i < 3; ++i) { const Position src = {-141.151581f, -4291.213867f, 120.130f, 0}; - Position dst; - me->GetRandomPoint(src, 7.0f, dst); + Position dst = me->GetRandomPoint(src, 7.0f); me->SummonCreature(NPC_VILE_AMBUSHER, dst, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000); } break; |
