diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 6 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 36 | ||||
-rw-r--r-- | src/game/Unit.cpp | 52 |
3 files changed, 51 insertions, 43 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ff1933c3d33..631d38017c9 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1192,12 +1192,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) m_spellAura->SetProcDamage(damageInfo.damage); caster->DealSpellDamage(&damageInfo, true); - // Judgement of Blood - if (m_caster && m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags[1] & 0x00000008 && m_spellInfo->SpellIconID==153) - { - int32 damagePoint = damageInfo.damage * 33 / 100; - m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); - } } // Passive spell hits/misses or active spells only misses (only triggers) else diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d676f8091ce..2edd987687c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1682,23 +1682,7 @@ void Spell::EffectDummy(uint32 i) if(!spell_proto) return; - if(unitTarget->hasUnitState(UNIT_STAT_STUNNED) && m_caster->GetTypeId()==TYPEID_PLAYER) - { - // always critical for stunned target - SpellModifier *mod = new SpellModifier; - mod->op = SPELLMOD_CRITICAL_CHANCE; - mod->value = 100; - mod->type = SPELLMOD_FLAT; - mod->spellId = m_spellInfo->Id; - mod->mask[1] = 0x00000200; - - ((Player*)m_caster)->AddSpellMod(mod, true); - m_caster->CastSpell(unitTarget,spell_proto,true,NULL); - ((Player*)m_caster)->AddSpellMod(mod, false); - } - else - m_caster->CastSpell(unitTarget, spell_proto, true, NULL); - + m_caster->CastSpell(unitTarget, spell_proto, true, NULL); return; } case 31789: // Righteous Defense (step 1) @@ -4420,6 +4404,24 @@ void Spell::SpellDamageWeaponDmg(uint32 i) spell_bonus += int32(0.25f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo))); } break; + // Judgement of Blood/of the Martyr backlash damage (33%) + if(m_spellInfo->SpellFamilyFlags[0] & 0x0000000800000000LL && m_spellInfo->SpellIconID==153) + { + int32 damagePoint = m_damage * 33 / 100; + if(m_spellInfo->Id == 31898) + m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); + else + m_caster->CastCustomSpell(m_caster, 53725, &damagePoint, NULL, NULL, true); + } + // Seal of Blood/of the Martyr backlash damage (10%) + else if(m_spellInfo->SpellIconID==2293) + { + int32 damagePoint = m_damage * 10 / 100; + if(m_spellInfo->Id == 31893) + m_caster->CastCustomSpell(m_caster, 32221, &damagePoint, NULL, NULL, true); + else + m_caster->CastCustomSpell(m_caster, 53718, &damagePoint, NULL, NULL, true); + } } case SPELLFAMILY_SHAMAN: { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 98760807e4f..5f0f1fd27b3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6307,35 +6307,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // Seal of Blood do damage trigger case 31892: { - if (effIndex == 0) // 0 effect - is proc on enemy + if (effIndex == 0 && procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT) // 0 effect - is proc on enemy triggered_spell_id = 31893; - else if (effIndex == 1) // 1 effect - is proc on self - { - // add spell damage from prev effect (27%) - damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100; - basepoints0 = triggerAmount * damage / 100; - target = this; - triggered_spell_id = 32221; - } else - return false; + return true; break; } // Seal of the Martyr do damage trigger case 53720: { - if (effIndex == 0) // 0 effect - is proc on enemy + if (effIndex == 0 && procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT ) // 0 effect - is proc on enemy triggered_spell_id = 53719; - else if (effIndex == 1) // 1 effect - is proc on self - { - // add spell damage from prev effect (27%) - damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100; - basepoints0 = triggerAmount * damage / 100; - target = this; - triggered_spell_id = 53718; - } else - return false; + return true; break; } // Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal) @@ -7150,6 +7134,24 @@ bool Unit::HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, S } break; } + + case SPELLFAMILY_PALADIN: + { + // Seal of Command should only proc from melee hits. + if(dummySpell->Id == 20375) + { + if (procFlag && ( procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT )) + { + *handled = false; + return true; + } + else + { + *handled = true; + return false; + } + } + } } return false; } @@ -9641,6 +9643,16 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM break; } break; + case SPELLFAMILY_PALADIN: + // Judgement of Command proc always crits on stunned target + if(spellProto->SpellFamilyName == SPELLFAMILY_PALADIN) + { + if(spellProto->SpellFamilyFlags[0] & 0x0000000000800000LL && spellProto->SpellIconID == 561) + { + if(pVictim->hasUnitState(UNIT_STAT_STUNNED)) + return true; + } + } } } case SPELL_DAMAGE_CLASS_RANGED: |