mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +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
|
|
@ -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_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_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_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_UNK19 0x00080000 // 19
|
||||||
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
|
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
|
||||||
#define SPELL_ATTR_EX3_UNK21 0x00200000 // 21
|
#define SPELL_ATTR_EX3_UNK21 0x00200000 // 21
|
||||||
|
|
|
||||||
|
|
@ -2958,7 +2958,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
|
||||||
|
|
||||||
uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f);
|
uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f);
|
||||||
// Roll miss
|
// Roll miss
|
||||||
uint32 tmp = missChance;
|
uint32 tmp = spell->AttributesEx3 & SPELL_ATTR_EX3_CANT_MISS ? 0 : missChance;
|
||||||
if (roll < tmp)
|
if (roll < tmp)
|
||||||
return SPELL_MISS_MISS;
|
return SPELL_MISS_MISS;
|
||||||
|
|
||||||
|
|
@ -3135,7 +3135,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
|
||||||
if (HitChance < 100) HitChance = 100;
|
if (HitChance < 100) HitChance = 100;
|
||||||
if (HitChance > 10000) HitChance = 10000;
|
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);
|
int32 rand = irand(0,10000);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11364"
|
#define REVISION_NR "11365"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue