diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 6b941271a..ab3eec386 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1577,6 +1577,20 @@ bool Creature::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->EffectMechanic[index] - 1))) return true; + // Taunt immunity special flag check + if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NOT_TAUNTABLE) + { + // Taunt aura apply check + if (spellInfo->Effect[index] == SPELL_EFFECT_APPLY_AURA) + { + if (spellInfo->EffectApplyAuraName[index] == SPELL_AURA_MOD_TAUNT) + return true; + } + // Spell effect taunt check + else if (spellInfo->Effect[index] == SPELL_EFFECT_ATTACK_ME) + return true; + } + return Unit::IsImmunedToSpellEffect(spellInfo, index); } diff --git a/src/game/Creature.h b/src/game/Creature.h index 64fe08399..5f0c54a95 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -142,6 +142,7 @@ enum CreatureFlagsExtra CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP CREATURE_FLAG_EXTRA_INVISIBLE = 0x00000080, // creature is always invisible for player (mostly trigger creatures) + CREATURE_FLAG_EXTRA_NOT_TAUNTABLE = 0x00000100, // creature is immune to taunt auras and effect attack me }; // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 32f21e079..c4cacde1d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7882" + #define REVISION_NR "7883" #endif // __REVISION_NR_H__