Jump to content

[Patch] Cleanup rage gain calculation


Recommended Posts

Posted

[em]diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp

index 0076aa2..3be2b16 100644

--- a/src/game/Unit.cpp

+++ b/src/game/Unit.cpp

@@ -618,23 +618,17 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa

switch(cleanDamage->attackType)

{

case BASE_ATTACK:

- {

- if(cleanDamage->hitOutCome == MELEE_HIT_CRIT)

- weaponSpeedHitFactor = uint32(GetAttackTime(cleanDamage->attackType)/1000.0f * 7);

- else

- weaponSpeedHitFactor = uint32(GetAttackTime(cleanDamage->attackType)/1000.0f * 3.5f);

-

- ((Player*)this)->RewardRage(damage, weaponSpeedHitFactor, true);

-

- break;

- }

case OFF_ATTACK:

{

+ int32 coeff=350;

+

if(cleanDamage->hitOutCome == MELEE_HIT_CRIT)

- weaponSpeedHitFactor = uint32(GetAttackTime(cleanDamage->attackType)/1000.0f * 3.5f);

- else

- weaponSpeedHitFactor = uint32(GetAttackTime(cleanDamage->attackType)/1000.0f * 1.75f);

+ coeff *= 2;

+

+ if (cleanDamage->attackType==OFF_ATTACK)

+ coeff /= 2;

+ weaponSpeedHitFactor = uint32(GetAttackTime(cleanDamage->attackType)* coeff/100000);

((Player*)this)->RewardRage(damage, weaponSpeedHitFactor, true);

break;

[/em]

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use