mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33: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:
@@ -272,8 +272,7 @@ public:
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
Position pos;
|
||||
target->GetFirstCollisionPosition(pos, 5.0f, M_PI);
|
||||
Position pos = target->GetFirstCollisionPosition(5.0f, M_PI);
|
||||
GetCaster()->CastSpell(target, SPELL_GARROTE_DUMMY, true);
|
||||
GetCaster()->RemoveAurasDueToSpell(SPELL_VANISH);
|
||||
GetCaster()->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), target->GetOrientation());
|
||||
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
|
||||
if ((me->GetMapId() == 532))
|
||||
{
|
||||
me->GetRandomNearPosition(pos, 40.0);
|
||||
pos = me->GetRandomNearPosition(40.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -778,8 +778,7 @@ public:
|
||||
|
||||
if (MoveTimer <= diff)
|
||||
{
|
||||
Position pos;
|
||||
me->GetRandomNearPosition(pos, 10);
|
||||
Position pos = me->GetRandomNearPosition(10);
|
||||
me->GetMotionMaster()->MovePoint(0, pos);
|
||||
MoveTimer = urand(3000, 5000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user