mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7045] Some additional check
More correct spell select for creatures if spell PreventionType == SPELL_PREVENTION_TYPE_SILENCE Also add check for PreventionType == SPELL_PREVENTION_TYPE_PACIFY Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
ccdad44e6c
commit
d12944d8f2
2 changed files with 7 additions and 3 deletions
|
|
@ -1596,7 +1596,9 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
|
|||
// continue;
|
||||
if( dist > range || dist < minrange )
|
||||
continue;
|
||||
if(HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
if(spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
continue;
|
||||
if(spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
continue;
|
||||
return spellInfo;
|
||||
}
|
||||
|
|
@ -1640,7 +1642,9 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
|
|||
// continue;
|
||||
if( dist > range || dist < minrange )
|
||||
continue;
|
||||
if(HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
if(spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
continue;
|
||||
if(spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
continue;
|
||||
return spellInfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7044"
|
||||
#define REVISION_NR "7045"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue