Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast
This commit is contained in:
1 parent
daf5a4b5c3
commit
b81bf7d025
17 files changed
+79
-51
No files matched your search
@@ -369,7 +369,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Shield Slam
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209)
|
||||
{
|
||||
uint8 level = m_caster->getLevel();
|
||||
uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f), uint32(float(level) * 34.5f));
|
||||
@@ -943,7 +943,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
|
||||
// Remove spell cooldown (not category) if spell triggering spell with cooldown and same category
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime
|
||||
&& m_spellInfo->Category == spellInfo->Category)
|
||||
&& m_spellInfo->GetCategory() == spellInfo->GetCategory())
|
||||
m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id);
|
||||
|
||||
// original caster guid only for GO cast
|
||||
@@ -996,7 +996,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
|
||||
// Remove spell cooldown (not category) if spell triggering spell with cooldown and same category
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime
|
||||
&& m_spellInfo->Category == spellInfo->Category)
|
||||
&& m_spellInfo->GetCategory() == spellInfo->GetCategory())
|
||||
m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id);
|
||||
|
||||
// original caster guid only for GO cast
|
||||
@@ -2521,7 +2521,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
|
||||
|
||||
// On success dispel
|
||||
// Devour Magic
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC)
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetCategory() == SPELLCATEGORY_DEVOUR_MAGIC)
|
||||
{
|
||||
int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue();
|
||||
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
|
||||
@@ -4106,7 +4106,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Judgement (seal trigger)
|
||||
if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT)
|
||||
if (m_spellInfo->GetCategory() == SPELLCATEGORY_JUDGEMENT)
|
||||
{
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user