Skip to content

Instantly share code, notes, and snippets.

@Langerz82
Last active January 30, 2019 08:56
Show Gist options
  • Save Langerz82/eb1f2091910cc3fcf593882e8a651615 to your computer and use it in GitHub Desktop.
Save Langerz82/eb1f2091910cc3fcf593882e8a651615 to your computer and use it in GitHub Desktop.
diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp
index 28b2eab..c5a3e1e 100644
--- a/src/game/WorldHandlers/Spell.cpp
+++ b/src/game/WorldHandlers/Spell.cpp
@@ -264,12 +264,25 @@ void SpellCastTargets::write(ByteBuffer& data) const
{ data << m_strTarget; }
}
+void Spell::ApplySpellInfoHotfixes()
+{
+ switch (m_spellInfo->Id)
+ {
+ // Paladin
+ // Judgement of Command receive benefit from Spell Damage and Healing
+ case 20467: case 20963: case 20964: case 20965: case 20966:
+ m_spellInfo->RecoveryTime = 1500;
+ break;
+ }
+
+}
+
Spell::Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid originalCasterGUID, SpellEntry const* triggeredBy)
{
MANGOS_ASSERT(caster != NULL && info != NULL);
MANGOS_ASSERT(info == sSpellStore.LookupEntry(info->Id)); // `info` must be pointer to sSpellStore element
- m_spellInfo = info;
+ m_spellInfo = (SpellInfo*) info;
m_triggeredBySpellInfo = triggeredBy;
m_caster = caster;
m_selfContainer = NULL;
@@ -280,6 +293,8 @@ Spell::Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid or
m_applyMultiplierMask = 0;
+ ApplySpellInfoHotfixes();
+
// Get data for type of attack
m_attackType = GetWeaponAttackType(m_spellInfo);
@@ -3178,7 +3193,6 @@ void Spell::update(uint32 difftime)
}
}
}
-
finish();
}
} break;
diff --git a/src/game/WorldHandlers/Spell.h b/src/game/WorldHandlers/Spell.h
index c23f248..4cea066 100644
--- a/src/game/WorldHandlers/Spell.h
+++ b/src/game/WorldHandlers/Spell.h
@@ -316,6 +316,8 @@ class Spell
Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid originalCasterGUID = ObjectGuid(), SpellEntry const* triggeredBy = NULL);
~Spell();
+ void ApplySpellInfoHotfixes();
+
void prepare(SpellCastTargets const* targets, Aura* triggeredByAura = NULL);
void cancel();
@@ -377,7 +379,7 @@ class Spell
void HandleThreatSpells();
// void HandleAddAura(Unit* Target);
- SpellEntry const* m_spellInfo;
+ SpellEntry* m_spellInfo;
SpellEntry const* m_triggeredBySpellInfo;
int32 m_currentBasePoints[MAX_EFFECT_INDEX]; // cache SpellEntry::CalculateSimpleValue and use for set custom base points
Item* m_CastItem;
@@ -442,7 +444,6 @@ class Spell
void SetSelfContainer(Spell** pCurrentContainer) { m_selfContainer = pCurrentContainer; }
Spell** GetSelfContainer() { return m_selfContainer; }
-
protected:
bool HasGlobalCooldown();
void TriggerGlobalCooldown();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment