mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9975] Use special function for honored/xp kill check
This commit is contained in:
parent
94888e52cd
commit
e6c874db13
2 changed files with 4 additions and 4 deletions
|
|
@ -3519,8 +3519,8 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
|
||||||
if (spellInfo->EffectItemType[m_effIndex] == 6265)
|
if (spellInfo->EffectItemType[m_effIndex] == 6265)
|
||||||
{
|
{
|
||||||
// Only from non-grey units
|
// Only from non-grey units
|
||||||
if ((victim->getLevel() <= MaNGOS::XP::GetGrayLevel(caster->getLevel()) ||
|
if (!((Player*)caster)->isHonorOrXPTarget(victim) ||
|
||||||
victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)))
|
victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7190,7 +7190,7 @@ void Aura::PeriodicTick()
|
||||||
{
|
{
|
||||||
// Only from non-grey units
|
// Only from non-grey units
|
||||||
if (roll_chance_i(10) && // 1-2 from drain with final and without glyph, 0-1 from damage
|
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()) &&
|
((Player*)pCaster)->isHonorOrXPTarget(m_target) &&
|
||||||
(m_target->GetTypeId() != TYPEID_UNIT || ((Player*)pCaster)->isAllowedToLoot((Creature*)m_target)))
|
(m_target->GetTypeId() != TYPEID_UNIT || ((Player*)pCaster)->isAllowedToLoot((Creature*)m_target)))
|
||||||
{
|
{
|
||||||
pCaster->CastSpell(pCaster, 43836, true, NULL, this);
|
pCaster->CastSpell(pCaster, 43836, true, NULL, this);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9974"
|
#define REVISION_NR "9975"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue