From 38433c106c65e4a7c4553a617bf165c5567e1dbf Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 4 Sep 2022 20:32:29 +0300 Subject: [PATCH 37/37] Fix filling player "scenario reserved" property to editor packet See osdn #45491 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/editprop.c | 5 +++-- client/gui-gtk-3.22/editprop.c | 5 +++-- client/gui-gtk-4.0/editprop.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/gui-gtk-3.0/editprop.c b/client/gui-gtk-3.0/editprop.c index 208fc31eaa..c9b7f6e60c 100644 --- a/client/gui-gtk-3.0/editprop.c +++ b/client/gui-gtk-3.0/editprop.c @@ -91,7 +91,7 @@ static int get_next_unique_tag(void); #include "spechash.h" /* NB: If packet definitions change, be sure to - * update objbind_pack_current_values!!! */ + * update objbind_pack_current_values()!!! */ union packetdata { struct { gpointer v_pointer1; @@ -288,7 +288,7 @@ static struct propval *propstate_get_value(struct propstate *ps); 6. Add a case handler in objbind_pack_modified_value. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! 7. Add code to set the packet field in !!! - !!! objbind_pack_current_values. !!! + !!! objbind_pack_current_values(). !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8. Add code to handle changes in the packet field in server/edithand.c handle_edit_. @@ -2309,6 +2309,7 @@ static void objbind_pack_current_values(struct objbind *ob, } advance_index_iterate_end; packet->gold = pplayer->economic.gold; packet->government = government_index(pplayer->government); + packet->scenario_reserved = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); /* TODO: Set more packet fields. */ } return; diff --git a/client/gui-gtk-3.22/editprop.c b/client/gui-gtk-3.22/editprop.c index 36f292e74f..c48ff75722 100644 --- a/client/gui-gtk-3.22/editprop.c +++ b/client/gui-gtk-3.22/editprop.c @@ -91,7 +91,7 @@ static int get_next_unique_tag(void); #include "spechash.h" /* NB: If packet definitions change, be sure to - * update objbind_pack_current_values!!! */ + * update objbind_pack_current_values()!!! */ union packetdata { struct { gpointer v_pointer1; @@ -288,7 +288,7 @@ static struct propval *propstate_get_value(struct propstate *ps); 6. Add a case handler in objbind_pack_modified_value. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! 7. Add code to set the packet field in !!! - !!! objbind_pack_current_values. !!! + !!! objbind_pack_current_values(). !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8. Add code to handle changes in the packet field in server/edithand.c handle_edit_. @@ -2309,6 +2309,7 @@ static void objbind_pack_current_values(struct objbind *ob, } advance_index_iterate_end; packet->gold = pplayer->economic.gold; packet->government = government_index(pplayer->government); + packet->scenario_reserved = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); /* TODO: Set more packet fields. */ } return; diff --git a/client/gui-gtk-4.0/editprop.c b/client/gui-gtk-4.0/editprop.c index 83e1e58027..6fdc1dcda4 100644 --- a/client/gui-gtk-4.0/editprop.c +++ b/client/gui-gtk-4.0/editprop.c @@ -91,7 +91,7 @@ static int get_next_unique_tag(void); #include "spechash.h" /* NB: If packet definitions change, be sure to - * update objbind_pack_current_values!!! */ + * update objbind_pack_current_values()!!! */ union packetdata { struct { gpointer v_pointer1; @@ -288,7 +288,7 @@ static struct propval *propstate_get_value(struct propstate *ps); 6. Add a case handler in objbind_pack_modified_value. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! 7. Add code to set the packet field in !!! - !!! objbind_pack_current_values. !!! + !!! objbind_pack_current_values(). !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8. Add code to handle changes in the packet field in server/edithand.c handle_edit_. @@ -2309,6 +2309,7 @@ static void objbind_pack_current_values(struct objbind *ob, } advance_index_iterate_end; packet->gold = pplayer->economic.gold; packet->government = government_index(pplayer->government); + packet->scenario_reserved = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); /* TODO: Set more packet fields. */ } return; -- 2.35.1