mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/Spells: Chill of the Grave will now grant Runic Power in all cases and will now again grant Runic Power for each target hit by Howling Blast
This commit is contained in:
1
sql/updates/world/custom/custom_2019_08_30_02_world.sql
Normal file
1
sql/updates/world/custom/custom_2019_08_30_02_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_chill_of_the_grave';
|
||||
@@ -4999,9 +4999,7 @@ void Spell::TakeRunePower(bool didHit)
|
||||
player->ClearLastUsedRuneMask();
|
||||
|
||||
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
|
||||
int32 runicPowerGain = runeCostData->runePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME);
|
||||
|
||||
// Apply rune cost modifiers
|
||||
for (uint32 i = 0; i < RUNE_DEATH; ++i)
|
||||
{
|
||||
runeCost[i] = runeCostData->RuneCost[i];
|
||||
@@ -5055,7 +5053,7 @@ void Spell::TakeRunePower(bool didHit)
|
||||
// you can gain some runic power when use runes
|
||||
if (didHit)
|
||||
{
|
||||
if (runicPowerGain)
|
||||
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 (auto i = bonusPct.begin(); i != bonusPct.end(); ++i)
|
||||
@@ -5065,18 +5063,14 @@ void Spell::TakeRunePower(bool didHit)
|
||||
{
|
||||
// Apply bonus when in Unholy or Blood Presence
|
||||
if (player->HasAura(48265) || player->HasAura(48263))
|
||||
AddPct(runicPowerGain, (*i)->GetAmount());
|
||||
AddPct(rp, (*i)->GetAmount());
|
||||
continue;
|
||||
}
|
||||
else
|
||||
AddPct(runicPowerGain, (*i)->GetAmount());
|
||||
AddPct(rp, (*i)->GetAmount());
|
||||
}
|
||||
|
||||
// Apply runic power gain modifiers
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runicPowerGain, const_cast<Spell*>(this));
|
||||
|
||||
player->ModifyPower(POWER_RUNIC_POWER, std::max(0, runicPowerGain));
|
||||
player->ModifyPower(POWER_RUNIC_POWER, rp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +64,12 @@ enum DeathKnightSpells
|
||||
SPELL_DK_ENERGIZE_BLOOD_RUNE = 81166,
|
||||
SPELL_DK_ENERGIZE_FROST_RUNE = 81168,
|
||||
SPELL_DK_ENERGIZE_UNHOLY_RUNE = 81169,
|
||||
SPELL_DK_FREEZING_FOG = 59052,
|
||||
SPELL_DK_FROST_FEVER = 55095,
|
||||
SPELL_DK_FROST_PRESENCE = 48266,
|
||||
SPELL_DK_FROST_STRIKE = 49143,
|
||||
SPELL_DK_FROST_STRIKE_OFFHAND = 66196,
|
||||
SPELL_DK_GHOUL_EXPLODE = 47496,
|
||||
SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625,
|
||||
SPELL_DK_HOWLING_BLAST = 49184,
|
||||
SPELL_DK_ICY_TOUCH = 45477,
|
||||
SPELL_DK_IMPROVED_BLOOD_PRESENCE = 63611,
|
||||
SPELL_DK_IMPROVED_DEATH_STRIKE = 62905,
|
||||
SPELL_DK_IMPROVED_FROST_PRESENCE = 63621,
|
||||
@@ -1272,46 +1269,6 @@ class spell_dk_howling_blast : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// -49149 - Chill of the Grave
|
||||
class spell_dk_chill_of_the_grave : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dk_chill_of_the_grave);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_DK_FREEZING_FOG,
|
||||
SPELL_DK_ICY_TOUCH,
|
||||
SPELL_DK_HOWLING_BLAST
|
||||
});
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (Spell const* spell = eventInfo.GetProcSpell())
|
||||
{
|
||||
if (SpellInfo const* spellInfo = spell->GetSpellInfo())
|
||||
if (GetTarget()->HasAura(SPELL_DK_FREEZING_FOG))
|
||||
if (spellInfo->Id == SPELL_DK_ICY_TOUCH || spellInfo->Id == SPELL_DK_HOWLING_BLAST)
|
||||
return false;
|
||||
|
||||
if (Unit* spellTarget = spell->m_targets.GetUnitTarget())
|
||||
if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
|
||||
if (Unit* procTarget = eventInfo.GetDamageInfo()->GetVictim())
|
||||
if (spellTarget == procTarget)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_dk_chill_of_the_grave::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_dk_threat_of_thassarian : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dk_threat_of_thassarian);
|
||||
@@ -1723,7 +1680,6 @@ void AddSC_deathknight_spell_scripts()
|
||||
RegisterAuraScript(spell_dk_blood_gorged);
|
||||
RegisterAuraScript(spell_dk_blood_rites);
|
||||
RegisterAuraScript(spell_dk_butchery);
|
||||
RegisterAuraScript(spell_dk_chill_of_the_grave);
|
||||
RegisterAuraScript(spell_dk_crimson_scourge);
|
||||
RegisterSpellScript(spell_dk_dark_transformation);
|
||||
RegisterAuraScript(spell_dk_dark_transformation_aura);
|
||||
|
||||
Reference in New Issue
Block a user