aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-15 20:03:58 -0700
committermaximius <none@none>2009-09-15 20:03:58 -0700
commit00409c67cf9537a218e8786e9a7e3fbf1df0d73b (patch)
treeeaec0f05676646bf9817a942acee3b0e9082e22e /src
parent88d632d153f6903c8224241d20fdb7a318f9cba9 (diff)
*Levelling Weapon Skill patch (Author: Menia), thanks Sorken :)
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/Unit.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 43a98ddc7b4..4fbcb212f07 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -5291,7 +5291,7 @@ bool Player::UpdateSkill(uint32 skill_id, uint32 step)
if ((!max) || (!value) || (value >= max))
return false;
- if (value*512 < max*urand(0,512))
+ if (value < max)
{
uint32 new_value = value+step;
if(new_value > max)
@@ -5510,7 +5510,7 @@ void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool de
if(!defence)
{
if(getClass() == CLASS_WARRIOR || getClass() == CLASS_ROGUE)
- chance *= 0.1f * GetStat(STAT_INTELLECT);
+ chance += chance * 0.02f * GetStat(STAT_INTELLECT);
}
chance = chance < 1.0f ? 1.0f : chance; //minimum chance to increase skill is 1%
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index dac9f91a16e..c6fd2e5c270 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -12592,8 +12592,8 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
((Player*)this)->UpdateCombatSkills(pTarget, attType, isVictim);
}
// Update defence if player is victim and parry/dodge/block
- if (isVictim && procExtra&(PROC_EX_DODGE|PROC_EX_PARRY|PROC_EX_BLOCK))
- ((Player*)this)->UpdateDefense();
+ else if (isVictim && procExtra&(PROC_EX_DODGE|PROC_EX_PARRY|PROC_EX_BLOCK))
+ ((Player*)this)->UpdateCombatSkills(pTarget, attType, MELEE_HIT_DODGE);
}
// If exist crit/parry/dodge/block need update aura state (for victim and attacker)
if (procExtra & (PROC_EX_CRITICAL_HIT|PROC_EX_PARRY|PROC_EX_DODGE|PROC_EX_BLOCK))