mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9963] Implement per-tick chance for shard for spell 1120 and ranks.
This commit is contained in:
parent
c7ea2be1d1
commit
702d368114
2 changed files with 15 additions and 2 deletions
|
|
@ -7168,7 +7168,7 @@ void Aura::PeriodicTick()
|
||||||
|
|
||||||
// only from players
|
// only from players
|
||||||
// FIXME: need use SpellDamageBonus instead?
|
// FIXME: need use SpellDamageBonus instead?
|
||||||
if (IS_PLAYER_GUID(m_caster_guid))
|
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
||||||
pdamage -= m_target->GetSpellDamageReduction(pdamage);
|
pdamage -= m_target->GetSpellDamageReduction(pdamage);
|
||||||
|
|
||||||
m_target->CalculateAbsorbAndResist(pCaster, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
|
m_target->CalculateAbsorbAndResist(pCaster, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
|
||||||
|
|
@ -7192,6 +7192,19 @@ void Aura::PeriodicTick()
|
||||||
pCaster->ProcDamageAndSpell(m_target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, GetSpellProto());
|
pCaster->ProcDamageAndSpell(m_target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, GetSpellProto());
|
||||||
|
|
||||||
pCaster->DealDamage(m_target, pdamage, &cleanDamage, DOT, GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), true);
|
pCaster->DealDamage(m_target, pdamage, &cleanDamage, DOT, GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), true);
|
||||||
|
|
||||||
|
// Drain Soul (chance soul shard)
|
||||||
|
if (pCaster->GetTypeId() == TYPEID_PLAYER && m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||||
|
{
|
||||||
|
// Only from non-grey units
|
||||||
|
if (roll_chance_i(10) && // 1-2 from drain with final and without glyph, 0-1 from damage
|
||||||
|
m_target->getLevel() > MaNGOS::XP::GetGrayLevel(pCaster->getLevel()) &&
|
||||||
|
(m_target->GetTypeId() != TYPEID_UNIT || ((Player*)pCaster)->isAllowedToLoot((Creature*)m_target)))
|
||||||
|
{
|
||||||
|
pCaster->CastSpell(pCaster, 43836, true, NULL, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_PERIODIC_LEECH:
|
case SPELL_AURA_PERIODIC_LEECH:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9962"
|
#define REVISION_NR "9963"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue