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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user