mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 18:13:48 +00:00
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user