[Spells] Update to SPA 442 and 443 (SE_TriggerOnReqTarget, SE_TriggerOnReqCaster) (#1543)

* Update to SPA 442 and 443

Use SpellRestriction Id's and updated PassCastRestriction code

* Update mob.cpp
This commit is contained in:
KayenEQ
2021-09-19 16:16:56 -04:00
committed by GitHub
parent f715ccd368
commit 71870cbd1c
10 changed files with 37 additions and 96 deletions
+3 -3
View File
@@ -383,7 +383,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
GetName()
);
TryTriggerOnValueAmount(false, true);
TryTriggerOnCastRequirement();
return(false);
}
@@ -2467,7 +2467,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
LogSpells("Spell [{}]: consuming [{}] mana", spell_id, mana_used);
if (!DoHPToManaCovert(mana_used)) {
SetMana(GetMana() - mana_used);
TryTriggerOnValueAmount(false, true);
TryTriggerOnCastRequirement();
}
}
// one may want to check if this is a disc or not, but we actually don't, there are non disc stuff that have end cost
@@ -2478,7 +2478,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if (mgb)
end_cost *= 2;
SetEndurance(GetEndurance() - EQ::ClampUpper(end_cost, GetEndurance()));
TryTriggerOnValueAmount(false, false, true);
TryTriggerOnCastRequirement();
}
if (mgb)
SetMGB(false);