From f19d82b43cd7b1fb3d622d5ec74d0e4865dcc1ea Mon Sep 17 00:00:00 2001 From: DonTomika Date: Sun, 23 May 2010 14:39:30 +0400 Subject: [PATCH] [9960] Implement glyph 43390. Chance unknown and seelcted by more recent comments. Signed-off-by: VladimirMangos --- src/game/SpellAuras.cpp | 24 ++++++++++++++++++------ src/shared/revision_nr.h | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 843ef5c7c..cb7b90b1c 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -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); + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 428ebd4a5..05f9363cc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9959" + #define REVISION_NR "9960" #endif // __REVISION_NR_H__ -- 2.11.4.GIT