mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +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:
@@ -364,8 +364,7 @@ public:
|
||||
{
|
||||
if (spell->Id == SPELL_DRAW_SPIRIT && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Position targetPos;
|
||||
target->GetPosition(&targetPos);
|
||||
Position targetPos = target->GetPosition();
|
||||
me->SummonCreature(NPC_SPIRIT_SHADE, targetPos, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 50000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +140,7 @@ bool NPCStaveQuestAI::ValidThreatlist()
|
||||
|
||||
void NPCStaveQuestAI::SetHomePosition()
|
||||
{
|
||||
Position homePosition;
|
||||
me->GetPosition(&homePosition);
|
||||
Position homePosition = me->GetPosition();
|
||||
|
||||
if (homePosition.IsPositionValid())
|
||||
{
|
||||
@@ -564,8 +563,7 @@ public:
|
||||
|
||||
void RespawnPet()
|
||||
{
|
||||
Position current;
|
||||
me->GetNearPosition(current, -5.0f, 0.0f);
|
||||
Position current = me->GetNearPosition(-5.0f, 0.0f);
|
||||
Precious()->RemoveCorpse(false, false);
|
||||
Precious()->SetPosition(current);
|
||||
Precious()->SetHomePosition(current);
|
||||
@@ -609,8 +607,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
Position petResetPos;
|
||||
me->GetNearPosition(petResetPos, -5.0f, 0.0f);
|
||||
Position petResetPos = me->GetNearPosition(-5.0f, 0.0f);
|
||||
|
||||
if (petResetPos.IsPositionValid())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user