refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)
This commit is contained in:
@@ -446,7 +446,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
||||
if (!GetCreatureAddon())
|
||||
SetSheath(SHEATH_STATE_MELEE);
|
||||
|
||||
setFaction(cInfo->faction);
|
||||
SetFaction(cInfo->faction);
|
||||
|
||||
uint32 npcflag, unit_flags, dynamicflags;
|
||||
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
|
||||
@@ -517,7 +517,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
||||
{
|
||||
if (Player* owner = Creature::GetCharmerOrOwnerPlayerOrPlayerItself()) // this check comes in case we don't have a player
|
||||
{
|
||||
setFaction(owner->getFaction()); // vehicles should have same as owner faction
|
||||
SetFaction(owner->GetFaction()); // vehicles should have same as owner faction
|
||||
owner->VehicleSpellInitialize();
|
||||
}
|
||||
}
|
||||
@@ -2280,7 +2280,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
||||
// only from same creature faction
|
||||
if (checkfaction)
|
||||
{
|
||||
if (getFaction() != u->getFaction())
|
||||
if (GetFaction() != u->GetFaction())
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -2362,7 +2362,7 @@ void Creature::UpdateMoveInLineOfSightState()
|
||||
}
|
||||
|
||||
bool nonHostile = true;
|
||||
if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(getFaction()))
|
||||
if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(GetFaction()))
|
||||
if (factionTemplate->hostileMask || factionTemplate->enemyFaction[0] || factionTemplate->enemyFaction[1] || factionTemplate->enemyFaction[2] || factionTemplate->enemyFaction[3])
|
||||
nonHostile = false;
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ void TempSummon::InitStats(uint32 duration)
|
||||
{
|
||||
if (IsTrigger() && m_spells[0])
|
||||
{
|
||||
setFaction(owner->getFaction());
|
||||
SetFaction(owner->GetFaction());
|
||||
SetLevel(owner->getLevel());
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
m_ControlledByPlayer = true;
|
||||
@@ -227,9 +227,9 @@ void TempSummon::InitStats(uint32 duration)
|
||||
}
|
||||
|
||||
if (m_Properties->Faction)
|
||||
setFaction(m_Properties->Faction);
|
||||
SetFaction(m_Properties->Faction);
|
||||
else if (IsVehicle() && owner) // properties should be vehicle
|
||||
setFaction(owner->getFaction());
|
||||
SetFaction(owner->GetFaction());
|
||||
}
|
||||
|
||||
void TempSummon::InitSummon()
|
||||
@@ -320,7 +320,7 @@ void Minion::InitStats(uint32 duration)
|
||||
|
||||
Unit* owner = GetOwner();
|
||||
SetCreatorGUID(owner->GetGUID());
|
||||
setFaction(owner->getFaction());
|
||||
SetFaction(owner->GetFaction());
|
||||
|
||||
owner->SetMinion(this, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user