[8940] Make players and totems always immune to taunt.

This commit is contained in:
VladimirMangos 2009-12-07 17:25:15 +03:00
parent 17e9cafecf
commit 1f7163f449
4 changed files with 29 additions and 1 deletions

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8939"
#define REVISION_NR "8940"
#endif // __REVISION_NR_H__