mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
[Quest API] (Performance) Check event EVENT_AGGRO, EVENT_ATTACK, or EVENT_COMBAT exist before export and execute (#2901)
* [Quest API] Optionally parse EVENT_COMBAT # Notes - Optionally parse this event instead of always doing so. * Optional EVENT_ATTACK * Update attack.cpp
This commit is contained in:
+6
-3
@@ -5340,9 +5340,12 @@ void Bot::Damage(Mob *from, int64 damage, uint16 spell_id, EQ::skills::SkillType
|
||||
spell_id = SPELL_UNKNOWN;
|
||||
|
||||
//handle EVENT_ATTACK. Resets after we have not been attacked for 12 seconds
|
||||
if(attacked_timer.Check()) {
|
||||
LogCombat("Triggering EVENT_ATTACK due to attack by [{}]", from->GetName());
|
||||
parse->EventBot(EVENT_ATTACK, this, from, "", 0);
|
||||
if (attacked_timer.Check()) {
|
||||
if (parse->BotHasQuestSub(EVENT_ATTACK)) {
|
||||
LogCombat("Triggering EVENT_ATTACK due to attack by [{}]", from->GetName());
|
||||
|
||||
parse->EventBot(EVENT_ATTACK, this, from, "", 0);
|
||||
}
|
||||
}
|
||||
|
||||
attacked_timer.Start(CombatEventTimer_expire);
|
||||
|
||||
Reference in New Issue
Block a user