From fb2aee1827a425c0ec7fdcfd04401ba116a6a3d1 Mon Sep 17 00:00:00 2001 From: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 12 Mar 2022 14:33:00 -0500 Subject: [PATCH] [Quest API] Add EVENT_CAST_ON exports to EVENT_CAST and EVENT_CAST_BEGIN. (#2051) - Export $caster_id and $caster_level to EVENT_CAST and EVENT_CAST_BEGIN in Perl. - Export e.caster_id and e.caster_level to EVENT_CAST and EVENT_CAST_BEGIN in Lua. --- zone/spells.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index f9e223d4b..d44c89801 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -237,7 +237,12 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, } } - std::string export_string = fmt::format("{}", spell_id); + std::string export_string = fmt::format( + "{} {} {}", + spell_id, + GetID(), + GetCasterLevel(spell_id) + ); if(IsClient()) { if (parse->EventPlayer(EVENT_CAST_BEGIN, CastToClient(), export_string, 0) != 0) { if (IsDiscipline(spell_id)) { @@ -1651,7 +1656,12 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo // at this point the spell has successfully been cast // - std::string export_string = fmt::format("{}", spell_id); + std::string export_string = fmt::format( + "{} {} {}", + spell_id, + GetID(), + GetCasterLevel(spell_id) + ); if(IsClient()) { parse->EventPlayer(EVENT_CAST, CastToClient(), export_string, 0); } else if(IsNPC()) {