TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

Undeads should be immune to fear

Open click opened this issue 15 years ago • 8 comments

What steps will reproduce the problem?

  1. Spec as unholy dk with pet and gargoyle
  2. Duel with lock, priest, warrior etc
  3. Tell them to cast fear on your pets

What is the expected output? What do you see instead?

Dk's pet are undead and undead should be immune to fear/sleep/charm (except fear spells like Turn Evil from paladin etc)

What revision of the Core are you using? On what operating system?

rev: 10868

click avatar May 16 '11 20:05 click

Author: josh Can't it simply be modified by setting the mechanic_immune_mask in database ?

click avatar May 16 '11 20:05 click

Author: nay Could someone test this? Based on josh idea {{{ -- Add MECHANIC_FEAR immune to Gargoyle (Unholy DK pet - talent) UPDATE creature_template SET mechanic_immune_mask=mechanic_immune_mask|16 WHERE entry=27829; }}}

Anyway, I think it should be the core adding this immunities (the pets are undeads and all undeads are immune to this)

click avatar May 16 '11 20:05 click

Author: pcpb Does anyone tested it?

click avatar May 16 '11 20:05 click

Author: bigfella Replying to [comment:5 nay]: True that undead ''should'' be immune to fear, but tester who deals primarily with warlocks, this is not the case. the mechanic that makes undead immune to fear is currently not active. Fix that and you will have your pet fixed.

Could someone test this? Based on josh idea {{{ -- Add MECHANIC_FEAR immune to Gargoyle (Unholy DK pet - talent) UPDATE creature_template SET mechanic_immune_mask=mechanic_immune_mask|16 WHERE entry=27829; }}}

Anyway, I think it should be the core adding this immunities (the pets are undeads and all undeads are immune to this)

click avatar May 16 '11 20:05 click

Author: fecker does this work actually ?

click avatar May 16 '11 20:05 click

Author: kaelima ^Hack DK pets CAN be feared with Turn Evil.

click avatar May 16 '11 20:05 click

Author: tobmaps Replying to [comment:5 nay]:

Anyway, I think it should be the core adding this immunities (the pets are undeads and all undeads are immune to this)

use this {{{ diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 07a2ce1..31aee9e 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -416,6 +416,9 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data) ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); }

  • if (GetCreatureType() == CREATURE_TYPE_UNDEAD)
  •    ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_FEAR, true);
    
    // TODO: In fact monster move flags should be set - not movement flags. if (cInfo->InhabitType & INHABIT_AIR) AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING);

}}} tested and works fine

or you have another way {{{ UPDATE creature_template SET mechanic_immune_mask=mechanic_immune_mask|16 WHERE type = 6; }}}

click avatar May 16 '11 20:05 click

Author: Nay DB/Creatures: All undeads should be immune to fear and horror. Correct position for triggers (most of them should be on air).

Closes #8 & #158 Changeset: 0be209c5a04627c037ce1aa98b3107950243fef2

click avatar May 16 '11 20:05 click