Permalink
Browse files

[Fix] Binary Resistance: Code Style. Update Type * var is changed to …

…Type* var
  • Loading branch information...
Retriman
Retriman committed Jan 31, 2012
1 parent 23ad608 commit 03704e2df33576e4828feb998f41808c21b1b0a1
Showing with 11 additions and 11 deletions.
  1. +5 −5 src/server/game/Entities/Unit/Unit.cpp
  2. +6 −6 src/server/game/Entities/Unit/Unit.h
@@ -902,7 +902,7 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit* victim, uint32 spellID, uint32 damage)
return damageInfo.damage;
}
-void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType, bool crit, int32 calc_resist)
+void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType, bool crit, int32 calc_resist)
{
if (damage < 0)
return;
@@ -1495,7 +1495,7 @@ uint32 Unit::GetSpellPenetration(SpellSchoolMask schoolMask) const
return uint32(std::max<int32>(spellPenetration, 0));
}
-uint32 Unit::CalcSpellResistance(Unit * victim, SpellSchoolMask schoolMask, bool binary, SpellInfo const * spellProto) const
+uint32 Unit::CalcSpellResistance(Unit* victim, SpellSchoolMask schoolMask, bool binary, SpellInfo const* spellProto) const
{
// Magic damage, check for resists
if (uint32(schoolMask & (SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_HOLY)) > 0)
@@ -1579,7 +1579,7 @@ uint32 Unit::CalcSpellResistance(Unit * victim, SpellSchoolMask schoolMask, bool
return (resistance * 10);
}
-void Unit::CalcAbsorbResist(Unit * victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32 * absorb, uint32 * resist, SpellInfo const* spellInfo, int32 calc_resist)
+void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32* absorb, uint32* resist, SpellInfo const* spellInfo, int32 calc_resist)
{
if (!victim || !victim->isAlive() || !damage)
return;
@@ -2407,7 +2407,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
return SPELL_MISS_NONE;
}
-uint32 Unit::CalcMagicSpellHitChance(Unit * victim, SpellSchoolMask schoolMask, SpellInfo const * spellProto)
+uint32 Unit::CalcMagicSpellHitChance(Unit* victim, SpellSchoolMask schoolMask, SpellInfo const* spellProto)

This comment has been minimized.

Show comment Hide comment
@FilipLukac

FilipLukac Jan 31, 2012

spellInfo

{
// PvP - PvE spell misschances per leveldif > 2
int32 lchance = victim->GetTypeId() == TYPEID_PLAYER ? 7 : 11;
@@ -2497,7 +2497,7 @@ uint32 Unit::CalcMagicSpellHitChance(Unit * victim, SpellSchoolMask schoolMask,
return uint32(hit);
}
-SpellMissInfo Unit::MagicSpellHitResult(Unit * victim, SpellInfo const * spell)
+SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
{
// Can`t miss on dead target (on skinning for example)
if (!victim->isAlive() && victim->GetTypeId() != TYPEID_PLAYER)
@@ -1436,7 +1436,7 @@ class Unit : public WorldObject
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
void HandleProcExtraAttackFor(Unit* victim);
- void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false, int32 calc_resist = -1);
+ void CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false, int32 calc_resist = -1);
void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss);
// player or player's pet resilience (-1%)
@@ -1459,15 +1459,15 @@ class Unit : public WorldObject
float MeleeSpellMissChance(const Unit* pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
SpellMissInfo MeleeSpellHitResult(Unit* pVictim, SpellInfo const* spell);
SpellMissInfo MagicSpellHitResult(Unit* pVictim, SpellInfo const* spell);
- SpellMissInfo SpellHitResult(Unit* pVictim, SpellInfo const* spell, bool canReflect = false);
- uint32 CalcMagicSpellHitChance(Unit * pVictim, SpellSchoolMask schoolMask, SpellInfo const * spellProto);
+ SpellMissInfo SpellHitResult(Unit* victim, SpellInfo const* spell, bool canReflect = false);
+ uint32 CalcMagicSpellHitChance(Unit* victim, SpellSchoolMask schoolMask, SpellInfo const* spellProto);
float GetUnitDodgeChance() const;
float GetUnitParryChance() const;
float GetUnitBlockChance() const;
float GetUnitMissChance(WeaponAttackType attType) const;
float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* pVictim) const;
- int32 GetMechanicResistChance(const SpellInfo *spell) const;
+ int32 GetMechanicResistChance(const SpellInfo* spell) const;
bool CanUseAttackType(uint8 attacktype) const
{
switch (attacktype)
@@ -2022,8 +2022,8 @@ class Unit : public WorldObject
// redefined in Creature
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS);
uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType=MAX_ATTACK);
- void CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const *spellInfo = NULL, int32 calc_resist = -1);
- uint32 CalcSpellResistance(Unit * pVictim, SpellSchoolMask schoolMask, bool binary, SpellInfo const * spellProto) const;

This comment has been minimized.

Show comment Hide comment
@FilipLukac

FilipLukac Jan 31, 2012

old codestyle :) Unit* victim :)

@FilipLukac

FilipLukac Jan 31, 2012

old codestyle :) Unit* victim :)

+ void CalcAbsorbResist(Unit* pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32* absorb, uint32* resist, SpellInfo const* spellInfo = NULL, int32 calc_resist = -1);
+ uint32 CalcSpellResistance(Unit* pVictim, SpellSchoolMask schoolMask, bool binary, SpellInfo const* spellProto) const;

This comment has been minimized.

Show comment Hide comment
@FilipLukac

FilipLukac Jan 31, 2012

I think spellInfo there

@FilipLukac

FilipLukac Jan 31, 2012

I think spellInfo there

This comment has been minimized.

Show comment Hide comment
@Retriman

Retriman Jan 31, 2012

Collaborator

I know it's old, but if you see in the line below. is still used.

@Retriman

Retriman Jan 31, 2012

Collaborator

I know it's old, but if you see in the line below. is still used.

void CalcHealAbsorb(Unit* pVictim, const SpellInfo* spellProto, uint32 &healAmount, uint32 &absorb);
void UpdateSpeed(UnitMoveType mtype, bool forced);

0 comments on commit 03704e2

Please sign in to comment.