Skip to content

Commit

Permalink
[12610] Remove unused argument in CalculateMeleeDamage
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberium committed Mar 18, 2014
1 parent 1c83096 commit 078f88d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/game/Unit.cpp
Expand Up @@ -1443,7 +1443,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss)
}

// TODO for melee need create structure as in
void Unit::CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType)
void Unit::CalculateMeleeDamage(Unit* pVictim, CalcDamageInfo* damageInfo, WeaponAttackType attackType /*= BASE_ATTACK*/)
{
damageInfo->attacker = this;
damageInfo->target = pVictim;
Expand Down Expand Up @@ -1500,7 +1500,7 @@ void Unit::CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* da
damageInfo->cleanDamage = 0;
return;
}
damage += CalculateDamage(damageInfo->attackType, false);
uint32 damage = CalculateDamage(damageInfo->attackType, false);
// Add melee damage bonus
damage = MeleeDamageBonusDone(damageInfo->target, damage, damageInfo->attackType);
damage = damageInfo->target->MeleeDamageBonusTaken(this, damage, damageInfo->attackType);
Expand Down Expand Up @@ -2610,7 +2610,7 @@ void Unit::AttackerStateUpdate(Unit* pVictim, WeaponAttackType attType, bool ext
pVictim = SelectMagnetTarget(pVictim);

CalcDamageInfo damageInfo;
CalculateMeleeDamage(pVictim, 0, &damageInfo, attType);
CalculateMeleeDamage(pVictim, &damageInfo, attType);
// Send log damage message to client
DealDamageMods(pVictim, damageInfo.damage, &damageInfo.absorb);
SendAttackStateUpdate(&damageInfo);
Expand Down
2 changes: 1 addition & 1 deletion src/game/Unit.h
Expand Up @@ -1456,7 +1456,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject

float MeleeMissChanceCalc(const Unit* pVictim, WeaponAttackType attType) const;

void CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
void CalculateMeleeDamage(Unit* pVictim, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);

bool IsAllowedDamageInArea(Unit* pVictim) const;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12609"
#define REVISION_NR "12610"
#endif // __REVISION_NR_H__

0 comments on commit 078f88d

Please sign in to comment.