refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)

This commit is contained in:
Malcrom
2021-11-01 13:04:32 -03:00
committed by GitHub
parent 3396a9da87
commit f106de8788
129 changed files with 418 additions and 444 deletions

View File

@@ -814,7 +814,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
return nullptr;
}
creature->setFaction(BattlefieldFactions[teamId]);
creature->SetFaction(BattlefieldFactions[teamId]);
creature->SetHomePosition(x, y, z, o);
// force using DB speeds -- do we really need this?

View File

@@ -238,7 +238,7 @@ void BattlefieldWG::OnBattleStart()
if (Creature* creature = GetCreature(*itr))
{
ShowNpc(creature, true);
creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
}
}
@@ -348,7 +348,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
if (Creature* creature = GetCreature(*itr))
{
if (!endByTimer)
creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
HideNpc(creature);
}
}
@@ -610,7 +610,7 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature)
return;
if (Unit* owner = creature->ToTempSummon()->GetSummonerUnit())
creature->setFaction(owner->getFaction());
creature->SetFaction(owner->GetFaction());
break;
}
}
@@ -630,9 +630,9 @@ void BattlefieldWG::OnCreatureRemove(Creature* /*creature*/)
case NPC_WINTERGRASP_DEMOLISHER:
{
uint8 team;
if (creature->getFaction() == WintergraspFaction[TEAM_ALLIANCE])
if (creature->GetFaction() == WintergraspFaction[TEAM_ALLIANCE])
team = TEAM_ALLIANCE;
else if (creature->getFaction() == WintergraspFaction[TEAM_HORDE])
else if (creature->GetFaction() == WintergraspFaction[TEAM_HORDE])
team = TEAM_HORDE;
else
return;

View File

@@ -1413,7 +1413,7 @@ struct BfWGGameObjectBuilding
{
if (Creature* creature = m_WG->GetCreature(*itr))
{
creature->setFaction(faction);
creature->SetFaction(faction);
if (disable)
m_WG->HideNpc(creature);
else
@@ -1425,7 +1425,7 @@ struct BfWGGameObjectBuilding
{
if (Creature* creature = m_WG->GetCreature(*itr))
{
creature->setFaction(faction);
creature->SetFaction(faction);
if (disable)
m_WG->HideNpc(creature);
else