Core/Misc: camelize GetFaction/SetFaction properly

This commit is contained in:
Aokromes committed 2017-05-02 02:02:31 +02:00
1 parent 0245a73ff6
commit c015a5cf10
122 files changed
+353 -353

No files matched your search

+7 -7
View File
@@ -2150,7 +2150,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
if (properties->Category == SUMMON_CATEGORY_ALLY)
{
summon->SetOwnerGUID(m_originalCaster->GetGUID());
summon->setFaction(m_originalCaster->getFaction());
summon->SetFaction(m_originalCaster->GetFaction());
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
}
@@ -2191,9 +2191,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
uint32 faction = properties->Faction;
if (!faction)
faction = m_originalCaster->getFaction();
faction = m_originalCaster->GetFaction();
summon->setFaction(faction);
summon->SetFaction(faction);
break;
}
@@ -3813,7 +3813,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
pGameObj->CopyPhaseFrom(m_caster);
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction());
pGameObj->SetFaction(m_caster->GetFaction());
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
int32 duration = m_spellInfo->GetDuration();
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -5359,9 +5359,9 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
return;
FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetFaction());
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)))
if (!tarGetFaction || (casterFaction && tarGetFaction && !casterFaction->IsFriendlyTo(*tarGetFaction)))
gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id);
}
@@ -5433,7 +5433,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
((Guardian*)summon)->InitStatsForLevel(level);
if (properties && properties->Category == SUMMON_CATEGORY_ALLY)
summon->setFaction(caster->getFaction());
summon->SetFaction(caster->GetFaction());
if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst())
((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon));