mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 09:03: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:
@@ -2428,8 +2428,7 @@ public:
|
||||
if (!si)
|
||||
return;
|
||||
SpellCastTargets targets;
|
||||
Position dest;
|
||||
GetExplTargetDest()->GetPosition(&dest);
|
||||
Position dest = GetExplTargetDest()->GetPosition();
|
||||
targets.SetDst(dest);
|
||||
CustomSpellValues values;
|
||||
int32 damage = si->Effects[0].CalcValue() + _energyLeft * _energyLeft * 8;
|
||||
|
||||
@@ -1538,8 +1538,7 @@ public:
|
||||
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(uint32(GetSpellInfo()->Effects[effIndex].MiscValueB));
|
||||
uint32 duration = uint32(GetSpellInfo()->GetDuration());
|
||||
|
||||
Position pos;
|
||||
caster->GetPosition(&pos);
|
||||
Position pos = caster->GetPosition();
|
||||
TempSummon* summon = caster->GetMap()->SummonCreature(entry, pos, properties, duration, caster, GetSpellInfo()->Id);
|
||||
if (!summon || !summon->IsVehicle())
|
||||
return;
|
||||
|
||||
@@ -215,8 +215,7 @@ public:
|
||||
if (!sindragosa->IsAlive())
|
||||
return true;
|
||||
|
||||
Position pos;
|
||||
_owner->GetPosition(&pos);
|
||||
Position pos = _owner->GetPosition();
|
||||
_owner->UpdateGroundPositionZ(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
|
||||
|
||||
if (TempSummon* summon = sindragosa->SummonCreature(NPC_ICE_TOMB, pos))
|
||||
|
||||
@@ -1770,8 +1770,7 @@ public:
|
||||
{
|
||||
if (spell->Id == 71306 && c->GetTypeId() == TYPEID_UNIT) // Twisted Winds
|
||||
{
|
||||
Position myPos;
|
||||
me->GetPosition(&myPos);
|
||||
Position myPos = me->GetPosition();
|
||||
me->NearTeleportTo(c->GetPositionX(), c->GetPositionY(), c->GetPositionZ(), c->GetOrientation());
|
||||
c->NearTeleportTo(myPos.GetPositionX(), myPos.GetPositionY(), myPos.GetPositionZ(), myPos.GetOrientation());
|
||||
const ThreatContainer::StorageType me_tl = me->getThreatMgr().getThreatList();
|
||||
@@ -2181,9 +2180,7 @@ public:
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
Position pos;
|
||||
caster->GetPosition(&pos);
|
||||
caster->GetNearPosition(pos, 5.0f, 0.0f);
|
||||
Position pos = caster->GetNearPosition(5.0f, 0.0f);
|
||||
pos.m_positionZ = caster->GetMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
|
||||
pos.m_positionZ += 0.1f;
|
||||
caster->SendMeleeAttackStop(caster->GetVictim());
|
||||
@@ -3214,8 +3211,7 @@ public:
|
||||
|
||||
if (currPipeWP != VENGEFUL_WP_COUNT)
|
||||
{
|
||||
Position pos;
|
||||
who->GetPosition(&pos);
|
||||
Position pos = who->GetPosition();
|
||||
float angle = who->GetAngle(me);
|
||||
float dist = 3.0f;
|
||||
pos.m_positionX += cos(angle) * dist;
|
||||
|
||||
Reference in New Issue
Block a user