*Levelling Weapon Skill patch (Author: Menia), thanks Sorken :)
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -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%
|
||||
|
||||
+2
-2
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user