Merge pull request #103 from zwisus/develop21
Fix Paladin Hammer of Wrath,Judgement of Command,Seal of Command PROC…
This commit is contained in:
commit
6f853a1bbe
@ -1038,15 +1038,16 @@ void Unit::JustKilledCreature(Creature* victim, Player* responsiblePlayer)
|
||||
{ mapInstance->OnCreatureDeath(victim); }
|
||||
|
||||
if (responsiblePlayer) // killedby Player, inform BG
|
||||
{
|
||||
if (BattleGround* bg = responsiblePlayer->GetBattleGround())
|
||||
{
|
||||
bg->HandleKillUnit(victim, responsiblePlayer);
|
||||
|
||||
}
|
||||
// Used by Eluna
|
||||
#ifdef ENABLE_ELUNA
|
||||
sEluna->OnCreatureKill(responsiblePlayer, victim);
|
||||
#endif /* ENABLE_ELUNA */
|
||||
}
|
||||
}
|
||||
|
||||
// Notify the outdoor pvp script
|
||||
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(responsiblePlayer ? responsiblePlayer->GetCachedZoneId() : GetZoneId()))
|
||||
@ -1332,11 +1333,58 @@ void Unit::CalculateSpellDamage(SpellNonMeleeDamage* damageInfo, int32 damage, S
|
||||
{
|
||||
// Melee and Ranged Spells
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
{
|
||||
// Calculate damage bonus
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
// Paladin Hammer of Wrath receive benefit from Spell Damage and Healing
|
||||
case 24274: case 24275: case 24239:
|
||||
{
|
||||
damage = SpellDamageBonusDone(pVictim, spellInfo, damage, SPELL_DIRECT_DAMAGE);
|
||||
damage = pVictim->SpellDamageBonusTaken(this, spellInfo, damage, SPELL_DIRECT_DAMAGE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
damage = MeleeDamageBonusDone(pVictim, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
damage = pVictim->MeleeDamageBonusTaken(this, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// if crit add critical bonus
|
||||
if (crit)
|
||||
{
|
||||
damageInfo->HitInfo |= SPELL_HIT_TYPE_CRIT;
|
||||
damage = SpellCriticalDamageBonus(spellInfo, damage, pVictim);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_MELEE:
|
||||
{
|
||||
// Calculate damage bonus
|
||||
damage = MeleeDamageBonusDone(pVictim, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
damage = pVictim->MeleeDamageBonusTaken(this, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
// Paladin
|
||||
// Judgement of Command receive benefit from Spell Damage and Healing
|
||||
case 20467: case 20963: case 20964: case 20965: case 20966:
|
||||
// Seal of Command PROC receive benefit from Spell Damage and Healing
|
||||
case 20424:
|
||||
// Seal of Righteousness Dummy Proc receive benefit from Spell Damage and Healing
|
||||
case 25735: case 25736: case 25737: case 25738: case 25739: case 25740:
|
||||
case 25713: case 25742:
|
||||
{
|
||||
damage = SpellDamageBonusDone(pVictim, spellInfo, damage, SPELL_DIRECT_DAMAGE);
|
||||
damage = pVictim->SpellDamageBonusTaken(this, spellInfo, damage, SPELL_DIRECT_DAMAGE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
damage = MeleeDamageBonusDone(pVictim, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
damage = pVictim->MeleeDamageBonusTaken(this, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// if crit add critical bonus
|
||||
if (crit)
|
||||
@ -5494,8 +5542,11 @@ int32 Unit::SpellBonusWithCoeffs(Unit* pCaster, SpellEntry const* spellProto, in
|
||||
else
|
||||
{ coeff = CalculateDefaultCoefficient(spellProto, damagetype); }
|
||||
|
||||
//float LvlPenalty = CalculateLevelPenalty(spellProto);//[-ZERO] not need. http://wowwiki.wikia.com/wiki/Patch_2.0.1
|
||||
float LvlPenalty = 1.0f;
|
||||
float LvlPenalty = CalculateLevelPenalty(spellProto);
|
||||
|
||||
// Holy Light and Seal of Righteousness PROC and Flash of Light receive benefit from Spell Damage and Healing too low.
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && (spellProto->SpellIconID == 25 || spellProto->SpellIconID == 70 || spellProto->SpellIconID == 242))
|
||||
LvlPenalty = 1.0f;
|
||||
|
||||
// Spellmod SpellDamage
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
|
@ -3177,16 +3177,6 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
|
||||
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
// Seal of Command - receive benefit from Spell Damage and Healing
|
||||
if (m_spellInfo->Id == 20424)
|
||||
{
|
||||
spell_bonus = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, spell_bonus, SPELL_DIRECT_DAMAGE);
|
||||
spell_bonus = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, spell_bonus, SPELL_DIRECT_DAMAGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
// Ambush
|
||||
@ -3215,6 +3205,23 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
|
||||
case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE:
|
||||
weaponDamagePercentMod *= float(CalculateDamage(SpellEffectIndex(j), unitTarget)) / 100.0f;
|
||||
|
||||
//Prevent Seal of Command damage overflow
|
||||
if (m_spellInfo->Id == 20424)
|
||||
{
|
||||
Unit::AuraList const& mModDamagePercentDone = m_caster->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for (Unit::AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
if (((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_HOLY) && ((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL) &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0)
|
||||
// 0 == any inventory type (not wand then)
|
||||
{
|
||||
totalDamagePercentMod /= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// applied only to prev.effects fixed damage
|
||||
if (customBonusDamagePercentMod)
|
||||
{ fixed_bonus = int32(fixed_bonus * bonusDamagePercentMod); }
|
||||
|
@ -724,15 +724,26 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||
|
||||
int damagePoint;
|
||||
|
||||
// Talent - Improve Seal of Righteousness
|
||||
uint32 ModSpellId[] = { 20224, 20225, 20330, 20331, 20332 };
|
||||
float ModPct = 1.0f;
|
||||
AuraList const& mModDamagePercentModifier = GetAurasByType(SPELL_AURA_ADD_PCT_MODIFIER);
|
||||
for (AuraList::const_iterator i = mModDamagePercentModifier.begin(); i != mModDamagePercentModifier.end(); ++i)
|
||||
{
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
if ((*i)->GetId() == ModSpellId[j])
|
||||
ModPct *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
}
|
||||
triggerAmount = triggerAmount * ModPct;
|
||||
|
||||
// In the description, we can find the divider of the base points for min/max effects.
|
||||
int min=triggerAmount/87;
|
||||
int max=triggerAmount/25;
|
||||
|
||||
damagePoint = (speed<=1.5?min:(speed>=4.0?max:min+(((max-min)/2.5f)*(speed-1.5))));
|
||||
|
||||
damagePoint = SpellDamageBonusDone(pVictim, dummySpell, damagePoint, SPELL_DIRECT_DAMAGE);
|
||||
damagePoint = pVictim->SpellDamageBonusTaken(this, dummySpell, damagePoint, SPELL_DIRECT_DAMAGE);
|
||||
|
||||
CastCustomSpell(pVictim, spellId, &damagePoint, NULL, NULL, true, NULL, triggeredByAura);
|
||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user