[9975] Use special function for honored/xp kill check

This commit is contained in:
VladimirMangos 2010-05-26 19:10:13 +04:00
parent 94888e52cd
commit e6c874db13
2 changed files with 4 additions and 4 deletions

View file

@ -3519,8 +3519,8 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
if (spellInfo->EffectItemType[m_effIndex] == 6265)
{
// Only from non-grey units
if ((victim->getLevel() <= MaNGOS::XP::GetGrayLevel(caster->getLevel()) ||
victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)))
if (!((Player*)caster)->isHonorOrXPTarget(victim) ||
victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim))
return;
}
@ -7190,7 +7190,7 @@ void Aura::PeriodicTick()
{
// 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()) &&
((Player*)pCaster)->isHonorOrXPTarget(m_target) &&
(m_target->GetTypeId() != TYPEID_UNIT || ((Player*)pCaster)->isAllowedToLoot((Creature*)m_target)))
{
pCaster->CastSpell(pCaster, 43836, true, NULL, this);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9974"
#define REVISION_NR "9975"
#endif // __REVISION_NR_H__