mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[11365] Implement SPELL_ATTR_EX3_CANT_MISS attribute. Should fix alot of 'too-often-missing' spells
This commit is contained in:
parent
cdf449cc0a
commit
070af93262
3 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue