mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
feat(Core/Misc): change how Position struct is retrieved (#9017)
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bc changes by return a Position object instead of accepting a Position parameter by reference.
Cherry pick of 2585e799f9
This commit is contained in:
@@ -233,8 +233,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Position pos;
|
||||
me->GetRandomNearPosition(pos, 40);
|
||||
Position pos = me->GetRandomNearPosition(40);
|
||||
me->GetMotionMaster()->MovePoint(0, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
|
||||
}
|
||||
|
||||
|
||||
@@ -301,8 +301,7 @@ public:
|
||||
if (!instance->GetPlayers().isEmpty())
|
||||
if (Player* player = instance->GetPlayers().getFirst()->GetSource())
|
||||
{
|
||||
Position pos;
|
||||
player->GetPosition(&pos);
|
||||
Position pos = player->GetPosition();
|
||||
if (Creature* cr = instance->SummonCreature(NPC_CHROMIE_MIDDLE, pos))
|
||||
{
|
||||
cr->SetVisible(false);
|
||||
|
||||
@@ -268,8 +268,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
Position pos;
|
||||
rift->GetNearPosition(pos, 10.0f, 2 * M_PI * rand_norm());
|
||||
Position pos = rift->GetNearPosition(10.0f, 2 * M_PI * rand_norm());
|
||||
|
||||
if (TempSummon* summon = instance->SummonCreature(abs(entry), pos))
|
||||
{
|
||||
|
||||
@@ -323,8 +323,7 @@ public:
|
||||
|
||||
void DoSummonAtRift(uint32 entry)
|
||||
{
|
||||
Position pos;
|
||||
me->GetNearPosition(pos, 10.0f, 2 * M_PI * rand_norm());
|
||||
Position pos = me->GetNearPosition(10.0f, 2 * M_PI * rand_norm());
|
||||
|
||||
if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 150000))
|
||||
if (instance)
|
||||
|
||||
Reference in New Issue
Block a user