diff options
author | Haru <haru@dotalux.com> | 2018-06-28 03:17:32 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-07-01 21:09:26 +0200 |
commit | a675e06c38ec4e31a2758435a582b58a2199cfc4 (patch) | |
tree | a4bf91c20da434eef97f55f7427ccbf034c5e285 /src/map/trade.c | |
parent | b7e6439f0c788ceacc567fbb017d3c7f09913f78 (diff) | |
download | hercules-a675e06c38ec4e31a2758435a582b58a2199cfc4.tar.gz hercules-a675e06c38ec4e31a2758435a582b58a2199cfc4.tar.bz2 hercules-a675e06c38ec4e31a2758435a582b58a2199cfc4.tar.xz hercules-a675e06c38ec4e31a2758435a582b58a2199cfc4.zip |
Change functions to static where possible (Part 4 - map)
This fixes issues with plugins defining symbols with the same names
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/trade.c b/src/map/trade.c index 316ed14d9..d4f846d19 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -40,13 +40,13 @@ #include <stdio.h> #include <string.h> -struct trade_interface trade_s; +static struct trade_interface trade_s; struct trade_interface *trade; /*========================================== * Initiates a trade request. *------------------------------------------*/ -void trade_traderequest(struct map_session_data *sd, struct map_session_data *target_sd) +static void trade_traderequest(struct map_session_data *sd, struct map_session_data *target_sd) { nullpo_retv(sd); @@ -118,7 +118,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta * Weird enough, the client should only send 3/4 * and the server is the one that can reply 0~2 *------------------------------------------*/ -void trade_tradeack(struct map_session_data *sd, int type) +static void trade_tradeack(struct map_session_data *sd, int type) { struct map_session_data *tsd; nullpo_retv(sd); @@ -192,7 +192,7 @@ void trade_tradeack(struct map_session_data *sd, int type) * @retval 0 The trade can continue * @retval 1 Hack attempt **/ -int impossible_trade_check(struct map_session_data *sd) +static int impossible_trade_check(struct map_session_data *sd) { struct item inventory[MAX_INVENTORY]; char message_to_gm[200]; @@ -253,7 +253,7 @@ int impossible_trade_check(struct map_session_data *sd) /*========================================== * Checks if trade is possible (against zeny limits, inventory limits, etc) *------------------------------------------*/ -int trade_check(struct map_session_data *sd, struct map_session_data *tsd) +static int trade_check(struct map_session_data *sd, struct map_session_data *tsd) { struct item inventory[MAX_INVENTORY]; struct item inventory2[MAX_INVENTORY]; @@ -343,7 +343,7 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) /*========================================== * Adds an item/qty to the trade window *------------------------------------------*/ -void trade_tradeadditem(struct map_session_data *sd, short index, short amount) +static void trade_tradeadditem(struct map_session_data *sd, short index, short amount) { struct map_session_data *target_sd; struct item *item; @@ -438,7 +438,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount) /*========================================== * Adds the specified amount of zeny to the trade window *------------------------------------------*/ -void trade_tradeaddzeny(struct map_session_data* sd, int amount) +static void trade_tradeaddzeny(struct map_session_data *sd, int amount) { struct map_session_data* target_sd; nullpo_retv(sd); @@ -464,7 +464,7 @@ void trade_tradeaddzeny(struct map_session_data* sd, int amount) /*========================================== * 'Ok' button on the trade window is pressed. *------------------------------------------*/ -void trade_tradeok(struct map_session_data *sd) +static void trade_tradeok(struct map_session_data *sd) { struct map_session_data *target_sd; @@ -485,7 +485,7 @@ void trade_tradeok(struct map_session_data *sd) /*========================================== * 'Cancel' is pressed. (or trade was force-canceled by the code) *------------------------------------------*/ -void trade_tradecancel(struct map_session_data *sd) +static void trade_tradecancel(struct map_session_data *sd) { struct map_session_data *target_sd; int trade_i; @@ -545,7 +545,7 @@ void trade_tradecancel(struct map_session_data *sd) /*========================================== * lock sd and tsd trade data, execute the trade, clear, then save players *------------------------------------------*/ -void trade_tradecommit(struct map_session_data *sd) +static void trade_tradecommit(struct map_session_data *sd) { struct map_session_data *tsd; int trade_i; |