[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

@ -348,7 +348,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
#define SPELL_ATTR_EX3_UNK15 0x00008000 // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 Causes no aggro if not missed
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
#define SPELL_ATTR_EX3_CANT_MISS 0x00040000 // 18 Spell should always hit its target
#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
#define SPELL_ATTR_EX3_UNK21 0x00200000 // 21

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);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11364"
#define REVISION_NR "11365"
#endif // __REVISION_NR_H__