diff options
author | QAston <none@none> | 2009-05-15 19:40:45 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-05-15 19:40:45 +0200 |
commit | 4b782ccc1d21015618c0d372e785e10c5aa3a428 (patch) | |
tree | fac6c01b9710f3cf31d5a73854b02adecdee4c84 /src | |
parent | f1fd3ad040155509c407fbc6efe191859a62727b (diff) |
*Blizzlike calculation of skill required to cast judgement-like spells.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3cd0c4fb2c7..d267a99b69d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2799,8 +2799,14 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED && IsRangedWeaponSpell(spell)) attType = RANGED_ATTACK; + int32 attackerWeaponSkill; + // skill value for these spells (for example judgements) is 5* level + if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED && !IsRangedWeaponSpell(spell)) + attackerWeaponSkill = getLevel() * 5; // bonus from skills is 0.04% per skill Diff - int32 attackerWeaponSkill = int32(GetWeaponSkillValue(attType,pVictim)); + else + attackerWeaponSkill = int32(GetWeaponSkillValue(attType,pVictim)); + int32 skillDiff = attackerWeaponSkill - int32(pVictim->GetMaxSkillValueForLevel(this)); int32 fullSkillDiff = attackerWeaponSkill - int32(pVictim->GetDefenseSkillValue(this)); |