Author: sveinung Date: Sun Aug 31 02:11:39 2014 New Revision: 26151 URL: http://svn.gna.org/viewcvs/freeciv?rev=26151&view=rev Log: Change the packet UNIT_DIPLOMAT_ANSWER to UNIT_ACTION_ANSWER
See patch #5141 Modified: trunk/client/packhand.c trunk/common/packets.def trunk/fc_version trunk/server/unithand.c Modified: trunk/client/packhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=26151&r1=26150&r2=26151&view=diff ============================================================================== --- trunk/client/packhand.c (original) +++ trunk/client/packhand.c Sun Aug 31 02:11:39 2014 @@ -3886,10 +3886,10 @@ } /************************************************************************** - Handle reply to diplomat action request + Handle the requested follow up question about an action **************************************************************************/ -void handle_unit_diplomat_answer(int diplomat_id, int target_id, int cost, - enum diplomat_actions action_type) +void handle_unit_action_answer(int diplomat_id, int target_id, int cost, + enum gen_action action_type) { struct city *pcity = game_city_by_number(target_id); struct unit *punit = game_unit_by_number(target_id); @@ -3897,14 +3897,14 @@ diplomat_id); if (!pdiplomat) { - log_debug("Bad diplomat %d.", diplomat_id); + log_debug("Bad actor %d.", diplomat_id); choose_action_queue_next(); return; } switch (action_type) { - case DIPLOMAT_BRIBE: + case ACTION_SPY_BRIBE_UNIT: if (punit && client.conn.playing && !client.conn.playing->ai_controlled) { /* Focus on the unit so the player knows where it is */ @@ -3916,7 +3916,7 @@ choose_action_queue_next(); } break; - case DIPLOMAT_INCITE: + case ACTION_SPY_INCITE_CITY: if (pcity && client.conn.playing && !client.conn.playing->ai_controlled) { /* Focus on the unit so the player knows where it is */ @@ -3928,12 +3928,12 @@ choose_action_queue_next(); } break; - case DIPLOMAT_ANY_ACTION: + case ACTION_COUNT: log_debug("Server didn't respond to query."); choose_action_queue_next(); break; default: - log_error("handle_unit_diplomat_answer() invalid action_type (%d).", + log_error("handle_unit_action_answer() invalid action_type (%d).", action_type); choose_action_queue_next(); break; Modified: trunk/common/packets.def URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/packets.def?rev=26151&r1=26150&r2=26151&view=diff ============================================================================== --- trunk/common/packets.def (original) +++ trunk/common/packets.def Sun Aug 31 02:11:39 2014 @@ -1010,11 +1010,11 @@ DIPLOMAT_ACTION action_type; end -PACKET_UNIT_DIPLOMAT_ANSWER = 85; sc, dsend +PACKET_UNIT_ACTION_ANSWER = 85; sc, dsend UNIT diplomat_id; UNIT target_id; # city_id or unit_id GOLD cost; - DIPLOMAT_ACTION action_type; + GEN_ACTION action_type; end PACKET_UNIT_DIPLOMAT_WANTS_INPUT = 86; sc, dsend, lsend Modified: trunk/fc_version URL: http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=26151&r1=26150&r2=26151&view=diff ============================================================================== --- trunk/fc_version (original) +++ trunk/fc_version Sun Aug 31 02:11:39 2014 @@ -54,7 +54,7 @@ # - Avoid adding a new mandatory capability to the development branch for # as long as possible. We want to maintain network compatibility with # the stable branch for as long as possible. -NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Aug.30" +NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Aug.31" NETWORK_CAPSTRING_OPTIONAL="" FREECIV_DISTRIBUTOR="" Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=26151&r1=26150&r2=26151&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Sun Aug 31 02:11:39 2014 @@ -313,10 +313,10 @@ int diplomat_id, int target_id) { - dsend_packet_unit_diplomat_answer(pc, - diplomat_id, target_id, - 0, - DIPLOMAT_ANY_ACTION); + dsend_packet_unit_action_answer(pc, + diplomat_id, target_id, + 0, + ACTION_COUNT); } /************************************************************************** @@ -356,10 +356,10 @@ case ACTION_SPY_BRIBE_UNIT: if (punit && diplomat_can_do_action(pactor, DIPLOMAT_BRIBE, unit_tile(punit))) { - dsend_packet_unit_diplomat_answer(pc, - actor_id, target_id, - unit_bribe_cost(punit, pplayer), - DIPLOMAT_BRIBE); + dsend_packet_unit_action_answer(pc, + actor_id, target_id, + unit_bribe_cost(punit, pplayer), + ACTION_SPY_BRIBE_UNIT); } else { illegal_action(pplayer, pactor, ACTION_SPY_BRIBE_UNIT); unit_query_impossible(pc, actor_id, target_id); @@ -369,10 +369,10 @@ case ACTION_SPY_INCITE_CITY: if (pcity && diplomat_can_do_action(pactor, DIPLOMAT_INCITE, pcity->tile)) { - dsend_packet_unit_diplomat_answer(pc, - actor_id, target_id, - city_incite_cost(pplayer, pcity), - DIPLOMAT_INCITE); + dsend_packet_unit_action_answer(pc, + actor_id, target_id, + city_incite_cost(pplayer, pcity), + ACTION_SPY_INCITE_CITY); } else { illegal_action(pplayer, pactor, ACTION_SPY_INCITE_CITY); unit_query_impossible(pc, actor_id, target_id); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits