TrinityCore/TrinityCore — Issue #3958: [HELP] How to make a spell get you in combat (Dispel Magic)
Author: zangeff
Created: 2011-11-14 10:58:53+00:00
State: open

Revision: https://github.com/TrinityCore/TrinityCore/commit/210be7d0d133ee936fd3b12b2dfa58a120b52310
Spell: Dispel Magic (Priest)
Problem: Unlike Purge, Devour Magic and etc this spell refuses to put the caster in combat.

What I tried:
1) Tried editing in SpellMgr.cpp with:

case 527:
case 988:
spellInfo->AttributesEx |= SPELL_ATTR1_MELEE_COMBAT_START;
break;

Not working.

2) Tried in SpellEffects.cpp:

case 527:
case 988:
{
m_caster->CombatStart(m_caster);
return;
}

3) Tried "implenting back" SPELL_ATTR1_PUT_CASTER_IN_COMBAT because it was removed in https://github.com/TrinityCore/TrinityCore/commit/b9413f08b339547bf3a323b44305e5827125b7b9#src/server/game/Miscellaneous/SharedDefines.h and loading it in LoadCustomAttr in SpellMgr.cpp - Failure!

I thought the problem may be in the way dispel mechanics work in general, but mass dispel and all other dispels work correctly.
Where do I fail and where should I look for making a spell properly put you in combat when casted?
Excuse my code if it contained silly logical mistakes but I am still struggling in learning trinitycore's source.