[DevTools] Fix NPC targetting dev tools display window (#2943)

This commit is contained in:
Chris Miles 2023-02-17 06:07:20 -06:00 committed by GitHub
parent 26dc05c0dc
commit a6dd65435f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4261,6 +4261,10 @@ void Mob::SetTarget(Mob *mob)
parse->BotHasQuestSub(EVENT_TARGET_CHANGE)
);
if (IsClient() && CastToClient()->admin > AccountStatus::GMMgmt) {
DisplayInfo(mob);
}
if (has_target_change_event) {
std::vector<std::any> args;
@ -4275,10 +4279,6 @@ void Mob::SetTarget(Mob *mob)
parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0, &args);
}
if (CastToClient()->admin > AccountStatus::GMMgmt) {
DisplayInfo(mob);
}
CastToClient()->SetBotPrecombat(false); // Any change in target will nullify this flag (target == mob checked above)
} else if (IsBot()) {
if (parse->BotHasQuestSub(EVENT_TARGET_CHANGE)) {