diff options
author | QAston <none@none> | 2009-06-26 17:16:32 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-26 17:16:32 +0200 |
commit | 63a936b0b77baea933f2ab9116ef93487e13d701 (patch) | |
tree | 785528c15d07295d1d7aab3f4c8915030ff4c7cc | |
parent | c3516ad8f353dff84e7b60af3df98c17ccf373b0 (diff) |
*Fix exorcism target check and crit chance calculation
*Do not apply spelldmg bonuses to conflagrate multiple times.
--HG--
branch : trunk
-rw-r--r-- | src/game/Spell.cpp | 7 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 8 |
3 files changed, 14 insertions, 3 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5a6cd08e449..3564f966566 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5826,8 +5826,11 @@ bool Spell::CheckTargetCreatureType(Unit* target) const { uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType; - // Curse of Doom : not find another way to fix spell target check :/ - if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags.IsEqual(0,0x02,0)) + // Curse of Doom or Exorcism + // These spells cannot be cast on players, however there is no clientside check for them + // so there is no attribute flag in dbcs which would mark these spells - we need to check them by spellfamily + if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags.IsEqual(0,0x02,0) + || m_spellInfo->SpellFamilyName==SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags.IsEqual(0,0x2,0)) { // not allow cast at player if(target->GetTypeId()==TYPEID_PLAYER) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 3a4fdd7c993..1de51e112fb 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -484,8 +484,8 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) (*i)->GetCasterGUID()==m_caster->GetGUID() ) { uint32 pdamage = (*i)->GetAmount() > 0 ? (*i)->GetAmount() : 0; - pdamage = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), pdamage, DOT, (*i)->GetParentAura()->GetStackAmount()); damage += pdamage * 4; // 4 ticks of 3 seconds = 12 secs + //damage = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), damage, DOT, (*i)->GetParentAura()->GetStackAmount()); // Glyph of Conflagrate if (!m_caster->HasAura(56235)) unitTarget->RemoveAurasDueToSpell((*i)->GetId(), m_caster->GetGUID()); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d606963f1a4..9a18ce02308 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9629,6 +9629,14 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM crit_chance+=aura->GetAmount(); break; } + // Exorcism - "If the target is Undead or Demon, it will always critically hit" + else if(spellProto->SpellFamilyFlags[1]&0x2) + { + if(pVictim->GetCreatureType() == CREATURE_TYPE_DEMON + || pVictim->GetCreatureType() == CREATURE_TYPE_UNDEAD) + return true; + break; + } break; case SPELLFAMILY_SHAMAN: // Lava Burst |