[Quest API] Add caster_id and caster_level export to EVENT_CAST_ON in Perl/Lua. (#2049)

- Add $caster_id and $caster_level to EVENT_CAST_ON in Perl.
- Add e.caster_id and e.caster_level to EVENT_CAST_ON in Perl.
This commit is contained in:
Kinglykrab
2022-03-10 21:46:27 -05:00
committed by GitHub
parent e6c8a38ffa
commit d904db0e52
3 changed files with 20 additions and 4 deletions
+7 -2
View File
@@ -3589,8 +3589,13 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes
);
/* Send the EVENT_CAST_ON event */
std::string export_string = fmt::format("{}", spell_id);
if(spelltar->IsNPC()) {
std::string export_string = fmt::format(
"{} {} {}",
spell_id,
GetID(),
caster_level
);
if (spelltar->IsNPC()) {
parse->EventNPC(EVENT_CAST_ON, spelltar->CastToNPC(), this, export_string, 0);
} else if (spelltar->IsClient()) {
parse->EventPlayer(EVENT_CAST_ON, spelltar->CastToClient(), export_string, 0);