-
-
Save SymbolixDEV/96c72b9380ad8abe8130 to your computer and use it in GitHub Desktop.
DalaranWoW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: SymbolixDEV<[email protected]> | |
Subject: [PATCH] Fix - Warlock: Glyph of Succubus - Improved Succubus (Talent). | |
--- | |
src/server/game/Entities/Unit/Unit.cpp | 10 -------- | |
src/server/game/Spells/Spell.cpp | 27 +++++++++++++++++++ | |
src/server/game/Spells/SpellMgr.cpp | 15 +++++++++++ | |
src/server/scripts/Spells/spell_warlock.cpp | 40 ++++++++++++++++++++++++++++- | |
5 files changed, 86 insertions(+), 11 deletions(-) | |
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp | |
index 6895d14..9dfb620 100644 | |
--- a/src/server/game/Entities/Unit/Unit.cpp | |
+++ b/src/server/game/Entities/Unit/Unit.cpp | |
@@ -5844,16 +5844,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere | |
triggered_spell_id = 37378; | |
break; | |
} | |
- // Glyph of Succubus | |
- case 56250: | |
- { | |
- if (!target) | |
- return false; | |
- target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(32409)); // SW:D shall not be removed. | |
- target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); | |
- target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); | |
- return true; | |
- } | |
} | |
break; | |
} | |
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp | |
index fee6fdb..e0be7bb 100644 | |
--- a/src/server/game/Spells/Spell.cpp | |
+++ b/src/server/game/Spells/Spell.cpp | |
@@ -2784,6 +2784,33 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA | |
{ | |
if (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION) | |
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this); | |
+ // Seduction | |
+ if (m_spellInfo->Id == 6358 && unit->GetTypeId() == TYPEID_PLAYER && m_originalCaster->GetOwner()) | |
+ { | |
+ float mod = 1.0f; | |
+ float durationadd = 0.0f; | |
+ | |
+ if (m_originalCaster->GetOwner()->HasAura(18754)) | |
+ durationadd += float(1.5*IN_MILLISECONDS*0.22); | |
+ else if (m_originalCaster->GetOwner()->HasAura(18755)) | |
+ durationadd += float(1.5*IN_MILLISECONDS*0.44); | |
+ else if (m_originalCaster->GetOwner()->HasAura(18756)) | |
+ durationadd += float(1.5*IN_MILLISECONDS*0.66); | |
+ if (durationadd) | |
+ { | |
+ switch (m_diminishLevel) | |
+ { | |
+ case DIMINISHING_LEVEL_1: break; | |
+ // lol, we lost 1 second here | |
+ case DIMINISHING_LEVEL_2: duration += 1000; mod = 0.5f; break; | |
+ case DIMINISHING_LEVEL_3: duration += 1000; mod = 0.25f; break; | |
+ case DIMINISHING_LEVEL_IMMUNE: { m_spellAura->Remove(); return SPELL_MISS_IMMUNE; } | |
+ default: break; | |
+ } | |
+ durationadd *= mod; | |
+ duration += int32(durationadd); | |
+ } | |
+ } | |
} | |
// and duration of auras affected by SPELL_AURA_PERIODIC_HASTE | |
else if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION) | |
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp | |
index de87f73..86ed176 100644 | |
--- a/src/server/game/Spells/SpellMgr.cpp | |
+++ b/src/server/game/Spells/SpellMgr.cpp | |
@@ -3286,6 +3286,21 @@ void SpellMgr::LoadSpellInfoCorrections() | |
case 29809: // Desecration Arm - 36 instead of 37 - typo? :/ | |
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_7_YARDS); | |
break; | |
+ case 18754: // Improved succubus | |
+ spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; // it's affects duration of seduction, let's minimize affection | |
+ spellInfo->Effects[EFFECT_0].BasePoints = -1.5*IN_MILLISECONDS*0.22; // reduce cast time of seduction by 22% | |
+ spellInfo->Effects[EFFECT_0].TargetA = TARGET_UNIT_CASTER; | |
+ break; | |
+ case 18755: | |
+ spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; | |
+ spellInfo->Effects[EFFECT_0].BasePoints = -1.5*IN_MILLISECONDS*0.44; // reduce cast time of seduction by 44% | |
+ spellInfo->Effects[EFFECT_0].TargetA = TARGET_UNIT_CASTER; | |
+ break; | |
+ case 18756: | |
+ spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; | |
+ spellInfo->Effects[EFFECT_0].BasePoints = -1.5*IN_MILLISECONDS*0.66; // reduce cast time of seduction by 66% | |
+ spellInfo->Effects[EFFECT_0].TargetA = TARGET_UNIT_CASTER; | |
+ break; | |
// Master Shapeshifter: missing stance data for forms other than bear - bear version has correct data | |
// To prevent aura staying on target after talent unlearned | |
case 48420: | |
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp | |
index 36e63b5..3fd8b9f 100644 | |
--- a/src/server/scripts/Spells/spell_warlock.cpp | |
+++ b/src/server/scripts/Spells/spell_warlock.cpp | |
@@ -52,7 +52,9 @@ enum WarlockSpells | |
SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553, | |
SPELL_WARLOCK_SOULSHATTER = 32835, | |
SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106, | |
- SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117 | |
+ SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117, | |
+ SPELL_WARLOCK_GLYPH_OF_SUCCUBUS = 56250, | |
+ SPELL_PRIEST_SHADOW_WORD_DEATH = 32409 | |
}; | |
enum WarlockSpellIcons | |
@@ -896,6 +898,41 @@ class spell_warl_unstable_affliction : public SpellScriptLoader | |
} | |
}; | |
+class spell_warl_seduction : public SpellScriptLoader | |
+{ | |
+public: | |
+ spell_warl_seduction() : SpellScriptLoader("spell_warl_seduction") { } | |
+ | |
+ class spell_warl_seduction_SpellScript : public SpellScript | |
+ { | |
+ PrepareSpellScript(spell_warl_seduction_SpellScript); | |
+ | |
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/) | |
+ { | |
+ Unit* caster = GetCaster(); | |
+ if (Unit* target = GetHitUnit()) | |
+ { | |
+ if (caster->GetOwner() && caster->GetOwner()->HasAura(SPELL_WARLOCK_GLYPH_OF_SUCCUBUS)) | |
+ { | |
+ target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. | |
+ target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); | |
+ target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); | |
+ } | |
+ } | |
+ } | |
+ | |
+ void Register() | |
+ { | |
+ OnEffectHitTarget += SpellEffectFn(spell_warl_seduction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); | |
+ } | |
+ }; | |
+ | |
+ SpellScript* GetSpellScript() const | |
+ { | |
+ return new spell_warl_seduction_SpellScript(); | |
+ } | |
+}; | |
+ | |
void AddSC_warlock_spell_scripts() | |
{ | |
new spell_warl_banish(); | |
@@ -916,4 +953,5 @@ void AddSC_warlock_spell_scripts() | |
new spell_warl_siphon_life(); | |
new spell_warl_soulshatter(); | |
new spell_warl_unstable_affliction(); | |
+ new spell_warl_seduction(); | |
} | |
-- | |
1.8.5.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment