diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d44360d5d..37ac59a8d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -21241,3 +21241,22 @@ void Player::SendDuelCountdown(uint32 counter) data << uint32(counter); // seconds GetSession()->SendPacket(&data); } + +bool Player::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const +{ + switch(spellInfo->Effect[index]) + { + case SPELL_EFFECT_ATTACK_ME: + return true; + default: + break; + } + switch(spellInfo->EffectApplyAuraName[index]) + { + case SPELL_AURA_MOD_TAUNT: + return true; + default: + break; + } + return Unit::IsImmunedToSpellEffect(spellInfo, index); +} diff --git a/src/game/Player.h b/src/game/Player.h index b7d29cc38..477701718 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1547,6 +1547,7 @@ class MANGOS_DLL_SPEC Player : public Unit TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell) const; bool IsSpellFitByClassAndRace( uint32 spell_id ) const; bool IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const; + bool IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const; void SendProficiency(uint8 pr1, uint32 pr2); void SendInitialSpells(); diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index 5811c88d9..698e811c2 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -160,12 +160,20 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto) bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const { // TODO: possibly all negative auras immune? + switch(spellInfo->Effect[index]) + { + case SPELL_EFFECT_ATTACK_ME: + return true; + default: + break; + } switch(spellInfo->EffectApplyAuraName[index]) { case SPELL_AURA_PERIODIC_DAMAGE: case SPELL_AURA_PERIODIC_LEECH: case SPELL_AURA_MOD_FEAR: case SPELL_AURA_TRANSFORM: + case SPELL_AURA_MOD_TAUNT: return true; default: break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cd859134d..45f857087 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 "8939" + #define REVISION_NR "8940" #endif // __REVISION_NR_H__