diff options
author | maximius <none@none> | 2009-11-04 18:41:38 -0800 |
---|---|---|
committer | maximius <none@none> | 2009-11-04 18:41:38 -0800 |
commit | 0975d502070753bad6d3670f93b135183f49ae99 (patch) | |
tree | 5b4fd9218d30392d727c429adfe06095ca2ea8de /src | |
parent | 2adb1b8d4c9410fa7da36222152a7b0e21eb79d4 (diff) |
*Fix fist weapons crit chance, found by SyRiOCoP, fixes #27
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 55e76b7c7f1..6492abaf3a6 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3149,14 +3149,14 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target) Item* item = ((Player*)this)->GetWeaponForAttack(attType,true); // feral or unarmed skill only for base attack - if(attType != BASE_ATTACK && !item ) + if (attType != BASE_ATTACK && !item) return 0; - if(IsInFeralForm()) + if (IsInFeralForm()) return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact - // weapon skill or (unarmed for base attack) - uint32 skill = item ? item->GetSkill() : SKILL_UNARMED; + // weapon skill or (unarmed for base attack and fist weapons) + uint32 skill = item && item->GetSkill() != SKILL_FIST_WEAPONS ? item->GetSkill() : SKILL_UNARMED; // in PvP use full skill instead current skill value value = (target && target->IsControlledByPlayer()) @@ -3166,9 +3166,9 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target) value += uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL)); switch (attType) { - case BASE_ATTACK: value+=uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_MAINHAND));break; - case OFF_ATTACK: value+=uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_OFFHAND));break; - case RANGED_ATTACK: value+=uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_RANGED));break; + case BASE_ATTACK: value += uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_MAINHAND)); break; + case OFF_ATTACK: value += uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_OFFHAND)); break; + case RANGED_ATTACK: value += uint32(((Player*)this)->GetRatingBonusValue(CR_WEAPON_SKILL_RANGED)); break; } } else |