fix: misleading indentation on reputation addon event dispatch

The two fireAddonEvent calls were indented as if conditional on
repChangeCallback_ but actually execute unconditionally (no braces).
Fixed indentation and added clarifying comment.
This commit is contained in:
Kelsi 2026-03-29 21:35:49 -07:00
parent bbb560f93c
commit e42f8f1c03

View file

@ -2479,8 +2479,9 @@ void SocialHandler::handleSetFactionStanding(network::Packet& packet) {
owner_.addSystemChatMessage(buf);
owner_.watchedFactionId_ = factionId;
if (owner_.repChangeCallback_) owner_.repChangeCallback_(name, delta, standing);
owner_.fireAddonEvent("UPDATE_FACTION", {});
owner_.fireAddonEvent("CHAT_MSG_COMBAT_FACTION_CHANGE", {std::string(buf)});
// These events fire unconditionally on any rep change (not gated by callback).
owner_.fireAddonEvent("UPDATE_FACTION", {});
owner_.fireAddonEvent("CHAT_MSG_COMBAT_FACTION_CHANGE", {std::string(buf)});
}
}
}