Fix bug regarding shiny items

This PR aims to fix a bug where if a user attempts to shiny an item using the upgrade station and an offering, if it succeeds, the server does not send a response. This appears to occur because the server sets a "announce" flag to be false when the upgrade is a shiny attempt, and this prevents the success response from being sent to the client.
This commit is contained in:
FreezePhoenix
2024-02-22 08:42:04 -05:00
committed by GitHub
parent 1e43904aee
commit 10dcc537fd
+4 -6
View File
@@ -12389,12 +12389,10 @@ function update_instance(instance) {
}
if (success && !player.p.u_fail) {
if (announce) {
player.hitchhikers.push([
"game_response",
{ response: "upgrade_success", level: new_level, num: ref.num, stale: ref.stale },
]);
}
player.hitchhikers.push([
"game_response",
{ response: "upgrade_success", level: new_level, num: ref.num, stale: ref.stale },
]);
if (announce && calculate_item_value(item) > 4800000 && !player.stealth) {
broadcast("server_message", {
message: player.name + " received " + item_to_phrase(item),