refactor(Core/Game): restyle game lib with astyle (#3466)

This commit is contained in:
Kargatum
2020-10-12 15:08:15 +07:00
committed by GitHub
parent e99b526e17
commit a2b26272d2
338 changed files with 52196 additions and 50944 deletions

View File

@@ -23,7 +23,7 @@ Totem::Totem(SummonPropertiesEntry const* properties, uint64 owner) : Minion(pro
}
void Totem::Update(uint32 time)
{
{
if (!GetOwner()->IsAlive() || !IsAlive())
{
UnSummon(); // remove self
@@ -42,7 +42,7 @@ void Totem::Update(uint32 time)
}
void Totem::InitStats(uint32 duration)
{
{
// client requires SMSG_TOTEM_CREATED to be sent before adding to world and before removing old totem
// Xinef: Set level for Unit totems
if (Unit* owner = ObjectAccessor::FindUnit(m_owner))
@@ -75,7 +75,7 @@ void Totem::InitStats(uint32 duration)
}
void Totem::InitSummon()
{
{
if (m_type == TOTEM_PASSIVE && GetSpell())
CastSpell(this, GetSpell(), true);
@@ -94,7 +94,7 @@ void Totem::InitSummon()
}
void Totem::UnSummon(uint32 msTime)
{
{
if (msTime)
{
m_Events.AddEvent(new ForcedUnsummonDelayEvent(*this), m_Events.CalculateTime(msTime));
@@ -104,7 +104,7 @@ void Totem::UnSummon(uint32 msTime)
CombatStop();
RemoveAurasDueToSpell(GetSpell(), GetGUID());
Unit *owner = GetOwner();
Unit* owner = GetOwner();
// clear owner's totem slot
for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
{
@@ -144,13 +144,13 @@ void Totem::UnSummon(uint32 msTime)
}
bool Totem::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const
{
{
// xinef: immune to all positive spells, except of stoneclaw totem absorb and sentry totem bind sight
// totems positive spells have unit_caster target
if (spellInfo->Effects[index].Effect != SPELL_EFFECT_DUMMY &&
spellInfo->Effects[index].Effect != SPELL_EFFECT_SCRIPT_EFFECT &&
spellInfo->IsPositive() && spellInfo->Effects[index].TargetA.GetTarget() != TARGET_UNIT_CASTER &&
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY && spellInfo->Id != 55277 && spellInfo->Id != 6277)
if (spellInfo->Effects[index].Effect != SPELL_EFFECT_DUMMY &&
spellInfo->Effects[index].Effect != SPELL_EFFECT_SCRIPT_EFFECT &&
spellInfo->IsPositive() && spellInfo->Effects[index].TargetA.GetTarget() != TARGET_UNIT_CASTER &&
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY && spellInfo->Id != 55277 && spellInfo->Id != 6277)
return true;
switch (spellInfo->Effects[index].ApplyAuraName)

View File

@@ -23,31 +23,31 @@ enum TotemType
class Totem : public Minion
{
public:
explicit Totem(SummonPropertiesEntry const *properties, uint64 owner);
virtual ~Totem(){};
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
void UnSummon(uint32 msTime = 0);
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
TotemType GetTotemType() const { return m_type; }
public:
explicit Totem(SummonPropertiesEntry const* properties, uint64 owner);
virtual ~Totem() {};
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
void UnSummon(uint32 msTime = 0);
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
TotemType GetTotemType() const { return m_type; }
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) {}
void UpdateArmor() {}
void UpdateMaxHealth() {}
void UpdateMaxPower(Powers /*power*/) {}
void UpdateAttackPowerAndDamage(bool /*ranged*/) {}
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) {}
void UpdateArmor() {}
void UpdateMaxHealth() {}
void UpdateMaxPower(Powers /*power*/) {}
void UpdateAttackPowerAndDamage(bool /*ranged*/) {}
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
protected:
TotemType m_type;
uint32 m_duration;
protected:
TotemType m_type;
uint32 m_duration;
};
#endif