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:
sschepens 2021-11-10 19:43:00 -03:00 committed by GitHub
parent d31d8279ca
commit b7f8083915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 68 additions and 133 deletions

View file

@ -585,8 +585,7 @@ public:
case EVENT_BLINK:
{
DoCast(me, SPELL_IMPROVED_BLINK);
Position pos;
me->GetRandomNearPosition(pos, (urand(15, 40)));
Position pos = me->GetRandomNearPosition((urand(15, 40)));
me->GetMotionMaster()->MovePoint(0, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
events.ScheduleEvent(EVENT_DESPAWN, 3 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_DESPAWN_VISUAL, 2.5 * IN_MILLISECONDS);