From 2090c4d30e0c7e079145c2dea073d3f68578e5e2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 4 Mar 2023 16:17:15 +0200 Subject: [PATCH 25/25] Lua: Send updated info to client after Player:change_gold() See osdn #47386 Signed-off-by: Marko Lindqvist --- server/scripting/api_server_edit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/scripting/api_server_edit.c b/server/scripting/api_server_edit.c index b4cb135110..85d1349365 100644 --- a/server/scripting/api_server_edit.c +++ b/server/scripting/api_server_edit.c @@ -738,6 +738,8 @@ void api_edit_change_gold(lua_State *L, Player *pplayer, int amount) LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player); pplayer->economic.gold = MAX(0, pplayer->economic.gold + amount); + + send_player_info_c(pplayer, NULL); } /**********************************************************************//** -- 2.39.2