fix(Spells/Scripts): Gnomish Poultryizer (#15554)
fix(Spells/Scripts): Gnomish Poultryizer not breaking on damage
This commit is contained in:
parent
4eb96bb684
commit
7c43738214
2 changed files with 20 additions and 4 deletions
|
|
@ -4560,6 +4560,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
|||
spellInfo->Effects[EFFECT_0].TriggerSpell = 62585; // Mulgore Hatchling (fear)
|
||||
});
|
||||
|
||||
// Poultryized!
|
||||
ApplySpellFix({ 30504 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_TAKE_DAMAGE;
|
||||
});
|
||||
|
||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||
{
|
||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||
|
|
|
|||
|
|
@ -2975,8 +2975,9 @@ class spell_item_nigh_invulnerability : public SpellScript
|
|||
|
||||
enum Poultryzer
|
||||
{
|
||||
SPELL_POULTRYIZER_SUCCESS = 30501,
|
||||
SPELL_POULTRYIZER_BACKFIRE = 30504,
|
||||
SPELL_POULTRYIZER_SUCCESS_1 = 30501,
|
||||
SPELL_POULTRYIZER_SUCCESS_2 = 30504, // malfunction
|
||||
SPELL_POULTRYIZER_BACKFIRE = 30506, // Not removed on damage
|
||||
};
|
||||
|
||||
class spell_item_poultryizer : public SpellScript
|
||||
|
|
@ -2985,13 +2986,22 @@ class spell_item_poultryizer : public SpellScript
|
|||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_POULTRYIZER_SUCCESS, SPELL_POULTRYIZER_BACKFIRE });
|
||||
return ValidateSpellInfo({ SPELL_POULTRYIZER_SUCCESS_1, SPELL_POULTRYIZER_SUCCESS_2, SPELL_POULTRYIZER_BACKFIRE });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (GetCastItem() && GetHitUnit())
|
||||
GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(80) ? SPELL_POULTRYIZER_SUCCESS : SPELL_POULTRYIZER_BACKFIRE, true, GetCastItem());
|
||||
{
|
||||
if (roll_chance_i(80))
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(80) ? SPELL_POULTRYIZER_SUCCESS_1 : SPELL_POULTRYIZER_SUCCESS_2, true, GetCastItem());
|
||||
}
|
||||
else
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_POULTRYIZER_BACKFIRE, true, GetCastItem());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue