mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fix priest 47540 and ranks
Also stop chanelling mage AM/priest 47540 if target die Set DK cast 52212 as triggered from aura. Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
8b270d67a8
commit
cb66f99fc2
3 changed files with 53 additions and 3 deletions
|
|
@ -689,6 +689,9 @@ void Spell::prepareDataForTriggerSystem()
|
|||
case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_PRIEST: // For Penance heal/damage triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & 0x0001800000000000LL) m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_HUNTER: // Hunter Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect
|
||||
if (m_spellInfo->SpellFamilyFlags & 0x0000200000000014LL) m_canTrigger = true;
|
||||
break;
|
||||
|
|
@ -2258,8 +2261,12 @@ void Spell::handle_immediate()
|
|||
// start channeling if applicable
|
||||
if(IsChanneledSpell(m_spellInfo))
|
||||
{
|
||||
m_spellState = SPELL_STATE_CASTING;
|
||||
SendChannelStart(GetSpellDuration(m_spellInfo));
|
||||
int32 duration = GetSpellDuration(m_spellInfo);
|
||||
if (duration)
|
||||
{
|
||||
m_spellState = SPELL_STATE_CASTING;
|
||||
SendChannelStart(duration);
|
||||
}
|
||||
}
|
||||
|
||||
// process immediate effects (items, ground, etc.) also initialize some variables
|
||||
|
|
|
|||
|
|
@ -2145,6 +2145,25 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
m_target->CastSpell(m_target,47287,true,NULL,this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (caster && m_removeMode == AURA_REMOVE_BY_DEATH)
|
||||
{
|
||||
// Stop caster Arcane Missle chanelling on death
|
||||
if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE &&
|
||||
m_spellProto->SpellFamilyFlags&0x0000000000000800LL)
|
||||
{
|
||||
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
return;
|
||||
}
|
||||
// Stop caster Penance chanelling on death
|
||||
if (m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST &&
|
||||
m_spellProto->SpellFamilyFlags2 & 0x00000080)
|
||||
{
|
||||
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// AT APPLY & REMOVE
|
||||
|
|
@ -6573,7 +6592,7 @@ void Aura::PeriodicDummyTick()
|
|||
if (spell->SpellFamilyFlags & 0x0000000000000020LL)
|
||||
{
|
||||
if (caster)
|
||||
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true);
|
||||
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this);
|
||||
return;
|
||||
}
|
||||
// Raise Dead
|
||||
|
|
|
|||
|
|
@ -1352,6 +1352,30 @@ void Spell::EffectDummy(uint32 i)
|
|||
}
|
||||
break;
|
||||
case SPELLFAMILY_PRIEST:
|
||||
// Penance
|
||||
if (m_spellInfo->SpellFamilyFlags & 0x0080000000000000LL)
|
||||
{
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
int hurt = 0;
|
||||
int heal = 0;
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 47540: hurt = 47758; heal = 47757; break;
|
||||
case 53005: hurt = 53001; heal = 52986; break;
|
||||
case 53006: hurt = 53002; heal = 52987; break;
|
||||
case 53007: hurt = 53003; heal = 52988; break;
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: Spell %u Penance need set correct heal/damage spell", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
if (m_caster->IsFriendlyTo(unitTarget))
|
||||
m_caster->CastSpell(unitTarget, heal, true, 0);
|
||||
else
|
||||
m_caster->CastSpell(unitTarget, hurt, true, 0);
|
||||
return;
|
||||
}
|
||||
switch(m_spellInfo->Id )
|
||||
{
|
||||
case 28598: // Touch of Weakness triggered spell
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue