mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
[Quest API] (Performance) Check event exists before export and execute EVENT_DUEL_LOSE and EVENT_DUEL_WIN (#2915)
# Notes - Optionally parse these events instead of always doing so.
This commit is contained in:
parent
604256a223
commit
241f900dc4
@ -1787,12 +1787,29 @@ void EntityList::QueueClientsStatus(Mob *sender, const EQApplicationPacket *app,
|
||||
void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
|
||||
{
|
||||
if (winner->GetLevelCon(winner->GetLevel(), loser->GetLevel()) > 2) {
|
||||
std::vector<std::any> args;
|
||||
args.push_back(winner);
|
||||
args.push_back(loser);
|
||||
if (parse->PlayerHasQuestSub(EVENT_DUEL_WIN)) {
|
||||
std::vector<std::any> args = { winner, loser };
|
||||
|
||||
parse->EventPlayer(EVENT_DUEL_WIN, winner->CastToClient(), loser->GetName(), loser->CastToClient()->CharacterID(), &args);
|
||||
parse->EventPlayer(EVENT_DUEL_LOSE, loser->CastToClient(), winner->GetName(), winner->CastToClient()->CharacterID(), &args);
|
||||
parse->EventPlayer(
|
||||
EVENT_DUEL_WIN,
|
||||
winner->CastToClient(),
|
||||
loser->GetName(),
|
||||
loser->CastToClient()->CharacterID(),
|
||||
&args
|
||||
);
|
||||
}
|
||||
|
||||
if (parse->PlayerHasQuestSub(EVENT_DUEL_LOSE)) {
|
||||
std::vector<std::any> args = { winner, loser };
|
||||
|
||||
parse->EventPlayer(
|
||||
EVENT_DUEL_LOSE,
|
||||
loser->CastToClient(),
|
||||
winner->GetName(),
|
||||
winner->CastToClient()->CharacterID(),
|
||||
&args
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
auto it = client_list.begin();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user