mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8940] Make players and totems always immune to taunt.
This commit is contained in:
parent
17e9cafecf
commit
1f7163f449
4 changed files with 29 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8939"
|
||||
#define REVISION_NR "8940"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue