mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Core/AuraScript): Soul Feast should apply on some Valithria mobs (#3355)
* 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ì <borzifrancesco@gmail.com> Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -2518,6 +2518,14 @@ class spell_item_scroll_of_recall : public SpellScriptLoader
|
|||||||
enum ShadowsFate
|
enum ShadowsFate
|
||||||
{
|
{
|
||||||
SPELL_SOUL_FEAST = 71203,
|
SPELL_SOUL_FEAST = 71203,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ExceptionCreature
|
||||||
|
{
|
||||||
|
NPC_GLUTTONOUS_ABOMINATION = 37886,
|
||||||
|
NPC_RISEN_ARCHMAGE = 37868,
|
||||||
|
NPC_BLISTERING_ZOMBIE = 37934,
|
||||||
|
NPC_BLAZING_SKELETON = 36791,
|
||||||
NPC_SINDRAGOSA = 36853
|
NPC_SINDRAGOSA = 36853
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2530,15 +2538,39 @@ class spell_item_unsated_craving : public SpellScriptLoader
|
|||||||
{
|
{
|
||||||
PrepareAuraScript(spell_item_unsated_craving_AuraScript);
|
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)
|
bool CheckProc(ProcEventInfo& procInfo)
|
||||||
{
|
{
|
||||||
Unit* caster = procInfo.GetActor();
|
Unit* caster = procInfo.GetActor();
|
||||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Unit* target = procInfo.GetActionTarget();
|
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 false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user