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
36 changed files with 68 additions and 133 deletions

View File

@@ -155,8 +155,7 @@ bool BattlefieldWG::SetupBattlefield()
// Spawn turrets and hide them per default
for (uint8 i = 0; i < WG_MAX_TURRET; i++)
{
Position towerCannonPos;
WGTurret[i].GetPosition(&towerCannonPos);
Position towerCannonPos = WGTurret[i].GetPosition();
if (Creature* creature = SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
{
CanonList.insert(creature->GetGUID());

View File

@@ -1338,8 +1338,7 @@ struct BfWGGameObjectBuilding
// Spawn Turret bottom
for (uint8 i = 0; i < TowerCannon[towerid].nbTowerCannonBottom; i++)
{
Position turretPos;
TowerCannon[towerid].TowerCannonBottom[i].GetPosition(&turretPos);
Position turretPos = TowerCannon[towerid].TowerCannonBottom[i].GetPosition();
if (Creature* turret = m_WG->SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, turretPos, TEAM_ALLIANCE))
{
m_TowerCannonBottomList.insert(turret->GetGUID());
@@ -1350,8 +1349,7 @@ struct BfWGGameObjectBuilding
// Spawn Turret top
for (uint8 i = 0; i < TowerCannon[towerid].nbTurretTop; i++)
{
Position towerCannonPos;
TowerCannon[towerid].TurretTop[i].GetPosition(&towerCannonPos);
Position towerCannonPos = TowerCannon[towerid].TurretTop[i].GetPosition();
if (Creature* turret = m_WG->SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
{
m_TurretTopList.insert(turret->GetGUID());