Add some missing code
This commit is contained in:
1 parent
c7e27dd511
commit
9dca905ea4
3 files changed
+14
-35
No files matched your search
@@ -6600,35 +6600,6 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
}
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
// Impurity (dummy effect)
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
PlayerSpellMap const& playerSpells = ToPlayer()->GetSpellMap();
|
||||
for (auto itr = playerSpells.begin(); itr != playerSpells.end(); ++itr)
|
||||
{
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled)
|
||||
continue;
|
||||
|
||||
switch (itr->first)
|
||||
{
|
||||
case 49220:
|
||||
case 49633:
|
||||
case 49635:
|
||||
case 49636:
|
||||
case 49638:
|
||||
if (SpellInfo const* proto = sSpellMgr->GetSpellInfo(itr->first))
|
||||
AddPct(ApCoeffMod, proto->Effects[EFFECT_0].CalcValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
@@ -6663,14 +6634,14 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
// Pets just add their bonus damage to their spell damage
|
||||
// note that their spell damage is just gain of their own auras
|
||||
if (HasUnitTypeMask(UNIT_MASK_GUARDIAN))
|
||||
DoneAdvertisedBenefit += static_cast<Guardian const*>(this)->GetBonusDamage();
|
||||
DoneAdvertisedBenefit += ((Guardian*)this)->GetBonusDamage();
|
||||
|
||||
// Check for table values
|
||||
float coeff = 0.f;
|
||||
float coeff = 0.0f;
|
||||
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
|
||||
if (bonus)
|
||||
{
|
||||
WeaponAttackType const attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
||||
WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
||||
float APbonus = float(victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS));
|
||||
APbonus += GetTotalAttackPowerValue(attType);
|
||||
|
||||
|
||||
Reference in new issue
Block a user