mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 20:13:48 +00:00
refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user