Core/Misc: cleanups
This commit is contained in:
@@ -1459,10 +1459,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||||||
int32 bonus = 0;
|
int32 bonus = 0;
|
||||||
bonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetSpellSchoolMask(i_spellProto));
|
bonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetSpellSchoolMask(i_spellProto));
|
||||||
if (Unit * caster = (*dmgShieldItr)->GetCaster())
|
if (Unit * caster = (*dmgShieldItr)->GetCaster())
|
||||||
{
|
|
||||||
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, GetSpellSchoolMask(i_spellProto));
|
|
||||||
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, GetCreatureTypeMask());
|
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, GetCreatureTypeMask());
|
||||||
}
|
|
||||||
if (bonus)
|
if (bonus)
|
||||||
AddPctN(damage, bonus);
|
AddPctN(damage, bonus);
|
||||||
|
|
||||||
@@ -2266,7 +2263,7 @@ bool Unit::isSpellBlocked(Unit* victim, SpellEntry const * spellProto, WeaponAtt
|
|||||||
if (spellProto && spellProto->Attributes & SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK)
|
if (spellProto && spellProto->Attributes & SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (victim->HasInArc(M_PI, this) || victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
|
if (victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION) || victim->HasInArc(M_PI, this))
|
||||||
{
|
{
|
||||||
// Check creatures flags_extra for disable block
|
// Check creatures flags_extra for disable block
|
||||||
if (victim->GetTypeId() == TYPEID_UNIT &&
|
if (victim->GetTypeId() == TYPEID_UNIT &&
|
||||||
@@ -8728,7 +8725,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
|||||||
// Combo points add triggers (need add combopoint only for main target, and after possible combopoints reset)
|
// Combo points add triggers (need add combopoint only for main target, and after possible combopoints reset)
|
||||||
case 15250: // Rogue Setup
|
case 15250: // Rogue Setup
|
||||||
{
|
{
|
||||||
if (!pVictim || (ToPlayer() && pVictim != ToPlayer()->GetSelectedUnit())) // applied only for main target
|
// applied only for main target
|
||||||
|
if (!pVictim || (GetTypeId() == TYPEID_PLAYER && pVictim != ToPlayer()->GetSelectedUnit()))
|
||||||
return false;
|
return false;
|
||||||
break; // continue normal case
|
break; // continue normal case
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -967,7 +967,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
|||||||
int32 heal = GetEffect(EFFECT_0)->GetAmount();
|
int32 heal = GetEffect(EFFECT_0)->GetAmount();
|
||||||
caster->CastCustomSpell(target, 64801, &heal, NULL, NULL, true, NULL, GetEffect(EFFECT_0));
|
caster->CastCustomSpell(target, 64801, &heal, NULL, NULL, true, NULL, GetEffect(EFFECT_0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
if (!caster)
|
if (!caster)
|
||||||
|
|||||||
@@ -3013,8 +3013,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
|||||||
// Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE)
|
// Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE)
|
||||||
case SUMMON_TYPE_VEHICLE:
|
case SUMMON_TYPE_VEHICLE:
|
||||||
case SUMMON_TYPE_VEHICLE2:
|
case SUMMON_TYPE_VEHICLE2:
|
||||||
if (m_originalCaster)
|
summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster);
|
||||||
summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster);
|
|
||||||
break;
|
break;
|
||||||
case SUMMON_TYPE_TOTEM:
|
case SUMMON_TYPE_TOTEM:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user