[7082] Implement paladin 53407, 20271, 53408

Remove dead code

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-14 01:57:42 +03:00
parent d544aec1db
commit 7b6b0bb816
2 changed files with 38 additions and 51 deletions

View file

@ -4989,62 +4989,49 @@ void Spell::EffectScriptEffect(uint32 effIndex)
} }
} }
else if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN ) else if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN )
{
switch(m_spellInfo->SpellFamilyFlags)
{ {
// Judgement // Judgement
case 0x800000: if (m_spellInfo->SpellFamilyFlags & 0x0000000000800000LL)
{ {
if(!unitTarget || !unitTarget->isAlive()) if(!unitTarget || !unitTarget->isAlive())
return; return;
uint32 spellId1 = 0;
uint32 spellId2 = 0; uint32 spellId2 = 0;
// all seals have aura dummy // Judgement self add switch
switch (m_spellInfo->Id)
{
case 41467: break; // Judgement
case 53407: spellId1 = 20184; break; // Judgement of Justice
case 20271: // Judgement of Light
case 57774: spellId1 = 20185; break; // Judgement of Light
case 53408: spellId1 = 20186; break; // Judgement of Wisdom
default:
return;
}
// all seals have aura dummy in 2 effect
Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr) for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr)
{ {
SpellEntry const *spellInfo = (*itr)->GetSpellProto(); SpellEntry const *spellInfo = (*itr)->GetSpellProto();
// search seal (all seals have judgement's aura dummy spell id in 2 effect // search seal (all seals have judgement's aura dummy spell id in 2 effect
if ( !spellInfo || !IsSealSpell((*itr)->GetSpellProto()) || (*itr)->GetEffIndex() != 2 ) if ((*itr)->GetEffIndex() != 2 || !spellInfo || !IsSealSpell(spellInfo))
continue; continue;
spellId2 = (*itr)->GetModifier()->m_amount;
// must be calculated base at raw base points in spell proto, GetModifier()->m_value for S.Righteousness modified by SPELLMOD_DAMAGE SpellEntry const *judge = sSpellStore.LookupEntry(spellId2);
spellId2 = (*itr)->GetSpellProto()->EffectBasePoints[2]+1; if (!judge)
if(spellId2 <= 1)
continue; continue;
// found, remove seal // found, remove seal
m_caster->RemoveAurasDueToSpell((*itr)->GetId()); m_caster->RemoveAurasDueToSpell(spellInfo->Id);
// Sanctified Judgement
Unit::AuraList const& m_auras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = m_auras.begin(); i != m_auras.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellIconID == 205 && (*i)->GetSpellProto()->Attributes == 0x01D0LL)
{
int32 chance = (*i)->GetModifier()->m_amount;
if ( roll_chance_i(chance) )
{
int32 mana = spellInfo->manaCost;
if ( Player* modOwner = m_caster->GetSpellModOwner() )
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COST, mana);
mana = int32(mana* 0.8f);
m_caster->CastCustomSpell(m_caster,31930,&mana,NULL,NULL,true,NULL,*i);
}
break; break;
} }
} if (spellId1)
m_caster->CastSpell(unitTarget, spellId1, true);
break; if (spellId2)
}
m_caster->CastSpell(unitTarget, spellId2, true); m_caster->CastSpell(unitTarget, spellId2, true);
return; return;
} }
} }
}
// normal DB scripted effect // normal DB scripted effect
if(!unitTarget) if(!unitTarget)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7081" #define REVISION_NR "7082"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__