Calculate spell critical hit chance at spell cast instead spell hit. Patch by thenecromancer.

--HG--
branch : trunk
This commit is contained in:
krz
2009-06-07 19:10:01 +02:00
parent 5e87f3144c
commit c7c092f54b
4 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -1169,7 +1169,7 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage
return damageInfo.damage;
}
void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType)
void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType, bool crit)
{
if (damage < 0)
return;
@@ -1181,7 +1181,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 dama
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
uint32 crTypeMask = pVictim->GetCreatureTypeMask();
// Check spell crit chance
bool crit = isSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType);
//bool crit = isSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType);
bool blocked = false;
// Per-school calc
switch (spellInfo->DmgClass)