diff options
author | maximius <none@none> | 2009-11-17 19:24:31 -0800 |
---|---|---|
committer | maximius <none@none> | 2009-11-17 19:24:31 -0800 |
commit | 131b66c8b49a3dd4807bed5d29cdd8031fb7ac88 (patch) | |
tree | 9e314b3a1647156f6f7c8fd4a3f9e229f337d4ec | |
parent | 06ea80ee4b44023464ae0f99a752160495797894 (diff) |
*Heart of the Crusader now works, thanks lobuz
*Little bit of cleanup
--HG--
branch : trunk
-rw-r--r-- | src/game/LootMgr.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 28 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 2ea8a2a47e2..e6be1e10206 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -1132,7 +1132,7 @@ void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_se { if (!LootTemplates_Reference.GetLootFor(-ieItr->mincountOrRef)) LootTemplates_Reference.ReportNotExistedId(-ieItr->mincountOrRef); - else if(ref_set) + else if (ref_set) ref_set->erase(-ieItr->mincountOrRef); } } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5f2419e3e4d..8a3406bb953 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4461,8 +4461,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i) break; } } - - if(!spellInfo) + if (!spellInfo) { // get highest rank of the Sunder Armor spell const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap(); @@ -5861,6 +5860,7 @@ void Spell::EffectScriptEffect(uint32 effIndex) return; uint32 spellId1 = 0; uint32 spellId2 = 0; + uint32 spellId3 = 0; // Judgement self add switch switch (m_spellInfo->Id) @@ -5875,12 +5875,26 @@ void Spell::EffectScriptEffect(uint32 effIndex) } // all seals have aura dummy in 2 effect Unit::AuraMap & sealAuras = m_caster->GetAuras(); - for (Unit::AuraMap::iterator iter = sealAuras.begin(); iter != sealAuras.end(); ) + for (Unit::AuraMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();) { + switch (iter->second->GetId()) + { + // Heart of the Crusader + case 20335: // Rank 1 + spellId3 = 21183; + break; + case 20336: // Rank 2 + spellId3 = 54498; + break; + case 20337: // Rank 3 + spellId3 = 54499; + break; + } + if (IsSealSpell(iter->second->GetSpellProto())) { if (AuraEffect * aureff = iter->second->GetPartAura(2)) - if (aureff->GetAuraName()==SPELL_AURA_DUMMY) + if (aureff->GetAuraName() == SPELL_AURA_DUMMY) { if (sSpellStore.LookupEntry(aureff->GetAmount())) spellId2 = aureff->GetAmount(); @@ -5890,11 +5904,11 @@ void Spell::EffectScriptEffect(uint32 effIndex) { switch (iter->first) { - // Seal of light, Seal of wisdom, Seal of justice + // Seal of light, Seal of wisdom, Seal of justice case 20165: case 20166: case 20164: - spellId2 = 54158; + spellId2 = 54158; } } break; @@ -5906,6 +5920,8 @@ void Spell::EffectScriptEffect(uint32 effIndex) m_caster->CastSpell(unitTarget, spellId1, true); if (spellId2) m_caster->CastSpell(unitTarget, spellId2, true); + if (spellId3) + m_caster->CastSpell(unitTarget, spellId3, true); return; } } |