Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Core/Spells: Fix Curse of Doom (thx to Warpten / joschiwald for helping) #6800

Merged
merged 1 commit into from

2 participants

@Vincent-Michael
Collaborator

Closes: #6536

@kaelima kaelima merged commit 99d3918 into from
@eilo eilo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
3  sql/updates/world/2012_06_14_09_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=-603;
+INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
+(-603,'spell_warl_curse_of_doom');
View
11 src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1373,17 +1373,8 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case SPELLFAMILY_WARLOCK:
if (!caster)
break;
- // Curse of Doom
- if (GetSpellInfo()->SpellFamilyFlags[1] & 0x02)
- {
- if (removeMode == AURA_REMOVE_BY_DEATH)
- {
- if (caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->isHonorOrXPTarget(target))
- caster->CastSpell(target, 18662, true, NULL, GetEffect(0));
- }
- }
// Improved Fear
- else if (GetSpellInfo()->SpellFamilyFlags[1] & 0x00000400)
+ if (GetSpellInfo()->SpellFamilyFlags[1] & 0x00000400)
{
if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_WARLOCK, 98, 0))
{
View
48 src/server/scripts/Spells/spell_warlock.cpp
@@ -39,6 +39,7 @@ enum WarlockSpells
WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST = 62388,
WARLOCK_HAUNT_HEAL = 48210,
WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
+ WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
};
class spell_warl_banish : public SpellScriptLoader
@@ -625,6 +626,52 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
}
};
+class spell_warl_curse_of_doom : public SpellScriptLoader
+{
+ public:
+ spell_warl_curse_of_doom() : SpellScriptLoader("spell_warl_curse_of_doom") { }
+
+ class spell_warl_curse_of_doom_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_warl_curse_of_doom_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(WARLOCK_CURSE_OF_DOOM_EFFECT))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (!GetCaster())
+ return;
+
+ AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();
+ if (removeMode != AURA_REMOVE_BY_DEATH || !IsExpired())
+ return;
+
+ if (GetCaster()->ToPlayer()->isHonorOrXPTarget(GetTarget()))
+ GetCaster()->CastSpell(GetTarget(), WARLOCK_CURSE_OF_DOOM_EFFECT, true, NULL, aurEff);
+ }
+
+ void Register()
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_warl_curse_of_doom_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_warl_curse_of_doom_AuraScript();
+ }
+};
+
void AddSC_warlock_spell_scripts()
{
new spell_warl_banish();
@@ -639,4 +686,5 @@ void AddSC_warlock_spell_scripts()
new spell_warl_demonic_circle_teleport();
new spell_warl_haunt();
new spell_warl_unstable_affliction();
+ new spell_warl_curse_of_doom();
}
Something went wrong with that request. Please try again.