SHA-1: 8d16a79dea4c0100d36e13b068c42499a3a48154
* Core/Spells: Rename SpellAttr4 to use official attribute names * Corrected implementation of SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET * Implemented SPELL_ATTR4_NO_HELPFUL_THREAT * Implemented SPELL_ATTR4_NO_PARTIAL_IMMUNITY * Implemented SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING * Implemented SPELL_ATTR4_USE_FACING_FROM_SPELL * Implemented SPELL_ATTR4_BOUNCY_CHAIN_MISSILES * Implemented SPELL_ATTR4_AURA_NEVER_BOUNCES * Implemented SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL * Implemented SPELL_ATTR4_AURA_IS_BUFF * Implemented SPELL_ATTR5_MELEE_CHAIN_TARGETING * Implemented SpellEffectAttributes::ChainFromInitialTarget
This commit is contained in:
1 parent
62b8db9f6e
commit
a7dc339a6a
16 files changed
+162
-163
No files matched your search
@@ -785,7 +785,7 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
|
||||
// interrupting auras with SpellAuraInterruptFlags::Damage before checking !damage (absorbed damage breaks that type of auras)
|
||||
if (spellProto)
|
||||
{
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS))
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_REACTIVE_DAMAGE_PROC))
|
||||
victim->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Damage, spellProto);
|
||||
}
|
||||
else
|
||||
@@ -930,7 +930,9 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
|
||||
// Part of Evade mechanics. DoT's and Thorns / Retribution Aura do not contribute to this
|
||||
if (damagetype != DOT && damage > 0 && !victim->GetOwnerGUID().IsPlayer() && (!spellProto || !spellProto->HasAura(SPELL_AURA_DAMAGE_SHIELD)))
|
||||
victim->ToCreature()->SetLastDamagedTime(GameTime::GetGameTime() + MAX_AGGRO_RESET_TIME);
|
||||
victim->GetThreatManager().AddThreat(attacker, float(damage), spellProto);
|
||||
|
||||
if (attacker && (!spellProto || !spellProto->HasAttribute(SPELL_ATTR4_NO_HARMFUL_THREAT)))
|
||||
victim->GetThreatManager().AddThreat(attacker, float(damage), spellProto);
|
||||
}
|
||||
else // victim is a player
|
||||
{
|
||||
@@ -1041,8 +1043,8 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
|
||||
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
|
||||
|
||||
// Spells with SPELL_ATTR4_FIXED_DAMAGE ignore resilience because their damage is based off another spell's damage.
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR4_FIXED_DAMAGE))
|
||||
// Spells with SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS ignore resilience because their damage is based off another spell's damage.
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS))
|
||||
{
|
||||
if (Unit::IsDamageReducedByArmor(damageSchoolMask, spellInfo))
|
||||
damage = Unit::CalcArmorReducedDamage(this, victim, damage, spellInfo, attackType);
|
||||
@@ -1581,17 +1583,6 @@ static float GetArmorReduction(float armor, uint8 attackerLevel)
|
||||
if ((schoolMask & SPELL_SCHOOL_MASK_HOLY) && victim->GetTypeId() != TYPEID_UNIT)
|
||||
return 0;
|
||||
|
||||
// Ignore spells that can't be resisted
|
||||
if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_RESISTANCES))
|
||||
return 0;
|
||||
|
||||
// Ignore spells that can't be resisted
|
||||
if (spellInfo)
|
||||
{
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_RESISTANCES))
|
||||
return 0;
|
||||
}
|
||||
|
||||
float const averageResist = Unit::CalculateAverageResistReduction(attacker, schoolMask, victim, spellInfo);
|
||||
|
||||
float discreteResistProbability[11] = { };
|
||||
@@ -4002,7 +3993,7 @@ void Unit::RemoveArenaAuras()
|
||||
RemoveAppliedAuras([](AuraApplication const* aurApp)
|
||||
{
|
||||
Aura const* aura = aurApp->GetBase();
|
||||
return (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_DONT_REMOVE_IN_ARENA) // don't remove stances, shadowform, pally/hunter auras
|
||||
return (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR4_ALLOW_ENTERING_ARENA) // don't remove stances, shadowform, pally/hunter auras
|
||||
&& !aura->IsPassive() // don't remove passive auras
|
||||
&& (aurApp->IsPositive() || !aura->GetSpellInfo()->HasAttribute(SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD))) || // not negative death persistent auras
|
||||
aura->GetSpellInfo()->HasAttribute(SPELL_ATTR5_REMOVE_ON_ARENA_ENTER); // special marker, always remove
|
||||
@@ -6583,8 +6574,8 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
}
|
||||
}
|
||||
|
||||
// Spells with SPELL_ATTR4_FIXED_DAMAGE should only benefit from mechanic damage mod auras.
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_FIXED_DAMAGE))
|
||||
// Spells with SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS should only benefit from mechanic damage mod auras.
|
||||
if (!spellProto->HasAttribute(SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS))
|
||||
{
|
||||
// from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
|
||||
// multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
|
||||
@@ -7377,6 +7368,8 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo, WorldObject const* caste
|
||||
immuneToAllEffects = false;
|
||||
break;
|
||||
}
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_NO_PARTIAL_IMMUNITY))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (immuneToAllEffects) //Return immune only if the target is immune to all spell effects.
|
||||
|
||||
Reference in new issue
Block a user