Freeciv-3.1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "capability.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "rand.h"
#include "support.h"
#include "city.h"
#include "events.h"
#include "game.h"
#include "idex.h"
#include "map.h"
#include "player.h"
#include "specialist.h"
#include "unit.h"
#include "worklist.h"
#include "cm.h"
#include "citytools.h"
#include "cityturn.h"
#include "notify.h"
#include "plrhand.h"
#include "sanitycheck.h"
#include "unithand.h"
#include "unittools.h"
#include "cityhand.h"
Go to the source code of this file.
Functions | |
void | handle_city_name_suggestion_req (struct player *pplayer, int unit_id16, int unit_id32) |
void | handle_city_change_specialist (struct player *pplayer, int city_id16, int city_id32, Specialist_type_id from, Specialist_type_id to) |
void | handle_city_make_specialist (struct player *pplayer, int city_id16, int city_id32, int tile_id) |
void | handle_city_make_worker (struct player *pplayer, int city_id16, int city_id32, int tile_id) |
void | really_handle_city_sell (struct player *pplayer, struct city *pcity, struct impr_type *pimprove) |
void | handle_city_sell (struct player *pplayer, int city_id16, int city_id32, int build_id) |
void | really_handle_city_buy (struct player *pplayer, struct city *pcity) |
void | handle_city_worklist (struct player *pplayer, int city_id16, int city_id32, const struct worklist *worklist) |
void | handle_city_buy (struct player *pplayer, int city_id16, int city_id32) |
void | handle_city_refresh (struct player *pplayer, int city_id16, int city_id32) |
void | handle_city_change (struct player *pplayer, int city_id16, int city_id32, int production_kind, int production_value) |
void | handle_city_rename (struct player *pplayer, int city_id16, int city_id32, const char *name) |
void | handle_city_options_req (struct player *pplayer, int city_id16, int city_id32, bv_city_options options) |
void | handle_city_rally_point (struct player *pplayer, const struct packet_city_rally_point *packet) |
void handle_city_buy | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32 | ||
) |
Handle buying request. This function does properly check its input as it may come from untrusted source over the network.
Definition at line 436 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_change | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
int | production_kind, | ||
int | production_value | ||
) |
Handle request to change current production.
Definition at line 479 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_change_specialist | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
Specialist_type_id | from, | ||
Specialist_type_id | to | ||
) |
Handle request to change specialist type
Definition at line 101 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_make_specialist | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
int | tile_id | ||
) |
Handle request to change city worker in to specialist.
Definition at line 139 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_make_worker | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
int | tile_id | ||
) |
Handle request to turn specialist in to city worker. Client cannot tell which kind of specialist is to be taken, but this just makes worker from first available specialist.
Definition at line 190 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_name_suggestion_req | ( | struct player * | pplayer, |
int | unit_id16, | ||
int | unit_id32 | ||
) |
Send city_name_suggestion packet back to requesting conn, with suggested name and with same id which was passed in (either unit id for city builder or existing city id for rename, we don't care here).
Definition at line 60 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_options_req | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
bv_city_options | options | ||
) |
Handles a packet from the client that requests the city options for the given city be changed.
Definition at line 566 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_rally_point | ( | struct player * | pplayer, |
const struct packet_city_rally_point * | packet | ||
) |
Handles a request to set city rally point for new units.
Definition at line 590 of file cityhand.c.
Referenced by client_handle_packet(), and server_handle_packet().
void handle_city_refresh | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32 | ||
) |
Handle city refresh request
Definition at line 456 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_rename | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
const char * | name | ||
) |
Handle city rename request packet.
Definition at line 535 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_sell | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
int | build_id | ||
) |
Handle improvement selling request. This function does check its parameters as they may come from untrusted source over the network.
Definition at line 299 of file cityhand.c.
Referenced by server_handle_packet().
void handle_city_worklist | ( | struct player * | pplayer, |
int | city_id16, | ||
int | city_id32, | ||
const struct worklist * | worklist | ||
) |
Handle city worklist update request
Definition at line 412 of file cityhand.c.
Referenced by server_handle_packet().
Handle buying request. Caller is responsible to validate input before passing to this function if it comes from untrusted source.
Definition at line 322 of file cityhand.c.
Referenced by dai_spend_gold(), and handle_city_buy().
void really_handle_city_sell | ( | struct player * | pplayer, |
struct city * | pcity, | ||
struct impr_type * | pimprove | ||
) |
Handle improvement selling request. Caller is responsible to validate input before passing to this function if it comes from untrusted source.
Definition at line 261 of file cityhand.c.
Referenced by handle_city_sell(), and try_to_sell_stuff().