[9960] Implement glyph 43390.

Chance unknown and seelcted by more recent comments.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
DonTomika 2010-05-23 14:39:30 +04:00 committed by VladimirMangos
parent fcf996b4fd
commit 3f4544df9d
2 changed files with 19 additions and 7 deletions

View file

@ -3515,11 +3515,15 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
// Soul Shard only from non-grey units
if( spellInfo->EffectItemType[m_effIndex] == 6265 &&
(victim->getLevel() <= MaNGOS::XP::GetGrayLevel(caster->getLevel()) ||
victim->GetTypeId()==TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)) )
return;
// Soul Shard (target req.)
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)))
return;
}
//Adding items
uint32 noSpaceForCount = 0;
uint32 count = m_modifier.m_amount;
@ -3535,7 +3539,15 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
}
Item* newitem = ((Player*)caster)->StoreNewItem(dest, spellInfo->EffectItemType[m_effIndex], true);
((Player*)caster)->SendNewItem(newitem, count, true, false);
((Player*)caster)->SendNewItem(newitem, count, true, true);
// Soul Shard (glyph bonus)
if (spellInfo->EffectItemType[m_effIndex] == 6265)
{
// Glyph of Soul Shard
if (caster->HasAura(58070) && roll_chance_i(40))
caster->CastSpell(caster, 58068, true, NULL, this);
}
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9959"
#define REVISION_NR "9960"
#endif // __REVISION_NR_H__