From 6ede23d177525b5af0b6208f94c8d5d1e3d70582 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Tue, 15 Sep 2020 21:09:50 +0200 Subject: [PATCH] fix(Core/AuraScript): Soul Feast should apply on some Valithria mobs (#3355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/ItemScript): Shadow's Edge should give stacks on some Vali mobs * make the logic more beautiful * update name to IsException * build * IsException -> isException * Keep it to a standard :) * indentation Co-authored-by: Francesco Borzì Co-authored-by: Stefano Borzì --- src/server/scripts/Spells/spell_item.cpp | 36 ++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 83f5896c6..71600c0e0 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -2518,7 +2518,15 @@ class spell_item_scroll_of_recall : public SpellScriptLoader enum ShadowsFate { SPELL_SOUL_FEAST = 71203, - NPC_SINDRAGOSA = 36853 +}; + +enum ExceptionCreature +{ + NPC_GLUTTONOUS_ABOMINATION = 37886, + NPC_RISEN_ARCHMAGE = 37868, + NPC_BLISTERING_ZOMBIE = 37934, + NPC_BLAZING_SKELETON = 36791, + NPC_SINDRAGOSA = 36853 }; class spell_item_unsated_craving : public SpellScriptLoader @@ -2530,15 +2538,39 @@ class spell_item_unsated_craving : public SpellScriptLoader { PrepareAuraScript(spell_item_unsated_craving_AuraScript); + bool isException(Unit* target) const + { + switch (target->GetEntry()) + { + case NPC_GLUTTONOUS_ABOMINATION: + case NPC_RISEN_ARCHMAGE: + case NPC_BLISTERING_ZOMBIE: + case NPC_BLAZING_SKELETON: + case NPC_SINDRAGOSA: + return true; + default: + return false; + } + } + bool CheckProc(ProcEventInfo& procInfo) { Unit* caster = procInfo.GetActor(); if (!caster || caster->GetTypeId() != TYPEID_PLAYER) + { return false; + } Unit* target = procInfo.GetActionTarget(); - if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon())) + if (target && isException(target)) + { + return true; + } + + if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || target->IsSummon()) + { return false; + } return true; }