diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9060767e97f..1215efa8c23 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -25408,6 +25408,10 @@ void Player::SetRuneCooldown(uint8 index, uint32 cooldown, bool casted /*= false { uint32 gracePeriod = GetRuneTimer(index); + // Improved Blood Presence + if (AuraEffect* aurEff = GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, 2636, EFFECT_2)) + cooldown *= 1.0 - CalculatePct(aurEff->GetAmount(), 1); + if (casted && IsInCombat()) { if (gracePeriod < 0xFFFFFFFF && cooldown > 0) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 0bf136f8616..cece3125244 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4840,7 +4840,23 @@ void Spell::TakeRunePower(bool didHit) // you can gain some runic power when use runes if (didHit) if (int32 rp = int32(runeCostData->runePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME))) + { + Unit::AuraEffectList const& bonusPct = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_RUNE_REGEN_SPEED); + for (Unit::AuraEffectList::const_iterator i = bonusPct.begin(); i != bonusPct.end(); ++i) + { + // Improved Frost Presence + if ((*i)->GetId() == 63621) + { + // Apply bonus when in Unholy or Blood Presence + if (player->HasAura(48265) || player->HasAura(48263)) + AddPct(int32(rp), (*i)->GetAmount()); + continue; + } + else + AddPct(int32(rp), (*i)->GetAmount()); + } player->ModifyPower(POWER_RUNIC_POWER, int32(rp)); + } } void Spell::TakeReagents() diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 694290320a7..13bf1914770 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -55,6 +55,7 @@ enum DeathKnightSpells SPELL_DK_GHOUL_EXPLODE = 47496, SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625, SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1 = 50365, + SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611, SPELL_DK_IMPROVED_DEATH_STRIKE = 62905, SPELL_DK_IMPROVED_FROST_PRESENCE_R1 = 50384, SPELL_DK_IMPROVED_FROST_PRESENCE_TRIGGERED = 63621, @@ -1125,8 +1126,8 @@ class spell_dk_pestilence : public SpellScriptLoader } }; -// 48266 - Blood Presence -// 48263 - Frost Presence +// 48266 - Frost Presence +// 48263 - Blood Presence // 48265 - Unholy Presence class spell_dk_presence : public SpellScriptLoader { @@ -1139,24 +1140,39 @@ class spell_dk_presence : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) override { - if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE) - || !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE) - || !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE) - || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1) - || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_FROST_PRESENCE_R1) - || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1) - || !sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE_TRIGGERED) - || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED) - || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_FROST_PRESENCE_TRIGGERED)) - return false; - - return true; + return ValidateSpellInfo( + { + SPELL_DK_BLOOD_PRESENCE, + SPELL_DK_FROST_PRESENCE, + SPELL_DK_UNHOLY_PRESENCE, + SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1, + SPELL_DK_IMPROVED_FROST_PRESENCE_R1, + SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1, + SPELL_DK_BLOOD_PRESENCE_TRIGGERED, + SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, + SPELL_DK_IMPROVED_FROST_PRESENCE_TRIGGERED, + SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED + }); } void HandleImprovedBloodPresence(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { - /// @todo: rune regg (effect 2) Unit* target = GetTarget(); + + // Improved Blood Presence Rune Regeneration Bonus + if (GetSpellInfo()->Id == SPELL_DK_BLOOD_PRESENCE) + { + if (Aura const* aura = target->GetAuraOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1)) + if (AuraEffect const* impAurEff = aura->GetEffect(EFFECT_2)) + if (!target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) + { + CustomSpellValues val; + val.AddSpellMod(SPELLVALUE_BASE_POINT0, impAurEff->GetAmount()); + val.AddSpellMod(SPELLVALUE_BASE_POINT1, impAurEff->GetAmount()); + target->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, val, target, TRIGGERED_FULL_MASK, nullptr, aurEff); + } + } + if (Aura const* aura = target->GetAuraOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1)) { CustomSpellValues val; @@ -1173,6 +1189,7 @@ class spell_dk_presence : public SpellScriptLoader if (!target->HasAura(SPELL_DK_BLOOD_PRESENCE_TRIGGERED)) target->CastCustomSpell(SPELL_DK_BLOOD_PRESENCE_TRIGGERED, val, target, TRIGGERED_FULL_MASK, NULL, aurEff); + } else if (GetSpellInfo()->Id == SPELL_DK_BLOOD_PRESENCE) target->CastSpell(target, SPELL_DK_BLOOD_PRESENCE_TRIGGERED, true, NULL, aurEff); @@ -1211,6 +1228,7 @@ class spell_dk_presence : public SpellScriptLoader target->RemoveAura(SPELL_DK_BLOOD_PRESENCE_TRIGGERED); target->RemoveAura(SPELL_DK_IMPROVED_FROST_PRESENCE_TRIGGERED); target->RemoveAura(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED); + target->RemoveAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED); } void Register() override