mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)
This commit is contained in:
@@ -271,7 +271,7 @@ void BattlegroundAB::NodeOccupied(uint8 node)
|
||||
|
||||
if (trigger)
|
||||
{
|
||||
trigger->setFaction(_capturePointInfo[node]._ownerTeamId == TEAM_ALLIANCE ? 84 : 83);
|
||||
trigger->SetFaction(_capturePointInfo[node]._ownerTeamId == TEAM_ALLIANCE ? FACTION_ALLIANCE_GENERIC : FACTION_HORDE_GENERIC);
|
||||
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
|
||||
BG_AV_CreaturePos[triggerSpawnID][2],
|
||||
BG_AV_CreaturePos[triggerSpawnID][3]))
|
||||
{
|
||||
trigger->setFaction(newFaction);
|
||||
trigger->SetFaction(newFaction);
|
||||
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
|
||||
}
|
||||
}
|
||||
@@ -786,7 +786,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
|
||||
DelCreature(node + 302);
|
||||
return;
|
||||
}
|
||||
trigger->setFaction(ownerId == TEAM_ALLIANCE ? 84 : 83);
|
||||
trigger->SetFaction(ownerId == TEAM_ALLIANCE ? FACTION_ALLIANCE_GENERIC : FACTION_HORDE_GENERIC);
|
||||
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void BattlegroundEY::EventTeamCapturedPoint(TeamId teamId, uint32 point)
|
||||
|
||||
if (trigger)
|
||||
{
|
||||
trigger->setFaction(teamId == TEAM_ALLIANCE ? 84 : 83);
|
||||
trigger->SetFaction(teamId == TEAM_ALLIANCE ? FACTION_ALLIANCE_GENERIC : FACTION_HORDE_GENERIC);
|
||||
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,9 +467,9 @@ bool BattlegroundIC::SetupBattleground()
|
||||
|
||||
// setting correct factions for Keep Cannons
|
||||
for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i <= BG_IC_NPC_KEEP_CANNON_12; ++i)
|
||||
GetBGCreature(i)->setFaction(BG_IC_Factions[0]);
|
||||
GetBGCreature(i)->SetFaction(BG_IC_Factions[0]);
|
||||
for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_25; ++i)
|
||||
GetBGCreature(i)->setFaction(BG_IC_Factions[1]);
|
||||
GetBGCreature(i)->SetFaction(BG_IC_Factions[1]);
|
||||
// Flags
|
||||
if (GameObject* go = GetBGObject(BG_IC_GO_ALLIANCE_BANNER))
|
||||
{
|
||||
@@ -821,7 +821,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
BG_IC_DocksVehiclesGlaives[i].GetPositionX(), BG_IC_DocksVehiclesGlaives[i].GetPositionY(),
|
||||
BG_IC_DocksVehiclesGlaives[i].GetPositionZ(), BG_IC_DocksVehiclesGlaives[i].GetOrientation(),
|
||||
RESPAWN_ONE_DAY))
|
||||
GetBGCreature(type)->setFaction(BG_IC_Factions[nodePoint->faction]);
|
||||
GetBGCreature(type)->SetFaction(BG_IC_Factions[nodePoint->faction]);
|
||||
}
|
||||
|
||||
// spawning catapults
|
||||
@@ -836,7 +836,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
BG_IC_DocksVehiclesCatapults[i].GetPositionX(), BG_IC_DocksVehiclesCatapults[i].GetPositionY(),
|
||||
BG_IC_DocksVehiclesCatapults[i].GetPositionZ(), BG_IC_DocksVehiclesCatapults[i].GetOrientation(),
|
||||
RESPAWN_ONE_DAY))
|
||||
GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
|
||||
GetBGCreature(type)->SetFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE)]);
|
||||
}
|
||||
break;
|
||||
case BG_IC_GO_WORKSHOP_BANNER:
|
||||
@@ -857,7 +857,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
BG_IC_WorkshopVehicles[i].GetPositionX(), BG_IC_WorkshopVehicles[i].GetPositionY(),
|
||||
BG_IC_WorkshopVehicles[i].GetPositionZ(), BG_IC_WorkshopVehicles[i].GetOrientation(),
|
||||
RESPAWN_ONE_DAY))
|
||||
GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
|
||||
GetBGCreature(type)->SetFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE)]);
|
||||
}
|
||||
|
||||
uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
|
||||
@@ -871,7 +871,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
|
||||
if (Creature* siegeEngine = GetBgMap()->GetCreature(BgCreatures[siegeType]))
|
||||
{
|
||||
siegeEngine->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
|
||||
siegeEngine->SetFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE)]);
|
||||
siegeEngine->SetCorpseDelay(5 * MINUTE);
|
||||
|
||||
if (siegeEngine->IsAlive())
|
||||
|
||||
@@ -687,13 +687,13 @@ void BattlegroundSA::OverrideGunFaction()
|
||||
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10; i++)
|
||||
{
|
||||
if (Creature* gun = GetBGCreature(i))
|
||||
gun->setFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
|
||||
gun->SetFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
|
||||
}
|
||||
|
||||
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
|
||||
{
|
||||
if (Creature* dem = GetBGCreature(i))
|
||||
dem->setFaction(BG_SA_Factions[Attackers]);
|
||||
dem->SetFaction(BG_SA_Factions[Attackers]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
|
||||
|
||||
if (Creature* dem = GetBGCreature(j))
|
||||
dem->setFaction(BG_SA_Factions[Attackers]);
|
||||
dem->SetFaction(BG_SA_Factions[Attackers]);
|
||||
}
|
||||
|
||||
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
|
||||
@@ -987,7 +987,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
|
||||
|
||||
if (Creature* dem = GetBGCreature(j))
|
||||
dem->setFaction(BG_SA_Factions[Attackers]);
|
||||
dem->SetFaction(BG_SA_Factions[Attackers]);
|
||||
}
|
||||
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
|
||||
|
||||
Reference in New Issue
Block a user