Skip to content

Commit

Permalink
[9960] Implement glyph 43390.
Browse files Browse the repository at this point in the history
Chance unknown and seelcted by more recent comments.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
DonTomika authored and VladimirMangos committed May 23, 2010
1 parent 7e2ec49 commit f19d82b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9959"
#define REVISION_NR "9960"
#endif // __REVISION_NR_H__

0 comments on commit f19d82b

Please sign in to comment.