mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10642] Implement spell 56826
This commit is contained in:
parent
46d740bbf4
commit
8f71d95c0d
2 changed files with 33 additions and 21 deletions
|
|
@ -7254,33 +7254,45 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType
|
|||
}
|
||||
}
|
||||
|
||||
// Frost Strike
|
||||
if (spellProto && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000))
|
||||
if (spellProto)
|
||||
{
|
||||
// search disease
|
||||
bool found = false;
|
||||
Unit::SpellAuraHolderMap const& auras = pVictim->GetSpellAuraHolderMap();
|
||||
for(Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
// Frost Strike
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000))
|
||||
{
|
||||
if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE)
|
||||
// search disease
|
||||
bool found = false;
|
||||
Unit::SpellAuraHolderMap const& auras = pVictim->GetSpellAuraHolderMap();
|
||||
for(Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(found)
|
||||
{
|
||||
// search for Glacier Rot dummy aura
|
||||
Unit::AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()] == 7244)
|
||||
if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE)
|
||||
{
|
||||
DonePercent *= ((*i)->GetModifier()->m_amount+100.0f) / 100.0f;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(found)
|
||||
{
|
||||
// search for Glacier Rot dummy aura
|
||||
Unit::AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()] == 7244)
|
||||
{
|
||||
DonePercent *= ((*i)->GetModifier()->m_amount+100.0f) / 100.0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Glyph of Steady Shot (Steady Shot check)
|
||||
else if (spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && spellProto->SpellFamilyFlags & UI64LIT(0x0000000100000000))
|
||||
{
|
||||
// search for glyph dummy aura
|
||||
if (Aura *aur = GetDummyAura(56826))
|
||||
// check for Serpent Sting
|
||||
if (Aura *serpentSting = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_HUNTER, UI64LIT(0x0000000000004000)))
|
||||
DonePercent *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue