*Blizzlike calculation of skill required to cast judgement-like spells.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-05-15 19:40:45 +02:00
parent f1fd3ad040
commit 4b782ccc1d
2 changed files with 13 additions and 1 deletions
+7 -1
View File
@@ -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));