mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Quest API] (Performance) Check event EVENT_AA_BUY or EVENT_AA_GAIN exist before export and execute (#2892)
* [Quest API] Optionally parse EVENT_AA_BUY and EVENT_AA_GAIN # Notes - Optionally parse these events instead of always doing so. * Cleanup
This commit is contained in:
parent
9dd4cf71f1
commit
efd6d2f9b1
18
zone/aa.cpp
18
zone/aa.cpp
@ -1239,15 +1239,17 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
|
||||
}
|
||||
}
|
||||
|
||||
const auto export_string = fmt::format(
|
||||
"{} {} {} {}",
|
||||
cost,
|
||||
rank->id,
|
||||
rank->prev_id,
|
||||
rank->next_id
|
||||
);
|
||||
if (parse->PlayerHasQuestSub(EVENT_AA_BUY)) {
|
||||
const auto& export_string = fmt::format(
|
||||
"{} {} {} {}",
|
||||
cost,
|
||||
rank->id,
|
||||
rank->prev_id,
|
||||
rank->next_id
|
||||
);
|
||||
|
||||
parse->EventPlayer(EVENT_AA_BUY, this, export_string, 0);
|
||||
parse->EventPlayer(EVENT_AA_BUY, this, export_string, 0);
|
||||
}
|
||||
|
||||
CalcBonuses();
|
||||
|
||||
|
||||
@ -725,12 +725,9 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
SendSound();
|
||||
}
|
||||
|
||||
const auto export_string = fmt::format(
|
||||
"{}",
|
||||
gained
|
||||
);
|
||||
|
||||
parse->EventPlayer(EVENT_AA_GAIN, this, export_string, 0);
|
||||
if (parse->PlayerHasQuestSub(EVENT_AA_GAIN)) {
|
||||
parse->EventPlayer(EVENT_AA_GAIN, this, std::to_string(gained), 0);
|
||||
}
|
||||
|
||||
RecordPlayerEventLog(PlayerEvent::AA_GAIN, PlayerEvent::AAGainedEvent{gained});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user