mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
[Quest API] (Performance) Check event EVENT_LANGUAGE_SKILL_UP, EVENT_SKILL_UP, or EVENT_USE_SKILL exist before export and execute (#2894)
* [Quest API] Optionally parse EVENT_LANGUAGE_SKILL_UP, EVENT_SKILL_UP, and EVENT_USE_SKILL - Optionally parse these events instead of always doing so. * Cleanup
This commit is contained in:
+9
-6
@@ -1451,12 +1451,15 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo
|
||||
}
|
||||
|
||||
if (IsBot()) {
|
||||
const auto export_string = fmt::format(
|
||||
"{} {}",
|
||||
hit.skill,
|
||||
GetSkill(hit.skill)
|
||||
);
|
||||
parse->EventBot(EVENT_USE_SKILL, CastToBot(), nullptr, export_string, 0);
|
||||
if (parse->BotHasQuestSub(EVENT_USE_SKILL)) {
|
||||
const auto& export_string = fmt::format(
|
||||
"{} {}",
|
||||
hit.skill,
|
||||
GetSkill(hit.skill)
|
||||
);
|
||||
|
||||
parse->EventBot(EVENT_USE_SKILL, CastToBot(), nullptr, export_string, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user