* Do not let Seal of Command proc on anything other than a melee swing.

* Fix Judgement of Blood/Martyr dummy by nos4r2zod
* Fix Judgement of Command dummy by nos4r2zod

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-10-06 17:09:11 +02:00
parent 1bd3f9604c
commit 2cd66e90c2
3 changed files with 51 additions and 43 deletions

View File

@@ -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: