*Fix exorcism target check and crit chance calculation
*Do not apply spelldmg bonuses to conflagrate multiple times. --HG-- branch : trunk
This commit is contained in:
+5
-2
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user