Scripts: Minor improvements to recently migrated scripts (#23189)

Ref: 2cfaeb1400
This commit is contained in:
Sorikoff
2019-04-21 14:22:39 +00:00
committed by Keader
parent 961bc9d829
commit 90d4254a87
2 changed files with 13 additions and 11 deletions

View File

@@ -103,6 +103,7 @@ enum DeathKnightSpells
enum DeathKnightSpellIcons
{
DK_ICON_ID_EPIDEMIC = 234,
DK_ICON_ID_IMPROVED_DEATH_STRIKE = 2751
};
@@ -1295,7 +1296,7 @@ class spell_dk_glyph_of_scourge_strike_script : public SpellScript
// this Glyph
countMax += 9000;
// talent Epidemic
if (AuraEffect const* epidemic = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 234, EFFECT_0))
if (AuraEffect const* epidemic = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, DK_ICON_ID_EPIDEMIC, EFFECT_0))
countMax += epidemic->GetAmount();
if (countMin < countMax)

View File

@@ -3717,9 +3717,9 @@ class spell_item_taunt_flag_targeting : public SpellScript
enum MirrensDrinkingHat
{
ITEM_LOCH_MODAN_LAGER = 23584,
ITEM_STOUTHAMMER_LITE = 23585,
ITEM_AERIE_PEAK_PALE_ALE = 23586
SPELL_LOCH_MODAN_LAGER = 29827,
SPELL_STOUTHAMMER_LITE = 29828,
SPELL_AERIE_PEAK_PALE_ALE = 29829
};
// 29830 - Mirren's Drinking Hat
@@ -3727,23 +3727,24 @@ class spell_item_mirrens_drinking_hat : public SpellScript
{
PrepareSpellScript(spell_item_mirrens_drinking_hat);
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /* effIndex */)
{
uint32 itemId;
uint32 spellId;
switch (urand(1, 6))
{
case 1:
case 2:
case 3:
itemId = ITEM_LOCH_MODAN_LAGER; break;
spellId = SPELL_LOCH_MODAN_LAGER; break;
case 4:
case 5:
itemId = ITEM_STOUTHAMMER_LITE; break;
spellId = SPELL_STOUTHAMMER_LITE; break;
case 6:
itemId = ITEM_AERIE_PEAK_PALE_ALE; break;
spellId = SPELL_AERIE_PEAK_PALE_ALE; break;
}
if (itemId)
CreateItem(effIndex, itemId);
Unit* caster = GetCaster();
caster->CastSpell(caster, spellId);
}
void Register() override