Core/Spells: build fixes
This commit is contained in:
1 parent
79b3fa5862
commit
87f25be0aa
4 files changed
+6
-14
No files matched your search
@@ -1680,7 +1680,8 @@ enum SpellPreventionType
|
|||||||
SPELL_PREVENTION_TYPE_NONE = 0,
|
SPELL_PREVENTION_TYPE_NONE = 0,
|
||||||
SPELL_PREVENTION_TYPE_SILENCE = 1,
|
SPELL_PREVENTION_TYPE_SILENCE = 1,
|
||||||
SPELL_PREVENTION_TYPE_PACIFY = 2,
|
SPELL_PREVENTION_TYPE_PACIFY = 2,
|
||||||
SPELL_PREVENTION_TYPE_UNK = 3 // Only a few spells have this, but most of the should be interruptable.
|
SPELL_PREVENTION_TYPE_UNK = 3, // Only a few spells have this, but most of the should be interruptable.
|
||||||
|
SPELL_PREVENTION_TYPE_NO_ACTIONS = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GameobjectTypes
|
enum GameobjectTypes
|
||||||
|
|||||||
@@ -2419,13 +2419,13 @@ void AuraEffect::HandleAuraModNoActions(AuraApplication const* aurApp, uint8 mod
|
|||||||
// Stop cast only spells vs PreventionType & SPELL_PREVENTION_TYPE_SILENCE
|
// Stop cast only spells vs PreventionType & SPELL_PREVENTION_TYPE_SILENCE
|
||||||
for (uint32 i = CURRENT_MELEE_SPELL; i < CURRENT_MAX_SPELL; ++i)
|
for (uint32 i = CURRENT_MELEE_SPELL; i < CURRENT_MAX_SPELL; ++i)
|
||||||
if (Spell* spell = target->GetCurrentSpell(CurrentSpellTypes(i)))
|
if (Spell* spell = target->GetCurrentSpell(CurrentSpellTypes(i)))
|
||||||
if (spell->m_spellInfo->PreventionType & SPELL_PREVENTION_TYPE_NO_ACTIONS)
|
if (spell->m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_NO_ACTIONS)
|
||||||
// Stop spells on prepare or casting state
|
// Stop spells on prepare or casting state
|
||||||
target->InterruptSpell(CurrentSpellTypes(i), false);
|
target->InterruptSpell(CurrentSpellTypes(i), false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
|
// do not remove unit flag if there are more than this auraEffect of that kind on unit
|
||||||
if (target->HasAuraType(SPELL_AURA_MOD_NO_ACTIONS))
|
if (target->HasAuraType(SPELL_AURA_MOD_NO_ACTIONS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -5780,7 +5780,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
|||||||
prevented_reason = SPELL_FAILED_SILENCED;
|
prevented_reason = SPELL_FAILED_SILENCED;
|
||||||
else if (unitflag & UNIT_FLAG_PACIFIED && m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY)
|
else if (unitflag & UNIT_FLAG_PACIFIED && m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY)
|
||||||
prevented_reason = SPELL_FAILED_PACIFIED;
|
prevented_reason = SPELL_FAILED_PACIFIED;
|
||||||
else if (m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_NO_ACTIONS) && m_spellInfo->PreventionType & SPELL_PREVENTION_TYPE_NO_ACTIONS)
|
else if (m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_NO_ACTIONS) && m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_NO_ACTIONS)
|
||||||
prevented_reason = SPELL_FAILED_NO_ACTIONS;
|
prevented_reason = SPELL_FAILED_NO_ACTIONS;
|
||||||
|
|
||||||
// Attr must make flag drop spell totally immune from all effects
|
// Attr must make flag drop spell totally immune from all effects
|
||||||
@@ -7502,11 +7502,8 @@ void Spell::TriggerGlobalCooldown()
|
|||||||
m_spellInfo->HasAttribute(SPELL_ATTR0_ABILITY);
|
m_spellInfo->HasAttribute(SPELL_ATTR0_ABILITY);
|
||||||
|
|
||||||
// Apply haste rating
|
// Apply haste rating
|
||||||
if (gcd > MIN_GCD && ((m_spellInfo->StartRecoveryCategory == 133 && !isMeleeOrRangedSpell) || m_caster->HasAuraTypeWithAffectMask(SPELL_AURA_MOD_GLOBAL_COOLDOWN_BY_HASTE, m_spellInfo)))
|
if (gcd > MIN_GCD && ((m_spellInfo->StartRecoveryCategory == 133 && !isMeleeOrRangedSpell)))
|
||||||
gcd = std::min<int32>(std::max<int32>(int32(float(gcd) * m_caster->GetFloatValue(UNIT_MOD_CAST_HASTE)), MIN_GCD), MAX_GCD);
|
gcd = std::min<int32>(std::max<int32>(int32(float(gcd) * m_caster->GetFloatValue(UNIT_MOD_CAST_HASTE)), MIN_GCD), MAX_GCD);
|
||||||
|
|
||||||
if (gcd > MIN_GCD && m_caster->HasAuraTypeWithAffectMask(SPELL_AURA_MOD_GLOBAL_COOLDOWN_BY_HASTE_REGEN, m_spellInfo))
|
|
||||||
gcd = std::min<int32>(std::max<int32>(int32(float(gcd) * m_caster->GetFloatValue(UNIT_FIELD_MOD_HASTE_REGEN)), MIN_GCD), MAX_GCD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_caster->GetSpellHistory()->AddGlobalCooldown(m_spellInfo, gcd);
|
m_caster->GetSpellHistory()->AddGlobalCooldown(m_spellInfo, gcd);
|
||||||
|
|||||||
@@ -317,12 +317,6 @@ void SpellHistory::StartCooldown(SpellInfo const* spellInfo, uint32 itemId, Spel
|
|||||||
categoryCooldown = int32(categoryCooldown * _owner->GetFloatValue(UNIT_MOD_CAST_HASTE));
|
categoryCooldown = int32(categoryCooldown * _owner->GetFloatValue(UNIT_MOD_CAST_HASTE));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_owner->HasAuraTypeWithAffectMask(SPELL_AURA_MOD_COOLDOWN_BY_HASTE_REGEN, spellInfo))
|
|
||||||
{
|
|
||||||
cooldown = int32(cooldown * _owner->GetFloatValue(UNIT_FIELD_MOD_HASTE_REGEN));
|
|
||||||
categoryCooldown = int32(categoryCooldown * _owner->GetFloatValue(UNIT_FIELD_MOD_HASTE_REGEN));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (int32 cooldownMod = _owner->GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN))
|
if (int32 cooldownMod = _owner->GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN))
|
||||||
{
|
{
|
||||||
// Apply SPELL_AURA_MOD_COOLDOWN only to own spells
|
// Apply SPELL_AURA_MOD_COOLDOWN only to own spells
|
||||||
|
|||||||
Reference in new issue
Block a user