[11365] Implement SPELL_ATTR_EX3_CANT_MISS attribute. Should fix alot of 'too-often-missing' spells

This commit is contained in:
darkstalker 2011-04-16 10:22:44 +03:00 committed by Ambal
parent cdf449cc0a
commit 070af93262
3 changed files with 4 additions and 4 deletions

View file

@ -2958,7 +2958,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f);
// Roll miss
uint32 tmp = missChance;
uint32 tmp = spell->AttributesEx3 & SPELL_ATTR_EX3_CANT_MISS ? 0 : missChance;
if (roll < tmp)
return SPELL_MISS_MISS;
@ -3135,7 +3135,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
if (HitChance < 100) HitChance = 100;
if (HitChance > 10000) HitChance = 10000;
int32 tmp = 10000 - HitChance;
int32 tmp = spell->AttributesEx3 & SPELL_ATTR_EX3_CANT_MISS ? 0 : (10000 - HitChance);
int32 rand = irand(0,10000);