Core: Codestyle cleanup
This commit is contained in:
@@ -802,17 +802,17 @@ struct CleanDamage
|
||||
class DamageInfo
|
||||
{
|
||||
private:
|
||||
Unit * const m_attacker;
|
||||
Unit * const m_victim;
|
||||
Unit* const m_attacker;
|
||||
Unit* const m_victim;
|
||||
uint32 m_damage;
|
||||
SpellEntry const * const m_spellInfo;
|
||||
SpellEntry const* const m_spellInfo;
|
||||
SpellSchoolMask const m_schoolMask;
|
||||
DamageEffectType const m_damageType;
|
||||
uint32 m_absorb;
|
||||
uint32 m_resist;
|
||||
uint32 m_block;
|
||||
public:
|
||||
explicit DamageInfo(Unit * _attacker, Unit * _victim, uint32 _damage, SpellEntry const * _spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType)
|
||||
explicit DamageInfo(Unit* _attacker, Unit* _victim, uint32 _damage, SpellEntry const* _spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType)
|
||||
: m_attacker(_attacker), m_victim(_victim), m_damage(_damage), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask), m_damageType(_damageType)
|
||||
{
|
||||
m_absorb = 0;
|
||||
@@ -842,10 +842,10 @@ public:
|
||||
m_block += amount;
|
||||
m_damage -= amount;
|
||||
}
|
||||
Unit * GetAttacker() const { return m_attacker; };
|
||||
Unit * GetVictim() const { return m_victim; };
|
||||
Unit* GetAttacker() const { return m_attacker; };
|
||||
Unit* GetVictim() const { return m_victim; };
|
||||
DamageEffectType GetDamageType() const { return m_damageType; };
|
||||
SpellEntry const * GetSpellInfo() const { return m_spellInfo; };
|
||||
SpellEntry const* GetSpellInfo() const { return m_spellInfo; };
|
||||
SpellSchoolMask GetSchoolMask() const { return m_schoolMask; };
|
||||
uint32 GetDamage() const { return m_damage; };
|
||||
uint32 GetAbsorb() const { return m_absorb; };
|
||||
@@ -903,7 +903,7 @@ struct SpellPeriodicAuraLogInfo
|
||||
SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
|
||||
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){}
|
||||
|
||||
AuraEffect const * auraEff;
|
||||
AuraEffect const* auraEff;
|
||||
uint32 damage;
|
||||
uint32 overDamage; // overkill/overheal
|
||||
uint32 absorb;
|
||||
@@ -1203,7 +1203,7 @@ class Unit : public WorldObject
|
||||
{
|
||||
m_attackers.erase(pAttacker);
|
||||
}
|
||||
Unit * getAttackerForHelper() const // If someone wants to help, who to give them
|
||||
Unit* getAttackerForHelper() const // If someone wants to help, who to give them
|
||||
{
|
||||
if (getVictim() != NULL)
|
||||
return getVictim();
|
||||
@@ -1357,8 +1357,8 @@ class Unit : public WorldObject
|
||||
void Kill(Unit *pVictim, bool durabilityLoss = true);
|
||||
int32 DealHeal(Unit *pVictim, uint32 addhealth);
|
||||
|
||||
void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL, SpellEntry const * procAura = NULL);
|
||||
void ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage , SpellEntry const * procAura = NULL);
|
||||
void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL, SpellEntry const* procAura = NULL);
|
||||
void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const* procSpell, uint32 damage , SpellEntry const* procAura = NULL);
|
||||
|
||||
void HandleEmoteCommand(uint32 anim_id);
|
||||
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false);
|
||||
@@ -1384,7 +1384,7 @@ class Unit : public WorldObject
|
||||
uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_RANGED, 2.0f, 100.0f, damage); }
|
||||
uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.0f, 100.0f, damage); }
|
||||
|
||||
void ApplyResilience(const Unit * pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
|
||||
void ApplyResilience(const Unit* pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
|
||||
|
||||
float MeleeSpellMissChance(const Unit *pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||
SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell);
|
||||
@@ -1462,29 +1462,29 @@ class Unit : public WorldObject
|
||||
bool isFrozen() const;
|
||||
|
||||
bool isTargetableForAttack() const;
|
||||
bool isAttackableByAOE(SpellEntry const * spellProto = NULL) const;
|
||||
bool isAttackableByAOE(SpellEntry const* spellProto = NULL) const;
|
||||
bool canAttack(Unit const* target, bool force = true) const;
|
||||
virtual bool IsInWater() const;
|
||||
virtual bool IsUnderWater() const;
|
||||
bool isInAccessiblePlaceFor(Creature const* c) const;
|
||||
|
||||
void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
|
||||
int32 HealBySpell(Unit * pVictim, SpellEntry const * spellInfo, uint32 addHealth, bool critical = false);
|
||||
int32 HealBySpell(Unit* pVictim, SpellEntry const* spellInfo, uint32 addHealth, bool critical = false);
|
||||
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
void EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage);
|
||||
void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0, Unit* originalVictim = 0);
|
||||
void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0, Unit* originalVictim = 0);
|
||||
void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
Aura * AddAura(uint32 spellId, Unit *target);
|
||||
Aura * AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit *target);
|
||||
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack);
|
||||
|
||||
bool IsDamageToThreatSpell(SpellEntry const * spellInfo) const;
|
||||
bool IsDamageToThreatSpell(SpellEntry const* spellInfo) const;
|
||||
|
||||
void DeMorph();
|
||||
|
||||
@@ -1579,7 +1579,7 @@ class Unit : public WorldObject
|
||||
void RemoveAllMinionsByEntry(uint32 entry);
|
||||
void SetCharm(Unit* target, bool apply);
|
||||
Unit* GetNextRandomRaidMemberOrPet(float radius);
|
||||
bool SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const * aurApp = NULL);
|
||||
bool SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* aurApp = NULL);
|
||||
void RemoveCharmedBy(Unit* charmer);
|
||||
void RestoreFaction();
|
||||
|
||||
@@ -1603,8 +1603,8 @@ class Unit : public WorldObject
|
||||
CharmInfo* InitCharmInfo();
|
||||
void DeleteCharmInfo();
|
||||
void UpdateCharmAI();
|
||||
//Player * GetMoverSource() const;
|
||||
Player * m_movedPlayer;
|
||||
//Player* GetMoverSource() const;
|
||||
Player* m_movedPlayer;
|
||||
SharedVisionList const& GetSharedVisionList() { return m_sharedVision; }
|
||||
void AddPlayerToVision(Player* plr);
|
||||
void RemovePlayerFromVision(Player* plr);
|
||||
@@ -1618,7 +1618,7 @@ class Unit : public WorldObject
|
||||
|
||||
// aura apply/remove helpers - you should better not use these
|
||||
Aura* _TryStackingOrRefreshingExistingAura(SpellEntry const* newAura, uint8 effMask, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
|
||||
void _AddAura(UnitAura * aura, Unit * caster);
|
||||
void _AddAura(UnitAura* aura, Unit* caster);
|
||||
AuraApplication * _CreateAuraApplication(Aura * aura, uint8 effMask);
|
||||
void _ApplyAuraEffect(Aura * aura, uint8 effIndex);
|
||||
void _ApplyAura(AuraApplication * aurApp, uint8 effMask);
|
||||
@@ -1694,13 +1694,13 @@ class Unit : public WorldObject
|
||||
bool HasAuraType(AuraType auraType) const;
|
||||
bool HasAuraTypeWithCaster(AuraType auratype, uint64 caster) const;
|
||||
bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const;
|
||||
bool HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
|
||||
bool HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
|
||||
bool HasAuraTypeWithValue(AuraType auratype, int32 value) const;
|
||||
bool HasNegativeAuraWithInterruptFlag(uint32 flag, uint64 guid = 0);
|
||||
bool HasNegativeAuraWithAttribute(uint32 flag, uint64 guid = 0);
|
||||
bool HasAuraWithMechanic(uint32 mechanicMask);
|
||||
|
||||
AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const;
|
||||
AuraEffect * IsScriptOverriden(SpellEntry const* spell, int32 script) const;
|
||||
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
|
||||
uint32 GetDoTsByCaster(uint64 casterGUID) const;
|
||||
|
||||
@@ -1719,10 +1719,10 @@ class Unit : public WorldObject
|
||||
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
|
||||
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
|
||||
|
||||
int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
|
||||
float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
|
||||
int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
|
||||
int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
|
||||
int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
|
||||
float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
|
||||
int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
|
||||
int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
|
||||
|
||||
float GetResistanceBuffMods(SpellSchools school, bool positive) const { return GetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school); }
|
||||
void SetResistanceBuffMods(SpellSchools school, bool positive, float val) { SetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val); }
|
||||
@@ -1749,7 +1749,7 @@ class Unit : public WorldObject
|
||||
float GetNegStat(Stats stat) const { return GetFloatValue(UNIT_FIELD_NEGSTAT0+stat); }
|
||||
float GetCreateStat(Stats stat) const { return m_createStats[stat]; }
|
||||
|
||||
void SetCurrentCastedSpell(Spell * pSpell);
|
||||
void SetCurrentCastedSpell(Spell* pSpell);
|
||||
virtual void ProhibitSpellSchool(SpellSchoolMask /*idSchoolMask*/, uint32 /*unTimeMs*/) { }
|
||||
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed = true, bool withInstant = true);
|
||||
void FinishSpell(CurrentSpellTypes spellType, bool ok = true);
|
||||
@@ -1904,8 +1904,8 @@ class Unit : public WorldObject
|
||||
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct);
|
||||
float GetAPMultiplier(WeaponAttackType attType, bool normalized);
|
||||
void ModifyAuraState(AuraState flag, bool apply);
|
||||
uint32 BuildAuraStateUpdateForTarget(Unit * target) const;
|
||||
bool HasAuraState(AuraState flag, SpellEntry const *spellProto = NULL, Unit const * Caster = NULL) const ;
|
||||
uint32 BuildAuraStateUpdateForTarget(Unit* target) const;
|
||||
bool HasAuraState(AuraState flag, SpellEntry const *spellProto = NULL, Unit const* Caster = NULL) const ;
|
||||
void UnsummonAllTotems();
|
||||
Unit* SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo = NULL);
|
||||
int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask);
|
||||
@@ -1956,7 +1956,7 @@ class Unit : public WorldObject
|
||||
int32 CalculateSpellDamage(Unit const* target, SpellEntry const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const;
|
||||
int32 CalcSpellDuration(SpellEntry const* spellProto);
|
||||
int32 ModSpellDuration(SpellEntry const* spellProto, Unit const* target, int32 duration, bool positive);
|
||||
void ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell * spell=NULL);
|
||||
void ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell* spell=NULL);
|
||||
float CalculateLevelPenalty(SpellEntry const* spellProto) const;
|
||||
|
||||
void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); }
|
||||
@@ -2158,13 +2158,13 @@ class Unit : public WorldObject
|
||||
|
||||
bool isAlwaysDetectableFor(WorldObject const* seer) const;
|
||||
private:
|
||||
bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry const * procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *& spellProcEvent);
|
||||
bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *& spellProcEvent);
|
||||
bool HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleObsModEnergyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
|
||||
bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
|
||||
bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 cooldown);
|
||||
bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura);
|
||||
|
||||
Reference in New Issue
Block a user