summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c2371
1 files changed, 1308 insertions, 1063 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bae079f3e..adc7562e1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -77,10 +77,10 @@
#include <stdarg.h>
#include <time.h>
-struct clif_interface clif_s;
+static struct clif_interface clif_s;
struct clif_interface *clif;
-struct s_packet_db packet_db[MAX_PACKET_DB + 1];
+static struct s_packet_db packet_db[MAX_PACKET_DB + 1];
/* re-usable */
static struct packet_itemlist_normal itemlist_normal;
@@ -96,7 +96,8 @@ static struct packet_npc_market_open npcmarket_open;
//#define DUMP_INVALID_PACKET
//Converts item type in case of pet eggs.
-static inline int itemtype(int type) {
+static inline int itemtype(int type)
+{
switch( type ) {
#if PACKETVER >= 20080827
case IT_WEAPON:
@@ -111,7 +112,8 @@ static inline int itemtype(int type) {
}
}
-static inline void WBUFPOS(uint8* p, unsigned short pos, short x, short y, unsigned char dir) {
+static inline void WBUFPOS(uint8 *p, unsigned short pos, short x, short y, unsigned char dir)
+{
p += pos;
p[0] = (uint8)(x>>2);
p[1] = (uint8)((x<<6) | ((y>>4)&0x3f));
@@ -119,7 +121,8 @@ static inline void WBUFPOS(uint8* p, unsigned short pos, short x, short y, unsig
}
// client-side: x0+=sx0*0.0625-0.5 and y0+=sy0*0.0625-0.5
-static inline void WBUFPOS2(uint8* p, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0) {
+static inline void WBUFPOS2(uint8 *p, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0)
+{
p += pos;
p[0] = (uint8)(x0>>2);
p[1] = (uint8)((x0<<6) | ((y0>>4)&0x3f));
@@ -130,16 +133,19 @@ static inline void WBUFPOS2(uint8* p, unsigned short pos, short x0, short y0, sh
}
#if 0 // Currently unused
-static inline void WFIFOPOS(int fd, unsigned short pos, short x, short y, unsigned char dir) {
+static inline void WFIFOPOS(int fd, unsigned short pos, short x, short y, unsigned char dir)
+{
WBUFPOS(WFIFOP(fd,pos), 0, x, y, dir);
}
#endif // 0
-static inline void WFIFOPOS2(int fd, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0) {
+static inline void WFIFOPOS2(int fd, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0)
+{
WBUFPOS2(WFIFOP(fd,pos), 0, x0, y0, x1, y1, sx0, sy0);
}
-static inline void RBUFPOS(const uint8* p, unsigned short pos, short* x, short* y, unsigned char* dir) {
+static inline void RBUFPOS(const uint8 *p, unsigned short pos, short *x, short *y, unsigned char *dir)
+{
p += pos;
if( x ) {
@@ -155,12 +161,14 @@ static inline void RBUFPOS(const uint8* p, unsigned short pos, short* x, short*
}
}
-static inline void RFIFOPOS(int fd, unsigned short pos, short* x, short* y, unsigned char* dir) {
+static inline void RFIFOPOS(int fd, unsigned short pos, short *x, short *y, unsigned char *dir)
+{
RBUFPOS(RFIFOP(fd,pos), 0, x, y, dir);
}
#if 0 // currently unused
-static inline void RBUFPOS2(const uint8* p, unsigned short pos, short* x0, short* y0, short* x1, short* y1, unsigned char* sx0, unsigned char* sy0) {
+static inline void RBUFPOS2(const uint8 *p, unsigned short pos, short *x0, short *y0, short *x1, short *y1, unsigned char *sx0, unsigned char *sy0)
+{
p += pos;
if( x0 ) {
@@ -187,13 +195,15 @@ static inline void RBUFPOS2(const uint8* p, unsigned short pos, short* x0, short
sy0[0] = ( p[5] & 0x0f ) >> 0;
}
}
-static inline void RFIFOPOS2(int fd, unsigned short pos, short* x0, short* y0, short* x1, short* y1, unsigned char* sx0, unsigned char* sy0) {
+
+static inline void RFIFOPOS2(int fd, unsigned short pos, short *x0, short *y0, short *x1, short *y1, unsigned char *sx0, unsigned char *sy0)
+{
RBUFPOS2(WFIFOP(fd,pos), 0, x0, y0, x1, y1, sx0, sy0);
}
#endif // 0
//To identify disguised characters.
-bool clif_isdisguised(struct block_list* bl)
+static bool clif_isdisguised(struct block_list *bl)
{
struct map_session_data *sd = BL_CAST(BL_PC, bl);
if (sd == NULL || sd->disguise == -1)
@@ -204,7 +214,8 @@ bool clif_isdisguised(struct block_list* bl)
/*==========================================
* Ip setting of map-server
*------------------------------------------*/
-bool clif_setip(const char* ip) {
+static bool clif_setip(const char *ip)
+{
char ip_str[16];
nullpo_retr(false, ip);
clif->map_ip = sockt->host2ip(ip);
@@ -218,7 +229,8 @@ bool clif_setip(const char* ip) {
return true;
}
-bool clif_setbindip(const char* ip) {
+static bool clif_setbindip(const char *ip)
+{
nullpo_retr(false, ip);
clif->bind_ip = sockt->host2ip(ip);
if ( clif->bind_ip ) {
@@ -234,30 +246,35 @@ bool clif_setbindip(const char* ip) {
* Sets map port to 'port'
* is run from map.c upon loading map server configuration
*------------------------------------------*/
-void clif_setport(uint16 port)
+static void clif_setport(uint16 port)
{
clif->map_port = port;
}
+#if 0 // Unused function
/*==========================================
* Returns map server IP
*------------------------------------------*/
-uint32 clif_getip(void)
+static uint32 clif_getip(void)
{
return clif->map_ip;
}
+#endif // 0
+#if 0 // Unused function
/*==========================================
* Returns map port which is set by clif_setport()
*------------------------------------------*/
-uint16 clif_getport(void)
+static uint16 clif_getport(void)
{
return clif->map_port;
}
+#endif // 0
+
/*==========================================
* Updates server ip resolution and returns it
*------------------------------------------*/
-uint32 clif_refresh_ip(void)
+static uint32 clif_refresh_ip(void)
{
uint32 new_ip = sockt->host2ip(clif->map_ip_str);
if ( new_ip && new_ip != clif->map_ip ) {
@@ -268,7 +285,7 @@ uint32 clif_refresh_ip(void)
return 0;
}
-unsigned char clif_bl_type(struct block_list *bl)
+static unsigned char clif_bl_type(struct block_list *bl)
{
#if PACKETVER >= 20071106
struct view_data *vd;
@@ -327,7 +344,8 @@ unsigned char clif_bl_type(struct block_list *bl)
* - AREA_WOS (AREA WITHOUT SELF) : Not run for self
* - AREA_CHAT_WOC : Everyone in the area of your chat without a chat
*------------------------------------------*/
-int clif_send_sub(struct block_list *bl, va_list ap) {
+static int clif_send_sub(struct block_list *bl, va_list ap)
+{
struct block_list *src_bl;
struct map_session_data *sd;
void *buf;
@@ -383,7 +401,7 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
return clif->send_actual(fd, buf, len);
}
-int clif_send_actual(int fd, void *buf, int len)
+static int clif_send_actual(int fd, void *buf, int len)
{
nullpo_retr(0, buf);
WFIFOHEAD(fd, len);
@@ -407,7 +425,8 @@ int clif_send_actual(int fd, void *buf, int len)
* Packet Delegation (called on all packets that require data to be sent to more than one client)
* functions that are sent solely to one use whose ID it posses use WFIFOSET
*------------------------------------------*/
-bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target type) {
+static bool clif_send(const void *buf, int len, struct block_list *bl, enum send_target type)
+{
int i;
struct map_session_data *sd, *tsd;
struct party_data *p = NULL;
@@ -694,7 +713,7 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target
/// Notifies the client, that it's connection attempt was accepted.
/// 0073 <start time>.L <position>.3B <x size>.B <y size>.B (ZC_ACCEPT_ENTER)
/// 02eb <start time>.L <position>.3B <x size>.B <y size>.B <font>.W (ZC_ACCEPT_ENTER2)
-void clif_authok(struct map_session_data *sd)
+static void clif_authok(struct map_session_data *sd)
{
struct packet_authok p;
@@ -722,7 +741,7 @@ void clif_authok(struct map_session_data *sd)
/// 2 = mobile - out of available time
/// 3 = mobile - already logged in
/// 4 = mobile - waiting state
-void clif_authrefuse(int fd, uint8 error_code)
+static void clif_authrefuse(int fd, uint8 error_code)
{
WFIFOHEAD(fd,packet_len(0x74));
WFIFOW(fd,0) = 0x74;
@@ -765,7 +784,7 @@ void clif_authrefuse(int fd, uint8 error_code)
/// 115 = You are in game connection ban period.
/// ? = disconnected -> MsgStringTable[3]
// TODO: type enum
-void clif_authfail_fd(int fd, int type)
+static void clif_authfail_fd(int fd, int type)
{
if (!fd || !sockt->session[fd] || sockt->session[fd]->func_parse != clif->parse) //clif_authfail should only be invoked on players!
return;
@@ -783,7 +802,8 @@ void clif_authfail_fd(int fd, int type)
/// type:
/// 1 = disconnect, char-select
/// ? = nothing
-void clif_charselectok(int id, uint8 ok) {
+static void clif_charselectok(int id, uint8 ok)
+{
struct map_session_data* sd;
int fd;
@@ -800,7 +820,8 @@ void clif_charselectok(int id, uint8 ok) {
/// Makes an item appear on the ground.
/// 009e <id>.L <name id>.W <identified>.B <x>.W <y>.W <subX>.B <subY>.B <amount>.W (ZC_ITEM_FALL_ENTRY)
/// 084b (ZC_ITEM_FALL_ENTRY4)
-void clif_dropflooritem(struct flooritem_data* fitem) {
+static void clif_dropflooritem(struct flooritem_data *fitem)
+{
struct packet_dropflooritem p;
int view;
@@ -835,7 +856,7 @@ void clif_dropflooritem(struct flooritem_data* fitem) {
/// Makes an item disappear from the ground.
/// 00a1 <id>.L (ZC_ITEM_DISAPPEAR)
-void clif_clearflooritem(struct flooritem_data *fitem, int fd)
+static void clif_clearflooritem(struct flooritem_data *fitem, int fd)
{
unsigned char buf[16];
@@ -861,7 +882,7 @@ void clif_clearflooritem(struct flooritem_data *fitem, int fd)
/// 2 = logged out
/// 3 = teleport
/// 4 = trickdead
-void clif_clearunit_single(int id, clr_type type, int fd)
+static void clif_clearunit_single(int id, clr_type type, int fd)
{
WFIFOHEAD(fd, packet_len(0x80));
WFIFOW(fd,0) = 0x80;
@@ -878,7 +899,7 @@ void clif_clearunit_single(int id, clr_type type, int fd)
/// 2 = logged out
/// 3 = teleport
/// 4 = trickdead
-void clif_clearunit_area(struct block_list* bl, clr_type type)
+static void clif_clearunit_area(struct block_list *bl, clr_type type)
{
unsigned char buf[8];
@@ -899,14 +920,16 @@ void clif_clearunit_area(struct block_list* bl, clr_type type)
/// Used to make monsters with player-sprites disappear after dying
/// like normal monsters, because the client does not remove those
/// automatically.
-int clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) {
+static int clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data)
+{
struct block_list *bl = (struct block_list *)data;
clif->clearunit_area(bl, (clr_type) id);
ers_free(clif->delay_clearunit_ers,bl);
return 0;
}
-void clif_clearunit_delayed(struct block_list* bl, clr_type type, int64 tick) {
+static void clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick)
+{
struct block_list *tbl;
nullpo_retv(bl);
@@ -916,7 +939,7 @@ void clif_clearunit_delayed(struct block_list* bl, clr_type type, int64 tick) {
}
/// Gets weapon view info from sd's inventory_data and points (*rhand,*lhand)
-void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, unsigned short *lhand)
+static void clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand)
{
nullpo_retv(sd);
nullpo_retv(rhand);
@@ -956,7 +979,8 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
}
//To make the assignation of the level based on limits clearer/easier. [Skotlex]
-static int clif_setlevel_sub(int lv) {
+static int clif_setlevel_sub(int lv)
+{
if( lv < battle_config.max_lv ) {
;
} else if( lv < battle_config.aura_lv ) {
@@ -968,7 +992,8 @@ static int clif_setlevel_sub(int lv) {
return lv;
}
-static int clif_setlevel(struct block_list* bl) {
+static int clif_setlevel(struct block_list *bl)
+{
int lv = status->get_lv(bl);
nullpo_retr(0, bl);
if( battle_config.client_limit_unit_lv&bl->type )
@@ -981,8 +1006,10 @@ static int clif_setlevel(struct block_list* bl) {
}
return lv;
}
+
/* for 'packetver < 20091103' 0x78 non-pc-looking unit handling */
-void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, enum send_target target) {
+static void clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, enum send_target target)
+{
#if PACKETVER < 20091103
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
@@ -1034,10 +1061,12 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en
return;
#endif
}
+
/*==========================================
* Prepares 'unit standing' packet
*------------------------------------------*/
-void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enum send_target target) {
+static void clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, enum send_target target)
+{
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
struct view_data* vd = status->get_viewdata(bl);
@@ -1143,8 +1172,10 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
}
}
+
/* for 'packetver < 20091103' 0x7c non-pc-looking unit handling */
-void clif_spawn_unit2(struct block_list* bl, enum send_target target) {
+static void clif_spawn_unit2(struct block_list *bl, enum send_target target)
+{
#if PACKETVER < 20091103
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
@@ -1190,7 +1221,9 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) {
return;
#endif
}
-void clif_spawn_unit(struct block_list* bl, enum send_target target) {
+
+static void clif_spawn_unit(struct block_list *bl, enum send_target target)
+{
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
struct view_data* vd = status->get_viewdata(bl);
@@ -1301,7 +1334,8 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
/*==========================================
* Prepares 'unit walking' packet
*------------------------------------------*/
-void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, struct unit_data* ud, enum send_target target) {
+static void clif_set_unit_walking(struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target target)
+{
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
struct view_data* vd = status->get_viewdata(bl);
@@ -1402,7 +1436,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
/// 01b0 <id>.L <type>.B <value>.L
/// type:
/// unused
-void clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd)
+static void clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd)
{
nullpo_retv(bl);
@@ -1424,7 +1458,8 @@ void clif_class_change(struct block_list *bl, int class_, int type, struct map_s
/// Notifies the client of an object's spirits.
/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
-void clif_spiritball_single(int fd, struct map_session_data *sd) {
+static void clif_spiritball_single(int fd, struct map_session_data *sd)
+{
nullpo_retv(sd);
WFIFOHEAD(fd, packet_len(0x1e1));
WFIFOW(fd,0)=0x1e1;
@@ -1436,7 +1471,7 @@ void clif_spiritball_single(int fd, struct map_session_data *sd) {
/*==========================================
* Kagerou/Oboro amulet spirit
*------------------------------------------*/
-void clif_charm_single(int fd, struct map_session_data *sd)
+static void clif_charm_single(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20110809
nullpo_retv(sd);
@@ -1453,7 +1488,8 @@ void clif_charm_single(int fd, struct map_session_data *sd)
* Run when player changes map / refreshes
* Tells its client to display all weather settings being used by this map
*------------------------------------------*/
-void clif_weather_check(struct map_session_data *sd) {
+static void clif_weather_check(struct map_session_data *sd)
+{
int16 m;
int fd;
@@ -1478,10 +1514,11 @@ void clif_weather_check(struct map_session_data *sd) {
if (map->list[m].flag.leaves)
clif->specialeffect_single(&sd->bl, 333, fd);
}
+
/**
* Run when the weather on a map changes, throws all players in map id 'm' to clif_weather_check function
**/
-void clif_weather(int16 m)
+static void clif_weather(int16 m)
{
struct s_mapiterator* iter;
struct map_session_data *sd=NULL;
@@ -1493,10 +1530,11 @@ void clif_weather(int16 m)
}
mapit->free(iter);
}
+
/**
* Main function to spawn a unit on the client (player/mob/pet/etc)
**/
-bool clif_spawn(struct block_list *bl)
+static bool clif_spawn(struct block_list *bl)
{
struct view_data *vd;
@@ -1574,7 +1612,8 @@ bool clif_spawn(struct block_list *bl)
/// Sends information about owned homunculus to the client (ZC_PROPERTY_HOMUN). [orn]
/// 022e <name>.24B <modified>.B <level>.W <hunger>.W <intimacy>.W <equip id>.W <atk>.W <matk>.W <hit>.W <crit>.W <def>.W <mdef>.W <flee>.W <aspd>.W <hp>.W <max hp>.W <sp>.W <max sp>.W <exp>.L <max exp>.L <skill points>.W <atk range>.W
-void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {
+static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
+{
struct status_data *hstatus;
unsigned char buf[128];
enum homun_type htype;
@@ -1675,7 +1714,7 @@ void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
/// 2 = hunger
/// 3 = accessory?
/// ? = ignored
-void clif_send_homdata(struct map_session_data *sd, int state, int param)
+static void clif_send_homdata(struct map_session_data *sd, int state, int param)
{
int fd;
@@ -1696,7 +1735,8 @@ void clif_send_homdata(struct map_session_data *sd, int state, int param)
}
/// Prepares and sends homun related information [orn]
-void clif_homskillinfoblock(struct map_session_data *sd) {
+static void clif_homskillinfoblock(struct map_session_data *sd)
+{
struct homun_data *hd;
int fd;
int i,j;
@@ -1737,7 +1777,9 @@ void clif_homskillinfoblock(struct map_session_data *sd) {
return;
}
-void clif_homskillup(struct map_session_data *sd, uint16 skill_id) { //[orn]
+//[orn]
+static void clif_homskillup(struct map_session_data *sd, uint16 skill_id)
+{
struct homun_data *hd;
int fd, idx;
nullpo_retv(sd);
@@ -1757,7 +1799,7 @@ void clif_homskillup(struct map_session_data *sd, uint16 skill_id) { //[orn]
WFIFOSET(fd,packet_len(0x239));
}
-void clif_hom_food(struct map_session_data *sd,int foodid,int fail)
+static void clif_hom_food(struct map_session_data *sd, int foodid, int fail)
{
int fd;
nullpo_retv(sd);
@@ -1774,7 +1816,7 @@ void clif_hom_food(struct map_session_data *sd,int foodid,int fail)
/// Notifies the client, that it is walking (ZC_NOTIFY_PLAYERMOVE).
/// 0087 <walk start time>.L <walk data>.6B
-void clif_walkok(struct map_session_data *sd)
+static void clif_walkok(struct map_session_data *sd)
{
int fd;
@@ -1787,7 +1829,8 @@ void clif_walkok(struct map_session_data *sd)
WFIFOSET(fd,packet_len(0x87));
}
-void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) {
+static void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud)
+{
#ifdef ANTI_MAYAP_CHEAT
struct status_change *sc = NULL;
#endif
@@ -1841,7 +1884,7 @@ void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *u
/// Notifies clients in an area, that an other visible object is walking (ZC_NOTIFY_PLAYERMOVE).
/// 0086 <id>.L <walk data>.6B <walk start time>.L
/// Note: unit must not be self
-void clif_move(struct unit_data *ud)
+static void clif_move(struct unit_data *ud)
{
unsigned char buf[16];
struct view_data *vd;
@@ -1895,7 +1938,8 @@ void clif_move(struct unit_data *ud)
/*==========================================
* Delays the map->quit of a player after they are disconnected. [Skotlex]
*------------------------------------------*/
-int clif_delayquit(int tid, int64 tick, int id, intptr_t data) {
+static int clif_delayquit(int tid, int64 tick, int id, intptr_t data)
+{
struct map_session_data *sd = NULL;
//Remove player from map server
@@ -1907,7 +1951,8 @@ int clif_delayquit(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
*
*------------------------------------------*/
-void clif_quitsave(int fd, struct map_session_data *sd) {
+static void clif_quitsave(int fd, struct map_session_data *sd)
+{
nullpo_retv(sd);
if (!battle_config.prevent_logout ||
DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout)
@@ -1923,7 +1968,8 @@ void clif_quitsave(int fd, struct map_session_data *sd) {
/// Notifies the client of a position change to coordinates on given map (ZC_NPCACK_MAPMOVE).
/// 0091 <map name>.16B <x>.W <y>.W
-void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
+static void clif_changemap(struct map_session_data *sd, short m, int x, int y)
+{
int fd;
nullpo_retv(sd);
fd = sd->fd;
@@ -1938,7 +1984,7 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
/// Notifies the client of a position change (on air ship) to coordinates on given map (ZC_AIRSHIP_MAPMOVE).
/// 0A4B <map name>.16B <x>.W <y>.W
-void clif_changemap_airship(struct map_session_data *sd, short m, int x, int y)
+static void clif_changemap_airship(struct map_session_data *sd, short m, int x, int y)
{
#if PACKETVER_MAIN_NUM >= 20180620 || PACKETVER_RE_NUM >= 20180321 || PACKETVER_ZERO_NUM >= 20171027
// [4144] this packet is not used yet by kro, but it here
@@ -1958,7 +2004,8 @@ void clif_changemap_airship(struct map_session_data *sd, short m, int x, int y)
/// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
/// 0ac7 <map name>.16B <x>.W <y>.W <ip>.L <port>.W <zero>.128B
-void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
+static void clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
+{
int fd;
#if PACKETVER >= 20170315
const int cmd = 0xac7;
@@ -1980,7 +2027,7 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index,
/// Notifies the client of a position change (with air ship) to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
/// 0a4c <map name>.16B <x>.W <y>.W <ip>.L <port>.W
-void clif_changemapserver_airship(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
+static void clif_changemapserver_airship(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
{
#if (PACKETVER_MAIN_NUM >= 20180620) || (PACKETVER_RE_NUM >= 20180321) || (PACKETVER_ZERO_NUM >= 20171027)
// [4144] this packet is not used yet by kro, but it here
@@ -2000,7 +2047,7 @@ void clif_changemapserver_airship(struct map_session_data* sd, unsigned short ma
#endif
}
-void clif_blown(struct block_list *bl)
+static void clif_blown(struct block_list *bl)
{
//Aegis packets says fixpos, but it's unsure whether slide works better or not.
nullpo_retv(bl);
@@ -2012,7 +2059,8 @@ void clif_blown(struct block_list *bl)
/// isn't walkable, the char doesn't move at all. If the char is
/// sitting it will stand up (ZC_STOPMOVE).
/// 0088 <id>.L <x>.W <y>.W
-void clif_fixpos(struct block_list *bl) {
+static void clif_fixpos(struct block_list *bl)
+{
unsigned char buf[10];
nullpo_retv(bl);
@@ -2031,7 +2079,7 @@ void clif_fixpos(struct block_list *bl) {
/// Displays the buy/sell dialog of an NPC shop (ZC_SELECT_DEALTYPE).
/// 00c4 <shop id>.L
-void clif_npcbuysell(struct map_session_data* sd, int id)
+static void clif_npcbuysell(struct map_session_data *sd, int id)
{
int fd;
@@ -2046,7 +2094,8 @@ void clif_npcbuysell(struct map_session_data* sd, int id)
/// Presents list of items, that can be bought in an NPC shop (ZC_PC_PURCHASE_ITEMLIST).
/// 00c6 <packet len>.W { <price>.L <discount price>.L <item type>.B <name id>.W }*
-void clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
+static void clif_buylist(struct map_session_data *sd, struct npc_data *nd)
+{
struct npc_item_list *shop = NULL;
unsigned short shop_size = 0;
int fd,i,c;
@@ -2088,7 +2137,7 @@ void clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
/// Presents list of items, that can be sold to an NPC shop (ZC_PC_SELL_ITEMLIST).
/// 00c7 <packet len>.W { <index>.W <price>.L <overcharge price>.L }*
-void clif_selllist(struct map_session_data *sd)
+static void clif_selllist(struct map_session_data *sd)
{
int fd,i,c=0,val;
@@ -2131,7 +2180,7 @@ void clif_selllist(struct map_session_data *sd)
/// - set npcid of dialog window (0 by default)
/// - if set to clear on next mes, clear contents
/// - append this text
-void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
+static void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
{
int fd, slen;
#ifdef SCRIPT_MES_STRIP_LINEBREAK
@@ -2176,7 +2225,7 @@ void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
/// - 00B9 <npcid of dialog window>.L
/// - set to clear on next mes
/// - remove 'next' button
-void clif_scriptnext(struct map_session_data *sd, int npcid)
+static void clif_scriptnext(struct map_session_data *sd, int npcid)
{
int fd;
@@ -2204,7 +2253,7 @@ void clif_scriptnext(struct map_session_data *sd, int npcid)
/// - close the dialog window
/// - close the menu window
/// - 0146 <npcid of dialog window>.L
-void clif_scriptclose(struct map_session_data *sd, int npcid)
+static void clif_scriptclose(struct map_session_data *sd, int npcid)
{
int fd;
@@ -2220,7 +2269,8 @@ void clif_scriptclose(struct map_session_data *sd, int npcid)
/*==========================================
*
*------------------------------------------*/
-void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
+static void clif_sendfakenpc(struct map_session_data *sd, int npcid)
+{
unsigned char *buf;
int fd;
@@ -2263,7 +2313,7 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
/// WARNING: the 'cancel' button closes other windows besides the dialog window and the menu window.
/// Which suggests their have intertwined behavior. (probably the mouse targeting)
/// TODO investigate behavior of other windows [FlavioJS]
-void clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes)
+static void clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes)
{
int fd, slen;
struct block_list *bl = NULL;
@@ -2299,7 +2349,8 @@ void clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes)
/// - if npcid exists in the client:
/// - 0143 <npcid of inputnum window>.L <atoi(text)>.L
/// - close inputnum window
-void clif_scriptinput(struct map_session_data *sd, int npcid) {
+static void clif_scriptinput(struct map_session_data *sd, int npcid)
+{
int fd;
struct block_list *bl = NULL;
@@ -2328,7 +2379,8 @@ void clif_scriptinput(struct map_session_data *sd, int npcid) {
/// - if npcid is 0 or npcid exists in the client:
/// - 01d5 <packetlen>.W <npcid of inputstr window>.L <text>.?B
/// - close inputstr window
-void clif_scriptinputstr(struct map_session_data *sd, int npcid) {
+static void clif_scriptinputstr(struct map_session_data *sd, int npcid)
+{
int fd;
struct block_list *bl = NULL;
@@ -2356,7 +2408,7 @@ void clif_scriptinputstr(struct map_session_data *sd, int npcid) {
/// 2 = remove mark
/// color:
/// 0x00RRGGBB
-void clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color)
+static void clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color)
{
int fd;
@@ -2384,7 +2436,7 @@ void clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, in
/// 3 = middle of screen, inside a movable window
/// 4 = middle of screen, movable with a close button, chrome-less
/// 255 = hide
-void clif_cutin(struct map_session_data* sd, const char* image, int type)
+static void clif_cutin(struct map_session_data *sd, const char *image, int type)
{
int fd;
@@ -2401,7 +2453,8 @@ void clif_cutin(struct map_session_data* sd, const char* image, int type)
/*==========================================
* Fills in card data from the given item and into the buffer. [Skotlex]
*------------------------------------------*/
-void clif_addcards(unsigned char* buf, struct item* item) {
+static void clif_addcards(unsigned char *buf, struct item *item)
+{
int i=0,j;
nullpo_retv(buf);
if( item == NULL ) { //Blank data
@@ -2451,7 +2504,8 @@ void clif_addcards(unsigned char* buf, struct item* item) {
WBUFW(buf,6) = item->card[i];
}
-void clif_addcards2(unsigned short *cards, struct item* item) {
+static void clif_addcards2(unsigned short *cards, struct item *item)
+{
int i=0,j;
nullpo_retv(cards);
if( item == NULL ) { //Blank data
@@ -2509,7 +2563,7 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
* @param buf[in,out] The buffer to write to. The pointer must be valid and initialized.
* @param item[in] The source item.
*/
- int clif_add_item_options(struct ItemOptions *buf, const struct item *it)
+static int clif_add_item_options(struct ItemOptions *buf, const struct item *it)
{
int i = 0, j = 0, total_options = 0;
@@ -2542,7 +2596,7 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
/// 0990 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V5)
/// 0a0c <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V6)
/// 0a37 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W <favorite>.B <view id>.W (ZC_ITEM_PICKUP_ACK_V7)
-void clif_additem(struct map_session_data *sd, int n, int amount, int fail)
+static void clif_additem(struct map_session_data *sd, int n, int amount, int fail)
{
struct packet_additem p;
nullpo_retv(sd);
@@ -2596,7 +2650,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail)
/// Notifies the client, that an inventory item was deleted or dropped (ZC_ITEM_THROW_ACK).
/// 00af <index>.W <amount>.W
-void clif_dropitem(struct map_session_data *sd,int n,int amount)
+static void clif_dropitem(struct map_session_data *sd, int n, int amount)
{
int fd;
@@ -2613,7 +2667,7 @@ void clif_dropitem(struct map_session_data *sd,int n,int amount)
/// Notifies the client, that an inventory item was deleted (ZC_DELETE_ITEM_FROM_BODY).
/// 07fa <delete type>.W <index>.W <amount>.W
/// delete type: @see enum delitem_reason
-void clif_delitem(struct map_session_data *sd,int n,int amount, short reason)
+static void clif_delitem(struct map_session_data *sd, int n, int amount, short reason)
{
#if PACKETVER < 20091117
clif->dropitem(sd,n,amount);
@@ -2637,7 +2691,8 @@ void clif_delitem(struct map_session_data *sd,int n,int amount, short reason)
// Equip is >= 0 for equippable items (holds the equip-point, is 0 for pet
// armor/egg) -1 for stackable items, -2 for stackable items where arrows must send in the equip-point.
// look like unused, not adding checks
-void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip) {
+static void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip)
+{
if (id->view_id > 0)
WBUFW(buf,n)=id->view_id;
else
@@ -2659,7 +2714,7 @@ void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *
}
-void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *it, struct item_data *id, int eqp_pos)
+static void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *it, struct item_data *id, int eqp_pos)
{
nullpo_retv(p);
nullpo_retv(it);
@@ -2710,7 +2765,8 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *it, struc
#endif
}
-void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id) {
+static void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id)
+{
nullpo_retv(p);
nullpo_retv(i);
nullpo_retv(id);
@@ -2746,7 +2802,8 @@ void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, stru
#endif
}
-void clif_inventorylist(struct map_session_data *sd) {
+static void clif_inventorylist(struct map_session_data *sd)
+{
int i, normal = 0, equip = 0;
nullpo_retv(sd);
@@ -2789,7 +2846,8 @@ void clif_inventorylist(struct map_session_data *sd) {
}
//Required when items break/get-repaired. Only sends equippable item list.
-void clif_equiplist(struct map_session_data *sd) {
+static void clif_equiplist(struct map_session_data *sd)
+{
int i, equip = 0;
nullpo_retv(sd);
@@ -2820,7 +2878,8 @@ void clif_equiplist(struct map_session_data *sd) {
#endif
}
-void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length) {
+static void clif_storagelist(struct map_session_data *sd, struct item *items, int items_length)
+{
int i = 0;
struct item_data *id;
@@ -2868,7 +2927,8 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
}
-void clif_cartlist(struct map_session_data *sd) {
+static void clif_cartlist(struct map_session_data *sd)
+{
int i, normal = 0, equip = 0;
struct item_data *id;
@@ -2905,7 +2965,7 @@ void clif_cartlist(struct map_session_data *sd) {
/// Client behavior:
/// Closes the cart storage and removes all it's items from memory.
/// The Num & Weight values of the cart are left untouched and the cart is NOT removed.
-void clif_clearcart(int fd)
+static void clif_clearcart(int fd)
{
WFIFOHEAD(fd, packet_len(0x12b));
WFIFOW(fd,0) = 0x12b;
@@ -2915,7 +2975,7 @@ void clif_clearcart(int fd)
/// Guild XY locators (ZC_NOTIFY_POSITION_TO_GUILDM) [Valaris]
/// 01eb <account id>.L <x>.W <y>.W
-void clif_guild_xy(struct map_session_data *sd)
+static void clif_guild_xy(struct map_session_data *sd)
{
unsigned char buf[10];
@@ -2931,7 +2991,7 @@ void clif_guild_xy(struct map_session_data *sd)
/*==========================================
* Sends x/y dot to a single fd. [Skotlex]
*------------------------------------------*/
-void clif_guild_xy_single(int fd, struct map_session_data *sd)
+static void clif_guild_xy_single(int fd, struct map_session_data *sd)
{
if( sd->bg_id )
return;
@@ -2946,7 +3006,7 @@ void clif_guild_xy_single(int fd, struct map_session_data *sd)
}
// Guild XY locators [Valaris]
-void clif_guild_xy_remove(struct map_session_data *sd)
+static void clif_guild_xy_remove(struct map_session_data *sd)
{
unsigned char buf[10];
@@ -2962,7 +3022,7 @@ void clif_guild_xy_remove(struct map_session_data *sd)
/*==========================================
*
*------------------------------------------*/
-int clif_hpmeter_sub(struct block_list *bl, va_list ap)
+static int clif_hpmeter_sub(struct block_list *bl, va_list ap)
{
#if PACKETVER < 20100126
const int cmd = 0x106;
@@ -3004,7 +3064,8 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap)
* Server tells all players that are allowed to view HP bars
* and are nearby 'sd' that 'sd' hp bar was updated.
*------------------------------------------*/
-int clif_hpmeter(struct map_session_data *sd) {
+static int clif_hpmeter(struct map_session_data *sd)
+{
nullpo_ret(sd);
map->foreachinarea(clif->hpmeter_sub, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd);
return 0;
@@ -3018,7 +3079,7 @@ int clif_hpmeter(struct map_session_data *sd) {
/// 013a <atk range>.W (ZC_ATTACK_RANGE)
/// 0141 <status id>.L <base status>.L <plus status>.L (ZC_COUPLESTATUS)
/// TODO: Extract individual packets.
-void clif_updatestatus(struct map_session_data *sd,int type)
+static void clif_updatestatus(struct map_session_data *sd, int type)
{
int fd,len;
@@ -3274,7 +3335,7 @@ void clif_updatestatus(struct map_session_data *sd,int type)
/// Notifies client of a parameter change of an another player (ZC_PAR_CHANGE_USER).
/// 01ab <account id>.L <var id>.W <value>.L
-void clif_changestatus(struct map_session_data* sd,int type,int val)
+static void clif_changestatus(struct map_session_data *sd, int type, int val)
{
unsigned char buf[12];
@@ -3298,7 +3359,7 @@ void clif_changestatus(struct map_session_data* sd,int type,int val)
}
/// Updates sprite/style properties of an object.
-void clif_changelook(struct block_list *bl,int type,int val)
+static void clif_changelook(struct block_list *bl, int type, int val)
{
struct map_session_data* sd;
struct status_change* sc;
@@ -3451,14 +3512,14 @@ void clif_changelook(struct block_list *bl,int type,int val)
}
//Sends a change-base-look packet required for traps as they are triggered.
-void clif_changetraplook(struct block_list *bl,int val)
+static void clif_changetraplook(struct block_list *bl, int val)
{
clif->sendlook(bl, bl->id, LOOK_BASE, val, 0, AREA);
}
/// 00c3 <id>.L <type>.B <value>.B (ZC_SPRITE_CHANGE)
/// 01d7 <id>.L <type>.B <value>.L (ZC_SPRITE_CHANGE2)
-void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target)
+static void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target)
{
unsigned char buf[32];
#if PACKETVER < 4
@@ -3478,7 +3539,7 @@ void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, e
}
//For the stupid cloth-dye bug. Resends the given view data to the area specified by bl.
-void clif_refreshlook(struct block_list *bl,int id,int type,int val,enum send_target target)
+static void clif_refreshlook(struct block_list *bl, int id, int type, int val, enum send_target target)
{
clif->sendlook(bl, id, type, val, 0, target);
}
@@ -3488,7 +3549,8 @@ void clif_refreshlook(struct block_list *bl,int id,int type,int val,enum send_ta
/// <int>.B <need int>.B <dex>.B <need dex>.B <luk>.B <need luk>.B <atk>.W <atk2>.W
/// <matk min>.W <matk max>.W <def>.W <def2>.W <mdef>.W <mdef2>.W <hit>.W
/// <flee>.W <flee2>.W <crit>.W <aspd>.W <aspd2>.W
-void clif_initialstatus(struct map_session_data *sd) {
+static void clif_initialstatus(struct map_session_data *sd)
+{
int fd, mdef2;
unsigned char *buf;
@@ -3548,7 +3610,7 @@ void clif_initialstatus(struct map_session_data *sd) {
/// Marks an ammunition item in inventory as equipped (ZC_EQUIP_ARROW).
/// 013c <index>.W
-void clif_arrowequip(struct map_session_data *sd,int val)
+static void clif_arrowequip(struct map_session_data *sd, int val)
{
int fd;
@@ -3573,7 +3635,7 @@ void clif_arrowequip(struct map_session_data *sd,int val)
/// 3 = assassin, baby_assassin, assassin_cross => MsgStringTable[1040]="You have equipped throwing daggers."
/// gunslinger => MsgStringTable[1175]="Bullets have been equipped."
/// NOT ninja => MsgStringTable[245]="Ammunition has been equipped."
-void clif_arrow_fail(struct map_session_data *sd,int type)
+static void clif_arrow_fail(struct map_session_data *sd, int type)
{
int fd;
@@ -3588,7 +3650,7 @@ void clif_arrow_fail(struct map_session_data *sd,int type)
/// Presents a list of items, that can be processed by Arrow Crafting (ZC_MAKINGARROW_LIST).
/// 01ad <packet len>.W { <name id>.W }*
-void clif_arrow_create_list(struct map_session_data *sd)
+static void clif_arrow_create_list(struct map_session_data *sd)
{
int i, c;
int fd;
@@ -3627,7 +3689,7 @@ void clif_arrow_create_list(struct map_session_data *sd)
/// result:
/// 0 = failure
/// 1 = success
-void clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
+static void clif_statusupack(struct map_session_data *sd, int type, int ok, int val)
{
int fd;
@@ -3645,7 +3707,8 @@ void clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
/// Notifies the client about the result of a request to equip an item (ZC_REQ_WEAR_EQUIP_ACK).
/// 00aa <index>.W <equip location>.W <result>.B
/// 00aa <index>.W <equip location>.W <view id>.W <result>.B (PACKETVER >= 20100629)
-void clif_equipitemack(struct map_session_data *sd,int n,int pos,enum e_EQUIP_ITEM_ACK result) {
+static void clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result)
+{
struct packet_equipitem_ack p;
nullpo_retv(sd);
@@ -3666,7 +3729,8 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,enum e_EQUIP_IT
/// Notifies the client about the result of a request to take off an item (ZC_REQ_TAKEOFF_EQUIP_ACK).
/// 00ac <index>.W <equip location>.W <result>.B
-void clif_unequipitemack(struct map_session_data *sd,int n,int pos,enum e_UNEQUIP_ITEM_ACK result) {
+static void clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result)
+{
struct packet_unequipitem_ack p;
nullpo_retv(sd);
@@ -3692,7 +3756,7 @@ void clif_unequipitemack(struct map_session_data *sd,int n,int pos,enum e_UNEQUI
/// 7 = base level up (super novice)
/// 8 = job level up (super novice)
/// 9 = base level up (taekwon)
-void clif_misceffect(struct block_list* bl,int type)
+static void clif_misceffect(struct block_list *bl, int type)
{
unsigned char buf[32];
@@ -3708,7 +3772,7 @@ void clif_misceffect(struct block_list* bl,int type)
/// Notifies clients in the area of a state change.
/// 0119 <id>.L <body state>.W <health state>.W <effect state>.W <pk mode>.B (ZC_STATE_CHANGE)
/// 0229 <id>.L <body state>.W <health state>.W <effect state>.L <pk mode>.B (ZC_STATE_CHANGE3)
-void clif_changeoption(struct block_list* bl)
+static void clif_changeoption(struct block_list *bl)
{
unsigned char buf[32];
struct status_change *sc;
@@ -3759,7 +3823,8 @@ void clif_changeoption(struct block_list* bl)
/// Displays status change effects on NPCs/monsters (ZC_NPC_SHOWEFST_UPDATE).
/// 028a <id>.L <effect state>.L <level>.L <showEFST>.L
-void clif_changeoption2(struct block_list* bl) {
+static void clif_changeoption2(struct block_list *bl)
+{
unsigned char buf[20];
struct status_change *sc;
@@ -3786,7 +3851,7 @@ void clif_changeoption2(struct block_list* bl) {
/// Notifies the client about the result of an item use request.
/// 00a8 <index>.W <amount>.W <result>.B (ZC_USE_ITEM_ACK)
/// 01c8 <index>.W <name id>.W <id>.L <amount>.W <result>.B (ZC_USE_ITEM_ACK2)
-void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok)
+static void clif_useitemack(struct map_session_data *sd, int index, int amount, bool ok)
{
nullpo_retv(sd);
@@ -3832,7 +3897,7 @@ void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok)
/// 1 = Room limit exceeded
/// 2 = Same room already exists
// TODO: Flag enum
-void clif_createchat(struct map_session_data* sd, int flag)
+static void clif_createchat(struct map_session_data *sd, int flag)
{
int fd;
@@ -3852,7 +3917,7 @@ void clif_createchat(struct map_session_data* sd, int flag)
/// 1 = public
/// 2 = arena (npc waiting room)
/// 3 = PK zone (non-clickable)
-void clif_dispchat(struct chat_data *cd, int fd)
+static void clif_dispchat(struct chat_data *cd, int fd)
{
unsigned char buf[128];
uint8 type;
@@ -3892,7 +3957,7 @@ void clif_dispchat(struct chat_data *cd, int fd)
/// 1 = public
/// 2 = arena (npc waiting room)
/// 3 = PK zone (non-clickable)
-void clif_changechatstatus(struct chat_data *cd)
+static void clif_changechatstatus(struct chat_data *cd)
{
unsigned char buf[128];
uint8 type;
@@ -3921,7 +3986,7 @@ void clif_changechatstatus(struct chat_data *cd)
/// Removes the chatroom (ZC_DESTROY_ROOM).
/// 00d8 <chat id>.L
-void clif_clearchat(struct chat_data *cd,int fd)
+static void clif_clearchat(struct chat_data *cd, int fd)
{
unsigned char buf[32];
@@ -3949,7 +4014,7 @@ void clif_clearchat(struct chat_data *cd,int fd)
/// 5 = too low level
/// 6 = too high level
/// 7 = unsuitable job class
-void clif_joinchatfail(struct map_session_data *sd,int flag)
+static void clif_joinchatfail(struct map_session_data *sd, int flag)
{
int fd;
@@ -3968,7 +4033,7 @@ void clif_joinchatfail(struct map_session_data *sd,int flag)
/// role:
/// 0 = owner (menu)
/// 1 = normal
-void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
+static void clif_joinchatok(struct map_session_data *sd, struct chat_data *cd)
{
int fd;
int i,t;
@@ -4004,7 +4069,7 @@ void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
/// Notifies clients in a chat about a new member (ZC_MEMBER_NEWENTRY).
/// 00dc <users>.W <name>.24B
-void clif_addchat(struct chat_data* cd,struct map_session_data *sd)
+static void clif_addchat(struct chat_data *cd, struct map_session_data *sd)
{
unsigned char buf[32];
@@ -4022,7 +4087,7 @@ void clif_addchat(struct chat_data* cd,struct map_session_data *sd)
/// role:
/// 0 = owner (menu)
/// 1 = normal
-void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
+static void clif_changechatowner(struct chat_data *cd, struct map_session_data *sd)
{
unsigned char buf[64];
@@ -4045,7 +4110,7 @@ void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
/// flag:
/// 0 = left
/// 1 = kicked
-void clif_leavechat(struct chat_data* cd, struct map_session_data* sd, bool flag)
+static void clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool flag)
{
unsigned char buf[32];
@@ -4063,7 +4128,7 @@ void clif_leavechat(struct chat_data* cd, struct map_session_data* sd, bool flag
/// Opens a trade request window from char 'name'.
/// 00e5 <nick>.24B (ZC_REQ_EXCHANGE_ITEM)
/// 01f4 <nick>.24B <charid>.L <baselvl>.W (ZC_REQ_EXCHANGE_ITEM2)
-void clif_traderequest(struct map_session_data *sd, const char *name)
+static void clif_traderequest(struct map_session_data *sd, const char *name)
{
int fd;
#if PACKETVER >= 6
@@ -4102,7 +4167,7 @@ void clif_traderequest(struct map_session_data *sd, const char *name)
/// 3 = Accept
/// 4 = Cancel
/// 5 = Busy
-void clif_tradestart(struct map_session_data *sd, uint8 type)
+static void clif_tradestart(struct map_session_data *sd, uint8 type)
{
int fd;
#if PACKETVER >= 6
@@ -4132,7 +4197,7 @@ void clif_tradestart(struct map_session_data *sd, uint8 type)
/// Notifies the client about an item from other player in current trade.
/// 00e9 <amount>.L <nameid>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_EXCHANGE_ITEM)
/// 080f <nameid>.W <item type>.B <amount>.L <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_EXCHANGE_ITEM2)
-void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd, int index, int amount)
+static void clif_tradeadditem(struct map_session_data *sd, struct map_session_data *tsd, int index, int amount)
{
int fd;
unsigned char *buf;
@@ -4200,7 +4265,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd
/// 0 = success
/// 1 = overweight
/// 2 = trade canceled
-void clif_tradeitemok(struct map_session_data* sd, int index, int fail)
+static void clif_tradeitemok(struct map_session_data *sd, int index, int fail)
{
int fd;
nullpo_retv(sd);
@@ -4218,7 +4283,7 @@ void clif_tradeitemok(struct map_session_data* sd, int index, int fail)
/// who:
/// 0 = self
/// 1 = other player
-void clif_tradedeal_lock(struct map_session_data* sd, int fail)
+static void clif_tradedeal_lock(struct map_session_data *sd, int fail)
{
int fd;
nullpo_retv(sd);
@@ -4232,7 +4297,7 @@ void clif_tradedeal_lock(struct map_session_data* sd, int fail)
/// Notifies the client about the trade being canceled (ZC_CANCEL_EXCHANGE_ITEM).
/// 00ee
-void clif_tradecancelled(struct map_session_data* sd)
+static void clif_tradecancelled(struct map_session_data *sd)
{
int fd;
nullpo_retv(sd);
@@ -4248,7 +4313,7 @@ void clif_tradecancelled(struct map_session_data* sd)
/// result:
/// 0 = success
/// 1 = failure
-void clif_tradecompleted(struct map_session_data* sd, int fail)
+static void clif_tradecompleted(struct map_session_data *sd, int fail)
{
int fd;
nullpo_retv(sd);
@@ -4265,7 +4330,7 @@ void clif_tradecompleted(struct map_session_data* sd, int fail)
/// NOTE: Unknown purpose. Items are not removed until the window is
/// refreshed (ex. by putting another item in there).
/// unused
-void clif_tradeundo(struct map_session_data* sd)
+static void clif_tradeundo(struct map_session_data *sd)
{
int fd;
@@ -4278,7 +4343,7 @@ void clif_tradeundo(struct map_session_data* sd)
/// Updates storage total amount (ZC_NOTIFY_STOREITEM_COUNTINFO).
/// 00f2 <current count>.W <max count>.W
-void clif_updatestorageamount(struct map_session_data* sd, int amount, int max_amount)
+static void clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount)
{
int fd;
@@ -4295,7 +4360,7 @@ void clif_updatestorageamount(struct map_session_data* sd, int amount, int max_a
/// Notifies the client of an item being added to the storage.
/// 00f4 <index>.W <amount>.L <nameid>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_STORE)
/// 01c4 <index>.W <amount>.L <nameid>.W <type>.B <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_STORE2)
-void clif_storageitemadded(struct map_session_data* sd, struct item* i, int index, int amount)
+static void clif_storageitemadded(struct map_session_data *sd, struct item *i, int index, int amount)
{
int view,fd;
int offset = 0;
@@ -4326,7 +4391,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde
/// Notifies the client of an item being deleted from the storage (ZC_DELETE_ITEM_FROM_STORE).
/// 00f6 <index>.W <amount>.L
-void clif_storageitemremoved(struct map_session_data* sd, int index, int amount)
+static void clif_storageitemremoved(struct map_session_data *sd, int index, int amount)
{
int fd;
@@ -4343,7 +4408,7 @@ void clif_storageitemremoved(struct map_session_data* sd, int index, int amount)
/// Closes storage (ZC_CLOSE_STORE).
/// 00f8
-void clif_storageclose(struct map_session_data* sd)
+static void clif_storageclose(struct map_session_data *sd)
{
int fd;
@@ -4358,7 +4423,8 @@ void clif_storageclose(struct map_session_data* sd)
/*==========================================
* Server tells 'sd' player client the abouts of 'dstsd' player
*------------------------------------------*/
-void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* dstsd) {
+static void clif_getareachar_pc(struct map_session_data *sd, struct map_session_data *dstsd)
+{
struct block_list *d_bl;
int i;
@@ -4398,7 +4464,8 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
clif->devotion(d_bl, sd);
}
-void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
+static void clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl)
+{
struct unit_data *ud;
struct view_data *vd;
@@ -4499,7 +4566,8 @@ static inline int clif_calc_delay(int type, int div, int damage, int delay)
/*==========================================
* Estimates walk delay based on the damage criteria. [Skotlex]
*------------------------------------------*/
-int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, int div_) {
+static int clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damage, int div_)
+{
if (type == 4 || type == 9 || damage <=0)
return 0;
@@ -4523,7 +4591,8 @@ int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, i
/// 08c8 <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.L <IsSPDamage>.B <div>.W <type>.B <damage2>.L (ZC_NOTIFY_ACT2)
/// type: @see enum battle_dmg_type
/// for BDT_NORMAL: [ damage: total damage, div: amount of hits, damage2: assassin dual-wield damage ]
-int clif_damage(struct block_list* src, struct block_list* dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type, int64 in_damage2) {
+static int clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type, int64 in_damage2)
+{
struct packet_damage p;
struct status_change *sc;
#if PACKETVER < 20071113
@@ -4602,7 +4671,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, int sdelay, int
/*==========================================
* src picks up dst
*------------------------------------------*/
-void clif_takeitem(struct block_list* src, struct block_list* dst)
+static void clif_takeitem(struct block_list *src, struct block_list *dst)
{
//clif->damage(src,dst,0,0,0,0,BDT_PICKUP,0);
unsigned char buf[32];
@@ -4621,7 +4690,7 @@ void clif_takeitem(struct block_list* src, struct block_list* dst)
/*==========================================
* inform clients in area that `bl` is sitting
*------------------------------------------*/
-void clif_sitting(struct block_list* bl)
+static void clif_sitting(struct block_list *bl)
{
unsigned char buf[32];
nullpo_retv(bl);
@@ -4640,7 +4709,7 @@ void clif_sitting(struct block_list* bl)
/*==========================================
* inform clients in area that `bl` is standing
*------------------------------------------*/
-void clif_standing(struct block_list* bl)
+static void clif_standing(struct block_list *bl)
{
unsigned char buf[32];
nullpo_retv(bl);
@@ -4658,7 +4727,8 @@ void clif_standing(struct block_list* bl)
/// Inform client(s) about a map-cell change (ZC_UPDATE_MAPINFO).
/// 0192 <x>.W <y>.W <type>.W <map name>.16B
-void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) {
+static void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target)
+{
unsigned char buf[32];
WBUFW(buf,0) = 0x192;
@@ -4683,7 +4753,8 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe
/// Notifies the client about an item on floor (ZC_ITEM_ENTRY).
/// 009d <id>.L <name id>.W <identified>.B <x>.W <y>.W <amount>.W <subX>.B <subY>.B
-void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fitem) {
+static void clif_getareachar_item(struct map_session_data *sd, struct flooritem_data *fitem)
+{
int view,fd;
nullpo_retv(sd);
@@ -4706,7 +4777,8 @@ void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fi
WFIFOSET(fd,packet_len(0x9d));
}
-void clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send_target target) {
+static void clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send_target target)
+{
struct packet_graffiti_entry p;
nullpo_retv(bl);
@@ -4730,7 +4802,8 @@ void clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send
/// 01c9 <id>.L <creator id>.L <x>.W <y>.W <unit id>.B <visible>.B <has msg>.B <msg>.80B (ZC_SKILL_ENTRY2)
/// 08c7 <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.B <range>.W <visible>.B (ZC_SKILL_ENTRY3)
/// 099f <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.W <visible>.B (ZC_SKILL_ENTRY4)
-void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, enum send_target target) {
+static void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, enum send_target target)
+{
struct packet_skill_entry p;
nullpo_retv(bl);
nullpo_retv(su);
@@ -4784,7 +4857,8 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, en
/*==========================================
* Server tells client to remove unit of id 'unit->bl.id'
*------------------------------------------*/
-void clif_clearchar_skillunit(struct skill_unit *su, int fd) {
+static void clif_clearchar_skillunit(struct skill_unit *su, int fd)
+{
nullpo_retv(su);
WFIFOHEAD(fd,packet_len(0x120));
@@ -4798,7 +4872,8 @@ void clif_clearchar_skillunit(struct skill_unit *su, int fd) {
/// Removes a skill unit (ZC_SKILL_DISAPPEAR).
/// 0120 <id>.L
-void clif_skill_delunit(struct skill_unit *su) {
+static void clif_skill_delunit(struct skill_unit *su)
+{
unsigned char buf[16];
nullpo_retv(su);
@@ -4811,7 +4886,7 @@ void clif_skill_delunit(struct skill_unit *su) {
/// Sent when an object gets ankle-snared (ZC_SKILL_UPDATE).
/// 01ac <id>.L
/// Only affects units with class [139,153] client-side.
-void clif_skillunit_update(struct block_list* bl)
+static void clif_skillunit_update(struct block_list *bl)
{
unsigned char buf[6];
nullpo_retv(bl);
@@ -4825,7 +4900,8 @@ void clif_skillunit_update(struct block_list* bl)
/*==========================================
*
*------------------------------------------*/
-int clif_getareachar(struct block_list* bl,va_list ap) {
+static int clif_getareachar(struct block_list *bl, va_list ap)
+{
struct map_session_data *sd;
nullpo_ret(bl);
@@ -4854,7 +4930,7 @@ int clif_getareachar(struct block_list* bl,va_list ap) {
/*==========================================
* tbl has gone out of view-size of bl
*------------------------------------------*/
-int clif_outsight(struct block_list *bl,va_list ap)
+static int clif_outsight(struct block_list *bl, va_list ap)
{
struct block_list *tbl;
struct view_data *vd;
@@ -4911,7 +4987,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
/*==========================================
* tbl has come into view of bl
*------------------------------------------*/
-int clif_insight(struct block_list *bl,va_list ap)
+static int clif_insight(struct block_list *bl, va_list ap)
{
struct block_list *tbl;
struct map_session_data *sd, *tsd;
@@ -4944,7 +5020,7 @@ int clif_insight(struct block_list *bl,va_list ap)
/// Updates whole skill tree (ZC_SKILLINFO_LIST).
/// 010f <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B }*
-void clif_skillinfoblock(struct map_session_data *sd)
+static void clif_skillinfoblock(struct map_session_data *sd)
{
int fd;
int i,len,id;
@@ -5000,7 +5076,7 @@ void clif_skillinfoblock(struct map_session_data *sd)
/// Adds new skill to the skill tree (ZC_ADD_SKILL).
/// 0111 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B
-void clif_addskill(struct map_session_data *sd, int id)
+static void clif_addskill(struct map_session_data *sd, int id)
{
int fd, skill_lv, idx = skill->get_index(id);
@@ -5036,7 +5112,7 @@ void clif_addskill(struct map_session_data *sd, int id)
/// Deletes a skill from the skill tree (ZC_SKILLINFO_DELETE).
/// 0441 <skill id>.W
-void clif_deleteskill(struct map_session_data *sd, int id)
+static void clif_deleteskill(struct map_session_data *sd, int id)
{
#if PACKETVER >= 20081217
int fd;
@@ -5059,7 +5135,7 @@ void clif_deleteskill(struct map_session_data *sd, int id)
/// flag:
/// 0: guild call
/// 1: player call
-void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag)
+static void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag)
{
int fd;
nullpo_retv(sd);
@@ -5082,7 +5158,7 @@ void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, in
/// Updates a skill in the skill tree (ZC_SKILLINFO_UPDATE2).
/// 07e1 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <upgradable>.B
-void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
+static void clif_skillinfo(struct map_session_data *sd, int skill_id, int inf)
{
const int fd = sd->fd;
int idx = skill->get_index(skill_id);
@@ -5127,7 +5203,7 @@ void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
/// is disposable:
/// 0 = yellow chat text "[src name] will use skill [skill name]."
/// 1 = no text
-void clif_useskill(struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime)
+static void clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime)
{
#if PACKETVER < 20091124
const int cmd = 0x13e;
@@ -5164,7 +5240,7 @@ void clif_useskill(struct block_list* bl, int src_id, int dst_id, int dst_x, int
/// Notifies clients in area, that an object canceled casting (ZC_DISPEL).
/// 01b9 <id>.L
-void clif_skillcastcancel(struct block_list* bl)
+static void clif_skillcastcancel(struct block_list *bl)
{
unsigned char buf[16];
@@ -5198,7 +5274,7 @@ void clif_skillcastcancel(struct block_list* bl)
/// if(result!=0) doesn't display any of the previous messages
/// Note: when this packet is received an unknown flag is always set to 0,
/// suggesting this is an ACK packet for the UseSkill packets and should be sent on success too [FlavioJS]
-void clif_skill_fail(struct map_session_data *sd,uint16 skill_id,enum useskill_fail_cause cause,int btype)
+static void clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype)
{
int fd;
@@ -5234,7 +5310,7 @@ void clif_skill_fail(struct map_session_data *sd,uint16 skill_id,enum useskill_f
/// Skill cooldown display icon (ZC_SKILL_POSTDELAY).
/// 043d <skill ID>.W <tick>.L
-void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration)
+static void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration)
{
#if PACKETVER>=20081112
int fd;
@@ -5253,7 +5329,8 @@ void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned
/// Skill attack effect and damage.
/// 0114 <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.W <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL)
/// 01de <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.L <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL2)
-int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 in_damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
+static int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 in_damage, int div, uint16 skill_id, uint16 skill_lv, int type)
+{
unsigned char buf[64];
struct status_change *sc;
int damage;
@@ -5354,7 +5431,8 @@ int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick
/// Ground skill attack effect and damage (ZC_NOTIFY_SKILL_POSITION).
/// 0115 <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <x>.W <y>.W <damage>.W <level>.W <div>.W <type>.B
#if 0
-int clif_skill_damage2(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
+static int clif_skill_damage2(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int damage, int div, uint16 skill_id, uint16 skill_lv, int type)
+{
unsigned char buf[64];
struct status_change *sc;
@@ -5411,7 +5489,7 @@ int clif_skill_damage2(struct block_list *src, struct block_list *dst, int64 tic
/// Non-damaging skill effect.
/// 011a <skill id>.W <skill lv>.W <dst id>.L <src id>.L <result>.B (ZC_USE_SKILL)
/// 09cb <skill id>.W <skill lv>.L <dst id>.L <src id>.L <result>.B (ZC_USE_SKILL2)
-int clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail)
+static int clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail)
{
unsigned char buf[32];
short offset = 0;
@@ -5455,7 +5533,8 @@ int clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint16 s
/// Non-damaging ground skill effect (ZC_NOTIFY_GROUNDSKILL).
/// 0117 <skill id>.W <src id>.L <level>.W <x>.W <y>.W <tick>.L
-void clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick) {
+static void clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick)
+{
unsigned char buf[32];
nullpo_retv(src);
@@ -5478,7 +5557,7 @@ void clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int
/// Presents a list of available warp destinations (ZC_WARPLIST).
/// 011c <skill id>.W { <map name>.16B }*4
-void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4)
+static void clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4)
{
int fd;
@@ -5515,7 +5594,7 @@ void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 s
///
/// @param sd Who receives the message
/// @param type What message
-void clif_skill_memomessage(struct map_session_data* sd, int type)
+static void clif_skill_memomessage(struct map_session_data *sd, int type)
{
int fd;
@@ -5538,7 +5617,7 @@ void clif_skill_memomessage(struct map_session_data* sd, int type)
///
/// @param sd Who receives the message
/// @param type What message
-void clif_skill_mapinfomessage(struct map_session_data *sd, int type)
+static void clif_skill_mapinfomessage(struct map_session_data *sd, int type)
{
int fd;
@@ -5554,7 +5633,8 @@ void clif_skill_mapinfomessage(struct map_session_data *sd, int type)
/// Displays Sense (WZ_ESTIMATION) information window (ZC_MONSTER_INFO).
/// 018c <class>.W <level>.W <size>.W <hp>.L <def>.W <race>.W <mdef>.W <element>.W
/// <water%>.B <earth%>.B <fire%>.B <wind%>.B <poison%>.B <holy%>.B <shadow%>.B <ghost%>.B <undead%>.B
-void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) {
+static void clif_skill_estimation(struct map_session_data *sd, struct block_list *dst)
+{
struct status_data *dstatus;
unsigned char buf[64];
int i;//, fix;
@@ -5591,7 +5671,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) {
/// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }*
/// material id:
/// unused by the client
-void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int trigger)
+static void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, int trigger)
{
int i,c,view,fd;
nullpo_retv(sd);
@@ -5637,7 +5717,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int
/// 4 = GN_MIX_COOKING
/// 5 = GN_MAKEBOMB
/// 6 = GN_S_PHARMACY
-void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type)
+static void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type)
{
int fd;
int i, c;
@@ -5691,7 +5771,8 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
}
}
-void clif_status_change_notick(struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3) {
+static void clif_status_change_notick(struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3)
+{
struct packet_sc_notick p;
struct map_session_data *sd;
@@ -5719,7 +5800,8 @@ void clif_status_change_notick(struct block_list *bl,int type,int flag,int tick,
/// 08ff <id>.L <index>.W <remain msec>.L { <val>.L }*3 (PACKETVER >= 20111108)
/// 0983 <index>.W <id>.L <state>.B <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618)
/// 0984 <id>.L <index>.W <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618)
-void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3) {
+static void clif_status_change(struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3)
+{
struct packet_status_change p;
struct map_session_data *sd;
@@ -5755,7 +5837,7 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val
/// Send message (modified by [Yor]) (ZC_NOTIFY_PLAYERCHAT).
/// 008e <packet len>.W <message>.?B
-void clif_displaymessage(const int fd, const char *mes)
+static void clif_displaymessage(const int fd, const char *mes)
{
nullpo_retv(mes);
@@ -5780,7 +5862,8 @@ void clif_displaymessage(const int fd, const char *mes)
}
}
-void clif_displaymessage2(const int fd, const char* mes) {
+static void clif_displaymessage2(const int fd, const char *mes)
+{
nullpo_retv(mes);
//Scrapped, as these are shared by disconnected players =X [Skotlex]
@@ -5812,9 +5895,11 @@ void clif_displaymessage2(const int fd, const char* mes) {
aFree(message);
}
}
+
/* oh noo! another version of 0x8e! */
-void clif_displaymessage_sprintf(const int fd, const char *mes, ...) __attribute__((format(printf, 2, 3)));
-void clif_displaymessage_sprintf(const int fd, const char *mes, ...) {
+static void clif_displaymessage_sprintf(const int fd, const char *mes, ...) __attribute__((format(printf, 2, 3)));
+static void clif_displaymessage_sprintf(const int fd, const char *mes, ...)
+{
va_list ap;
nullpo_retv(mes);
@@ -5846,9 +5931,10 @@ void clif_displaymessage_sprintf(const int fd, const char *mes, ...) {
WFIFOSET(fd, 5 + len);
}
}
+
/// Send broadcast message in yellow or blue without font formatting (ZC_BROADCAST).
/// 009a <packet len>.W <message>.?B
-void clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target)
+static void clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target)
{
int lp = (type&BC_COLOR_MASK) ? 4 : 0;
unsigned char *buf = NULL;
@@ -5872,7 +5958,7 @@ void clif_broadcast(struct block_list *bl, const char *mes, int len, int type, e
* Displays a message on a 'bl' to all it's nearby clients
* Used by npc_globalmessage
*------------------------------------------*/
-void clif_GlobalMessage(struct block_list *bl, const char *message)
+static void clif_GlobalMessage(struct block_list *bl, const char *message)
{
char buf[256];
int len;
@@ -5897,7 +5983,7 @@ void clif_GlobalMessage(struct block_list *bl, const char *message)
/// Send broadcast message with font formatting (ZC_BROADCAST2).
/// 01c3 <packet len>.W <fontColor>.L <fontType>.W <fontSize>.W <fontAlign>.W <fontY>.W <message>.?B
-void clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target)
+static void clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target)
{
unsigned char *buf;
@@ -5923,7 +6009,7 @@ void clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned i
/// 5 = HP (SP_HP)
/// 7 = SP (SP_SP)
/// ? = ignored
-void clif_heal(int fd, int type, int val)
+static void clif_heal(int fd, int type, int val)
{
#if PACKETVER < 20150513
short cmd = 0x13d;
@@ -5947,7 +6033,7 @@ void clif_heal(int fd, int type, int val)
/// 0148 <id>.L <type>.W
/// type:
/// ignored
-void clif_resurrection(struct block_list *bl,int type)
+static void clif_resurrection(struct block_list *bl, int type)
{
unsigned char buf[16];
@@ -5971,7 +6057,7 @@ void clif_resurrection(struct block_list *bl,int type)
/// Sets the map property (ZC_NOTIFY_MAPPROPERTY).
/// 0199 <type>.W
-void clif_map_property(struct map_session_data* sd, enum map_property property)
+static void clif_map_property(struct map_session_data *sd, enum map_property property)
{
int fd;
@@ -5986,7 +6072,8 @@ void clif_map_property(struct map_session_data* sd, enum map_property property)
/// Set the map type (ZC_NOTIFY_MAPPROPERTY2).
/// 01d6 <type>.W
-void clif_map_type(struct map_session_data* sd, enum map_type type) {
+static void clif_map_type(struct map_session_data *sd, enum map_type type)
+{
int fd;
nullpo_retv(sd);
@@ -6001,7 +6088,7 @@ void clif_map_type(struct map_session_data* sd, enum map_type type) {
/// Updates PvP ranking (ZC_NOTIFY_RANKING).
/// 019a <id>.L <ranking>.L <total>.L
// FIXME: missing documentation for the 'type' parameter
-void clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
+static void clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int type)
{
nullpo_retv(sd);
@@ -6034,7 +6121,7 @@ void clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
/*==========================================
*
*------------------------------------------*/
-void clif_map_property_mapall(int mapid, enum map_property property)
+static void clif_map_property_mapall(int mapid, enum map_property property)
{
struct block_list bl;
unsigned char buf[16];
@@ -6053,7 +6140,7 @@ void clif_map_property_mapall(int mapid, enum map_property property)
/// 0 = success
/// 1 = failure
/// 2 = downgrade
-void clif_refine(int fd, int fail, int index, int val)
+static void clif_refine(int fd, int fail, int index, int val)
{
WFIFOHEAD(fd,packet_len(0x188));
WFIFOW(fd,0)=0x188;
@@ -6070,7 +6157,7 @@ void clif_refine(int fd, int fail, int index, int val)
/// 1 = "weapon upgraded: %s" MsgStringTable[912] in rgb(0,205,205)
/// 2 = "cannot upgrade %s until you level up the upgrade weapon skill" MsgStringTable[913] in rgb(255,200,200)
/// 3 = "you lack the item %s to upgrade the weapon" MsgStringTable[914] in rgb(255,200,200)
-void clif_upgrademessage(int fd, int result, int item_id)
+static void clif_upgrademessage(int fd, int result, int item_id)
{
WFIFOHEAD(fd,packet_len(0x223));
WFIFOW(fd,0)=0x223;
@@ -6082,7 +6169,7 @@ void clif_upgrademessage(int fd, int result, int item_id)
/// Whisper is transmitted to the destination player (ZC_WHISPER).
/// 0097 <packet len>.W <nick>.24B <message>.?B
/// 0097 <packet len>.W <nick>.24B <isAdmin>.L <message>.?B (PACKETVER >= 20091104)
-void clif_wis_message(int fd, const char *nick, const char *mes, int mes_len)
+static void clif_wis_message(int fd, const char *nick, const char *mes, int mes_len)
{
#if PACKETVER >= 20091104
struct map_session_data *ssd = NULL;
@@ -6117,7 +6204,8 @@ void clif_wis_message(int fd, const char *nick, const char *mes, int mes_len)
/// 1 = target character is not logged in
/// 2 = ignored by target
/// 3 = everyone ignored by target
-void clif_wis_end(int fd, int flag) {
+static void clif_wis_end(int fd, int flag)
+{
struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
struct packet_wis_end p;
@@ -6136,7 +6224,7 @@ void clif_wis_end(int fd, int flag) {
/// Returns character name requested by char_id (ZC_ACK_REQNAME_BYGID).
/// 0194 <char id>.L <name>.24B
/// 0af7 <flag>.W <char id>.L <name>.24B
-void clif_solved_charname(int fd, int charid, const char* name)
+static void clif_solved_charname(int fd, int charid, const char *name)
{
nullpo_retv(name);
#if PACKETVER_MAIN_NUM >= 20180307 || PACKETVER_RE_NUM >= 20180221 || PACKETVER_ZERO_NUM >= 20180328
@@ -6162,7 +6250,7 @@ void clif_solved_charname(int fd, int charid, const char* name)
/// Presents a list of items that can be carded/composed (ZC_ITEMCOMPOSITION_LIST).
/// 017b <packet len>.W { <name id>.W }*
-void clif_use_card(struct map_session_data *sd,int idx)
+static void clif_use_card(struct map_session_data *sd, int idx)
{
int i, c;
int fd;
@@ -6195,7 +6283,7 @@ void clif_use_card(struct map_session_data *sd,int idx)
/// result:
/// 0 = success
/// 1 = failure
-void clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int flag)
+static void clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_card, int flag)
{
int fd;
@@ -6212,7 +6300,7 @@ void clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int
/// Presents a list of items that can be identified (ZC_ITEMIDENTIFY_LIST).
/// 0177 <packet len>.W { <name id>.W }*
-void clif_item_identify_list(struct map_session_data *sd)
+static void clif_item_identify_list(struct map_session_data *sd)
{
int i,c;
int fd;
@@ -6240,7 +6328,7 @@ void clif_item_identify_list(struct map_session_data *sd)
/// Notifies the client about the result of a item identify request (ZC_ACK_ITEMIDENTIFY).
/// 0179 <index>.W <result>.B
-void clif_item_identified(struct map_session_data *sd,int idx,int flag)
+static void clif_item_identified(struct map_session_data *sd, int idx, int flag)
{
int fd;
@@ -6256,7 +6344,7 @@ void clif_item_identified(struct map_session_data *sd,int idx,int flag)
/// Presents a list of items that can be repaired (ZC_REPAIRITEMLIST).
/// 01fc <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
-void clif_item_repair_list(struct map_session_data *sd,struct map_session_data *dstsd, int lv)
+static void clif_item_repair_list(struct map_session_data *sd, struct map_session_data *dstsd, int lv)
{
int i,c;
int fd;
@@ -6295,7 +6383,7 @@ void clif_item_repair_list(struct map_session_data *sd,struct map_session_data *
/// result:
/// 0 = Item repair success.
/// 1 = Item repair failure.
-void clif_item_repaireffect(struct map_session_data *sd,int idx,int flag)
+static void clif_item_repaireffect(struct map_session_data *sd, int idx, int flag)
{
int fd;
@@ -6313,7 +6401,7 @@ void clif_item_repaireffect(struct map_session_data *sd,int idx,int flag)
/// Displays a message, that an equipment got damaged (ZC_EQUIPITEM_DAMAGED).
/// 02bb <equip location>.W <account id>.L
-void clif_item_damaged(struct map_session_data* sd, unsigned short position)
+static void clif_item_damaged(struct map_session_data *sd, unsigned short position)
{
int fd;
@@ -6329,7 +6417,7 @@ void clif_item_damaged(struct map_session_data* sd, unsigned short position)
/// Presents a list of weapon items that can be refined [Taken from jAthena] (ZC_NOTIFY_WEAPONITEMLIST).
/// 0221 <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
-void clif_item_refine_list(struct map_session_data *sd)
+static void clif_item_refine_list(struct map_session_data *sd)
{
int i,c;
int fd;
@@ -6365,7 +6453,7 @@ void clif_item_refine_list(struct map_session_data *sd)
/// Notification of an auto-casted skill (ZC_AUTORUN_SKILL).
/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B
-void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv)
+static void clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv)
{
int fd;
@@ -6387,7 +6475,7 @@ void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv
/// Adds an item to character's cart.
/// 0124 <index>.W <amount>.L <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_CART)
/// 01c5 <index>.W <amount>.L <name id>.W <type>.B <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W (ZC_ADD_ITEM_TO_CART2)
-void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
+static void clif_cart_additem(struct map_session_data *sd, int n, int amount, int fail)
{
int view,fd;
unsigned char *buf;
@@ -6424,7 +6512,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
/// Deletes an item from character's cart (ZC_DELETE_ITEM_FROM_CART).
/// 0125 <index>.W <amount>.L
-void clif_cart_delitem(struct map_session_data *sd,int n,int amount)
+static void clif_cart_delitem(struct map_session_data *sd, int n, int amount)
{
int fd;
@@ -6443,7 +6531,7 @@ void clif_cart_delitem(struct map_session_data *sd,int n,int amount)
/// 012d <num>.W
/// num:
/// number of allowed item slots
-void clif_openvendingreq(struct map_session_data* sd, int num)
+static void clif_openvendingreq(struct map_session_data *sd, int num)
{
int fd;
@@ -6458,7 +6546,7 @@ void clif_openvendingreq(struct map_session_data* sd, int num)
/// Displays a vending board to target/area (ZC_STORE_ENTRY).
/// 0131 <owner id>.L <message>.80B
-void clif_showvendingboard(struct block_list* bl, const char* message, int fd)
+static void clif_showvendingboard(struct block_list *bl, const char *message, int fd)
{
unsigned char buf[128];
@@ -6479,7 +6567,7 @@ void clif_showvendingboard(struct block_list* bl, const char* message, int fd)
/// Removes a vending board from screen (ZC_DISAPPEAR_ENTRY).
/// 0132 <owner id>.L
-void clif_closevendingboard(struct block_list* bl, int fd)
+static void clif_closevendingboard(struct block_list *bl, int fd)
{
unsigned char buf[16];
@@ -6499,7 +6587,8 @@ void clif_closevendingboard(struct block_list* bl, int fd)
/// Sends a list of items in a shop.
/// R 0133 <packet len>.W <owner id>.L { <price>.L <amount>.W <index>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC)
/// R 0800 <packet len>.W <owner id>.L <unique id>.L { <price>.L <amount>.W <index>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC2)
-void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_vending* vending_items) {
+static void clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_vending *vending_items)
+{
int i,fd;
int count;
struct map_session_data* vsd;
@@ -6569,7 +6658,7 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven
/// 5 = "cannot use an npc shop while in a trade"
/// 6 = Because the store information was incorrect the item was not purchased.
/// 7 = No sales information.
-void clif_buyvending(struct map_session_data* sd, int index, int amount, int fail)
+static void clif_buyvending(struct map_session_data *sd, int index, int amount, int fail)
{
int fd;
@@ -6586,7 +6675,8 @@ void clif_buyvending(struct map_session_data* sd, int index, int amount, int fai
/// Shop creation success (ZC_PC_PURCHASE_MYITEMLIST).
/// 0136 <packet len>.W <owner id>.L { <price>.L <index>.W <amount>.W <type>.B <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
-void clif_openvending(struct map_session_data* sd, int id, struct s_vending* vending_items) {
+static void clif_openvending(struct map_session_data *sd, int id, struct s_vending *vending_items)
+{
int i,fd;
int count;
@@ -6636,7 +6726,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven
/// Inform merchant that someone has bought an item.
/// 0137 <index>.W <amount>.W (ZC_DELETEITEM_FROM_MCSTORE).
/// 09e5 <index>.W <amount>.W <GID>.L <Date>.L <zeny>.L (ZC_DELETEITEM_FROM_MCSTORE2).
-void clif_vendingreport(struct map_session_data* sd, int index, int amount, uint32 char_id, int zeny)
+static void clif_vendingreport(struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny)
{
int fd;
#if PACKETVER < 20141016 // TODO : not sure for client date [Napster]
@@ -6669,7 +6759,7 @@ void clif_vendingreport(struct map_session_data* sd, int index, int amount, uint
/// 2 = MsgStringTable[79]="already in a party"
/// 3 = cannot organize parties on this map
/// ? = nothing
-void clif_party_created(struct map_session_data *sd,int result)
+static void clif_party_created(struct map_session_data *sd, int result)
{
int fd;
@@ -6689,7 +6779,7 @@ void clif_party_created(struct map_session_data *sd,int result)
/// state:
/// 0 = connected
/// 1 = disconnected
-void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
+static void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
{
int i;
struct PACKET_ZC_ADD_MEMBER_TO_GROUP packet;
@@ -6735,7 +6825,7 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
/// state:
/// 0 = connected
/// 1 = disconnected
-void clif_party_info(struct party_data* p, struct map_session_data *sd)
+static void clif_party_info(struct party_data *p, struct map_session_data *sd)
{
struct PACKET_ZC_GROUP_LIST *packet;
struct map_session_data* party_sd = NULL;
@@ -6781,7 +6871,7 @@ void clif_party_info(struct party_data* p, struct map_session_data *sd)
/// Updates the job and level of a party member
/// 0abd <account id>.L <job>.W <level>.W
-void clif_party_job_and_level(struct map_session_data *sd)
+static void clif_party_job_and_level(struct map_session_data *sd)
{
// [4144] packet 0xabd added in client in 2017-02-15 because this probably it can works for clients older than 20170502
#if PACKETVER >= 20170502
@@ -6803,7 +6893,7 @@ void clif_party_job_and_level(struct map_session_data *sd)
/// flag:
/// 0 = allow party invites
/// 1 = auto-deny party invites
-void clif_partyinvitationstate(struct map_session_data* sd)
+static void clif_partyinvitationstate(struct map_session_data *sd)
{
int fd;
nullpo_retv(sd);
@@ -6818,7 +6908,7 @@ void clif_partyinvitationstate(struct map_session_data* sd)
/// Party invitation request.
/// 00fe <party id>.L <party name>.24B (ZC_REQ_JOIN_GROUP)
/// 02c6 <party id>.L <party name>.24B (ZC_PARTY_JOIN_REQ)
-void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
+static void clif_party_invite(struct map_session_data *sd, struct map_session_data *tsd)
{
#if PACKETVER < 20070821
const int cmd = 0xfe;
@@ -6855,7 +6945,7 @@ void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
/// result=7 : char is not online or doesn't exist -> MsgStringTable[71] (since 20070904)
/// result=8 : (%s) TODO instance related? -> MsgStringTable[1388] (since 20080527)
/// return=9 : TODO map prohibits party joining? -> MsgStringTable[1871] (since 20110205)
-void clif_party_inviteack(struct map_session_data* sd, const char* nick, int result)
+static void clif_party_inviteack(struct map_session_data *sd, const char *nick, int result)
{
int fd;
nullpo_retv(sd);
@@ -6895,7 +6985,7 @@ void clif_party_inviteack(struct map_session_data* sd, const char* nick, int res
/// flag:
/// 0 = send to party
/// 1 = send to sd
-void clif_party_option(struct party_data *p,struct map_session_data *sd,int flag)
+static void clif_party_option(struct party_data *p, struct map_session_data *sd, int flag)
{
unsigned char buf[16];
#if PACKETVER < 20090603
@@ -6932,7 +7022,7 @@ void clif_party_option(struct party_data *p,struct map_session_data *sd,int flag
/// 1 = expel
/// 2 = cannot leave party on this map
/// 3 = cannot expel from party on this map
-void clif_party_withdraw(struct party_data* p, struct map_session_data* sd, int account_id, const char* name, int flag)
+static void clif_party_withdraw(struct party_data *p, struct map_session_data *sd, int account_id, const char *name, int flag)
{
unsigned char buf[64];
@@ -6962,7 +7052,7 @@ void clif_party_withdraw(struct party_data* p, struct map_session_data* sd, int
/// Party chat message (ZC_NOTIFY_CHAT_PARTY).
/// 0109 <packet len>.W <account id>.L <message>.?B
-void clif_party_message(struct party_data *p, int account_id, const char *mes, int len)
+static void clif_party_message(struct party_data *p, int account_id, const char *mes, int len)
{
struct map_session_data *sd;
int i;
@@ -6993,7 +7083,7 @@ void clif_party_message(struct party_data *p, int account_id, const char *mes, i
/// Updates the position of a party member on the minimap (ZC_NOTIFY_POSITION_TO_GROUPM).
/// 0107 <account id>.L <x>.W <y>.W
-void clif_party_xy(struct map_session_data *sd)
+static void clif_party_xy(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -7009,7 +7099,7 @@ void clif_party_xy(struct map_session_data *sd)
/*==========================================
* Sends x/y dot to a single fd. [Skotlex]
*------------------------------------------*/
-void clif_party_xy_single(int fd, struct map_session_data *sd)
+static void clif_party_xy_single(int fd, struct map_session_data *sd)
{
nullpo_retv(sd);
WFIFOHEAD(fd,packet_len(0x107));
@@ -7023,7 +7113,7 @@ void clif_party_xy_single(int fd, struct map_session_data *sd)
/// Updates HP bar of a party member.
/// 0106 <account id>.L <hp>.W <max hp>.W (ZC_NOTIFY_HP_TO_GROUPM)
/// 080e <account id>.L <hp>.L <max hp>.L (ZC_NOTIFY_HP_TO_GROUPM_R2)
-void clif_party_hp(struct map_session_data *sd)
+static void clif_party_hp(struct map_session_data *sd)
{
unsigned char buf[16];
#if PACKETVER < 20100126
@@ -7054,7 +7144,7 @@ void clif_party_hp(struct map_session_data *sd)
/*==========================================
* Sends HP bar to a single fd. [Skotlex]
*------------------------------------------*/
-void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp)
+static void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp)
{
#if PACKETVER < 20100126
const int cmd = 0x106;
@@ -7082,7 +7172,7 @@ void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp)
/// Notifies the client, that it's attack target is too far (ZC_ATTACK_FAILURE_FOR_DISTANCE).
/// 0139 <target id>.L <target x>.W <target y>.W <x>.W <y>.W <atk range>.W
-void clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
+static void clif_movetoattack(struct map_session_data *sd, struct block_list *bl)
{
int fd;
@@ -7108,7 +7198,7 @@ void clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
/// 1 = failure
/// 2 = success (alchemist)
/// 3 = failure (alchemist)
-void clif_produceeffect(struct map_session_data* sd,int flag,int nameid)
+static void clif_produceeffect(struct map_session_data *sd, int flag, int nameid)
{
int view,fd;
@@ -7128,7 +7218,7 @@ void clif_produceeffect(struct map_session_data* sd,int flag,int nameid)
/// Initiates the pet taming process (ZC_START_CAPTURE).
/// 019e
-void clif_catch_process(struct map_session_data *sd)
+static void clif_catch_process(struct map_session_data *sd)
{
int fd;
@@ -7144,7 +7234,7 @@ void clif_catch_process(struct map_session_data *sd)
/// 01a0 <result>.B
/// 0 = failure
/// 1 = success
-void clif_pet_roulette(struct map_session_data *sd,int data)
+static void clif_pet_roulette(struct map_session_data *sd, int data)
{
int fd;
@@ -7159,7 +7249,8 @@ void clif_pet_roulette(struct map_session_data *sd,int data)
/// Presents a list of pet eggs that can be hatched (ZC_PETEGG_LIST).
/// 01a6 <packet len>.W { <index>.W }*
-void clif_sendegg(struct map_session_data *sd) {
+static void clif_sendegg(struct map_session_data *sd)
+{
int i, n, fd;
nullpo_retv(sd);
@@ -7199,7 +7290,7 @@ void clif_sendegg(struct map_session_data *sd) {
/// 5 = hairstyle
///
/// If sd is null, the update is sent to nearby objects, otherwise it is sent only to that player.
-void clif_send_petdata(struct map_session_data* sd, struct pet_data* pd, int type, int param)
+static void clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int type, int param)
{
uint8 buf[16];
nullpo_retv(pd);
@@ -7216,7 +7307,7 @@ void clif_send_petdata(struct map_session_data* sd, struct pet_data* pd, int typ
/// Pet's base data (ZC_PROPERTY_PET).
/// 01a2 <name>.24B <renamed>.B <level>.W <hunger>.W <intimacy>.W <accessory id>.W <class>.W
-void clif_send_petstatus(struct map_session_data *sd)
+static void clif_send_petstatus(struct map_session_data *sd)
{
int fd;
struct s_pet *p;
@@ -7244,7 +7335,7 @@ void clif_send_petstatus(struct map_session_data *sd)
/// 01aa <id>.L <data>.L
/// data:
/// @see CZ_PET_ACT.
-void clif_pet_emotion(struct pet_data *pd,int param)
+static void clif_pet_emotion(struct pet_data *pd, int param)
{
unsigned char buf[16];
@@ -7273,7 +7364,7 @@ void clif_pet_emotion(struct pet_data *pd,int param)
/// result:
/// 0 = failure
/// 1 = success
-void clif_pet_food(struct map_session_data *sd,int foodid,int fail)
+static void clif_pet_food(struct map_session_data *sd, int foodid, int fail)
{
int fd;
@@ -7289,7 +7380,7 @@ void clif_pet_food(struct map_session_data *sd,int foodid,int fail)
/// Presents a list of skills that can be auto-spelled (ZC_AUTOSPELLLIST).
/// 01cd { <skill id>.L }*7
-void clif_autospell(struct map_session_data *sd,uint16 skill_lv)
+static void clif_autospell(struct map_session_data *sd, uint16 skill_lv)
{
int fd;
@@ -7335,7 +7426,7 @@ void clif_autospell(struct map_session_data *sd,uint16 skill_lv)
/// Devotion's visual effect (ZC_DEVOTIONLIST).
/// 01cf <devoter id>.L { <devotee id>.L }*5 <max distance>.W
-void clif_devotion(struct block_list *src, struct map_session_data *tsd)
+static void clif_devotion(struct block_list *src, struct map_session_data *tsd)
{
unsigned char buf[56];
@@ -7386,7 +7477,8 @@ void clif_devotion(struct block_list *src, struct map_session_data *tsd)
* 01d0 <id>.L <amount>.W (ZC_SPIRITS)
* 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
*------------------------------------------*/
-void clif_spiritball(struct block_list *bl) {
+static void clif_spiritball(struct block_list *bl)
+{
unsigned char buf[16];
struct map_session_data *sd = BL_CAST(BL_PC,bl);
struct homun_data *hd = BL_CAST(BL_HOM,bl);
@@ -7405,7 +7497,7 @@ void clif_spiritball(struct block_list *bl) {
/// Notifies clients in area of a character's combo delay (ZC_COMBODELAY).
/// 01d2 <account id>.L <delay>.L
-void clif_combo_delay(struct block_list *bl,int wait)
+static void clif_combo_delay(struct block_list *bl, int wait)
{
unsigned char buf[32];
@@ -7422,7 +7514,7 @@ void clif_combo_delay(struct block_list *bl,int wait)
/// flag:
/// 0 = inactive
/// 1 = active
-void clif_bladestop(struct block_list *src, int dst_id, int active)
+static void clif_bladestop(struct block_list *src, int dst_id, int active)
{
unsigned char buf[32];
@@ -7438,7 +7530,7 @@ void clif_bladestop(struct block_list *src, int dst_id, int active)
/// MVP effect (ZC_MVP).
/// 010c <account id>.L
-void clif_mvp_effect(struct map_session_data *sd)
+static void clif_mvp_effect(struct map_session_data *sd)
{
unsigned char buf[16];
@@ -7451,7 +7543,7 @@ void clif_mvp_effect(struct map_session_data *sd)
/// MVP item reward message (ZC_MVP_GETTING_ITEM).
/// 010a <name id>.W
-void clif_mvp_item(struct map_session_data *sd,int nameid)
+static void clif_mvp_item(struct map_session_data *sd, int nameid)
{
int view,fd;
@@ -7469,7 +7561,7 @@ void clif_mvp_item(struct map_session_data *sd,int nameid)
/// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP).
/// 010b <exp>.L
-void clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
+static void clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
{
#if PACKETVER >= 20131223 // Kro removed this packet [Napster]
if (battle_config.mvp_exp_reward_message) {
@@ -7495,7 +7587,7 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
///
/// "You are the MVP, but cannot obtain the reward because
/// you are overweight."
-void clif_mvp_noitem(struct map_session_data* sd)
+static void clif_mvp_noitem(struct map_session_data *sd)
{
int fd = sd->fd;
@@ -7511,7 +7603,7 @@ void clif_mvp_noitem(struct map_session_data* sd)
/// 1 = "You are already in a Guild."
/// 2 = "That Guild Name already exists."
/// 3 = "You need the necessary item to create a Guild."
-void clif_guild_created(struct map_session_data *sd,int flag)
+static void clif_guild_created(struct map_session_data *sd, int flag)
{
int fd;
@@ -7527,7 +7619,7 @@ void clif_guild_created(struct map_session_data *sd,int flag)
/// Notifies the client that it is belonging to a guild (ZC_UPDATE_GDID).
/// 016c <guild id>.L <emblem id>.L <mode>.L <ismaster>.B <inter sid>.L <guild name>.24B
/// mode: @see enum guild_permission
-void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
+static void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
{
int ps,fd;
nullpo_retv(sd);
@@ -7552,7 +7644,7 @@ void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
/// status:
/// 0 = offline
/// 1 = online
-void clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
+static void clif_guild_memberlogin_notice(struct guild *g, int idx, int flag)
{
unsigned char buf[64];
struct map_session_data* sd;
@@ -7589,7 +7681,7 @@ void clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
// At next time the client would always show the message.
// The function sends all the statuses in the single packet
// to economize traffic. [LuzZza]
-void clif_guild_send_onlineinfo(struct map_session_data *sd)
+static void clif_guild_send_onlineinfo(struct map_session_data *sd)
{
struct guild *g;
unsigned char buf[14*128];
@@ -7628,7 +7720,7 @@ void clif_guild_send_onlineinfo(struct map_session_data *sd)
/// &0x10 = Expulsion list
/// &0x40 = Unknown (GMENUFLAG_ALLGUILDLIST)
/// &0x80 = Notice
-void clif_guild_masterormember(struct map_session_data *sd)
+static void clif_guild_masterormember(struct map_session_data *sd)
{
int fd;
@@ -7644,7 +7736,7 @@ void clif_guild_masterormember(struct map_session_data *sd)
/// Guild basic information (Territories [Valaris])
/// 0150 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B (ZC_GUILD_INFO)
/// 01b6 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B <zeny>.L (ZC_GUILD_INFO2)
-void clif_guild_basicinfo(struct map_session_data *sd)
+static void clif_guild_basicinfo(struct map_session_data *sd)
{
int fd;
struct guild *g;
@@ -7690,7 +7782,7 @@ void clif_guild_basicinfo(struct map_session_data *sd)
/// Guild alliance and opposition list (ZC_MYGUILD_BASIC_INFO).
/// 014c <packet len>.W { <relation>.L <guild id>.L <guild name>.24B }*
-void clif_guild_allianceinfo(struct map_session_data *sd)
+static void clif_guild_allianceinfo(struct map_session_data *sd)
{
int fd,i,c;
struct guild *g;
@@ -7722,7 +7814,7 @@ void clif_guild_allianceinfo(struct map_session_data *sd)
/// 1 = online
/// memo:
/// probably member's self-introduction (unused, no client UI/packets for editing it)
-void clif_guild_memberlist(struct map_session_data *sd)
+static void clif_guild_memberlist(struct map_session_data *sd)
{
int fd;
int i,c;
@@ -7772,7 +7864,8 @@ void clif_guild_memberlist(struct map_session_data *sd)
/// Guild position name information (ZC_POSITION_ID_NAME_INFO).
/// 0166 <packet len>.W { <position id>.L <position name>.24B }*
-void clif_guild_positionnamelist(struct map_session_data *sd) {
+static void clif_guild_positionnamelist(struct map_session_data *sd)
+{
int i,fd;
struct guild *g;
@@ -7796,7 +7889,8 @@ void clif_guild_positionnamelist(struct map_session_data *sd) {
/// mode: @see enum guild_permission
/// ranking:
/// TODO
-void clif_guild_positioninfolist(struct map_session_data *sd) {
+static void clif_guild_positioninfolist(struct map_session_data *sd)
+{
int i,fd;
struct guild *g;
@@ -7823,7 +7917,7 @@ void clif_guild_positioninfolist(struct map_session_data *sd) {
/// mode: @see enum guild_permission
/// ranking:
/// TODO
-void clif_guild_positionchanged(struct guild *g,int idx)
+static void clif_guild_positionchanged(struct guild *g, int idx)
{
// FIXME: This packet is intended to update the clients after a
// commit of position info changes, not sending one packet per
@@ -7848,7 +7942,7 @@ void clif_guild_positionchanged(struct guild *g,int idx)
/// Notifies clients in a guild about updated member position assignments (ZC_ACK_REQ_CHANGE_MEMBERS).
/// 0156 <packet len>.W { <account id>.L <char id>.L <position id>.L }*
-void clif_guild_memberpositionchanged(struct guild *g,int idx)
+static void clif_guild_memberpositionchanged(struct guild *g, int idx)
{
// FIXME: This packet is intended to update the clients after a
// commit of member position assignment changes, not sending one
@@ -7871,7 +7965,7 @@ void clif_guild_memberpositionchanged(struct guild *g,int idx)
/// Sends emblems bitmap data to the client that requested it (ZC_GUILD_EMBLEM_IMG).
/// 0152 <packet len>.W <guild id>.L <emblem id>.L <emblem data>.?B
-void clif_guild_emblem(struct map_session_data *sd,struct guild *g)
+static void clif_guild_emblem(struct map_session_data *sd, struct guild *g)
{
int fd;
nullpo_retv(sd);
@@ -7892,7 +7986,7 @@ void clif_guild_emblem(struct map_session_data *sd,struct guild *g)
/// Sends update of the guild id/emblem id to everyone in the area (ZC_CHANGE_GUILD).
/// 01b4 <id>.L <guild id>.L <emblem id>.W
-void clif_guild_emblem_area(struct block_list* bl)
+static void clif_guild_emblem_area(struct block_list *bl)
{
uint8 buf[12];
@@ -7909,7 +8003,7 @@ void clif_guild_emblem_area(struct block_list* bl)
/// Sends guild skills (ZC_GUILD_SKILLINFO).
/// 0162 <packet len>.W <skill points>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B }*
-void clif_guild_skillinfo(struct map_session_data* sd)
+static void clif_guild_skillinfo(struct map_session_data *sd)
{
int fd;
struct guild* g;
@@ -7948,7 +8042,7 @@ void clif_guild_skillinfo(struct map_session_data* sd)
/// Sends guild notice to client (ZC_GUILD_NOTICE).
/// 016f <subject>.60B <notice>.120B
-void clif_guild_notice(struct map_session_data* sd, struct guild* g)
+static void clif_guild_notice(struct map_session_data *sd, struct guild *g)
{
int fd;
@@ -7972,7 +8066,7 @@ void clif_guild_notice(struct map_session_data* sd, struct guild* g)
/// Guild invite (ZC_REQ_JOIN_GUILD).
/// 016a <guild id>.L <guild name>.24B
-void clif_guild_invite(struct map_session_data *sd,struct guild *g)
+static void clif_guild_invite(struct map_session_data *sd, struct guild *g)
{
int fd;
@@ -7994,7 +8088,7 @@ void clif_guild_invite(struct map_session_data *sd,struct guild *g)
/// 1 = Offer rejected.
/// 2 = Offer accepted.
/// 3 = Guild full.
-void clif_guild_inviteack(struct map_session_data *sd,int flag)
+static void clif_guild_inviteack(struct map_session_data *sd, int flag)
{
int fd;
@@ -8009,7 +8103,7 @@ void clif_guild_inviteack(struct map_session_data *sd,int flag)
/// Notifies clients of a guild of a leaving member (ZC_ACK_LEAVE_GUILD).
/// 015a <char name>.24B <reason>.40B
-void clif_guild_leave(struct map_session_data *sd,const char *name,const char *mes)
+static void clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes)
{
unsigned char buf[128];
@@ -8024,7 +8118,7 @@ void clif_guild_leave(struct map_session_data *sd,const char *name,const char *m
/// Notifies clients of a guild of an expelled member.
/// 015c <char name>.24B <reason>.40B <account name>.24B (ZC_ACK_BAN_GUILD)
/// 0839 <char name>.24B <reason>.40B (ZC_ACK_BAN_GUILD_SSO)
-void clif_guild_expulsion(struct map_session_data* sd, const char* name, const char* mes, int account_id)
+static void clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id)
{
unsigned char buf[128];
#if PACKETVER < 20100803
@@ -8049,7 +8143,8 @@ void clif_guild_expulsion(struct map_session_data* sd, const char* name, const c
/// Guild expulsion list (ZC_BAN_LIST).
/// 0163 <packet len>.W { <char name>.24B <account name>.24B <reason>.40B }*
/// 0163 <packet len>.W { <char name>.24B <reason>.40B }* (PACKETVER >= 20100803)
-void clif_guild_expulsionlist(struct map_session_data* sd) {
+static void clif_guild_expulsionlist(struct map_session_data *sd)
+{
#if PACKETVER < 20100803
const int offset = NAME_LENGTH*2+40;
#else
@@ -8090,7 +8185,7 @@ void clif_guild_expulsionlist(struct map_session_data* sd) {
/// Guild chat message (ZC_GUILD_CHAT).
/// 017f <packet len>.W <message>.?B
-void clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
+static void clif_guild_message(struct guild *g, int account_id, const char *mes, int len)
{// TODO: account_id is not used, candidate for deletion? [Ai4rei]
struct map_session_data *sd;
uint8 buf[256];
@@ -8114,7 +8209,7 @@ void clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
/// Request for guild alliance (ZC_REQ_ALLY_GUILD).
/// 0171 <inviter account id>.L <guild name>.24B
-void clif_guild_reqalliance(struct map_session_data *sd,int account_id,const char *name)
+static void clif_guild_reqalliance(struct map_session_data *sd, int account_id, const char *name)
{
int fd;
@@ -8138,7 +8233,7 @@ void clif_guild_reqalliance(struct map_session_data *sd,int account_id,const cha
/// 3 = They have too any alliances.
/// 4 = You have too many alliances.
/// 5 = Alliances are disabled.
-void clif_guild_allianceack(struct map_session_data *sd,int flag)
+static void clif_guild_allianceack(struct map_session_data *sd, int flag)
{
int fd;
@@ -8156,7 +8251,7 @@ void clif_guild_allianceack(struct map_session_data *sd,int flag)
/// relation:
/// 0 = Ally
/// 1 = Enemy
-void clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
+static void clif_guild_delalliance(struct map_session_data *sd, int guild_id, int flag)
{
int fd;
@@ -8179,7 +8274,7 @@ void clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
/// 1 = Guild has too many Antagonists.
/// 2 = Already set as an Antagonist.
/// 3 = Antagonists are disabled.
-void clif_guild_oppositionack(struct map_session_data *sd,int flag)
+static void clif_guild_oppositionack(struct map_session_data *sd, int flag)
{
int fd;
@@ -8194,8 +8289,8 @@ void clif_guild_oppositionack(struct map_session_data *sd,int flag)
/// Adds alliance or opposition (ZC_ADD_RELATED_GUILD).
/// 0185 <relation>.L <guild id>.L <guild name>.24B
-/*
-void clif_guild_allianceadded(struct guild *g,int idx)
+#if 0
+static void clif_guild_allianceadded(struct guild *g, int idx)
{
unsigned char buf[64];
WBUFW(buf,0)=0x185;
@@ -8204,14 +8299,14 @@ void clif_guild_allianceadded(struct guild *g,int idx)
memcpy(WBUFP(buf,10),g->alliance[idx].name,NAME_LENGTH);
clif->send(buf,packet_len(0x185),guild->getavailablesd(g),GUILD);
}
-*/
+#endif // 0
/// Notifies the client about the result of a guild break (ZC_ACK_DISORGANIZE_GUILD_RESULT).
/// 015e <reason>.L
/// 0 = success
/// 1 = invalid key (guild name, @see clif_parse_GuildBreak)
/// 2 = there are still members in the guild
-void clif_guild_broken(struct map_session_data *sd,int flag)
+static void clif_guild_broken(struct map_session_data *sd, int flag)
{
int fd;
@@ -8228,7 +8323,7 @@ void clif_guild_broken(struct map_session_data *sd,int flag)
/// 00c0 <id>.L <type>.B
/// type:
/// enum emotion_type
-void clif_emotion(struct block_list *bl,int type)
+static void clif_emotion(struct block_list *bl, int type)
{
unsigned char buf[8];
@@ -8242,7 +8337,7 @@ void clif_emotion(struct block_list *bl,int type)
/// Displays the contents of a talkiebox trap (ZC_TALKBOX_CHATCONTENTS).
/// 0191 <id>.L <contents>.80B
-void clif_talkiebox(struct block_list* bl, const char* talkie)
+static void clif_talkiebox(struct block_list *bl, const char *talkie)
{
unsigned char buf[MESSAGE_SIZE+6];
nullpo_retv(bl);
@@ -8256,7 +8351,7 @@ void clif_talkiebox(struct block_list* bl, const char* talkie)
/// Displays wedding effect centered on an object (ZC_CONGRATULATION).
/// 01ea <id>.L
-void clif_wedding_effect(struct block_list *bl)
+static void clif_wedding_effect(struct block_list *bl)
{
unsigned char buf[6];
@@ -8269,7 +8364,8 @@ void clif_wedding_effect(struct block_list *bl)
/// Notifies the client of the name of the partner character (ZC_COUPLENAME).
/// 01e6 <partner name>.24B
-void clif_callpartner(struct map_session_data *sd) {
+static void clif_callpartner(struct map_session_data *sd)
+{
unsigned char buf[26];
nullpo_retv(sd);
@@ -8294,8 +8390,8 @@ void clif_callpartner(struct map_session_data *sd) {
/// Initiates the partner "taming" process [DracoRPG] (ZC_START_COUPLE).
/// 01e4
/// This packet while still implemented by the client is no longer being officially used.
-/*
-void clif_marriage_process(struct map_session_data *sd)
+#if 0
+static void clif_marriage_process(struct map_session_data *sd)
{
int fd;
nullpo_retv(sd);
@@ -8305,11 +8401,11 @@ void clif_marriage_process(struct map_session_data *sd)
WFIFOW(fd,0)=0x1e4;
WFIFOSET(fd,packet_len(0x1e4));
}
-*/
+#endif // 0
/// Notice of divorce (ZC_DIVORCE).
/// 0205 <partner name>.24B
-void clif_divorced(struct map_session_data* sd, const char* name)
+static void clif_divorced(struct map_session_data *sd, const char *name)
{
int fd;
nullpo_retv(sd);
@@ -8324,8 +8420,8 @@ void clif_divorced(struct map_session_data* sd, const char* name)
/// Marriage proposal (ZC_REQ_COUPLE).
/// 01e2 <account id>.L <char id>.L <char name>.24B
/// This packet while still implemented by the client is no longer being officially used.
-/*
-void clif_marriage_proposal(int fd, struct map_session_data *sd, struct map_session_data* ssd)
+#if 0
+static void clif_marriage_proposal(int fd, struct map_session_data *sd, struct map_session_data *ssd)
{
nullpo_retv(sd);
@@ -8336,12 +8432,12 @@ void clif_marriage_proposal(int fd, struct map_session_data *sd, struct map_sess
safestrncpy(WFIFOP(fd,10), ssd->status.name, NAME_LENGTH);
WFIFOSET(fd, packet_len(0x1e2));
}
-*/
+#endif // 0
/*==========================================
* Displays a message using the guild-chat colors to the specified targets. [Skotlex]
*------------------------------------------*/
-void clif_disp_message(struct block_list *src, const char *mes, enum send_target target)
+static void clif_disp_message(struct block_list *src, const char *mes, enum send_target target)
{
unsigned char buf[256];
int len;
@@ -8370,7 +8466,7 @@ void clif_disp_message(struct block_list *src, const char *mes, enum send_target
/// result:
/// 0 = failure
/// 1 = success
-void clif_GM_kickack(struct map_session_data *sd, int result)
+static void clif_GM_kickack(struct map_session_data *sd, int result)
{
int fd;
@@ -8383,7 +8479,8 @@ void clif_GM_kickack(struct map_session_data *sd, int result)
WFIFOSET(fd, packet_len(0xcd));
}
-void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) {
+static void clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd)
+{
int fd;
nullpo_retv(tsd);
@@ -8407,7 +8504,7 @@ void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) {
/// 3 = "Chat Block has been applied by GM due to your ill-mannerous action."
/// 4 = "Automated Chat Block has been applied due to Anti-Spam System."
/// 5 = "You got a good point from %s."
-void clif_manner_message(struct map_session_data* sd, uint32 type)
+static void clif_manner_message(struct map_session_data *sd, uint32 type)
{
int fd;
nullpo_retv(sd);
@@ -8424,7 +8521,7 @@ void clif_manner_message(struct map_session_data* sd, uint32 type)
/// type:
/// 0 = positive (unmute)
/// 1 = negative (mute)
-void clif_GM_silence(struct map_session_data* sd, struct map_session_data* tsd, uint8 type)
+static void clif_GM_silence(struct map_session_data *sd, struct map_session_data *tsd, uint8 type)
{
int fd;
nullpo_retv(sd);
@@ -8447,7 +8544,8 @@ void clif_GM_silence(struct map_session_data* sd, struct map_session_data* tsd,
/// 0 = success
/// 1 = failure
/// 2 = too many blocks
-void clif_wisexin(struct map_session_data *sd,int type,int flag) {
+static void clif_wisexin(struct map_session_data *sd, int type, int flag)
+{
int fd;
nullpo_retv(sd);
@@ -8468,7 +8566,8 @@ void clif_wisexin(struct map_session_data *sd,int type,int flag) {
/// result:
/// 0 = success
/// 1 = failure
-void clif_wisall(struct map_session_data *sd,int type,int flag) {
+static void clif_wisall(struct map_session_data *sd, int type, int flag)
+{
int fd;
nullpo_retv(sd);
@@ -8483,7 +8582,7 @@ void clif_wisall(struct map_session_data *sd,int type,int flag) {
/// Play a BGM! [Rikter/Yommy] (ZC_PLAY_NPC_BGM).
/// 07fe <bgm>.24B
-void clif_playBGM(struct map_session_data* sd, const char* name)
+static void clif_playBGM(struct map_session_data *sd, const char *name)
{
int fd;
@@ -8509,7 +8608,7 @@ void clif_playBGM(struct map_session_data* sd, const char* name)
/// npc id:
/// The acoustic direction of the sound is determined by the
/// relative position of the NPC to the player (3D sound).
-void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type)
+static void clif_soundeffect(struct map_session_data *sd, struct block_list *bl, const char *name, int type)
{
int fd;
@@ -8527,7 +8626,7 @@ void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const
WFIFOSET(fd,packet_len(0x1d3));
}
-void clif_soundeffectall(struct block_list* bl, const char* name, int type, enum send_target coverage)
+static void clif_soundeffectall(struct block_list *bl, const char *name, int type, enum send_target coverage)
{
unsigned char buf[40];
@@ -8546,7 +8645,7 @@ void clif_soundeffectall(struct block_list* bl, const char* name, int type, enum
/// 01f3 <id>.L <effect id>.L
/// effect id:
/// @see doc/effect_list.txt
-void clif_specialeffect(struct block_list* bl, int type, enum send_target target)
+static void clif_specialeffect(struct block_list *bl, int type, enum send_target target)
{
unsigned char buf[24];
@@ -8566,7 +8665,8 @@ void clif_specialeffect(struct block_list* bl, int type, enum send_target target
}
}
-void clif_specialeffect_single(struct block_list* bl, int type, int fd) {
+static void clif_specialeffect_single(struct block_list *bl, int type, int fd)
+{
nullpo_retv(bl);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x1f3;
@@ -8581,7 +8681,7 @@ void clif_specialeffect_single(struct block_list* bl, int type, int fd) {
/// @see doc/effect_list.txt
/// num data:
/// effect-dependent value
-void clif_specialeffect_value(struct block_list* bl, int effect_id, int num, send_target target)
+static void clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target)
{
uint8 buf[14];
@@ -8606,7 +8706,7 @@ void clif_specialeffect_value(struct block_list* bl, int effect_id, int num, sen
* @param color Message color (RGB format: 0xRRGGBB)
* @param msg Message text
*/
-void clif_messagecolor_self(int fd, uint32 color, const char *msg)
+static void clif_messagecolor_self(int fd, uint32 color, const char *msg)
{
int msg_len;
@@ -8632,7 +8732,7 @@ void clif_messagecolor_self(int fd, uint32 color, const char *msg)
* @param color Message color (RGB format: 0xRRGGBB)
* @param msg Message text
*/
-void clif_messagecolor(struct block_list *bl, uint32 color, const char *msg)
+static void clif_messagecolor(struct block_list *bl, uint32 color, const char *msg)
{
int msg_len;
uint8 buf[256];
@@ -8662,7 +8762,7 @@ void clif_messagecolor(struct block_list *bl, uint32 color, const char *msg)
* Should only be used in cases where the client closed the
* storage window without server's consent
**/
-void clif_refresh_storagewindow(struct map_session_data *sd)
+static void clif_refresh_storagewindow(struct map_session_data *sd)
{
nullpo_retv(sd);
// Notify the client that the storage is open
@@ -8689,7 +8789,7 @@ void clif_refresh_storagewindow(struct map_session_data *sd)
}
// refresh the client's screen, getting rid of any effects
-void clif_refresh(struct map_session_data *sd)
+static void clif_refresh(struct map_session_data *sd)
{
nullpo_retv(sd);
@@ -8754,7 +8854,7 @@ void clif_refresh(struct map_session_data *sd)
/// Updates the object's (bl) name on client.
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
-void clif_charnameack (int fd, struct block_list *bl)
+static void clif_charnameack(int fd, struct block_list *bl)
{
unsigned char buf[103];
int cmd = 0x95;
@@ -8888,7 +8988,7 @@ void clif_charnameack (int fd, struct block_list *bl)
//Used to update when a char leaves a party/guild. [Skotlex]
//Needed because when you send a 0x95 packet, the client will not remove the cached party/guild info that is not sent.
-void clif_charnameupdate (struct map_session_data *ssd)
+static void clif_charnameupdate(struct map_session_data *ssd)
{
unsigned char buf[103];
int cmd = 0x195, ps = -1;
@@ -8946,7 +9046,7 @@ void clif_charnameupdate (struct map_session_data *ssd)
/// Visually moves(instant) a character to x,y. The char moves even
/// when the target cell isn't walkable. If the char is sitting it
/// stays that way.
-void clif_slide(struct block_list *bl, int x, int y)
+static void clif_slide(struct block_list *bl, int x, int y)
{
unsigned char buf[10];
nullpo_retv(bl);
@@ -8965,7 +9065,7 @@ void clif_slide(struct block_list *bl, int x, int y)
/// Public chat message (ZC_NOTIFY_CHAT). lordalfa/Skotlex - used by @me as well
/// 008d <packet len>.W <id>.L <message>.?B
-void clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl)
+static void clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl)
{
char buf[CHAT_SIZE_MAX + (int)sizeof(struct PACKET_ZC_NOTIFY_CHAT)];
int max_len = CHAT_SIZE_MAX - (int)sizeof(struct PACKET_ZC_NOTIFY_CHAT);
@@ -8997,7 +9097,7 @@ void clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target
}
}
-void clif_notify_playerchat(struct block_list *bl, const char *mes)
+static void clif_notify_playerchat(struct block_list *bl, const char *mes)
{
char buf[CHAT_SIZE_MAX + (int)sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT)];
int max_len = CHAT_SIZE_MAX - (int)sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT);
@@ -9023,7 +9123,7 @@ void clif_notify_playerchat(struct block_list *bl, const char *mes)
* Minimap fix [Kevin]
* Remove dot from minimap
*--------------------------*/
-void clif_party_xy_remove(struct map_session_data *sd)
+static void clif_party_xy_remove(struct map_session_data *sd)
{
unsigned char buf[16];
nullpo_retv(sd);
@@ -9049,7 +9149,7 @@ void clif_party_xy_remove(struct map_session_data *sd)
/// 0x20 = HIT/Flee +50 (PA_GOSPEL)
/// 0x28 = Full strip failed because of coating (ST_FULLSTRIP)
/// ? = nothing
-void clif_gospel_info(struct map_session_data *sd, int type)
+static void clif_gospel_info(struct map_session_data *sd, int type)
{
int fd;
@@ -9090,7 +9190,7 @@ void clif_gospel_info(struct map_session_data *sd, int type)
/// 22 = [Collector Rank] Target Item : <monster_id used as item id>
/// 30 = [Sun, Moon and Stars Angel] Designed places and monsters have been reset.
/// 40 = Target HP : <monster_id used as HP>
-void clif_starskill(struct map_session_data* sd, const char* mapname, int monster_id, unsigned char star, unsigned char result)
+static void clif_starskill(struct map_session_data *sd, const char *mapname, int monster_id, unsigned char star, unsigned char result)
{
int fd;
@@ -9111,7 +9211,7 @@ void clif_starskill(struct map_session_data* sd, const char* mapname, int monste
* Info about Star Gladiator save map [Komurka]
* type: 1: Information, 0: Map registered
*------------------------------------------*/
-void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsigned char type)
+static void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type)
{
char mapname[MAP_NAME_LENGTH_EXT];
@@ -9125,7 +9225,7 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig
* Info about Star Gladiator hate mob [Komurka]
* type: 1: Register mob, 0: Information.
*------------------------------------------*/
-void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type)
+static void clif_hate_info(struct map_session_data *sd, unsigned char hate_level, int class_, unsigned char type)
{
if( pc->db_checkid(class_) ) {
clif->starskill(sd, pc->job_name(class_), class_, hate_level, type ? 10 : 11);
@@ -9139,7 +9239,7 @@ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int cl
/*==========================================
* Info about TaeKwon Do TK_MISSION mob [Skotlex]
*------------------------------------------*/
-void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress)
+static void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress)
{
clif->starskill(sd, mob->db(mob_id)->jname, mob_id, progress, 20);
}
@@ -9147,7 +9247,7 @@ void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char pr
/*==========================================
* Feel/Hate reset (thanks to Rayce) [Skotlex]
*------------------------------------------*/
-void clif_feel_hate_reset(struct map_session_data *sd)
+static void clif_feel_hate_reset(struct map_session_data *sd)
{
clif->starskill(sd, "", 0, 0, 30);
}
@@ -9160,7 +9260,7 @@ void clif_feel_hate_reset(struct map_session_data *sd)
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_zc_config(struct map_session_data* sd, enum CZ_CONFIG type, int flag)
+static void clif_zc_config(struct map_session_data *sd, enum CZ_CONFIG type, int flag)
{
int fd;
nullpo_retv(sd);
@@ -9178,7 +9278,7 @@ void clif_zc_config(struct map_session_data* sd, enum CZ_CONFIG type, int flag)
/// open equip window:
/// 0 = disabled
/// 1 = enabled
-void clif_equpcheckbox(struct map_session_data* sd)
+static void clif_equpcheckbox(struct map_session_data *sd)
{
int fd;
nullpo_retv(sd);
@@ -9195,7 +9295,8 @@ void clif_equpcheckbox(struct map_session_data* sd)
/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE, PACKETVER >= 20100629)
/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20101124)
/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20110111)
-void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd) {
+static void clif_viewequip_ack(struct map_session_data *sd, struct map_session_data *tsd)
+{
int i, equip = 0;
nullpo_retv(sd);
@@ -9239,7 +9340,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
* @param sd The target character.
* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
*/
-void clif_msgtable(struct map_session_data* sd, enum clif_messages msg_id)
+static void clif_msgtable(struct map_session_data *sd, enum clif_messages msg_id)
{
int fd;
nullpo_retv(sd);
@@ -9260,7 +9361,7 @@ void clif_msgtable(struct map_session_data* sd, enum clif_messages msg_id)
* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
* @param value The value to fill %d.
*/
-void clif_msgtable_num(struct map_session_data *sd, enum clif_messages msg_id, int value)
+static void clif_msgtable_num(struct map_session_data *sd, enum clif_messages msg_id, int value)
{
#if PACKETVER >= 20090805
int fd;
@@ -9287,7 +9388,7 @@ void clif_msgtable_num(struct map_session_data *sd, enum clif_messages msg_id, i
* @param skill_id ID of the skill to display.
* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
*/
-void clif_msgtable_skill(struct map_session_data* sd, uint16 skill_id, enum clif_messages msg_id)
+static void clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id)
{
int fd;
@@ -9302,13 +9403,13 @@ void clif_msgtable_skill(struct map_session_data* sd, uint16 skill_id, enum clif
}
/**
-* Displays a format string from msgstringtable.txt with a %s value (ZC_FORMATSTRING_MSG).
-*
-* @param sd The target character.
-* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
-* @param value The value to fill %s.
-*/
-void clif_msgtable_str(struct map_session_data *sd, enum clif_messages msg_id, const char *value)
+ * Displays a format string from msgstringtable.txt with a %s value (ZC_FORMATSTRING_MSG).
+ *
+ * @param sd The target character.
+ * @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
+ * @param value The value to fill %s.
+ */
+static void clif_msgtable_str(struct map_session_data *sd, enum clif_messages msg_id, const char *value)
{
int message_len;
int len;
@@ -9332,13 +9433,13 @@ void clif_msgtable_str(struct map_session_data *sd, enum clif_messages msg_id, c
}
/**
-* Displays a format string from msgstringtable.txt with a color (ZC_MSG_COLOR).
-*
-* @param sd The target character.
-* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
-* @param color The color to use
-*/
-void clif_msgtable_color(struct map_session_data *sd, enum clif_messages msg_id, uint32 color)
+ * Displays a format string from msgstringtable.txt with a color (ZC_MSG_COLOR).
+ *
+ * @param sd The target character.
+ * @param msg_id msgstringtable message index, 0-based (@see enum clif_messages)
+ * @param color The color to use
+ */
+static void clif_msgtable_color(struct map_session_data *sd, enum clif_messages msg_id, uint32 color)
{
struct PACKET_ZC_MSG_COLOR p;
@@ -9363,7 +9464,7 @@ void clif_msgtable_color(struct map_session_data *sd, enum clif_messages msg_id,
* @retval NULL if the validation failed, the messages was a command or the
* character can't send chat messages. out_buf shan't be used.
*/
-const char *clif_process_chat_message(struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen)
+static const char *clif_process_chat_message(struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen)
{
const char *srcname = NULL, *srcmessage = NULL, *message = NULL;
int textlen = 0, namelen = 0, messagelen = 0;
@@ -9434,7 +9535,7 @@ const char *clif_process_chat_message(struct map_session_data *sd, const struct
* character can't send chat messages. out_name and out_message
* shan't be used.
*/
-bool clif_process_whisper_message(struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen)
+static bool clif_process_whisper_message(struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen)
{
int namelen = 0, messagelen = 0;
@@ -9485,7 +9586,7 @@ bool clif_process_whisper_message(struct map_session_data *sd, const struct pack
return true;
}
-void clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, char *msg)
+static void clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, char *msg)
{
struct DBIterator *iter;
struct map_session_data *user;
@@ -9520,7 +9621,7 @@ void clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, ch
dbi_destroy(iter);
}
-void clif_channel_msg2(struct channel_data *chan, char *msg)
+static void clif_channel_msg2(struct channel_data *chan, char *msg)
{
struct DBIterator *iter;
struct map_session_data *user;
@@ -9552,7 +9653,7 @@ void clif_channel_msg2(struct channel_data *chan, char *msg)
// TODO: [4144] same packet with login server. need somehow use one function for both servers
// 3 - Rejected by server
-void clif_auth_error(int fd, int errorCode)
+static void clif_auth_error(int fd, int errorCode)
{
struct packet_ZC_REFUSE_LOGIN p;
const int len = sizeof(p);
@@ -9575,7 +9676,8 @@ void clif_auth_error(int fd, int errorCode)
/// 0072 <account id>.L <char id>.L <auth code>.L <client time>.L <gender>.B (CZ_ENTER)
/// 0436 <account id>.L <char id>.L <auth code>.L <client time>.L <gender>.B (CZ_ENTER2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
+static void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
+{
struct block_list* bl;
struct auth_node* node;
int cmd, account_id, char_id, login_id1, sex;
@@ -9643,10 +9745,11 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
chrif->authreq(sd,false);
}
-void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Notification from the client, that it has finished map loading and is about to display player's character (CZ_NOTIFY_ACTORINIT).
/// 007d
-void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) {
+static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
+{
bool first_time = false;
if(sd->bl.prev != NULL)
@@ -10019,7 +10122,8 @@ void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) {
/// Server's tick (ZC_NOTIFY_TIME).
/// 007f <time>.L
-void clif_notify_time(struct map_session_data* sd, int64 time) {
+static void clif_notify_time(struct map_session_data *sd, int64 time)
+{
int fd;
nullpo_retv(sd);
@@ -10031,12 +10135,12 @@ void clif_notify_time(struct map_session_data* sd, int64 time) {
WFIFOSET(fd,packet_len(0x7f));
}
-void clif_parse_TickSend(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TickSend(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for server's tick.
/// 007e <client tick>.L (CZ_REQUEST_TIME)
/// 0360 <client tick>.L (CZ_REQUEST_TIME2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_TickSend(int fd, struct map_session_data *sd)
+static void clif_parse_TickSend(int fd, struct map_session_data *sd)
{
sd->client_tick = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
@@ -10048,7 +10152,8 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd)
/// 07d9 { <is skill>.B <id>.L <count>.W }*36 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090603)
/// 07d9 { <is skill>.B <id>.L <count>.W }*38 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090617)
/// 0a00 <rotate>.B { <is skill>.B <id>.L <count>.W }*38 (ZC_SHORTCUT_KEY_LIST_V3, PACKETVER >= 20141022)
-void clif_hotkeys_send(struct map_session_data *sd) {
+static void clif_hotkeys_send(struct map_session_data *sd)
+{
#ifdef HOTKEY_SAVING
struct packet_hotkey p;
int i;
@@ -10066,17 +10171,18 @@ void clif_hotkeys_send(struct map_session_data *sd) {
#endif
}
-void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd)
+static void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd)
{
int cmd = RFIFOW(fd, 0);
sd->status.hotkey_rowshift = RFIFOB(fd, packet_db[cmd].pos[0]);
}
-void clif_parse_Hotkey(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Hotkey(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update a position on the hotkey bar (CZ_SHORTCUT_KEY_CHANGE).
/// 02ba <index>.W <is skill>.B <id>.L <count>.W
-void clif_parse_Hotkey(int fd, struct map_session_data *sd) {
+static void clif_parse_Hotkey(int fd, struct map_session_data *sd)
+{
#ifdef HOTKEY_SAVING
unsigned short idx;
int cmd;
@@ -10093,7 +10199,7 @@ void clif_parse_Hotkey(int fd, struct map_session_data *sd) {
/// Displays cast-like progress bar (ZC_PROGRESS).
/// 02f0 <color>.L <time>.L
-void clif_progressbar(struct map_session_data * sd, unsigned int color, unsigned int second)
+static void clif_progressbar(struct map_session_data *sd, unsigned int color, unsigned int second)
{
int fd;
@@ -10109,7 +10215,7 @@ void clif_progressbar(struct map_session_data * sd, unsigned int color, unsigned
/// Removes an ongoing progress bar (ZC_PROGRESS_CANCEL).
/// 02f2
-void clif_progressbar_abort(struct map_session_data * sd)
+static void clif_progressbar_abort(struct map_session_data *sd)
{
int fd;
@@ -10122,14 +10228,14 @@ void clif_progressbar_abort(struct map_session_data * sd)
}
/**
-* Displays cast-like progress bar on a unit.
-* 09d1 <id>.L <color>.L <time>.L
-*
-* @param bl Source block list.
-* @param color Message color (RGB format: 0xRRGGBB).
-* @param time Time in seconds.
-*/
-void clif_progressbar_unit(struct block_list *bl, uint32 color, uint32 time)
+ * Displays cast-like progress bar on a unit.
+ * 09d1 <id>.L <color>.L <time>.L
+ *
+ * @param bl Source block list.
+ * @param color Message color (RGB format: 0xRRGGBB).
+ * @param time Time in seconds.
+ */
+static void clif_progressbar_unit(struct block_list *bl, uint32 color, uint32 time)
{
#if PACKETVER >= 20130821
struct ZC_PROGRESS_ACTOR p;
@@ -10145,10 +10251,10 @@ void clif_progressbar_unit(struct block_list *bl, uint32 color, uint32 time)
#endif
}
-void clif_parse_progressbar(int fd, struct map_session_data * sd) __attribute__((nonnull (2)));
+static void clif_parse_progressbar(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Notification from the client, that the progress bar has reached 100% (CZ_PROGRESS).
/// 02f1
-void clif_parse_progressbar(int fd, struct map_session_data * sd)
+static void clif_parse_progressbar(int fd, struct map_session_data *sd)
{
int npc_id = sd->progressbar.npc_id;
@@ -10159,12 +10265,12 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd)
npc->scriptcont(sd, npc_id, false);
}
-void clif_parse_WalkToXY(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_WalkToXY(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to walk to a certain position on the current map.
/// 0085 <dest>.3B (CZ_REQUEST_MOVE)
/// 035f <dest>.3B (CZ_REQUEST_MOVE2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
+static void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
{
short x, y;
@@ -10199,7 +10305,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
/// 0 = disconnect (quit)
/// 1 = cannot disconnect (wait 10 seconds)
/// ? = ignored
-void clif_disconnect_ack(struct map_session_data* sd, short result)
+static void clif_disconnect_ack(struct map_session_data *sd, short result)
{
int fd;
@@ -10212,12 +10318,12 @@ void clif_disconnect_ack(struct map_session_data* sd, short result)
WFIFOSET(fd,packet_len(0x18b));
}
-void clif_parse_QuitGame(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_QuitGame(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to disconnect from server (CZ_REQ_DISCONNECT).
/// 018a <type>.W
/// type:
/// 0 = quit
-void clif_parse_QuitGame(int fd, struct map_session_data *sd)
+static void clif_parse_QuitGame(int fd, struct map_session_data *sd)
{
/* Rovert's prevent logout option fixed [Valaris] */
if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] &&
@@ -10229,12 +10335,13 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
}
}
-void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Requesting unit's name.
/// 0094 <id>.L (CZ_REQNAME)
/// 0368 <id>.L (CZ_REQNAME2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
+static void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
+{
int id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
struct block_list* bl;
//struct status_change *sc;
@@ -10267,7 +10374,8 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
clif->charnameack(fd, bl);
}
-int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
+static int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data)
+{
struct map_session_data * sd;
if( (sd = map->id2sd(id)) ) {
sd->fontcolor_tid = INVALID_TIMER;
@@ -10289,8 +10397,8 @@ int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
* @param fd The incoming file descriptor.
* @param sd The related character.
*/
-void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_GlobalMessage(int fd, struct map_session_data *sd)
+static void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GlobalMessage(int fd, struct map_session_data *sd)
{
const struct packet_chat_message *packet = NULL;
char full_message[CHAT_SIZE_MAX + NAME_LENGTH + 3 + 1];
@@ -10381,11 +10489,11 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd)
map->foreachinrange(npc_chat->sub, &sd->bl, AREA_SIZE, BL_NPC, full_message, strlen(full_message), &sd->bl);
}
-void clif_parse_MapMove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MapMove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /mm /mapmove (as @rura GM command) (CZ_MOVETO_MAP).
/// Request to warp to a map on given coordinates.
/// 0140 <map name>.16B <x>.W <y>.W
-void clif_parse_MapMove(int fd, struct map_session_data *sd)
+static void clif_parse_MapMove(int fd, struct map_session_data *sd)
{
char command[MAP_NAME_LENGTH_EXT+25];
char map_name[MAP_NAME_LENGTH_EXT];
@@ -10410,7 +10518,7 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd)
/// 5 = southeast
/// 6 = east
/// 7 = northeast
-void clif_changed_dir(struct block_list *bl, enum send_target target)
+static void clif_changed_dir(struct block_list *bl, enum send_target target)
{
unsigned char buf[64];
@@ -10429,12 +10537,12 @@ void clif_changed_dir(struct block_list *bl, enum send_target target)
}
}
-void clif_parse_ChangeDir(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ChangeDir(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change own body and head direction.
/// 009b <head dir>.W <dir>.B (CZ_CHANGE_DIRECTION)
/// 0361 <head dir>.W <dir>.B (CZ_CHANGE_DIRECTION2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
+static void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
{
unsigned char headdir, dir;
@@ -10445,12 +10553,12 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
clif->changed_dir(&sd->bl, AREA_WOS);
}
-void clif_parse_Emotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Emotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to show an emotion (CZ_REQ_EMOTION).
/// 00bf <type>.B
/// type:
/// @see enum emotion_type
-void clif_parse_Emotion(int fd, struct map_session_data *sd)
+static void clif_parse_Emotion(int fd, struct map_session_data *sd)
{
int emoticon = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]);
@@ -10480,7 +10588,8 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
-void clif_user_count(struct map_session_data* sd, int count) {
+static void clif_user_count(struct map_session_data *sd, int count)
+{
int fd;
nullpo_retv(sd);
@@ -10492,15 +10601,16 @@ void clif_user_count(struct map_session_data* sd, int count) {
WFIFOSET(fd,packet_len(0xc2));
}
-void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /w /who (CZ_REQ_USER_COUNT).
/// Request to display amount of currently connected players.
/// 00c1
-void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) {
+static void clif_parse_HowManyConnections(int fd, struct map_session_data *sd)
+{
clif->user_count(sd, map->getusers());
}
-void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick)
+static void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick)
{
nullpo_retv(sd);
if (pc_isdead(sd)) {
@@ -10611,7 +10721,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
}
}
-void clif_parse_ActionRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ActionRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for an action.
/// 0089 <target id>.L <action>.B (CZ_REQUEST_ACT)
/// 0437 <target id>.L <action>.B (CZ_REQUEST_ACT2)
@@ -10623,7 +10733,7 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) __attribute__
/// 7 = continuous attack
/// 12 = (touch skill?)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
+static void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
{
clif->pActionRequest_sub(sd,
RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[1]),
@@ -10632,13 +10742,14 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
);
}
-void clif_parse_Restart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Restart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Response to the death/system menu (CZ_RESTART).
/// 00b2 <type>.B
/// type:
/// 0 = restart (respawn)
/// 1 = char-select (disconnect)
-void clif_parse_Restart(int fd, struct map_session_data *sd) {
+static void clif_parse_Restart(int fd, struct map_session_data *sd)
+{
switch(RFIFOB(fd,2)) {
case 0x00:
pc->respawn(sd,CLR_OUTSIGHT);
@@ -10668,8 +10779,8 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) {
* @param fd The incoming file descriptor.
* @param sd The related character.
*/
-void clif_parse_WisMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_WisMessage(int fd, struct map_session_data* sd)
+static void clif_parse_WisMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_WisMessage(int fd, struct map_session_data *sd)
{
struct map_session_data* dstsd;
int i;
@@ -10786,11 +10897,11 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
clif->wis_message(dstsd->fd, sd->status.name, message, (int)strlen(message));
}
-void clif_parse_Broadcast(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Broadcast(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /b /nb (CZ_BROADCAST).
/// Request to broadcast a message on whole server.
/// 0099 <packet len>.W <text>.?B 00
-void clif_parse_Broadcast(int fd, struct map_session_data *sd)
+static void clif_parse_Broadcast(int fd, struct map_session_data *sd)
{
const char commandname[] = "kami";
char command[sizeof commandname + 2 + CHAT_SIZE_MAX] = ""; // '@' command + ' ' + message + NUL
@@ -10809,12 +10920,12 @@ void clif_parse_Broadcast(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-void clif_parse_TakeItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TakeItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to pick up an item.
/// 009f <id>.L (CZ_ITEM_PICKUP)
/// 0362 <id>.L (CZ_ITEM_PICKUP2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_TakeItem(int fd, struct map_session_data *sd)
+static void clif_parse_TakeItem(int fd, struct map_session_data *sd)
{
int map_object_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
struct flooritem_data *fitem = map->id2fi(map_object_id);
@@ -10851,12 +10962,12 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd)
clif->additem(sd,0,0,6);
}
-void clif_parse_DropItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_DropItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to drop an item.
/// 00a2 <index>.W <amount>.W (CZ_ITEM_THROW)
/// 0363 <index>.W <amount>.W (CZ_ITEM_THROW2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_DropItem(int fd, struct map_session_data *sd)
+static void clif_parse_DropItem(int fd, struct map_session_data *sd)
{
int item_index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2;
int item_amount = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[1]);
@@ -10887,12 +10998,12 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
clif->dropitem(sd, item_index, 0);
}
-void clif_parse_UseItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UseItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use an item.
/// 00a7 <index>.W <account id>.L (CZ_USE_ITEM)
/// 0439 <index>.W <account id>.L (CZ_USE_ITEM2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_UseItem(int fd, struct map_session_data *sd)
+static void clif_parse_UseItem(int fd, struct map_session_data *sd)
{
int n;
@@ -10914,11 +11025,11 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
clif->useitemack(sd,n,0,false); //Send an empty ack packet or the client gets stuck.
}
-void clif_parse_EquipItem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_EquipItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to equip an item (CZ_REQ_WEAR_EQUIP).
/// 00a9 <index>.W <position>.W
/// 0998 <index>.W <position>.L
-void clif_parse_EquipItem(int fd,struct map_session_data *sd)
+static void clif_parse_EquipItem(int fd, struct map_session_data *sd)
{
const struct packet_equip_item *p = RP2PTR(fd);
int index = 0;
@@ -10962,10 +11073,10 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
pc->equipitem(sd, index, p->wearLocation);
}
-void clif_parse_UnequipItem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UnequipItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to take off an equip (CZ_REQ_TAKEOFF_EQUIP).
/// 00ab <index>.W
-void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
+static void clif_parse_UnequipItem(int fd, struct map_session_data *sd)
{
int index;
@@ -10989,12 +11100,12 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
pc->unequipitem(sd,index, PCUNEQUIPITEM_RECALC);
}
-void clif_parse_NpcClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcClicked(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to start a conversation with an NPC (CZ_CONTACTNPC).
/// 0090 <id>.L <type>.B
/// type:
/// 1 = click
-void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
+static void clif_parse_NpcClicked(int fd, struct map_session_data *sd)
{
struct block_list *bl;
@@ -11033,13 +11144,13 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
}
}
-void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Selection between buy/sell was made (CZ_ACK_SELECT_DEALTYPE).
/// 00c5 <id>.L <type>.B
/// type:
/// 0 = buy
/// 1 = sell
-void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
+static void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
{
if (sd->state.trading)
return;
@@ -11053,7 +11164,8 @@ void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
/// 1 = "You do not have enough zeny."
/// 2 = "You are over your Weight Limit."
/// 3 = "Out of the maximum capacity, you have too many items."
-void clif_npc_buy_result(struct map_session_data* sd, unsigned char result) {
+static void clif_npc_buy_result(struct map_session_data *sd, unsigned char result)
+{
int fd;
nullpo_retv(sd);
@@ -11064,10 +11176,10 @@ void clif_npc_buy_result(struct map_session_data* sd, unsigned char result) {
WFIFOSET(fd,packet_len(0xca));
}
-void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcBuyListSend(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to buy chosen items from npc shop (CZ_PC_PURCHASE_ITEMLIST).
/// 00c8 <packet len>.W { <amount>.W <name id>.W }*
-void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
+static void clif_parse_NpcBuyListSend(int fd, struct map_session_data *sd)
{
int n = ((int)RFIFOW(fd,2)-4) / 4;
int result;
@@ -11104,7 +11216,8 @@ void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
/// result:
/// 0 = "The deal has successfully completed."
/// 1 = "The deal has failed."
-void clif_npc_sell_result(struct map_session_data* sd, unsigned char result) {
+static void clif_npc_sell_result(struct map_session_data *sd, unsigned char result)
+{
int fd;
nullpo_retv(sd);
@@ -11115,10 +11228,10 @@ void clif_npc_sell_result(struct map_session_data* sd, unsigned char result) {
WFIFOSET(fd,packet_len(0xcb));
}
-void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcSellListSend(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to sell chosen items to npc shop (CZ_PC_SELL_ITEMLIST).
/// 00c9 <packet len>.W { <index>.W <amount>.W }*
-void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
+static void clif_parse_NpcSellListSend(int fd, struct map_session_data *sd)
{
int fail=0,n;
@@ -11153,13 +11266,13 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
clif->npc_sell_result(sd, fail);
}
-void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_CreateChatRoom(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Chatroom creation request (CZ_CREATE_CHATROOM).
/// 00d5 <packet len>.W <limit>.W <type>.B <passwd>.8B <title>.?B
/// type:
/// 0 = private
/// 1 = public
-void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
+static void clif_parse_CreateChatRoom(int fd, struct map_session_data *sd)
{
int len = (int)RFIFOW(fd, 2) - 15;
int limit;
@@ -11198,10 +11311,10 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
chat->create_pc_chat(sd, s_title, s_password, limit, pub);
}
-void clif_parse_ChatAddMember(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ChatAddMember(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Chatroom join request (CZ_REQ_ENTER_ROOM).
/// 00d9 <chat ID>.L <passwd>.8B
-void clif_parse_ChatAddMember(int fd, struct map_session_data* sd)
+static void clif_parse_ChatAddMember(int fd, struct map_session_data *sd)
{
int chatid = RFIFOL(fd,2);
const char *password = RFIFOP(fd,6); // not zero-terminated
@@ -11209,13 +11322,13 @@ void clif_parse_ChatAddMember(int fd, struct map_session_data* sd)
chat->join(sd,chatid,password);
}
-void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Chatroom properties adjustment request (CZ_CHANGE_CHATROOM).
/// 00de <packet len>.W <limit>.W <type>.B <passwd>.8B <title>.?B
/// type:
/// 0 = private
/// 1 = public
-void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
+static void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data *sd)
{
int len = (int)RFIFOW(fd, 2) - 15;
int limit;
@@ -11239,29 +11352,29 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
chat->change_status(sd, s_title, s_password, limit, pub);
}
-void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ChangeChatOwner(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change the chat room ownership (CZ_REQ_ROLE_CHANGE).
/// 00e0 <role>.L <nick>.24B
/// role:
/// 0 = owner
/// 1 = normal
-void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd)
+static void clif_parse_ChangeChatOwner(int fd, struct map_session_data *sd)
{
chat->change_owner(sd, RFIFOP(fd,6)); // non null terminated
}
-void clif_parse_KickFromChat(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_KickFromChat(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a player from chat room (CZ_REQ_EXPEL_MEMBER).
/// 00e2 <name>.24B
-void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
+static void clif_parse_KickFromChat(int fd, struct map_session_data *sd)
{
chat->kick(sd, RFIFOP(fd,2)); // non null terminated
}
-void clif_parse_ChatLeave(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ChatLeave(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to leave the current chatroom (CZ_EXIT_ROOM).
/// 00e3
-void clif_parse_ChatLeave(int fd, struct map_session_data* sd)
+static void clif_parse_ChatLeave(int fd, struct map_session_data *sd)
{
chat->leave(sd, false);
}
@@ -11269,7 +11382,8 @@ void clif_parse_ChatLeave(int fd, struct map_session_data* sd)
//Handles notifying asker and rejecter of what has just occurred.
//Type is used to determine the correct msg_txt to use:
//0:
-void clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) {
+static void clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type)
+{
const char* msg;
char output[256];
nullpo_retv(src);
@@ -11281,10 +11395,11 @@ void clif_noask_sub(struct map_session_data *src, struct map_session_data *targe
clif_disp_onlyself(target, output);
}
-void clif_parse_TradeRequest(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeRequest(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to begin a trade (CZ_REQ_EXCHANGE_ITEM).
/// 00e4 <account id>.L
-void clif_parse_TradeRequest(int fd,struct map_session_data *sd) {
+static void clif_parse_TradeRequest(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
t_sd = map->id2sd(RFIFOL(fd,2));
@@ -11306,21 +11421,21 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) {
trade->request(sd,t_sd);
}
-void clif_parse_TradeAck(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a trade request (CZ_ACK_EXCHANGE_ITEM).
/// 00e6 <result>.B
/// result:
/// 3 = accepted
/// 4 = rejected
-void clif_parse_TradeAck(int fd,struct map_session_data *sd)
+static void clif_parse_TradeAck(int fd, struct map_session_data *sd)
{
trade->ack(sd,RFIFOB(fd,2));
}
-void clif_parse_TradeAddItem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeAddItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item to current trade (CZ_ADD_EXCHANGE_ITEM).
/// 00e8 <index>.W <amount>.L
-void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
+static void clif_parse_TradeAddItem(int fd, struct map_session_data *sd)
{
short index = RFIFOW(fd,2);
int amount = RFIFOL(fd,4);
@@ -11331,42 +11446,43 @@ void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
trade->additem(sd, index, (short)amount);
}
-void clif_parse_TradeOk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeOk(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to lock items in current trade (CZ_CONCLUDE_EXCHANGE_ITEM).
/// 00eb
-void clif_parse_TradeOk(int fd,struct map_session_data *sd)
+static void clif_parse_TradeOk(int fd, struct map_session_data *sd)
{
trade->ok(sd);
}
-void clif_parse_TradeCancel(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeCancel(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to cancel current trade (CZ_CANCEL_EXCHANGE_ITEM).
/// 00ed
-void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
+static void clif_parse_TradeCancel(int fd, struct map_session_data *sd)
{
trade->cancel(sd);
}
-void clif_parse_TradeCommit(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_TradeCommit(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to commit current trade (CZ_EXEC_EXCHANGE_ITEM).
/// 00ef
-void clif_parse_TradeCommit(int fd,struct map_session_data *sd)
+static void clif_parse_TradeCommit(int fd, struct map_session_data *sd)
{
trade->commit(sd);
}
-void clif_parse_StopAttack(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_StopAttack(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to stop chasing/attacking an unit (CZ_CANCEL_LOCKON).
/// 0118
-void clif_parse_StopAttack(int fd,struct map_session_data *sd)
+static void clif_parse_StopAttack(int fd, struct map_session_data *sd)
{
pc_stop_attack(sd);
}
-void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from inventory to cart (CZ_MOVE_ITEM_FROM_BODY_TO_CART).
/// 0126 <index>.W <amount>.L
-void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) {
+static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd)
+{
int flag = 0;
if (pc_istrading(sd))
return;
@@ -11378,20 +11494,20 @@ void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) {
}
}
-void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from cart to inventory (CZ_MOVE_ITEM_FROM_CART_TO_BODY).
/// 0127 <index>.W <amount>.L
-void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
+static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd)
{
if (!pc_iscarton(sd))
return;
pc->getitemfromcart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));
}
-void clif_parse_RemoveOption(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RemoveOption(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to remove cart/falcon/peco/dragon (CZ_REQ_CARTOFF).
/// 012a
-void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
+static void clif_parse_RemoveOption(int fd, struct map_session_data *sd)
{
if (pc_isridingpeco(sd) || pc_isfalcon(sd) || pc_isridingdragon(sd) || pc_ismadogear(sd)) {
// priority to remove this option before we can clear cart
@@ -11406,10 +11522,10 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
}
}
-void clif_parse_ChangeCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ChangeCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change cart's visual look (CZ_REQ_CHANGECART).
/// 01af <num>.W
-void clif_parse_ChangeCart(int fd, struct map_session_data *sd)
+static void clif_parse_ChangeCart(int fd, struct map_session_data *sd)
{// TODO: State tracking?
int type;
@@ -11445,7 +11561,7 @@ void clif_parse_ChangeCart(int fd, struct map_session_data *sd)
/// Request to select cart's visual look for new cart design (CZ_SELECTCART).
/// 0980 <identity>.L <type>.B
-void clif_parse_SelectCart(int fd, struct map_session_data *sd)
+static void clif_parse_SelectCart(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20150805 // RagexeRE
int type;
@@ -11462,7 +11578,7 @@ void clif_parse_SelectCart(int fd, struct map_session_data *sd)
#endif
}
-void clif_parse_StatusUp(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_StatusUp(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to increase status (CZ_STATUS_CHANGE).
/// 00bb <status id>.W <amount>.B
/// status id:
@@ -11470,7 +11586,8 @@ void clif_parse_StatusUp(int fd,struct map_session_data *sd) __attribute__((nonn
/// amount:
/// Old clients send always 1 for this, even when using /str+ and the like.
/// Newer clients (2013-12-23 and newer) send the correct amount.
-void clif_parse_StatusUp(int fd,struct map_session_data *sd) {
+static void clif_parse_StatusUp(int fd, struct map_session_data *sd)
+{
int increase_amount;
increase_amount = RFIFOB(fd,4);
@@ -11482,15 +11599,16 @@ void clif_parse_StatusUp(int fd,struct map_session_data *sd) {
pc->statusup(sd, RFIFOW(fd,2), increase_amount);
}
-void clif_parse_SkillUp(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SkillUp(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to increase level of a skill (CZ_UPGRADE_SKILLLEVEL).
/// 0112 <skill id>.W
-void clif_parse_SkillUp(int fd,struct map_session_data *sd)
+static void clif_parse_SkillUp(int fd, struct map_session_data *sd)
{
pc->skillup(sd,RFIFOW(fd,2));
}
-void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+static void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id)
+{
int lv;
nullpo_retv(sd);
@@ -11520,7 +11638,8 @@ void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_session_dat
unit->skilluse_id(&hd->bl, target_id, skill_id, skill_lv);
}
-void clif_parse_UseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+static void clif_parse_UseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo)
+{
int lv;
nullpo_retv(sd);
if( !hd )
@@ -11548,7 +11667,8 @@ void clif_parse_UseSkillToPos_homun(struct homun_data *hd, struct map_session_da
unit->skilluse_pos(&hd->bl, x, y, skill_id, skill_lv);
}
-void clif_parse_UseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+static void clif_parse_UseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id)
+{
int lv;
nullpo_retv(sd);
@@ -11570,7 +11690,8 @@ void clif_parse_UseSkillToId_mercenary(struct mercenary_data *md, struct map_ses
unit->skilluse_id(&md->bl, target_id, skill_id, skill_lv);
}
-void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+static void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo)
+{
int lv;
nullpo_retv(sd);
if( !md )
@@ -11593,12 +11714,12 @@ void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct map_se
unit->skilluse_pos(&md->bl, x, y, skill_id, skill_lv);
}
-void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a targeted skill.
/// 0113 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL)
/// 0438 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
+static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
{
uint16 skill_id, skill_lv;
int tmp, target_id;
@@ -11708,7 +11829,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
/*==========================================
* Client tells server he'd like to use AoE skill id 'skill_id' of level 'skill_lv' on 'x','y' location
*------------------------------------------*/
-void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo)
+static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo)
{
int64 tick = timer->gettick();
@@ -11789,12 +11910,12 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
}
}
-void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a ground skill.
/// 0116 <skill lv>.W <skill id>.W <x>.W <y>.W (CZ_USE_SKILL_TOGROUND)
/// 0366 <skill lv>.W <skill id>.W <x>.W <y>.W (CZ_USE_SKILL_TOGROUND2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
+static void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
{
if (pc_cant_act(sd))
return;
@@ -11810,12 +11931,12 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
);
}
-void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to use a ground skill with text.
/// 0190 <skill lv>.W <skill id>.W <x>.W <y>.W <contents>.80B (CZ_USE_SKILL_TOGROUND_WITHTALKBOX)
/// 0367 <skill lv>.W <skill id>.W <x>.W <y>.W <contents>.80B (CZ_USE_SKILL_TOGROUND_WITHTALKBOX2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd)
+static void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd)
{
if (pc_cant_act(sd))
return;
@@ -11831,10 +11952,10 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd)
);
}
-void clif_parse_UseSkillMap(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_UseSkillMap(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to map selection dialog (CZ_SELECT_WARPPOINT).
/// 011b <skill id>.W <map name>.16B
-void clif_parse_UseSkillMap(int fd, struct map_session_data* sd)
+static void clif_parse_UseSkillMap(int fd, struct map_session_data *sd)
{
uint16 skill_id = RFIFOW(fd,2);
char map_name[MAP_NAME_LENGTH];
@@ -11855,19 +11976,19 @@ void clif_parse_UseSkillMap(int fd, struct map_session_data* sd)
skill->castend_map(sd,skill_id,map_name);
}
-void clif_parse_RequestMemo(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RequestMemo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to set a memo on current map (CZ_REMEMBER_WARPPOINT).
/// 011d
-void clif_parse_RequestMemo(int fd,struct map_session_data *sd)
+static void clif_parse_RequestMemo(int fd, struct map_session_data *sd)
{
if (!pc_isdead(sd))
pc->memo(sd,-1);
}
-void clif_parse_ProduceMix(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ProduceMix(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to pharmacy item selection dialog (CZ_REQMAKINGITEM).
/// 018e <name id>.W { <material id>.W }*3
-void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
+static void clif_parse_ProduceMix(int fd, struct map_session_data *sd)
{
switch( sd->menuskill_id ) {
case -1:
@@ -11889,7 +12010,7 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_Cooking(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Cooking(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to mixing item selection dialog (CZ_REQ_MAKINGITEM).
/// 025b <mk type>.W <name id>.W
/// mk type:
@@ -11899,7 +12020,8 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) __attribute__((nonnu
/// 4 = GN_MIX_COOKING
/// 5 = GN_MAKEBOMB
/// 6 = GN_S_PHARMACY
-void clif_parse_Cooking(int fd,struct map_session_data *sd) {
+static void clif_parse_Cooking(int fd, struct map_session_data *sd)
+{
int type = RFIFOW(fd,2);
int nameid = RFIFOW(fd,4);
int amount = sd->menuskill_val2?sd->menuskill_val2:1;
@@ -11917,10 +12039,10 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) {
clif_menuskill_clear(sd);
}
-void clif_parse_RepairItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RepairItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to repair weapon item selection dialog (CZ_REQ_ITEMREPAIR).
/// 01fd <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W
-void clif_parse_RepairItem(int fd, struct map_session_data *sd)
+static void clif_parse_RepairItem(int fd, struct map_session_data *sd)
{
if (sd->menuskill_id != BS_REPAIRWEAPON)
return;
@@ -11934,10 +12056,10 @@ void clif_parse_RepairItem(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to refine weapon item selection dialog (CZ_REQ_WEAPONREFINE).
/// 0222 <index>.L
-void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
+static void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
{
int idx;
@@ -11956,7 +12078,7 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcSelectMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to script menu dialog (CZ_CHOOSE_MENU).
/// 00b8 <npc id>.L <choice>.B
/// choice:
@@ -11964,7 +12086,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) __attribute__(
/// 255 = cancel
/// NOTE: If there were more than 254 items in the list, choice
/// overflows to choice%256.
-void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
+static void clif_parse_NpcSelectMenu(int fd, struct map_session_data *sd)
{
int npc_id = RFIFOL(fd,2);
uint8 select = RFIFOB(fd,6);
@@ -11986,18 +12108,18 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
npc->scriptcont(sd,npc_id, false);
}
-void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcNextClicked(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC dialog 'next' click (CZ_REQ_NEXT_SCRIPT).
/// 00b9 <npc id>.L
-void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
+static void clif_parse_NpcNextClicked(int fd, struct map_session_data *sd)
{
npc->scriptcont(sd,RFIFOL(fd,2), false);
}
-void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcAmountInput(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC numeric input dialog value (CZ_INPUT_EDITDLG).
/// 0143 <npc id>.L <value>.L
-void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
+static void clif_parse_NpcAmountInput(int fd, struct map_session_data *sd)
{
int npcid = RFIFOL(fd,2);
int amount = RFIFOL(fd,6);
@@ -12009,10 +12131,10 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
npc->scriptcont(sd, npcid, false);
}
-void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC text input dialog value (CZ_INPUT_EDITDLGSTR).
/// 01d5 <packet len>.W <npc id>.L <string>.?B
-void clif_parse_NpcStringInput(int fd, struct map_session_data* sd)
+static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd)
{
int len = RFIFOW(fd, 2);
// [4144] can't confirm exact client version. At least >= correct for 20150513
@@ -12034,10 +12156,10 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd)
npc->scriptcont(sd, npcid, false);
}
-void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NpcCloseClicked(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// NPC dialog 'close' click (CZ_CLOSE_DIALOG).
/// 0146 <npc id>.L
-void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
+static void clif_parse_NpcCloseClicked(int fd, struct map_session_data *sd)
{
if (!sd->npc_id) //Avoid parsing anything when the script was done with. [Skotlex]
return;
@@ -12045,12 +12167,12 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
npc->scriptcont(sd, RFIFOL(fd,2), true);
}
-void clif_parse_ItemIdentify(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ItemIdentify(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to identify item selection dialog (CZ_REQ_ITEMIDENTIFY).
/// 0178 <index>.W
/// index:
/// -1 = cancel
-void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
+static void clif_parse_ItemIdentify(int fd, struct map_session_data *sd)
{
short idx = RFIFOW(fd,2);
@@ -12068,7 +12190,7 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
/// Identifying item with right-click (CZ_REQ_ONECLICK_ITEMIDENTIFY).
/// 0A35 <index>.W
-void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
+static void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
{
int cmd = RFIFOW(fd,0);
short idx = RFIFOW(fd, packet_db[cmd].pos[0]) - 2;
@@ -12082,10 +12204,10 @@ void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
skill->identify(sd, idx);
}
-void clif_parse_SelectArrow(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SelectArrow(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to arrow crafting item selection dialog (CZ_REQ_MAKINGARROW).
/// 01ae <name id>.W
-void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
+static void clif_parse_SelectArrow(int fd, struct map_session_data *sd)
{
if (pc_istrading(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
@@ -12114,10 +12236,10 @@ void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_AutoSpell(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_AutoSpell(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to SA_AUTOSPELL skill selection dialog (CZ_SELECTAUTOSPELL).
/// 01ce <skill id>.L
-void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
+static void clif_parse_AutoSpell(int fd, struct map_session_data *sd)
{
uint16 skill_id = RFIFOL(fd,2);
@@ -12133,42 +12255,44 @@ void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_UseCard(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_UseCard(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to display item carding/composition list (CZ_REQ_ITEMCOMPOSITION_LIST).
/// 017a <card index>.W
-void clif_parse_UseCard(int fd,struct map_session_data *sd)
+static void clif_parse_UseCard(int fd, struct map_session_data *sd)
{
clif->use_card(sd,RFIFOW(fd,2)-2);
}
-void clif_parse_InsertCard(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_InsertCard(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to carding/composing item selection dialog (CZ_REQ_ITEMCOMPOSITION).
/// 017c <card index>.W <equip index>.W
-void clif_parse_InsertCard(int fd,struct map_session_data *sd)
+static void clif_parse_InsertCard(int fd, struct map_session_data *sd)
{
pc->insert_card(sd,RFIFOW(fd,2)-2,RFIFOW(fd,4)-2);
}
-void clif_parse_SolveCharName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SolveCharName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request of character's name by char ID.
/// 0193 <char id>.L (CZ_REQNAME_BYGID)
/// 0369 <char id>.L (CZ_REQNAME_BYGID2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
+static void clif_parse_SolveCharName(int fd, struct map_session_data *sd)
+{
int charid;
charid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
map->reqnickdb(sd, charid);
}
-void clif_parse_ResetChar(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ResetChar(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /resetskill /resetstate (CZ_RESET).
/// Request to reset stats or skills.
/// 0197 <type>.W
/// type:
/// 0 = state
/// 1 = skill
-void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
+static void clif_parse_ResetChar(int fd, struct map_session_data *sd)
+{
char cmd[15];
if( RFIFOW(fd,2) )
@@ -12179,11 +12303,11 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
atcommand->exec(fd, sd, cmd, true);
}
-void clif_parse_LocalBroadcast(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_LocalBroadcast(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /lb /nlb (CZ_LOCALBROADCAST).
/// Request to broadcast a message on current map.
/// 019c <packet len>.W <text>.?B
-void clif_parse_LocalBroadcast(int fd, struct map_session_data *sd)
+static void clif_parse_LocalBroadcast(int fd, struct map_session_data *sd)
{
const char commandname[] = "lkami";
char command[sizeof commandname + 2 + CHAT_SIZE_MAX] = ""; // '@' + command + ' ' + message + NUL
@@ -12202,12 +12326,12 @@ void clif_parse_LocalBroadcast(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from inventory to storage.
/// 00f3 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_BODY_TO_STORE)
/// 0364 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_BODY_TO_STORE2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
+static void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
{
int item_index, item_amount;
@@ -12225,12 +12349,12 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
gstorage->add(sd, item_index, item_amount);
}
-void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from storage to inventory.
/// 00f5 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_STORE_TO_BODY)
/// 0365 <index>.W <amount>.L (CZ_MOVE_ITEM_FROM_STORE_TO_BODY2)
/// There are various variants of this packet, some of them have padding between fields.
-void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd)
+static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd)
{
int item_index, item_amount;
@@ -12243,10 +12367,10 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd)
gstorage->get(sd, item_index, item_amount);
}
-void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from cart to storage (CZ_MOVE_ITEM_FROM_CART_TO_STORE).
/// 0129 <index>.W <amount>.L
-void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
+static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
{
if( sd->state.vending )
return;
@@ -12259,10 +12383,10 @@ void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
gstorage->addfromcart(sd, RFIFOW(fd,2) - 2, RFIFOL(fd,4));
}
-void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move an item from storage to cart (CZ_MOVE_ITEM_FROM_STORE_TO_CART).
/// 0128 <index>.W <amount>.L
-void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
+static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
{
if( sd->state.vending )
return;
@@ -12275,10 +12399,10 @@ void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
gstorage->gettocart(sd, RFIFOW(fd,2)-1, RFIFOL(fd,4));
}
-void clif_parse_CloseKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CloseKafra(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to close storage (CZ_CLOSE_STORE).
/// 00f7
-void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
+static void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
{
if( sd->state.storage_flag == STORAGE_FLAG_NORMAL )
storage->close(sd);
@@ -12286,6 +12410,7 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
gstorage->close(sd);
}
+#if 0 // Unused function
/// Displays kafra storage password dialog (ZC_REQ_STORE_PASSWORD).
/// 023a <info>.W
/// info:
@@ -12294,7 +12419,7 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd)
/// 8 = too many wrong passwords
/// ? = ignored
/// NOTE: This packet is only available on certain non-kRO clients.
-void clif_storagepassword(struct map_session_data* sd, short info)
+static void clif_storagepassword(struct map_session_data *sd, short info)
{
int fd;
@@ -12305,19 +12430,21 @@ void clif_storagepassword(struct map_session_data* sd, short info)
WFIFOW(fd,2) = info;
WFIFOSET(fd,packet_len(0x23a));
}
+#endif // 0
-void clif_parse_StoragePassword(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_StoragePassword(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to the kafra storage password dialog (CZ_ACK_STORE_PASSWORD).
/// 023b <type>.W <password>.16B <new password>.16B
/// type:
/// 2 = change password
/// 3 = check password
/// NOTE: This packet is only available on certain non-kRO clients.
-void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
+static void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
{
//TODO
}
+#if 0 // Unused function
/// Result of kafra storage password validation (ZC_RESULT_STORE_PASSWORD).
/// 023c <result>.W <error count>.W
/// result:
@@ -12328,7 +12455,7 @@ void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
/// 8 = too many wrong passwords
/// ? = ignored
/// NOTE: This packet is only available on certain non-kRO clients.
-void clif_storagepassword_result(struct map_session_data* sd, short result, short error_count)
+static void clif_storagepassword_result(struct map_session_data *sd, short result, short error_count)
{
int fd;
@@ -12340,12 +12467,13 @@ void clif_storagepassword_result(struct map_session_data* sd, short result, shor
WFIFOW(fd,4) = error_count;
WFIFOSET(fd,packet_len(0x23c));
}
+#endif // 0
-void clif_parse_CreateParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CreateParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party creation request
/// 00f9 <party name>.24B (CZ_MAKE_GROUP)
/// 01e8 <party name>.24B <item pickup rule>.B <item share rule>.B (CZ_MAKE_GROUP2)
-void clif_parse_CreateParty(int fd, struct map_session_data *sd)
+static void clif_parse_CreateParty(int fd, struct map_session_data *sd)
{
char name[NAME_LENGTH];
@@ -12364,8 +12492,8 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd)
party->create(sd,name,0,0);
}
-void clif_parse_CreateParty2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
+static void clif_parse_CreateParty2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
{
char name[NAME_LENGTH];
int item1 = RFIFOB(fd,26);
@@ -12386,11 +12514,12 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
party->create(sd,name,item1,item2);
}
-void clif_parse_PartyInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party invitation request
/// 00fc <account id>.L (CZ_REQ_JOIN_GROUP)
/// 02c4 <char name>.24B (CZ_PARTY_JOIN_REQ)
-void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
+static void clif_parse_PartyInvite(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
if(map->list[sd->bl.m].flag.partylock) {
@@ -12409,8 +12538,8 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
party->invite(sd, t_sd);
}
-void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
+static void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
{
struct map_session_data *t_sd;
char name[NAME_LENGTH];
@@ -12433,28 +12562,29 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
party->invite(sd, t_sd);
}
-void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ReplyPartyInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party invitation reply
/// 00ff <party id>.L <flag>.L (CZ_JOIN_GROUP)
/// 02c7 <party id>.L <flag>.B (CZ_PARTY_JOIN_REQ_ACK)
/// flag:
/// 0 = reject
/// 1 = accept
-void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd)
+static void clif_parse_ReplyPartyInvite(int fd, struct map_session_data *sd)
{
party->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd)
+static void clif_parse_ReplyPartyInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ReplyPartyInvite2(int fd, struct map_session_data *sd)
{
party->reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
}
-void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to leave party (CZ_REQ_LEAVE_GROUP).
/// 0100
-void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
+static void clif_parse_LeaveParty(int fd, struct map_session_data *sd)
+{
if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
@@ -12463,10 +12593,11 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
party->leave(sd);
}
-void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a party member (CZ_REQ_EXPEL_GROUP_MEMBER).
/// 0103 <account id>.L <char name>.24B
-void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
+static void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd)
+{
if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
@@ -12475,11 +12606,11 @@ void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
party->removemember(sd, RFIFOL(fd,2), RFIFOP(fd,6));
}
-void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change party options.
/// 0102 <exp share rule>.L (CZ_CHANGE_GROUPEXPOPTION)
/// 07d7 <exp share rule>.L <item pickup rule>.B <item share rule>.B (CZ_GROUPINFO_CHANGE_V2)
-void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
+static void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
{
struct party_data *p;
int i;
@@ -12516,8 +12647,8 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
* @param fd The incoming file descriptor.
* @param sd The related character.
*/
-void clif_parse_PartyMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_PartyMessage(int fd, struct map_session_data *sd)
+static void clif_parse_PartyMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyMessage(int fd, struct map_session_data *sd)
{
const struct packet_chat_message *packet = RP2PTR(fd);
char message[CHAT_SIZE_MAX + NAME_LENGTH + 3 + 1];
@@ -12528,20 +12659,21 @@ void clif_parse_PartyMessage(int fd, struct map_session_data *sd)
party->send_message(sd, message);
}
-void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyChangeLeader(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Changes Party Leader (CZ_CHANGE_GROUP_MASTER).
/// 07da <account id>.L
-void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) {
+static void clif_parse_PartyChangeLeader(int fd, struct map_session_data *sd)
+{
party->changeleader(sd, map->id2sd(RFIFOL(fd,2)));
}
-void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Party Booking in KRO [Spiria]
///
/// Request to register a party booking advertisement (CZ_PARTY_BOOKING_REQ_REGISTER).
/// 0802 <level>.W <map id>.W { <job>.W }*6
-void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
short level = RFIFOW(fd,2);
@@ -12564,7 +12696,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
/// 0 = success
/// 1 = failure
/// 2 = already registered
-void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
+static void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
{
#ifndef PARTY_RECRUIT
int fd;
@@ -12580,10 +12712,10 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
#endif
}
-void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to search for party booking advertisement (CZ_PARTY_BOOKING_REQ_SEARCH).
/// 0804 <level>.W <map id>.W <job>.W <last index>.L <result count>.W
-void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
short level = RFIFOW(fd,2);
@@ -12603,7 +12735,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
/// more results:
/// 0 = no
/// 1 = yes
-void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
+static void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result)
{
#ifndef PARTY_RECRUIT
int i, j;
@@ -12631,10 +12763,10 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
#endif
}
-void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete own party booking advertisement (CZ_PARTY_BOOKING_REQ_DELETE).
/// 0806
-void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
if(party->booking_delete(sd))
@@ -12651,7 +12783,7 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
/// 1 = success (auto-removed expired ad)
/// 2 = failure
/// 3 = nothing registered
-void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
+static void clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag)
{
#ifndef PARTY_RECRUIT
int fd;
@@ -12667,10 +12799,10 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
#endif
}
-void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update party booking advertisement (CZ_PARTY_BOOKING_REQ_UPDATE).
/// 0808 { <job>.W }*6
-void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
short job[PARTY_BOOKING_JOBS];
@@ -12687,7 +12819,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
/// Notification about new party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_INSERT).
/// 0809 <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6
-void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
+static void clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifndef PARTY_RECRUIT
int i;
@@ -12713,7 +12845,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
/// Notification about updated party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_UPDATE).
/// 080a <index>.L { <job>.W }*6
-void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
+static void clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifndef PARTY_RECRUIT
int i;
@@ -12734,7 +12866,7 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo
/// Notification about deleted party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_DELETE).
/// 080b <index>.L
-void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
+static void clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index)
{
#ifndef PARTY_RECRUIT
uint8 buf[6];
@@ -12749,13 +12881,13 @@ void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
#endif
}
-void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE).
/// Code written by mkbu95, Spiria, Yommy and Ind
/// Request to register a party booking advertisement (CZ_PARTY_RECRUIT_REQ_REGISTER).
/// 08e5 <level>.W <notice>.37B
-void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
short level = RFIFOW(fd,2);
@@ -12772,7 +12904,7 @@ void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd)
/// more results:
/// 0 = no
/// 1 = yes
-void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
+static void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result)
{
#ifdef PARTY_RECRUIT
int i;
@@ -12807,7 +12939,7 @@ void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results,
/// 0 = success
/// 1 = failure
/// 2 = already registered
-void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag)
+static void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag)
{
#ifdef PARTY_RECRUIT
int fd;
@@ -12823,10 +12955,10 @@ void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag)
#endif
}
-void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to search for party booking advertisement (CZ_PARTY_RECRUIT_REQ_SEARCH).
/// 08e7 <level>.W <map id>.W <last index>.L <result count>.W
-void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
short level = RFIFOW(fd, 2);
@@ -12840,10 +12972,10 @@ void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd)
#endif
}
-void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete own party booking advertisement (CZ_PARTY_RECRUIT_REQ_DELETE).
/// 08e9
-void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd)
+static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
if(party->booking_delete(sd))
@@ -12860,7 +12992,7 @@ void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd)
/// 1 = success (auto-removed expired ad)
/// 2 = failure
/// 3 = nothing registered
-void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag)
+static void clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag)
{
#ifdef PARTY_RECRUIT
int fd;
@@ -12876,10 +13008,10 @@ void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag)
#endif
}
-void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update party booking advertisement (CZ_PARTY_RECRUIT_REQ_UPDATE).
/// 08eb <notice>.37B
-void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
+static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
const char *notice = RFIFOP(fd, 2);
@@ -12892,7 +13024,7 @@ void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
/// Notification about new party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_INSERT).
/// 08ec <index>.L <expire time>.L <char name>.24B <level>.W <notice>.37B
-void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
+static void clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+6+24+4+37+1];
@@ -12915,7 +13047,7 @@ void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_boo
/// Notification about updated party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_UPDATE).
/// 08ed <index>.L <notice>.37B
-void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad)
+static void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+37+1];
@@ -12934,7 +13066,7 @@ void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_boo
/// Notification about deleted party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_DELETE).
/// 08ee <index>.L
-void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index)
+static void clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+1];
@@ -12949,10 +13081,10 @@ void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index)
#endif
}
-void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add to filtering list (PARTY_RECRUIT_ADD_FILTERLINGLIST).
/// 08ef <index>.L
-void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
@@ -12963,10 +13095,10 @@ void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd
#endif
}
-void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to remove from filtering list (PARTY_RECRUIT_SUB_FILTERLINGLIST).
/// 08f0 <GID>.L
-void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
int gid = RFIFOL(fd, 2);
@@ -12977,10 +13109,10 @@ void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd
#endif
}
-void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to recruit volunteer (PARTY_RECRUIT_REQ_VOLUNTEER).
/// 08f1 <index>.L
-void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
@@ -12993,7 +13125,7 @@ void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
/// Request volunteer information (PARTY_RECRUIT_VOLUNTEER_INFO).
/// 08f2 <AID>.L <job>.L <level>.W <char name>.24B
-void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd)
+static void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+4+4+2+24+1];
@@ -13013,31 +13145,31 @@ void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd)
#if 0 //Disabled for now. Needs more info.
/// 08f3 <packet type>.W <cost>.L
-void clif_PartyBookingPersonalSetting(int fd, struct map_session_data *sd)
+static void clif_PartyBookingPersonalSetting(int fd, struct map_session_data *sd)
{
}
-void clif_parse_PartyBookingShowEquipment(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingShowEquipment(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08f4 <target GID>.L
-void clif_parse_PartyBookingShowEquipment(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingShowEquipment(int fd, struct map_session_data *sd)
{
}
-void clif_parse_PartyBookingReqRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingReqRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08f5 <packet len>.W
-void clif_parse_PartyBookingReqRecall(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingReqRecall(int fd, struct map_session_data *sd)
{
}
-void clif_PartyBookingRecallCost(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_PartyBookingRecallCost(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08f6 <money>.L <map name>.16B
-void clif_PartyBookingRecallCost(int fd, struct map_session_data *sd)
+static void clif_PartyBookingRecallCost(int fd, struct map_session_data *sd)
{
}
-void clif_parse_PartyBookingAckRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingAckRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08f7 <result>.B
-void clif_parse_PartyBookingAckRecall(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingAckRecall(int fd, struct map_session_data *sd)
{
}
@@ -13048,15 +13180,15 @@ void clif_parse_PartyBookingAckRecall(int fd, struct map_session_data *sd)
/// REASON_REFUSE = 0x2
/// REASON_NOT_PARTY_MEMBER = 0x3
/// REASON_ETC = 0x4
-void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd)
+static void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd)
{
}
#endif //if 0
-void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08f9 <refuse AID>.L
-void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned int aid = RFIFOL(fd, 2);
@@ -13067,9 +13199,9 @@ void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
#endif
}
-void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08fa <index>.L
-void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd)
+static void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6];
@@ -13083,9 +13215,9 @@ void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data
#endif
}
-void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// 08fb <index>.L
-void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
+static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
@@ -13097,7 +13229,7 @@ void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
}
/// 0909 <index>.L
-void clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd)
+static void clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+1];
@@ -13113,7 +13245,7 @@ void clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd)
}
/// 090b <gid>.L <char name>.24B
-void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd)
+static void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+24+1];
@@ -13130,7 +13262,7 @@ void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd)
}
/// 090c <gid>.L <char name>.24B
-void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
+static void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6+24+1];
@@ -13148,28 +13280,28 @@ void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
#if 0
/// 091c <aid>.L
-void clif_PartyBookingCancelVolunteerToPM(struct map_session_data *sd)
+static void clif_PartyBookingCancelVolunteerToPM(struct map_session_data *sd)
{
}
/// 0971 <pm_aid>.L
-void clif_PartyBookingRefuseVolunteerToPM(struct map_session_data *sd)
+static void clif_PartyBookingRefuseVolunteerToPM(struct map_session_data *sd)
{
}
#endif //if 0
-void clif_parse_CloseVending(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_CloseVending(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to close own vending (CZ_REQ_CLOSESTORE).
/// 012e
-void clif_parse_CloseVending(int fd, struct map_session_data* sd)
+static void clif_parse_CloseVending(int fd, struct map_session_data *sd)
{
vending->close(sd);
}
-void clif_parse_VendingListReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_VendingListReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to open a vending shop (CZ_REQ_BUY_FROMMC).
/// 0130 <account id>.L
-void clif_parse_VendingListReq(int fd, struct map_session_data* sd)
+static void clif_parse_VendingListReq(int fd, struct map_session_data *sd)
{
if( sd->npc_id ) {// using an NPC
return;
@@ -13177,10 +13309,10 @@ void clif_parse_VendingListReq(int fd, struct map_session_data* sd)
vending->list(sd,RFIFOL(fd,2));
}
-void clif_parse_PurchaseReq(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PurchaseReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC).
/// 0134 <packet len>.W <account id>.L { <amount>.W <index>.W }*
-void clif_parse_PurchaseReq(int fd, struct map_session_data* sd)
+static void clif_parse_PurchaseReq(int fd, struct map_session_data *sd)
{
int len = (int)RFIFOW(fd, 2) - 8;
int id;
@@ -13198,10 +13330,10 @@ void clif_parse_PurchaseReq(int fd, struct map_session_data* sd)
sd->vended_id = 0;
}
-void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PurchaseReq2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC2).
/// 0801 <packet len>.W <account id>.L <unique id>.L { <amount>.W <index>.W }*
-void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd)
+static void clif_parse_PurchaseReq2(int fd, struct map_session_data *sd)
{
int len = (int)RFIFOW(fd, 2) - 12;
int aid;
@@ -13220,14 +13352,15 @@ void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd)
sd->vended_id = 0;
}
-void clif_parse_OpenVending(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_OpenVending(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Confirm or cancel the shop preparation window.
/// 012f <packet len>.W <shop name>.80B { <index>.W <amount>.W <price>.L }* (CZ_REQ_OPENSTORE)
/// 01b2 <packet len>.W <shop name>.80B <result>.B { <index>.W <amount>.W <price>.L }* (CZ_REQ_OPENSTORE2)
/// result:
/// 0 = canceled
/// 1 = open
-void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
+static void clif_parse_OpenVending(int fd, struct map_session_data *sd)
+{
int len = (int)RFIFOW(fd, 2) - 85;
const char *message;
bool flag;
@@ -13260,10 +13393,10 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
vending->open(sd, message, data, len/8);
}
-void clif_parse_CreateGuild(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CreateGuild(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild creation request (CZ_REQ_MAKE_GUILD).
/// 0165 <char id>.L <guild name>.24B
-void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
+static void clif_parse_CreateGuild(int fd, struct map_session_data *sd)
{
char name[NAME_LENGTH];
safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);
@@ -13276,15 +13409,15 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
guild->create(sd, name);
}
-void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild window interface permissions (CZ_REQ_GUILD_MENUINTERFACE).
/// 014d
-void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd)
+static void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd)
{
clif->guild_masterormember(sd);
}
-void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild window information (CZ_REQ_GUILD_MENU).
/// 014f <type>.L
/// type:
@@ -13295,7 +13428,7 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) __attribut
/// 4 = expulsion list
/// 5 = unknown (GM_ALLGUILDLIST)
/// 6 = notice
-void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
+static void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
{
if( !sd->status.guild_id && !sd->bg_id )
return;
@@ -13325,10 +13458,10 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
}
}
-void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update guild positions (CZ_REG_CHANGE_GUILD_POSITIONINFO).
/// 0161 <packet len>.W { <position id>.L <mode>.L <ranking>.L <pay rate>.L <name>.24B }*
-void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
+static void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
{
int i;
int count = (RFIFOW(fd, 2) - 4) / 40;
@@ -13342,10 +13475,10 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
}
}
-void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update the position of guild members (CZ_REQ_CHANGE_MEMBERPOS).
/// 0155 <packet len>.W { <account id>.L <char id>.L <position id>.L }*
-void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
+static void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
{
int i;
int len = RFIFOW(fd, 2);
@@ -13369,10 +13502,10 @@ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
}
}
-void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildRequestEmblem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request for guild emblem data (CZ_REQ_GUILD_EMBLEM_IMG).
/// 0151 <guild id>.L
-void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd)
+static void clif_parse_GuildRequestEmblem(int fd, struct map_session_data *sd)
{
struct guild* g;
int guild_id = RFIFOL(fd,2);
@@ -13382,7 +13515,8 @@ void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd)
}
/// Validates data of a guild emblem (compressed bitmap)
-bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
+static bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len)
+{
enum e_bitmapconst {
RGBTRIPLE_SIZE = 3, // sizeof(RGBTRIPLE)
RGBQUAD_SIZE = 4, // sizeof(RGBQUAD)
@@ -13506,10 +13640,10 @@ bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
return true;
}
-void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildChangeEmblem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to update the guild emblem (CZ_REGISTER_GUILD_EMBLEM_IMG).
/// 0153 <packet len>.W <emblem data>.?B
-void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
+static void clif_parse_GuildChangeEmblem(int fd, struct map_session_data *sd)
{
unsigned int emblem_len = RFIFOW(fd,2)-4;
const uint8* emblem = RFIFOP(fd,4);
@@ -13526,10 +13660,10 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
guild->change_emblem(sd, emblem_len, (const char*)emblem);
}
-void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildChangeNotice(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild notice update request (CZ_GUILD_NOTICE).
/// 016e <guild id>.L <msg1>.60B <msg2>.120B
-void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd)
+static void clif_parse_GuildChangeNotice(int fd, struct map_session_data *sd)
{
int guild_id = RFIFOL(fd,2);
char *msg1 = NULL, *msg2 = NULL;
@@ -13551,7 +13685,8 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd)
}
// Helper function for guild invite functions
-bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
+static bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd)
+{
if ( t_sd == NULL )// not online or does not exist
return false;
@@ -13577,20 +13712,21 @@ bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_sessi
return true;
}
-void clif_parse_GuildInvite(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild invite request (CZ_REQ_JOIN_GUILD).
/// 0168 <account id>.L <inviter account id>.L <inviter char id>.L
-void clif_parse_GuildInvite(int fd,struct map_session_data *sd) {
+static void clif_parse_GuildInvite(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd = map->id2sd(RFIFOL(fd,2));
if (!clif_sub_guild_invite(fd, sd, t_sd))
return;
}
-void clif_parse_GuildInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild invite request (/guildinvite) (CZ_REQ_JOIN_GUILD2).
/// 0916 <char name>.24B
-void clif_parse_GuildInvite2(int fd, struct map_session_data *sd)
+static void clif_parse_GuildInvite2(int fd, struct map_session_data *sd)
{
char nick[NAME_LENGTH];
struct map_session_data *t_sd = NULL;
@@ -13601,21 +13737,22 @@ void clif_parse_GuildInvite2(int fd, struct map_session_data *sd)
clif_sub_guild_invite(fd, sd, t_sd);
}
-void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildReplyInvite(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to guild invitation (CZ_JOIN_GUILD).
/// 016b <guild id>.L <answer>.L
/// answer:
/// 0 = refuse
/// 1 = accept
-void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd)
+static void clif_parse_GuildReplyInvite(int fd, struct map_session_data *sd)
{
guild->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-void clif_parse_GuildLeave(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildLeave(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to leave guild (CZ_REQ_LEAVE_GUILD).
/// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B
-void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
+static void clif_parse_GuildLeave(int fd, struct map_session_data *sd)
+{
if(map->list[sd->bl.m].flag.guildlock) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
@@ -13628,10 +13765,11 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
guild->leave(sd,RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOP(fd,14));
}
-void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildExpulsion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to expel a member of a guild (CZ_REQ_BAN_GUILD).
/// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B
-void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
+static void clif_parse_GuildExpulsion(int fd, struct map_session_data *sd)
+{
if( map->list[sd->bl.m].flag.guildlock || sd->bg_id ) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
@@ -13649,8 +13787,8 @@ void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
* @param fd The incoming file descriptor.
* @param sd The related character.
*/
-void clif_parse_GuildMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_GuildMessage(int fd, struct map_session_data *sd)
+static void clif_parse_GuildMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildMessage(int fd, struct map_session_data *sd)
{
const struct packet_chat_message *packet = RP2PTR(fd);
char message[CHAT_SIZE_MAX + NAME_LENGTH + 3 + 1];
@@ -13664,10 +13802,11 @@ void clif_parse_GuildMessage(int fd, struct map_session_data *sd)
guild->send_message(sd, message);
}
-void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Guild alliance request (CZ_REQ_ALLY_GUILD).
/// 0170 <account id>.L <inviter account id>.L <inviter char id>.L
-void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
+static void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
if(!sd->state.gmaster_flag)
@@ -13689,24 +13828,25 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
guild->reqalliance(sd,t_sd);
}
-void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a guild alliance request (CZ_ALLY_GUILD).
/// 0172 <inviter account id>.L <answer>.L
/// answer:
/// 0 = refuse
/// 1 = accept
-void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd)
+static void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd)
{
guild->reply_reqalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a guild alliance or opposition (CZ_REQ_DELETE_RELATED_GUILD).
/// 0183 <opponent guild id>.L <relation>.L
/// relation:
/// 0 = Ally
/// 1 = Enemy
-void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
+static void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd)
+{
if(!sd->state.gmaster_flag)
return;
@@ -13717,10 +13857,11 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
guild->delalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
-void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to set a guild as opposition (CZ_REQ_HOSTILE_GUILD).
/// 0180 <account id>.L
-void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
+static void clif_parse_GuildOpposition(int fd, struct map_session_data *sd)
+{
struct map_session_data *t_sd;
if(!sd->state.gmaster_flag)
@@ -13742,13 +13883,13 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
guild->opposition(sd,t_sd);
}
-void clif_parse_GuildBreak(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GuildBreak(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete own guild (CZ_REQ_DISORGANIZE_GUILD).
/// 015d <key>.40B
/// key:
/// now guild name; might have been (intended) email, since the
/// field name and size is same as the one in CH_DELETE_CHAR.
-void clif_parse_GuildBreak(int fd, struct map_session_data *sd)
+static void clif_parse_GuildBreak(int fd, struct map_session_data *sd)
{
char key[40];
if( map->list[sd->bl.m].flag.guildlock ) {
@@ -13762,7 +13903,7 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd)
/// Pet
///
-void clif_parse_PetMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PetMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke a pet menu action (CZ_COMMAND_PET).
/// 01a1 <type>.B
/// type:
@@ -13771,23 +13912,23 @@ void clif_parse_PetMenu(int fd, struct map_session_data *sd) __attribute__((nonn
/// 2 = performance
/// 3 = return to egg
/// 4 = unequip accessory
-void clif_parse_PetMenu(int fd, struct map_session_data *sd)
+static void clif_parse_PetMenu(int fd, struct map_session_data *sd)
{
pet->menu(sd,RFIFOB(fd,2));
}
-void clif_parse_CatchPet(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CatchPet(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Attempt to tame a monster (CZ_TRYCAPTURE_MONSTER).
/// 019f <id>.L
-void clif_parse_CatchPet(int fd, struct map_session_data *sd)
+static void clif_parse_CatchPet(int fd, struct map_session_data *sd)
{
pet->catch_process2(sd,RFIFOL(fd,2));
}
-void clif_parse_SelectEgg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SelectEgg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to pet incubator egg selection dialog (CZ_SELECT_PETEGG).
/// 01a7 <index>.W
-void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
+static void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
{
if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_val != -1) {
return;
@@ -13796,7 +13937,7 @@ void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
}
-void clif_parse_SendEmotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SendEmotion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to display pet's emotion/talk (CZ_PET_ACT).
/// 01a9 <data>.L
/// data:
@@ -13821,24 +13962,24 @@ void clif_parse_SendEmotion(int fd, struct map_session_data *sd) __attribute__((
/// 2 = satisfied (noting)
/// 3 = stuffed (full)
/// 4 = full (so_full)
-void clif_parse_SendEmotion(int fd, struct map_session_data *sd)
+static void clif_parse_SendEmotion(int fd, struct map_session_data *sd)
{
if(sd->pd)
clif->pet_emotion(sd->pd,RFIFOL(fd,2));
}
-void clif_parse_ChangePetName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ChangePetName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change pet's name (CZ_RENAME_PET).
/// 01a5 <name>.24B
-void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
+static void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
{
pet->change_name(sd, RFIFOP(fd,2));
}
-void clif_parse_pet_evolution(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_pet_evolution(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to Evolve the pet (CZ_PET_EVOLUTION) [Dastgir/Hercules]
/// 09fb <Length>.W <EvolvedPetEggID>.W {<index>.W <amount>.W}*items
-void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
+static void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_PET_EVOLUTION *p = RP2PTR(fd);
int i = 0, idx, petIndex;
@@ -13935,7 +14076,8 @@ void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
* Result of Pet Evolution (ZC_PET_EVOLUTION_RESULT)
* 0x9fc <Result>.L
*/
-void clif_pet_evolution_result(int fd, enum pet_evolution_result result) {
+static void clif_pet_evolution_result(int fd, enum pet_evolution_result result)
+{
#if PACKETVER >= 20140122
WFIFOHEAD(fd, packet_len(0x9fc));
WFIFOW(fd, 0) = 0x9fc;
@@ -13944,12 +14086,13 @@ void clif_pet_evolution_result(int fd, enum pet_evolution_result result) {
#endif
}
-void clif_parse_GMKick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMKick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /kill (CZ_DISCONNECT_CHARACTER).
/// Request to disconnect a character.
/// 00cc <account id>.L
/// NOTE: Also sent when using GM right click menu "(name) force to quit"
-void clif_parse_GMKick(int fd, struct map_session_data *sd) {
+static void clif_parse_GMKick(int fd, struct map_session_data *sd)
+{
struct block_list *target;
int tid;
@@ -14003,17 +14146,18 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) {
}
}
-void clif_parse_GMKickAll(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_GMKickAll(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /killall (CZ_DISCONNECT_ALL_CHARACTER).
/// Request to disconnect all characters.
/// 00ce
-void clif_parse_GMKickAll(int fd, struct map_session_data* sd) {
+static void clif_parse_GMKickAll(int fd, struct map_session_data *sd)
+{
char cmd[15];
sprintf(cmd,"%ckickall",atcommand->at_symbol);
atcommand->exec(fd, sd, cmd, true);
}
-void clif_parse_GMShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /remove (CZ_REMOVE_AID).
/// Request to warp to a character with given login ID.
/// 01ba <account name>.24B
@@ -14021,7 +14165,7 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd) __attribute__((nonn
/// /shift (CZ_SHIFT).
/// Request to warp to a character with given name.
/// 01bb <char name>.24B
-void clif_parse_GMShift(int fd, struct map_session_data *sd)
+static void clif_parse_GMShift(int fd, struct map_session_data *sd)
{
// FIXME: remove is supposed to receive account name for clients prior 20100803RE
char player_name[NAME_LENGTH];
@@ -14033,11 +14177,12 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-void clif_parse_GMRemove2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_GMRemove2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /remove (CZ_REMOVE_AID_SSO).
/// Request to warp to a character with given account ID.
/// 0843 <account id>.L
-void clif_parse_GMRemove2(int fd, struct map_session_data* sd) {
+static void clif_parse_GMRemove2(int fd, struct map_session_data *sd)
+{
int account_id;
struct map_session_data* pl_sd;
@@ -14049,7 +14194,7 @@ void clif_parse_GMRemove2(int fd, struct map_session_data* sd) {
}
}
-void clif_parse_GMRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMRecall(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /recall (CZ_RECALL).
/// Request to summon a player with given login ID to own position.
/// 01bc <account name>.24B
@@ -14057,7 +14202,7 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd) __attribute__((non
/// /summon (CZ_RECALL_GID).
/// Request to summon a player with given name to own position.
/// 01bd <char name>.24B
-void clif_parse_GMRecall(int fd, struct map_session_data *sd)
+static void clif_parse_GMRecall(int fd, struct map_session_data *sd)
{
// FIXME: recall is supposed to receive account name for clients prior 20100803RE
char player_name[NAME_LENGTH];
@@ -14069,11 +14214,12 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
-void clif_parse_GMRecall2(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_GMRecall2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /recall (CZ_RECALL_SSO).
/// Request to summon a player with given account ID to own position.
/// 0842 <account id>.L
-void clif_parse_GMRecall2(int fd, struct map_session_data* sd) {
+static void clif_parse_GMRecall2(int fd, struct map_session_data *sd)
+{
int account_id;
struct map_session_data* pl_sd;
@@ -14085,7 +14231,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) {
}
}
-void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /item /monster (CZ_ITEM_CREATE).
/// Request to execute GM commands.
/// usage:
@@ -14099,7 +14245,7 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) __attribute
/// /item agitinvest - reset current global agit investments.(not yet implemented)
/// 013f <item/mob name>.24B
/// 09ce <item/mob name>.100B [Ind/Yommy<3]
-void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
+static void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
{
const struct packet_gm_monster_item *p = RP2PTR(fd);
int i, count;
@@ -14155,12 +14301,13 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
}
}
-void clif_parse_GMHide(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMHide(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /hide (CZ_CHANGE_EFFECTSTATE).
/// 019d <effect state>.L
/// effect state:
/// TODO: Any OPTION_* ?
-void clif_parse_GMHide(int fd, struct map_session_data *sd) {
+static void clif_parse_GMHide(int fd, struct map_session_data *sd)
+{
char cmd[6];
sprintf(cmd,"%chide",atcommand->at_symbol);
@@ -14168,14 +14315,15 @@ void clif_parse_GMHide(int fd, struct map_session_data *sd) {
atcommand->exec(fd, sd, cmd, true);
}
-void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMReqNoChat(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to adjust player's manner points (CZ_REQ_GIVE_MANNER_POINT).
/// 0149 <account id>.L <type>.B <value>.W
/// type:
/// 0 = positive points
/// 1 = negative points
/// 2 = self mute (+10 minutes)
-void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
+static void clif_parse_GMReqNoChat(int fd, struct map_session_data *sd)
+{
int id, type, value;
struct map_session_data *dstsd;
char command[NAME_LENGTH+15];
@@ -14222,11 +14370,11 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
atcommand->exec(fd, sd, command, true);
}
-void clif_parse_GMRc(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_GMRc(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /rc (CZ_REQ_GIVE_MANNER_BYNAME).
/// GM adjustment of a player's manner value by -60.
/// 0212 <char name>.24B
-void clif_parse_GMRc(int fd, struct map_session_data* sd)
+static void clif_parse_GMRc(int fd, struct map_session_data *sd)
{
char command[NAME_LENGTH+15];
char name[NAME_LENGTH];
@@ -14239,7 +14387,8 @@ void clif_parse_GMRc(int fd, struct map_session_data* sd)
/// Result of request to resolve account name (ZC_ACK_ACCOUNTNAME).
/// 01e0 <account id>.L <account name>.24B
-void clif_account_name(struct map_session_data* sd, int account_id, const char* accname) {
+static void clif_account_name(struct map_session_data *sd, int account_id, const char *accname)
+{
int fd;
nullpo_retv(sd);
@@ -14251,10 +14400,10 @@ void clif_account_name(struct map_session_data* sd, int account_id, const char*
WFIFOSET(fd,packet_len(0x1e0));
}
-void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// GM requesting account name (for right-click gm menu) (CZ_REQ_ACCOUNTNAME).
/// 01df <account id>.L
-void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
+static void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
{
int account_id = RFIFOL(fd,2);
@@ -14262,14 +14411,15 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
clif->account_name(sd, account_id, ""); // insert account name here >_<
}
-void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /changemaptype <x> <y> <type> (CZ_CHANGE_MAPTYPE).
/// GM single cell type change request.
/// 0198 <x>.W <y>.W <type>.W
/// type:
/// 0 = not walkable
/// 1 = walkable
-void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) {
+static void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd)
+{
int x,y,type;
if (!pc_has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE))
@@ -14284,14 +14434,14 @@ void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) {
//FIXME: once players leave the map, the client 'forgets' this information.
}
-void clif_parse_PMIgnore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PMIgnore(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /in /ex (CZ_SETTING_WHISPER_PC).
/// Request to allow/deny whispers from a nick.
/// 00cf <nick>.24B <type>.B
/// type:
/// 0 = (/ex nick) deny speech from nick
/// 1 = (/in nick) allow speech from nick
-void clif_parse_PMIgnore(int fd, struct map_session_data* sd)
+static void clif_parse_PMIgnore(int fd, struct map_session_data *sd)
{
char nick[NAME_LENGTH];
uint8 type;
@@ -14338,14 +14488,14 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd)
clif->wisexin(sd, type, 0); // success
}
-void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /inall /exall (CZ_SETTING_WHISPER_STATE).
/// Request to allow/deny all whispers.
/// 00d0 <type>.B
/// type:
/// 0 = (/exall) deny all speech
/// 1 = (/inall) allow all speech
-void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
+static void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
{
int type = RFIFOB(fd,2), flag;
@@ -14376,7 +14526,8 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd)
/// Whisper ignore list (ZC_WHISPER_LIST).
/// 00d4 <packet len>.W { <char name>.24B }*
-void clif_PMIgnoreList(struct map_session_data* sd) {
+static void clif_PMIgnoreList(struct map_session_data *sd)
+{
int i, fd;
nullpo_retv(sd);
@@ -14392,18 +14543,18 @@ void clif_PMIgnoreList(struct map_session_data* sd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PMIgnoreList(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Whisper ignore list request (CZ_REQ_WHISPER_LIST).
/// 00d3
-void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
+static void clif_parse_PMIgnoreList(int fd, struct map_session_data *sd)
{
clif->PMIgnoreList(sd);
}
-void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke the /doridori recovery bonus (CZ_DORIDORI).
/// 01e7
-void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
+static void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
{
if (sd->state.doridori) return;
@@ -14420,7 +14571,7 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
}
}
-void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke the effect of super novice's guardian angel prayer (CZ_CHOPOKGI).
/// 01ed
/// Note: This packet is caused by 7 lines of any text, followed by
@@ -14429,7 +14580,7 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) __at
/// "Dear angel, can you hear my voice?"
/// "I am" (space separated player name) "Super Novice~"
/// "Help me out~ Please~ T_T"
-void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
+static void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
{
/* [Ind/Hercules] */
/* game client is currently broken on this (not sure the packetver range) */
@@ -14458,7 +14609,8 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
/// state:
/// 0 = online
/// 1 = offline
-void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int char_id, int online) {
+static void clif_friendslist_toggle(struct map_session_data *sd, int account_id, int char_id, int online)
+{
int i, fd;
nullpo_retv(sd);
@@ -14483,7 +14635,7 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha
}
//Sub-function called from clif_foreachclient to toggle friends on/off [Skotlex]
-int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
+static int clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap)
{
int account_id, char_id, online;
account_id = va_arg(ap, int);
@@ -14496,7 +14648,7 @@ int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
/// Sends the whole friends list (ZC_FRIENDS_LIST).
/// 0201 <packet len>.W { <account id>.L <char id>.L <name>.24B }*
/// 0201 <packet len>.W { <account id>.L <char id>.L }*
-void clif_friendslist_send(struct map_session_data *sd)
+static void clif_friendslist_send(struct map_session_data *sd)
{
int i = 0, n, fd = sd->fd;
@@ -14535,7 +14687,7 @@ void clif_friendslist_send(struct map_session_data *sd)
/// 1 = MsgStringTable[822]="(%s) does not want to be friends with you."
/// 2 = MsgStringTable[819]="Your Friend List is full."
/// 3 = MsgStringTable[820]="(%s)'s Friend List is full."
-void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type)
+static void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type)
{
int fd;
nullpo_retv(sd);
@@ -14554,7 +14706,8 @@ void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_dat
/// Asks a player for permission to be added as friend (ZC_REQ_ADD_FRIENDS).
/// 0207 <req account id>.L <req char id>.L <req char name>.24B
-void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_id, const char* name) {
+static void clif_friendlist_req(struct map_session_data *sd, int account_id, int char_id, const char *name)
+{
int fd;
nullpo_retv(sd);
@@ -14567,10 +14720,10 @@ void clif_friendlist_req(struct map_session_data* sd, int account_id, int char_i
WFIFOSET(fd,packet_len(0x207));
}
-void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add a player as friend (CZ_ADD_FRIENDS).
/// 0202 <name>.24B
-void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
+static void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
{
struct map_session_data *f_sd;
int i;
@@ -14618,14 +14771,14 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
clif->friendlist_req(f_sd, sd->status.account_id, sd->status.char_id, sd->status.name);
}
-void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to a friend add request (CZ_ACK_REQ_ADD_FRIENDS).
/// 0208 <inviter account id>.L <inviter char id>.L <result>.B
/// 0208 <inviter account id>.L <inviter char id>.L <result>.L (PACKETVER >= 6)
/// result:
/// 0 = rejected
/// 1 = accepted
-void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
+static void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
{
struct map_session_data *f_sd;
int account_id;
@@ -14686,10 +14839,10 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
}
}
-void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a friend (CZ_DELETE_FRIENDS).
/// 0203 <account id>.L <char id>.L
-void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
+static void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
{
struct map_session_data *f_sd = NULL;
int account_id, char_id;
@@ -14752,7 +14905,8 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
/// /pvpinfo list (ZC_ACK_PVPPOINT).
/// 0210 <char id>.L <account id>.L <win point>.L <lose point>.L <point>.L
-void clif_PVPInfo(struct map_session_data* sd) {
+static void clif_PVPInfo(struct map_session_data *sd)
+{
int fd;
nullpo_retv(sd);
@@ -14767,10 +14921,10 @@ void clif_PVPInfo(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x210));
}
-void clif_parse_PVPInfo(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_PVPInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /pvpinfo (CZ_REQ_PVPPOINT).
/// 020f <char id>.L <account id>.L
-void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
+static void clif_parse_PVPInfo(int fd, struct map_session_data *sd)
{
// TODO: Is there a way to use this on an another player (char/acc id)?
clif->PVPInfo(sd);
@@ -14779,7 +14933,8 @@ void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
/// Ranking list
/// ranking pointlist { <name>.24B <point>.L }*10
-void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) {
+static void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type)
+{
const char* name;
struct fame_list* list;
int i;
@@ -14812,7 +14967,7 @@ void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) {
}
/// 097d <RankingType>.W {<CharName>.24B <point>L}*10 <mypoint>L (ZC_ACK_RANKING)
-void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
+static void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
{
#if PACKETVER >= 20120502
int fd;
@@ -14835,11 +14990,12 @@ void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
#endif
}
-void clif_parse_ranklist(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ranklist(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/*
* 097c <type> (CZ_REQ_RANKING)
* */
-void clif_parse_ranklist(int fd, struct map_session_data *sd) {
+static void clif_parse_ranklist(int fd, struct map_session_data *sd)
+{
int16 type = RFIFOW(fd, 2); //type
switch( type ) {
@@ -14852,7 +15008,7 @@ void clif_parse_ranklist(int fd, struct map_session_data *sd) {
}
// 097e <RankingType>.W <point>.L <TotalPoint>.L (ZC_UPDATE_RANKING_POINT)
-void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points)
+static void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points)
{
#if PACKETVER < 20120502
switch( type ) {
@@ -14878,7 +15034,8 @@ void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type t
/// /blacksmith list (ZC_BLACKSMITH_RANK).
/// 0219 { <name>.24B }*10 { <point>.L }*10
-void clif_blacksmith(struct map_session_data* sd) {
+static void clif_blacksmith(struct map_session_data *sd)
+{
int fd;
nullpo_retv(sd);
@@ -14889,16 +15046,18 @@ void clif_blacksmith(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x219));
}
-void clif_parse_Blacksmith(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Blacksmith(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /blacksmith (CZ_BLACKSMITH_RANK).
/// 0217
-void clif_parse_Blacksmith(int fd,struct map_session_data *sd) {
+static void clif_parse_Blacksmith(int fd, struct map_session_data *sd)
+{
clif->blacksmith(sd);
}
/// Notification about backsmith points (ZC_BLACKSMITH_POINT).
/// 021b <points>.L <total points>.L
-void clif_fame_blacksmith(struct map_session_data *sd, int points) {
+static void clif_fame_blacksmith(struct map_session_data *sd, int points)
+{
int fd;
nullpo_retv(sd);
@@ -14912,7 +15071,8 @@ void clif_fame_blacksmith(struct map_session_data *sd, int points) {
/// /alchemist list (ZC_ALCHEMIST_RANK).
/// 021a { <name>.24B }*10 { <point>.L }*10
-void clif_alchemist(struct map_session_data* sd) {
+static void clif_alchemist(struct map_session_data *sd)
+{
int fd;
nullpo_retv(sd);
@@ -14923,16 +15083,18 @@ void clif_alchemist(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x21a));
}
-void clif_parse_Alchemist(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Alchemist(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /alchemist (CZ_ALCHEMIST_RANK).
/// 0218
-void clif_parse_Alchemist(int fd,struct map_session_data *sd) {
+static void clif_parse_Alchemist(int fd, struct map_session_data *sd)
+{
clif->alchemist(sd);
}
/// Notification about alchemist points (ZC_ALCHEMIST_POINT).
/// 021c <points>.L <total points>.L
-void clif_fame_alchemist(struct map_session_data *sd, int points) {
+static void clif_fame_alchemist(struct map_session_data *sd, int points)
+{
int fd;
nullpo_retv(sd);
@@ -14946,7 +15108,8 @@ void clif_fame_alchemist(struct map_session_data *sd, int points) {
/// /taekwon list (ZC_TAEKWON_RANK).
/// 0226 { <name>.24B }*10 { <point>.L }*10
-void clif_taekwon(struct map_session_data* sd) {
+static void clif_taekwon(struct map_session_data *sd)
+{
int fd;
nullpo_retv(sd);
@@ -14957,16 +15120,18 @@ void clif_taekwon(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x226));
}
-void clif_parse_Taekwon(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Taekwon(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /taekwon (CZ_TAEKWON_RANK).
/// 0225
-void clif_parse_Taekwon(int fd,struct map_session_data *sd) {
+static void clif_parse_Taekwon(int fd, struct map_session_data *sd)
+{
clif->taekwon(sd);
}
/// Notification about taekwon points (ZC_TAEKWON_POINT).
/// 0224 <points>.L <total points>.L
-void clif_fame_taekwon(struct map_session_data *sd, int points) {
+static void clif_fame_taekwon(struct map_session_data *sd, int points)
+{
int fd;
nullpo_retv(sd);
@@ -14980,7 +15145,8 @@ void clif_fame_taekwon(struct map_session_data *sd, int points) {
/// /pk list (ZC_KILLER_RANK).
/// 0238 { <name>.24B }*10 { <point>.L }*10
-void clif_ranking_pk(struct map_session_data* sd) {
+static void clif_ranking_pk(struct map_session_data *sd)
+{
int i, fd;
nullpo_retv(sd);
@@ -14994,21 +15160,22 @@ void clif_ranking_pk(struct map_session_data* sd) {
WFIFOSET(fd, packet_len(0x238));
}
-void clif_parse_RankingPk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RankingPk(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /pk (CZ_KILLER_RANK).
/// 0237
-void clif_parse_RankingPk(int fd,struct map_session_data *sd) {
+static void clif_parse_RankingPk(int fd, struct map_session_data *sd)
+{
clif->ranking_pk(sd);
}
-void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// SG Feel save OK [Komurka] (CZ_AGREE_STARPLACE).
/// 0254 <which>.B
/// which:
/// 0 = sun
/// 1 = moon
/// 2 = star
-void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
+static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd)
{
int i;
if (sd->menuskill_id != SG_FEEL)
@@ -15034,7 +15201,7 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
/// 0 = sun
/// 1 = moon
/// 2 = star
-void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
+static void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
{
nullpo_retv(sd);
WFIFOHEAD(fd,packet_len(0x253));
@@ -15045,18 +15212,18 @@ void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
sd->menuskill_val = skill_lv;
}
-void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change homunculus' name (CZ_RENAME_MER).
/// 0231 <name>.24B
-void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd)
+static void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd)
{
homun->change_name(sd, RFIFOP(fd,2));
}
-void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to warp/move homunculus/mercenary to it's owner (CZ_REQUEST_MOVETOOWNER).
/// 0234 <id>.L
-void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
+static void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
{
int id = RFIFOL(fd,2); // Mercenary or Homunculus
struct block_list *bl = NULL;
@@ -15074,10 +15241,10 @@ void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
unit->walktoxy(bl, ud->to_x, ud->to_y, 4);
}
-void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to move homunculus/mercenary (CZ_REQUEST_MOVENPC).
/// 0232 <id>.L <position data>.3B
-void clif_parse_HomMoveTo(int fd, struct map_session_data *sd)
+static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd)
{
int id = RFIFOL(fd,2); // Mercenary or Homunculus
struct block_list *bl = NULL;
@@ -15095,12 +15262,12 @@ void clif_parse_HomMoveTo(int fd, struct map_session_data *sd)
unit->walktoxy(bl, x, y, 4);
}
-void clif_parse_HomAttack(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HomAttack(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to do an action with homunculus/mercenary (CZ_REQUEST_ACTNPC).
/// 0233 <id>.L <target id>.L <action>.B
/// action:
/// always 0
-void clif_parse_HomAttack(int fd,struct map_session_data *sd)
+static void clif_parse_HomAttack(int fd, struct map_session_data *sd)
{
struct block_list *bl = NULL;
int id = RFIFOL(fd,2),
@@ -15117,7 +15284,7 @@ void clif_parse_HomAttack(int fd,struct map_session_data *sd)
unit->attack(bl, target_id, action_type != 0);
}
-void clif_parse_HomMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HomMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke a homunculus menu action (CZ_COMMAND_MER).
/// 022d <type>.W <command>.B
/// type:
@@ -15126,7 +15293,8 @@ void clif_parse_HomMenu(int fd, struct map_session_data *sd) __attribute__((nonn
/// 0 = homunculus information
/// 1 = feed
/// 2 = delete
-void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
+static void clif_parse_HomMenu(int fd, struct map_session_data *sd)
+{ //[orn]
int cmd;
cmd = RFIFOW(fd,0);
@@ -15137,10 +15305,11 @@ void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
homun->menu(sd,RFIFOB(fd,packet_db[cmd].pos[1]));
}
-void clif_parse_AutoRevive(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_AutoRevive(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to resurrect oneself using Token of Siegfried (CZ_STANDING_RESURRECTION).
/// 0292
-void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
+static void clif_parse_AutoRevive(int fd, struct map_session_data *sd)
+{
int item_position = pc->search_inventory(sd, ITEMID_TOKEN_OF_SIEGFRIED);
int hpsp = 100;
@@ -15172,7 +15341,8 @@ void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
/// <itemdefPower>.W <plusdefPower>.W <mdefPower>.W <plusmdefPower>.W
/// <hitSuccessValue>.W <avoidSuccessValue>.W <plusAvoidSuccessValue>.W
/// <criticalSuccessValue>.W <ASPD>.W <plusASPD>.W
-void clif_check(int fd, struct map_session_data* pl_sd) {
+static void clif_check(int fd, struct map_session_data *pl_sd)
+{
nullpo_retv(pl_sd);
WFIFOHEAD(fd,packet_len(0x214));
WFIFOW(fd, 0) = 0x214;
@@ -15205,11 +15375,11 @@ void clif_check(int fd, struct map_session_data* pl_sd) {
WFIFOSET(fd,packet_len(0x214));
}
-void clif_parse_Check(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Check(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /check (CZ_REQ_STATUS_GM).
/// Request character's status values.
/// 0213 <char name>.24B
-void clif_parse_Check(int fd, struct map_session_data *sd)
+static void clif_parse_Check(int fd, struct map_session_data *sd)
{
char charname[NAME_LENGTH];
struct map_session_data* pl_sd;
@@ -15235,7 +15405,7 @@ void clif_parse_Check(int fd, struct map_session_data *sd)
/// result:
/// 0 = success
/// 1 = failure
-void clif_Mail_setattachment(int fd, int index, uint8 flag)
+static void clif_Mail_setattachment(int fd, int index, uint8 flag)
{
WFIFOHEAD(fd,packet_len(0x255));
WFIFOW(fd,0) = 0x255;
@@ -15250,7 +15420,7 @@ void clif_Mail_setattachment(int fd, int index, uint8 flag)
/// 0 = success
/// 1 = failure
/// 2 = too many items
-void clif_Mail_getattachment(int fd, uint8 flag)
+static void clif_Mail_getattachment(int fd, uint8 flag)
{
WFIFOHEAD(fd,packet_len(0x245));
WFIFOW(fd,0) = 0x245;
@@ -15263,7 +15433,7 @@ void clif_Mail_getattachment(int fd, uint8 flag)
/// result:
/// 0 = success
/// 1 = recipient does not exist
-void clif_Mail_send(int fd, bool fail)
+static void clif_Mail_send(int fd, bool fail)
{
WFIFOHEAD(fd,packet_len(0x249));
WFIFOW(fd,0) = 0x249;
@@ -15276,7 +15446,7 @@ void clif_Mail_send(int fd, bool fail)
/// result:
/// 0 = success
/// 1 = failure
-void clif_Mail_delete(int fd, int mail_id, short fail)
+static void clif_Mail_delete(int fd, int mail_id, short fail)
{
WFIFOHEAD(fd, packet_len(0x257));
WFIFOW(fd,0) = 0x257;
@@ -15290,7 +15460,7 @@ void clif_Mail_delete(int fd, int mail_id, short fail)
/// result:
/// 0 = success
/// 1 = failure
-void clif_Mail_return(int fd, int mail_id, short fail)
+static void clif_Mail_return(int fd, int mail_id, short fail)
{
WFIFOHEAD(fd,packet_len(0x274));
WFIFOW(fd,0) = 0x274;
@@ -15301,7 +15471,7 @@ void clif_Mail_return(int fd, int mail_id, short fail)
/// Notification about new mail (ZC_MAIL_RECEIVE).
/// 024a <mail id>.L <title>.40B <sender>.24B
-void clif_Mail_new(int fd, int mail_id, const char *sender, const char *title)
+static void clif_Mail_new(int fd, int mail_id, const char *sender, const char *title)
{
nullpo_retv(sender);
nullpo_retv(title);
@@ -15318,7 +15488,7 @@ void clif_Mail_new(int fd, int mail_id, const char *sender, const char *title)
/// type:
/// 0 = open
/// 1 = close
-void clif_Mail_window(int fd, int flag)
+static void clif_Mail_window(int fd, int flag)
{
WFIFOHEAD(fd,packet_len(0x260));
WFIFOW(fd,0) = 0x260;
@@ -15331,7 +15501,7 @@ void clif_Mail_window(int fd, int flag)
/// read:
/// 0 = unread
/// 1 = read
-void clif_Mail_refreshinbox(struct map_session_data *sd)
+static void clif_Mail_refreshinbox(struct map_session_data *sd)
{
int fd = sd->fd;
struct mail_data *md;
@@ -15368,10 +15538,10 @@ void clif_Mail_refreshinbox(struct map_session_data *sd)
}
}
-void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Mail inbox list request (CZ_MAIL_GET_LIST).
/// 023f
-void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
{
struct mail_data* md = &sd->mail.inbox;
@@ -15388,7 +15558,7 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
/// 0242 <packet len>.W <mail id>.L <title>.40B <sender>.24B <time>.L <zeny>.L
/// <amount>.L <name id>.W <item type>.W <identified>.B <damaged>.B <refine>.B
/// <card1>.W <card2>.W <card3>.W <card4>.W <message>.?B
-void clif_Mail_read(struct map_session_data *sd, int mail_id)
+static void clif_Mail_read(struct map_session_data *sd, int mail_id)
{
int i, fd = sd->fd;
@@ -15451,10 +15621,10 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id)
}
}
-void clif_parse_Mail_read(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_read(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to open a mail (CZ_MAIL_OPEN).
/// 0241 <mail id>.L
-void clif_parse_Mail_read(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_read(int fd, struct map_session_data *sd)
{
int mail_id = RFIFOL(fd,2);
@@ -15466,10 +15636,10 @@ void clif_parse_Mail_read(int fd, struct map_session_data *sd)
clif->mail_read(sd, RFIFOL(fd,2));
}
-void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to receive mail's attachment (CZ_MAIL_GET_ITEM).
/// 0244 <mail id>.L
-void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
{
int mail_id = RFIFOL(fd,2);
int i;
@@ -15534,10 +15704,10 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
intif->Mail_getattach(sd->status.char_id, mail_id);
}
-void clif_parse_Mail_delete(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_delete(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to delete a mail (CZ_MAIL_DELETE).
/// 0243 <mail id>.L
-void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
{
int mail_id = RFIFOL(fd,2);
int i;
@@ -15565,10 +15735,10 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
}
}
-void clif_parse_Mail_return(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_return(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to return a mail (CZ_REQ_MAIL_RETURN).
/// 0273 <mail id>.L <receive name>.24B
-void clif_parse_Mail_return(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_return(int fd, struct map_session_data *sd)
{
int mail_id = RFIFOL(fd,2);
int i;
@@ -15589,10 +15759,10 @@ void clif_parse_Mail_return(int fd, struct map_session_data *sd)
}
}
-void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item or Zeny to mail (CZ_MAIL_ADD_ITEM).
/// 0247 <index>.W <amount>.L
-void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
{
int idx = RFIFOW(fd,2);
int amount = RFIFOL(fd,4);
@@ -15607,14 +15777,14 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
clif->mail_setattachment(fd,idx,flag);
}
-void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to reset mail item and/or Zeny (CZ_MAIL_RESET_ITEM).
/// 0246 <type>.W
/// type:
/// 0 = reset all
/// 1 = remove item
/// 2 = remove zeny
-void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
{
int flag = RFIFOW(fd,2);
@@ -15624,11 +15794,11 @@ void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
mail->removezeny(sd, 0);
}
-void clif_parse_Mail_send(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Mail_send(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to send mail (CZ_MAIL_SEND).
/// 0248 <packet len>.W <recipient>.24B <title>.40B <body len>.B <body>.?B
-void clif_parse_Mail_send(int fd, struct map_session_data *sd)
+static void clif_parse_Mail_send(int fd, struct map_session_data *sd)
{
struct mail_message msg;
int body_len;
@@ -15700,7 +15870,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
/// type:
/// 0 = open
/// 1 = close
-void clif_Auction_openwindow(struct map_session_data *sd)
+static void clif_Auction_openwindow(struct map_session_data *sd)
{
int fd;
@@ -15720,7 +15890,7 @@ void clif_Auction_openwindow(struct map_session_data *sd)
/// Returns auction item search results (ZC_AUCTION_ITEM_REQ_SEARCH).
/// 0252 <packet len>.W <pages>.L <count>.L { <auction id>.L <seller name>.24B <name id>.W <type>.L <amount>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <now price>.L <max price>.L <buyer name>.24B <delete time>.L }*
-void clif_Auction_results(struct map_session_data *sd, short count, short pages, const uint8 *buf)
+static void clif_Auction_results(struct map_session_data *sd, short count, short pages, const uint8 *buf)
{
int i, fd, len = sizeof(struct auction_data);
struct auction_data auction;
@@ -15768,7 +15938,8 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages,
/// result:
/// 0 = success
/// 1 = failure
-void clif_Auction_setitem(int fd, int index, bool fail) {
+static void clif_Auction_setitem(int fd, int index, bool fail)
+{
WFIFOHEAD(fd,packet_len(0x256));
WFIFOW(fd,0) = 0x256;
WFIFOW(fd,2) = index;
@@ -15776,14 +15947,14 @@ void clif_Auction_setitem(int fd, int index, bool fail) {
WFIFOSET(fd,packet_len(0x256));
}
-void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to initialize 'new auction' data (CZ_AUCTION_CREATE).
/// 024b <type>.W
/// type:
/// 0 = create (any other action in auction window)
/// 1 = cancel (cancel pressed on register tab)
/// ? = junk, uninitialized value (ex. when switching between list filters)
-void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
{
if( sd->auction.amount > 0 )
clif->additem(sd, sd->auction.index, sd->auction.amount, 0);
@@ -15791,10 +15962,10 @@ void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
sd->auction.amount = 0;
}
-void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an item to the action (CZ_AUCTION_ADD_ITEM).
/// 024c <index>.W <count>.L
-void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
{
int idx = RFIFOW(fd,2) - 2;
int amount = RFIFOL(fd,4); // Always 1
@@ -15848,7 +16019,7 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
/// 7 = You have failed to win the auction
/// 8 = You do not have enough Zeny
/// 9 = You cannot place more than 5 bids at a time
-void clif_Auction_message(int fd, unsigned char flag)
+static void clif_Auction_message(int fd, unsigned char flag)
{
WFIFOHEAD(fd,packet_len(0x250));
WFIFOW(fd,0) = 0x250;
@@ -15862,7 +16033,7 @@ void clif_Auction_message(int fd, unsigned char flag)
/// 0 = You have ended the auction
/// 1 = You cannot end the auction
/// 2 = Auction ID is incorrect
-void clif_Auction_close(int fd, unsigned char flag)
+static void clif_Auction_close(int fd, unsigned char flag)
{
WFIFOHEAD(fd, 4);
WFIFOW(fd,0) = 0x25d; // BUG: The client identifies this packet as 0x25d (CZ_AUCTION_REQ_MY_SELL_STOP)
@@ -15870,10 +16041,10 @@ void clif_Auction_close(int fd, unsigned char flag)
WFIFOSET(fd, 4);
}
-void clif_parse_Auction_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to add an auction (CZ_AUCTION_ADD).
/// 024d <now money>.L <max money>.L <delete hour>.W
-void clif_parse_Auction_register(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_register(int fd, struct map_session_data *sd)
{
struct auction_data auction;
struct item_data *item;
@@ -15965,30 +16136,30 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
}
}
-void clif_parse_Auction_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Cancels an auction (CZ_AUCTION_ADD_CANCEL).
/// 024e <auction id>.L
-void clif_parse_Auction_cancel(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_cancel(int fd, struct map_session_data *sd)
{
unsigned int auction_id = RFIFOL(fd,2);
intif->Auction_cancel(sd->status.char_id, auction_id);
}
-void clif_parse_Auction_close(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_close(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Closes an auction (CZ_AUCTION_REQ_MY_SELL_STOP).
/// 025d <auction id>.L
-void clif_parse_Auction_close(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_close(int fd, struct map_session_data *sd)
{
unsigned int auction_id = RFIFOL(fd,2);
intif->Auction_close(sd->status.char_id, auction_id);
}
-void clif_parse_Auction_bid(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_bid(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Places a bid on an auction (CZ_AUCTION_BUY).
/// 024f <auction id>.L <money>.L
-void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
+static void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
{
unsigned int auction_id = RFIFOL(fd,2);
int bid = RFIFOL(fd,6);
@@ -16010,7 +16181,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
}
}
-void clif_parse_Auction_search(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_search(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Auction Search (CZ_AUCTION_ITEM_SEARCH).
/// 0251 <search type>.W <auction id>.L <search text>.24B <page number>.W
/// search type:
@@ -16020,7 +16191,7 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd) __attribute_
/// 3 = misc
/// 4 = name search
/// 5 = auction id search
-void clif_parse_Auction_search(int fd, struct map_session_data* sd)
+static void clif_parse_Auction_search(int fd, struct map_session_data *sd)
{
char search_text[NAME_LENGTH];
short type = RFIFOW(fd,2), page = RFIFOW(fd,32);
@@ -16035,13 +16206,13 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd)
intif->Auction_requestlist(sd->status.char_id, type, price, search_text, page);
}
-void clif_parse_Auction_buysell(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_Auction_buysell(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Requests list of own currently active bids or auctions (CZ_AUCTION_REQ_MY_INFO).
/// 025c <type>.W
/// type:
/// 0 = sell (own auctions)
/// 1 = buy (own bids)
-void clif_parse_Auction_buysell(int fd, struct map_session_data* sd)
+static void clif_parse_Auction_buysell(int fd, struct map_session_data *sd)
{
short type = RFIFOW(fd,2) + 6;
@@ -16059,7 +16230,8 @@ void clif_parse_Auction_buysell(int fd, struct map_session_data* sd)
/// List of items offered in a cash shop (ZC_PC_CASH_POINT_ITEMLIST).
/// 0287 <packet len>.W <cash point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }*
/// 0287 <packet len>.W <cash point>.L <kafra point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }* (PACKETVER >= 20070711)
-void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) {
+static void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd)
+{
struct npc_item_list *shop = NULL;
unsigned short shop_size = 0;
int fd,i, c = 0;
@@ -16117,7 +16289,8 @@ void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) {
/// 0289 <cash point>.L <error>.W
/// 0289 <cash point>.L <kafra point>.L <error>.W (PACKETVER >= 20070711)
/// For error return codes see enum cashshop_error@clif.h
-void clif_cashshop_ack(struct map_session_data* sd, int error) {
+static void clif_cashshop_ack(struct map_session_data *sd, int error)
+{
struct npc_data *nd;
int fd;
int currency[2] = { 0,0 };
@@ -16145,12 +16318,12 @@ void clif_cashshop_ack(struct map_session_data* sd, int error) {
WFIFOSET(fd, packet_len(0x289));
}
-void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to buy item(s) from cash shop (CZ_PC_BUY_CASH_POINT_ITEM).
/// 0288 <name id>.W <amount>.W
/// 0288 <name id>.W <amount>.W <kafra points>.L (PACKETVER >= 20070711)
/// 0288 <packet len>.W <kafra points>.L <count>.W { <amount>.W <name id>.W }.4B*count (PACKETVER >= 20100803)
-void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
+static void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
{
int fail = 0;
@@ -16210,7 +16383,7 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
/// 0 = "You cannot adopt more than 1 child."
/// 1 = "You must be at least character level 70 in order to adopt someone."
/// 2 = "You cannot adopt a married person."
-void clif_Adopt_reply(struct map_session_data *sd, int type)
+static void clif_Adopt_reply(struct map_session_data *sd, int type)
{
int fd;
@@ -16224,7 +16397,8 @@ void clif_Adopt_reply(struct map_session_data *sd, int type)
/// Adoption confirmation (ZC_REQ_BABY).
/// 01f6 <account id>.L <char id>.L <name>.B
-void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *src, int p_id) {
+static void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *src, int p_id)
+{
int fd;
nullpo_retv(sd);
@@ -16238,10 +16412,11 @@ void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *sr
WFIFOSET(fd,34);
}
-void clif_parse_Adopt_request(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Adopt_request(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to adopt a player (CZ_REQ_JOIN_BABY).
/// 01f9 <account id>.L
-void clif_parse_Adopt_request(int fd, struct map_session_data *sd) {
+static void clif_parse_Adopt_request(int fd, struct map_session_data *sd)
+{
struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2)), *p_sd = map->charid2sd(sd->status.partner_id);
if( pc->can_Adopt(sd, p_sd, tsd) ) {
@@ -16250,13 +16425,14 @@ void clif_parse_Adopt_request(int fd, struct map_session_data *sd) {
}
}
-void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to adopt confirmation (CZ_JOIN_BABY).
/// 01f7 <account id>.L <char id>.L <answer>.L
/// answer:
/// 0 = rejected
/// 1 = accepted
-void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) {
+static void clif_parse_Adopt_reply(int fd, struct map_session_data *sd)
+{
int p1_id = RFIFOL(fd,2);
int p2_id = RFIFOL(fd,6);
int result = RFIFOL(fd,10);
@@ -16285,7 +16461,7 @@ void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) {
/// 1 = Boss is alive (position update) (BOSS_INFO_ALIVE).
/// 2 = Boss is alive (initial announce) (BOSS_INFO_ALIVE_WITHMSG).
/// 3 = Boss is dead (BOSS_INFO_DEAD).
-void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
+static void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
{
WFIFOHEAD(fd,70);
memset(WFIFOP(fd,0),0,70);
@@ -16319,10 +16495,11 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
WFIFOSET(fd,70);
}
-void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ViewPlayerEquip(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Requesting equip of a player (CZ_EQUIPWIN_MICROSCOPE).
/// 02d6 <account id>.L
-void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
+static void clif_parse_ViewPlayerEquip(int fd, struct map_session_data *sd)
+{
int charid = RFIFOL(fd, 2);
struct map_session_data* tsd = map->id2sd(charid);
@@ -16338,7 +16515,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
}
}
-void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Receive configurations (CZ_CONFIG).
/// 02d8 <type>.L <value>.L
/// type:
@@ -16348,7 +16525,7 @@ void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((no
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_parse_cz_config(int fd, struct map_session_data *sd)
+static void clif_parse_cz_config(int fd, struct map_session_data *sd)
{
enum CZ_CONFIG type = RFIFOL(fd, 2);
int flag = RFIFOL(fd, 6);
@@ -16380,12 +16557,12 @@ void clif_parse_cz_config(int fd, struct map_session_data *sd)
clif->zc_config(sd, type, flag);
}
-void clif_parse_PartyTick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_PartyTick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change party invitation tick.
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_parse_PartyTick(int fd, struct map_session_data* sd)
+static void clif_parse_PartyTick(int fd, struct map_session_data *sd)
{
bool flag = RFIFOB(fd,6)?true:false;
sd->status.allow_party = flag;
@@ -16399,7 +16576,7 @@ void clif_parse_PartyTick(int fd, struct map_session_data* sd)
/// 02b1 <packet len>.W <num>.L { <quest id>.L <active>.B }*num
/// 097a <packet len>.W <num>.L { <quest id>.L <active>.B <remaining time>.L <time>.L <count>.W { <mob_id>.L <killed>.W <total>.W <mob name>.24B }*count }*num
/// 09f8 <packet len>.W <num>.L { <quest id>.L <active>.B <remaining time>.L <time>.L <count>.W { <hunt identification>.L <mob type>.L <mob_id>.L <min level>.L <max level>.L <killed>.W <total>.W <mob name>.24B }*count }*num
-void clif_quest_send_list(struct map_session_data *sd)
+static void clif_quest_send_list(struct map_session_data *sd)
{
int i, len, real_len;
uint8 *buf = NULL;
@@ -16460,7 +16637,7 @@ void clif_quest_send_list(struct map_session_data *sd)
/// Sends list of all quest missions (ZC_ALL_QUEST_MISSION).
/// 02b2 <packet len>.W <num>.L { <quest id>.L <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3 }*num
-void clif_quest_send_mission(struct map_session_data *sd)
+static void clif_quest_send_mission(struct map_session_data *sd)
{
int fd = sd->fd;
int i, j;
@@ -16495,7 +16672,7 @@ void clif_quest_send_mission(struct map_session_data *sd)
/// Notification about a new quest (ZC_ADD_QUEST).
/// 02b3 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3
/// 09f9 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <hunt identification>.L <mob type>.L <mob id>.L <min level>.L <max level>.L <mob count>.W <mob name>.24B }*3
-void clif_quest_add(struct map_session_data *sd, struct quest *qd)
+static void clif_quest_add(struct map_session_data *sd, struct quest *qd)
{
int i, len;
uint8 *buf = NULL;
@@ -16545,7 +16722,8 @@ void clif_quest_add(struct map_session_data *sd, struct quest *qd)
/// Notification about a quest being removed (ZC_DEL_QUEST).
/// 02b4 <quest id>.L
-void clif_quest_delete(struct map_session_data *sd, int quest_id) {
+static void clif_quest_delete(struct map_session_data *sd, int quest_id)
+{
int fd;
nullpo_retv(sd);
@@ -16559,7 +16737,7 @@ void clif_quest_delete(struct map_session_data *sd, int quest_id) {
/// Notification of an update to the hunting mission counter (ZC_UPDATE_MISSION_HUNT).
/// 02b5 <packet len>.W <mobs>.W { <quest id>.L <mob id>.L <total count>.W <current count>.W }*3
/// 09fa <packet len>.W <mobs>.W { <quest id>.L <hunt identification>.L <total count>.W <current count>.W }*3
-void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
+static void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
{
int i, len, real_len;
uint8 *buf = NULL;
@@ -16601,7 +16779,7 @@ void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
/// Notification of an hunting mission counter just after quest is added (ZC_HUNTING_QUEST_INFO).
/// 08fe <packet len>.W { <quest id>.L <mob id>.L <total count>.W <current count>.W }*3
-void clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd)
+static void clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd)
{
#if PACKETVER >= 20150513
int i, len, real_len;
@@ -16638,16 +16816,18 @@ void clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd)
#endif
}
-void clif_parse_questStateAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_questStateAck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change the state of a quest (CZ_ACTIVE_QUEST).
/// 02b6 <quest id>.L <active>.B
-void clif_parse_questStateAck(int fd, struct map_session_data *sd) {
+static void clif_parse_questStateAck(int fd, struct map_session_data *sd)
+{
quest->update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE);
}
/// Notification about the change of a quest state (ZC_ACTIVE_QUEST).
/// 02b7 <quest id>.L <active>.B
-void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active) {
+static void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active)
+{
int fd;
nullpo_retv(sd);
@@ -16670,7 +16850,7 @@ void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool ac
/// 1 = orange
/// 2 = green
/// 3 = purple
-void clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color)
+static void clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color)
{
#if PACKETVER >= 20090218
int fd;
@@ -16694,7 +16874,8 @@ void clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, s
/// Notification about a mercenary status parameter change (ZC_MER_PAR_CHANGE).
/// 02a2 <var id>.W <value>.L
-void clif_mercenary_updatestatus(struct map_session_data *sd, int type) {
+static void clif_mercenary_updatestatus(struct map_session_data *sd, int type)
+{
struct mercenary_data *md;
struct status_data *mstatus;
int fd;
@@ -16760,7 +16941,8 @@ void clif_mercenary_updatestatus(struct map_session_data *sd, int type) {
/// 029b <id>.L <atk>.W <matk>.W <hit>.W <crit>.W <def>.W <mdef>.W <flee>.W <aspd>.W
/// <name>.24B <level>.W <hp>.L <maxhp>.L <sp>.L <maxsp>.L <expire time>.L <faith>.W
/// <calls>.L <kills>.L <atk range>.W
-void clif_mercenary_info(struct map_session_data *sd) {
+static void clif_mercenary_info(struct map_session_data *sd)
+{
int fd;
struct mercenary_data *md;
struct status_data *mstatus;
@@ -16816,7 +16998,7 @@ void clif_mercenary_info(struct map_session_data *sd) {
/// Mercenary skill tree (ZC_MER_SKILLINFO_LIST).
/// 029d <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradeable>.B }*
-void clif_mercenary_skillblock(struct map_session_data *sd)
+static void clif_mercenary_skillblock(struct map_session_data *sd)
{
struct mercenary_data *md;
int fd, i, len = 4, j;
@@ -16851,12 +17033,12 @@ void clif_mercenary_skillblock(struct map_session_data *sd)
WFIFOSET(fd,len);
}
-void clif_parse_mercenary_action(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_mercenary_action(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke a mercenary menu action (CZ_MER_COMMAND).
/// 029f <command>.B
/// 1 = mercenary information
/// 2 = delete
-void clif_parse_mercenary_action(int fd, struct map_session_data* sd)
+static void clif_parse_mercenary_action(int fd, struct map_session_data *sd)
{
int option = RFIFOB(fd,2);
if (sd->md == NULL)
@@ -16872,7 +17054,7 @@ void clif_parse_mercenary_action(int fd, struct map_session_data* sd)
/// 1 = Your mercenary soldier has been killed.
/// 2 = Your mercenary soldier has been fired.
/// 3 = Your mercenary soldier has ran away.
-void clif_mercenary_message(struct map_session_data* sd, int message)
+static void clif_mercenary_message(struct map_session_data *sd, int message)
{
#if PACKETVER >= 20070227
clif->msgtable(sd, MSG_MER_FINISH + message);
@@ -16881,7 +17063,7 @@ void clif_mercenary_message(struct map_session_data* sd, int message)
/// Notification about the remaining time of a rental item (ZC_CASH_TIME_COUNTER).
/// 0298 <name id>.W <seconds>.L
-void clif_rental_time(int fd, int nameid, int seconds)
+static void clif_rental_time(int fd, int nameid, int seconds)
{ // '<ItemName>' item will disappear in <seconds/60> minutes.
WFIFOHEAD(fd,packet_len(0x298));
WFIFOW(fd,0) = 0x298;
@@ -16892,7 +17074,7 @@ void clif_rental_time(int fd, int nameid, int seconds)
/// Deletes a rental item from client's inventory (ZC_CASH_ITEM_DELETE).
/// 0299 <index>.W <name id>.W
-void clif_rental_expired(int fd, int index, int nameid)
+static void clif_rental_expired(int fd, int index, int nameid)
{ // '<ItemName>' item has been deleted from the Inventory
WFIFOHEAD(fd,packet_len(0x299));
WFIFOW(fd,0) = 0x299;
@@ -16903,7 +17085,7 @@ void clif_rental_expired(int fd, int index, int nameid)
/// Book Reading (ZC_READ_BOOK).
/// 0294 <book id>.L <page>.L
-void clif_readbook(int fd, int book_id, int page)
+static void clif_readbook(int fd, int book_id, int page)
{
WFIFOHEAD(fd,packet_len(0x294));
WFIFOW(fd,0) = 0x294;
@@ -16918,7 +17100,7 @@ void clif_readbook(int fd, int book_id, int page)
/// Updates HP bar of a camp member.
/// 02e0 <account id>.L <name>.24B <hp>.W <max hp>.W (ZC_BATTLEFIELD_NOTIFY_HP).
/// 0a0e <account id>.L <hp>.L <max hp>.L (ZC_BATTLEFIELD_NOTIFY_HP2)
-void clif_bg_hp(struct map_session_data *sd)
+static void clif_bg_hp(struct map_session_data *sd)
{
unsigned char buf[34];
@@ -16961,7 +17143,7 @@ void clif_bg_hp(struct map_session_data *sd)
/// Updates the position of a camp member on the minimap (ZC_BATTLEFIELD_NOTIFY_POSITION).
/// 02df <account id>.L <name>.24B <class>.W <x>.W <y>.W
-void clif_bg_xy(struct map_session_data *sd)
+static void clif_bg_xy(struct map_session_data *sd)
{
unsigned char buf[36];
nullpo_retv(sd);
@@ -16976,7 +17158,7 @@ void clif_bg_xy(struct map_session_data *sd)
clif->send(buf, packet_len(0x2df), &sd->bl, BG_SAMEMAP_WOS);
}
-void clif_bg_xy_remove(struct map_session_data *sd)
+static void clif_bg_xy_remove(struct map_session_data *sd)
{
unsigned char buf[36];
nullpo_retv(sd);
@@ -16993,7 +17175,7 @@ void clif_bg_xy_remove(struct map_session_data *sd)
/// Notifies clients of a battleground message (ZC_BATTLEFIELD_CHAT).
/// 02dc <packet len>.W <account id>.L <name>.24B <message>.?B
-void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes)
+static void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes)
{
struct map_session_data *sd;
unsigned char *buf;
@@ -17030,8 +17212,8 @@ void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name
* @param fd The incoming file descriptor.
* @param sd The related character.
*/
-void clif_parse_BattleChat(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_BattleChat(int fd, struct map_session_data *sd)
+static void clif_parse_BattleChat(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BattleChat(int fd, struct map_session_data *sd)
{
const struct packet_chat_message *packet = RP2PTR(fd);
char message[CHAT_SIZE_MAX + NAME_LENGTH + 3 + 1];
@@ -17044,7 +17226,8 @@ void clif_parse_BattleChat(int fd, struct map_session_data *sd)
/// Notifies client of a battleground score change (ZC_BATTLEFIELD_NOTIFY_POINT).
/// 02de <camp A points>.W <camp B points>.W
-void clif_bg_updatescore(int16 m) {
+static void clif_bg_updatescore(int16 m)
+{
struct block_list bl;
unsigned char buf[6];
@@ -17058,7 +17241,8 @@ void clif_bg_updatescore(int16 m) {
clif->send(buf,packet_len(0x2de),&bl,ALL_SAMEMAP);
}
-void clif_bg_updatescore_single(struct map_session_data *sd) {
+static void clif_bg_updatescore_single(struct map_session_data *sd)
+{
int fd;
nullpo_retv(sd);
fd = sd->fd;
@@ -17072,7 +17256,7 @@ void clif_bg_updatescore_single(struct map_session_data *sd) {
/// Battleground camp belong-information (ZC_BATTLEFIELD_NOTIFY_CAMPINFO).
/// 02dd <account id>.L <name>.24B <camp>.W
-void clif_sendbgemblem_area(struct map_session_data *sd)
+static void clif_sendbgemblem_area(struct map_session_data *sd)
{
unsigned char buf[33];
nullpo_retv(sd);
@@ -17084,7 +17268,7 @@ void clif_sendbgemblem_area(struct map_session_data *sd)
clif->send(buf,packet_len(0x2dd), &sd->bl, AREA);
}
-void clif_sendbgemblem_single(int fd, struct map_session_data *sd)
+static void clif_sendbgemblem_single(int fd, struct map_session_data *sd)
{
nullpo_retv(sd);
WFIFOHEAD(fd,32);
@@ -17097,7 +17281,7 @@ void clif_sendbgemblem_single(int fd, struct map_session_data *sd)
/// Custom Fonts (ZC_NOTIFY_FONT).
/// 02ef <account_id>.L <font id>.W
-void clif_font(struct map_session_data *sd)
+static void clif_font(struct map_session_data *sd)
{
#if PACKETVER >= 20080102
unsigned char buf[8];
@@ -17112,7 +17296,8 @@ void clif_font(struct map_session_data *sd)
/*==========================================
* Instancing Window
*------------------------------------------*/
-int clif_instance(int instance_id, int type, int flag) {
+static int clif_instance(int instance_id, int type, int flag)
+{
struct map_session_data *sd = NULL;
unsigned char buf[255];
enum send_target target = PARTY;
@@ -17184,7 +17369,7 @@ int clif_instance(int instance_id, int type, int flag) {
return 0;
}
-void clif_instance_join(int fd, int instance_id)
+static void clif_instance_join(int fd, int instance_id)
{
if( instance->list[instance_id].idle_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
@@ -17209,7 +17394,7 @@ void clif_instance_join(int fd, int instance_id)
}
}
-void clif_instance_leave(int fd)
+static void clif_instance_leave(int fd)
{
WFIFOHEAD(fd,packet_len(0x02CE));
WFIFOW(fd,0) = 0x02ce;
@@ -17219,7 +17404,7 @@ void clif_instance_leave(int fd)
/// Notifies clients about item picked up by a party member (ZC_ITEM_PICKUP_PARTY).
/// 02b8 <account id>.L <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B
-void clif_party_show_picker(struct map_session_data * sd, struct item * item_data)
+static void clif_party_show_picker(struct map_session_data *sd, struct item *item_data)
{
#if PACKETVER >= 20071002
unsigned char buf[22];
@@ -17248,7 +17433,7 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat
/// exp type:
/// 0 = normal exp gain/loss
/// 1 = quest exp gain/loss
-void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest)
+static void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest)
{
int fd;
@@ -17286,7 +17471,7 @@ void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is
/// 3 = Decremental counter (1 tick/second), 'value' specifies start value (stops when reaching 0, displays at most 2 digits).
/// value:
/// Except for type 3 it is interpreted as seconds for displaying as DD:HH:MM:SS, HH:MM:SS, MM:SS or SS (leftmost '00' is not displayed).
-void clif_showdigit(struct map_session_data* sd, unsigned char type, int value)
+static void clif_showdigit(struct map_session_data *sd, unsigned char type, int value)
{
nullpo_retv(sd);
WFIFOHEAD(sd->fd, packet_len(0x1b1));
@@ -17296,7 +17481,7 @@ void clif_showdigit(struct map_session_data* sd, unsigned char type, int value)
WFIFOSET(sd->fd, packet_len(0x1b1));
}
-void clif_parse_LessEffect(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_LessEffect(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Notification of the state of client command /effect (CZ_LESSEFFECT).
/// 021d <state>.L
/// state:
@@ -17309,16 +17494,16 @@ void clif_parse_LessEffect(int fd, struct map_session_data* sd) __attribute__((n
/// constructed, this state tracking was rendered useless,
/// as the only skill unit, that is sent with 0x1c9 is
/// Graffiti.
-void clif_parse_LessEffect(int fd, struct map_session_data* sd)
+static void clif_parse_LessEffect(int fd, struct map_session_data *sd)
{
int isLess = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
sd->state.lesseffect = ( isLess != 0 );
}
-void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// S 07e4 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b*
-void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd)
+static void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd)
{
int n = ((int)RFIFOW(fd, 2) - 12) / 4;
int type = RFIFOL(fd,4);
@@ -17369,7 +17554,8 @@ void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd)
/*==========================================
* Elemental System
*==========================================*/
-void clif_elemental_updatestatus(struct map_session_data *sd, int type) {
+static void clif_elemental_updatestatus(struct map_session_data *sd, int type)
+{
struct elemental_data *ed;
struct status_data *estatus;
int fd;
@@ -17399,7 +17585,8 @@ void clif_elemental_updatestatus(struct map_session_data *sd, int type) {
WFIFOSET(fd,8);
}
-void clif_elemental_info(struct map_session_data *sd) {
+static void clif_elemental_info(struct map_session_data *sd)
+{
int fd;
struct elemental_data *ed;
struct status_data *estatus;
@@ -17425,7 +17612,7 @@ void clif_elemental_info(struct map_session_data *sd) {
/// Opens preparation window for buying store (ZC_OPEN_BUYING_STORE).
/// 0810 <slots>.B
-void clif_buyingstore_open(struct map_session_data* sd)
+static void clif_buyingstore_open(struct map_session_data *sd)
{
#if PACKETVER >= 20100303
int fd;
@@ -17439,13 +17626,14 @@ void clif_buyingstore_open(struct map_session_data* sd)
#endif
}
-void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to create a buying store (CZ_REQ_OPEN_BUYING_STORE).
/// 0811 <packet len>.W <limit zeny>.L <result>.B <store name>.80B { <name id>.W <amount>.W <price>.L }*
/// result:
/// 0 = cancel
/// 1 = open
-void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) {
+static void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data *sd)
+{
const unsigned int blocksize = 8;
const uint8 *itemlist;
char storename[MESSAGE_SIZE];
@@ -17491,7 +17679,7 @@ void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) {
/// 2 = "Total amount of then possessed items exceeds the weight limit by <weight/10-maxweight*90%>. Please re-enter." (0x6ce, MSI_BUYINGSTORE_OVERWEIGHT)
/// 8 = "No sale (purchase) information available." (0x705)
/// ? = nothing
-void clif_buyingstore_open_failed(struct map_session_data* sd, unsigned short result, unsigned int weight)
+static void clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short result, unsigned int weight)
{
#if PACKETVER >= 20100420
int fd;
@@ -17508,7 +17696,7 @@ void clif_buyingstore_open_failed(struct map_session_data* sd, unsigned short re
/// Notification, that the requested buying store was created (ZC_MYITEMLIST_BUYING_STORE).
/// 0813 <packet len>.W <account id>.L <limit zeny>.L { <price>.L <count>.W <type>.B <name id>.W }*
-void clif_buyingstore_myitemlist(struct map_session_data* sd)
+static void clif_buyingstore_myitemlist(struct map_session_data *sd)
{
int fd;
unsigned int i;
@@ -17534,7 +17722,7 @@ void clif_buyingstore_myitemlist(struct map_session_data* sd)
/// Notifies clients in area of a buying store (ZC_BUYING_STORE_ENTRY).
/// 0814 <account id>.L <store name>.80B
-void clif_buyingstore_entry(struct map_session_data* sd)
+static void clif_buyingstore_entry(struct map_session_data *sd)
{
#if PACKETVER >= 20100420
uint8 buf[86];
@@ -17547,7 +17735,7 @@ void clif_buyingstore_entry(struct map_session_data* sd)
clif->send(buf, packet_len(0x814), &sd->bl, AREA_WOS);
#endif
}
-void clif_buyingstore_entry_single(struct map_session_data* sd, struct map_session_data* pl_sd)
+static void clif_buyingstore_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd)
{
#if PACKETVER >= 20100420
int fd;
@@ -17562,16 +17750,17 @@ void clif_buyingstore_entry_single(struct map_session_data* sd, struct map_sessi
#endif
}
-void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to close own buying store (CZ_REQ_CLOSE_BUYING_STORE).
/// 0815
-void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data* sd) {
+static void clif_parse_ReqCloseBuyingStore(int fd, struct map_session_data *sd)
+{
buyingstore->close(sd);
}
/// Notifies clients in area that a buying store was closed (ZC_DISAPPEAR_BUYING_STORE_ENTRY).
/// 0816 <account id>.L
-void clif_buyingstore_disappear_entry(struct map_session_data* sd)
+static void clif_buyingstore_disappear_entry(struct map_session_data *sd)
{
#if PACKETVER >= 20100309
uint8 buf[6];
@@ -17584,7 +17773,7 @@ void clif_buyingstore_disappear_entry(struct map_session_data* sd)
#endif
}
-void clif_buyingstore_disappear_entry_single(struct map_session_data* sd, struct map_session_data* pl_sd)
+static void clif_buyingstore_disappear_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd)
{
#if PACKETVER >= 20100309
int fd;
@@ -17601,7 +17790,7 @@ void clif_buyingstore_disappear_entry_single(struct map_session_data* sd, struct
/// Request to open someone else's buying store (CZ_REQ_CLICK_TO_BUYING_STORE).
/// 0817 <account id>.L
-void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data* sd)
+static void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data *sd)
{
int account_id;
@@ -17612,7 +17801,7 @@ void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data* sd)
/// Sends buying store item list (ZC_ACK_ITEMLIST_BUYING_STORE).
/// 0818 <packet len>.W <account id>.L <store id>.L <limit zeny>.L { <price>.L <amount>.W <type>.B <name id>.W }*
-void clif_buyingstore_itemlist(struct map_session_data* sd, struct map_session_data* pl_sd)
+static void clif_buyingstore_itemlist(struct map_session_data *sd, struct map_session_data *pl_sd)
{
int fd;
unsigned int i;
@@ -17638,10 +17827,11 @@ void clif_buyingstore_itemlist(struct map_session_data* sd, struct map_session_d
WFIFOSET(fd,WFIFOW(fd,2));
}
-void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to sell items to a buying store (CZ_REQ_TRADE_BUYING_STORE).
/// 0819 <packet len>.W <account id>.L <store id>.L { <index>.W <name id>.W <amount>.W }*
-void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) {
+static void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data *sd)
+{
const unsigned int blocksize = 6;
const uint8 *itemlist;
int account_id;
@@ -17682,7 +17872,7 @@ void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) {
/// 3 = "All items within the buy limit were purchased." (0x6cf, MSI_BUYINGSTORE_TRADE_OVERLIMITZENY)
/// 4 = "All items were purchased." (0x6d0, MSI_BUYINGSTORE_TRADE_BUYCOMPLETE)
/// ? = nothing
-void clif_buyingstore_trade_failed_buyer(struct map_session_data* sd, short result)
+static void clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short result)
{
#if PACKETVER >= 20100420
int fd;
@@ -17698,7 +17888,7 @@ void clif_buyingstore_trade_failed_buyer(struct map_session_data* sd, short resu
/// Updates the zeny limit and an item in the buying store item list (ZC_UPDATE_ITEM_FROM_BUYING_STORE).
/// 081b <name id>.W <amount>.W <limit zeny>.L
-void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny)
+static void clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny)
{
int fd;
#if PACKETVER < 20141016 // TODO : not sure for client date [Napster]
@@ -17731,7 +17921,7 @@ void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short na
/// "%s (%d) were sold at %dz." (0x6d2, MSI_BUYINGSTORE_TRADE_SELLCOMPLETE)
///
/// NOTE: This function has to be called _instead_ of clif_delitem/clif_dropitem.
-void clif_buyingstore_delete_item(struct map_session_data* sd, short index, unsigned short amount, int price)
+static void clif_buyingstore_delete_item(struct map_session_data *sd, short index, unsigned short amount, int price)
{
#if PACKETVER >= 20100420
int fd;
@@ -17754,7 +17944,7 @@ void clif_buyingstore_delete_item(struct map_session_data* sd, short index, unsi
/// 6 = "The trade failed, because the entered amount of item %s is higher, than the buyer is willing to buy." (0x6d3, MSI_BUYINGSTORE_TRADE_OVERCOUNT)
/// 7 = "The trade failed, because the buyer is lacking required balance." (0x6d1, MSI_BUYINGSTORE_TRADE_LACKBUYERZENY)
/// ? = nothing
-void clif_buyingstore_trade_failed_seller(struct map_session_data* sd, short result, unsigned short nameid)
+static void clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, unsigned short nameid)
{
#if PACKETVER >= 20100420
int fd;
@@ -17769,7 +17959,7 @@ void clif_buyingstore_trade_failed_seller(struct map_session_data* sd, short res
#endif
}
-void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_SearchStoreInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Search Store Info System
///
@@ -17782,7 +17972,8 @@ void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) __attribute
/// NOTE: The client determines the item ids by specifying a name and optionally,
/// amount of card slots. If the client does not know about the item it
/// cannot be searched.
-void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) {
+static void clif_parse_SearchStoreInfo(int fd, struct map_session_data *sd)
+{
const unsigned int blocksize = 2;
const uint8* itemlist;
const uint8* cardlist;
@@ -17838,7 +18029,7 @@ void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) {
/// is next page:
/// 0 = no "next" label
/// 1 = "next" label to retrieve more results
-void clif_search_store_info_ack(struct map_session_data* sd)
+static void clif_search_store_info_ack(struct map_session_data *sd)
{
#if PACKETVER >= 20150226
const unsigned int blocksize = MESSAGE_SIZE + 26 + 5 * MAX_ITEM_OPTIONS;
@@ -17897,7 +18088,7 @@ void clif_search_store_info_ack(struct map_session_data* sd)
/// 2 = "You cannot search anymore." (0x706)
/// 3 = "You cannot search yet." (0x708)
/// 4 = "No sale (purchase) information available." (0x705)
-void clif_search_store_info_failed(struct map_session_data* sd, unsigned char reason)
+static void clif_search_store_info_failed(struct map_session_data *sd, unsigned char reason)
{
#if PACKETVER >= 20100601
int fd;
@@ -17911,10 +18102,10 @@ void clif_search_store_info_failed(struct map_session_data* sd, unsigned char re
#endif
}
-void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to display next page of results (CZ_SEARCH_STORE_INFO_NEXT_PAGE).
/// 0838
-void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data* sd)
+static void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data *sd)
{
searchstore->next(sd);
}
@@ -17924,7 +18115,7 @@ void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data* sd)
/// type:
/// 0 = Search Stores
/// 1 = Search Stores (Cash), asks for confirmation, when clicking a store
-void clif_open_search_store_info(struct map_session_data* sd)
+static void clif_open_search_store_info(struct map_session_data *sd)
{
#if PACKETVER >= 20100608
int fd;
@@ -17941,18 +18132,18 @@ void clif_open_search_store_info(struct map_session_data* sd)
#endif
}
-void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to close the store search window (CZ_CLOSE_SEARCH_STORE_INFO).
/// 083b
-void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data* sd)
+static void clif_parse_CloseSearchStoreInfo(int fd, struct map_session_data *sd)
{
searchstore->close(sd);
}
-void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to invoke catalog effect on a store from search results (CZ_SSILIST_ITEM_CLICK).
/// 083c <account id>.L <store id>.L <nameid>.W
-void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data* sd)
+static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data *sd)
{
unsigned short nameid;
int account_id, store_id;
@@ -17967,7 +18158,7 @@ void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data* sd
/// Notification of the store position on current map (ZC_SSILIST_ITEM_CLICK_ACK).
/// 083d <xPos>.W <yPos>.W
-void clif_search_store_info_click_ack(struct map_session_data* sd, short x, short y)
+static void clif_search_store_info_click_ack(struct map_session_data *sd, short x, short y)
{
#if PACKETVER >= 20100608
int fd;
@@ -17983,7 +18174,8 @@ void clif_search_store_info_click_ack(struct map_session_data* sd, short x, shor
}
/// Parse function for packet debugging.
-void clif_parse_debug(int fd,struct map_session_data *sd) {
+static void clif_parse_debug(int fd, struct map_session_data *sd)
+{
int cmd, packet_len;
// clif_parse ensures, that there is at least 2 bytes of data
@@ -18007,7 +18199,8 @@ void clif_parse_debug(int fd,struct map_session_data *sd) {
* Server tells client to display a window similar to Magnifier (item) one
* Server populates the window with available elemental converter options according to player's inventory
*------------------------------------------*/
-int clif_elementalconverter_list(struct map_session_data *sd) {
+static int clif_elementalconverter_list(struct map_session_data *sd)
+{
int i,c,view,fd;
nullpo_ret(sd);
@@ -18038,7 +18231,8 @@ int clif_elementalconverter_list(struct map_session_data *sd) {
/**
* Rune Knight
**/
-void clif_millenniumshield(struct block_list *bl, short shields ) {
+static void clif_millenniumshield(struct block_list *bl, short shields)
+{
#if PACKETVER >= 20081217
unsigned char buf[10];
@@ -18056,7 +18250,7 @@ void clif_millenniumshield(struct block_list *bl, short shields ) {
/*==========================================
* Spellbook list [LimitLine/3CeAM]
*------------------------------------------*/
-int clif_spellbook_list(struct map_session_data *sd)
+static int clif_spellbook_list(struct map_session_data *sd)
{
int i, c;
int fd;
@@ -18096,7 +18290,8 @@ int clif_spellbook_list(struct map_session_data *sd)
/*==========================================
* Magic Decoy Material List
*------------------------------------------*/
-int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y) {
+static int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y)
+{
int i, c;
int fd;
@@ -18132,7 +18327,8 @@ int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x,
/*==========================================
* Guillotine Cross Poisons List
*------------------------------------------*/
-int clif_poison_list(struct map_session_data *sd, uint16 skill_lv) {
+static int clif_poison_list(struct map_session_data *sd, uint16 skill_lv)
+{
int i, c;
int fd;
@@ -18160,7 +18356,8 @@ int clif_poison_list(struct map_session_data *sd, uint16 skill_lv) {
return 1;
}
-int clif_autoshadowspell_list(struct map_session_data *sd) {
+static int clif_autoshadowspell_list(struct map_session_data *sd)
+{
int fd, i, c;
nullpo_ret(sd);
fd = sd->fd;
@@ -18196,7 +18393,7 @@ int clif_autoshadowspell_list(struct map_session_data *sd) {
* Skill list for Four Elemental Analysis
* and Change Material skills.
*------------------------------------------*/
-int clif_skill_itemlistwindow( struct map_session_data *sd, uint16 skill_id, uint16 skill_lv )
+static int clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv)
{
#if PACKETVER >= 20090922
int fd;
@@ -18222,12 +18419,13 @@ int clif_skill_itemlistwindow( struct map_session_data *sd, uint16 skill_id, uin
}
-void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/*==========================================
* used by SC_AUTOSHADOWSPELL
* RFIFOL(fd,2) - flag (currently not used)
*------------------------------------------*/
-void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) {
+static void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd)
+{
if( sd->menuskill_id != SC_AUTOSHADOWSPELL )
return;
@@ -18246,7 +18444,7 @@ void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) {
/*==========================================
* Kagerou/Oboro amulet spirit
*------------------------------------------*/
-void clif_charm(struct map_session_data *sd)
+static void clif_charm(struct map_session_data *sd)
{
#if PACKETVER >= 20110809
unsigned char buf[10];
@@ -18261,7 +18459,7 @@ void clif_charm(struct map_session_data *sd)
#endif
}
-void clif_parse_MoveItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_MoveItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Move Item from or to Personal Tab (CZ_WHATSOEVER) [FE]
/// 0907 <index>.W
///
@@ -18269,7 +18467,8 @@ void clif_parse_MoveItem(int fd, struct map_session_data *sd) __attribute__((non
/// type:
/// 0 = move item to personal tab
/// 1 = move item to normal tab
-void clif_parse_MoveItem(int fd, struct map_session_data *sd) {
+static void clif_parse_MoveItem(int fd, struct map_session_data *sd)
+{
#if PACKETVER >= 20111122
int index;
@@ -18295,7 +18494,8 @@ void clif_parse_MoveItem(int fd, struct map_session_data *sd) {
}
/* [Ind/Hercules] */
-void clif_cashshop_db(void) {
+static void clif_cashshop_db(void)
+{
struct config_t cashshop_conf;
struct config_setting_t *cashshop = NULL, *cats = NULL;
const char *config_filename = "db/cashshop_db.conf"; // FIXME hardcoded name
@@ -18359,7 +18559,8 @@ void clif_cashshop_db(void) {
}
/// Items that are in favorite tab of inventory (ZC_ITEM_FAVORITE).
/// 0900 <index>.W <favorite>.B
-void clif_favorite_item(struct map_session_data* sd, unsigned short index) {
+static void clif_favorite_item(struct map_session_data *sd, unsigned short index)
+{
#if PACKETVER >= 20120410
int fd;
@@ -18373,7 +18574,8 @@ void clif_favorite_item(struct map_session_data* sd, unsigned short index) {
#endif
}
-void clif_snap( struct block_list *bl, short x, short y ) {
+static void clif_snap(struct block_list *bl, short x, short y)
+{
#if PACKETVER >= 20110809
unsigned char buf[10];
@@ -18387,7 +18589,7 @@ void clif_snap( struct block_list *bl, short x, short y ) {
#endif
}
-void clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd)
+static void clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd)
{
#if PACKETVER >= 20120228
struct packet_monster_hp p;
@@ -18404,12 +18606,14 @@ void clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd)
}
/* [Ind/Hercules] placeholder for unsupported incoming packets (avoids server disconnecting client) */
-void __attribute__ ((unused)) clif_parse_dull(int fd,struct map_session_data *sd) {
+static void __attribute__ ((unused)) clif_parse_dull(int fd, struct map_session_data *sd)
+{
return;
}
-void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) {
+static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd)
+{
if (map->list[sd->bl.m].flag.nocashshop) {
clif->messagecolor_self(fd, COLOR_RED, msg_fd(fd,1489)); //Cash Shop is disabled in this map
@@ -18423,13 +18627,14 @@ void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) {
WFIFOSET(fd, 10);
}
-void clif_parse_CashShopClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_CashShopClose(int fd, struct map_session_data *sd) {
+static void clif_parse_CashShopClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CashShopClose(int fd, struct map_session_data *sd)
+{
/* TODO apply some state tracking */
}
-void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd)
+static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20110614
int i, j = 0;
@@ -18455,8 +18660,9 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd)
}
/// R 0848 <len>.W <limit>.W <kafra pay>.L (<item id>.L <amount>.L <tab>.W)*
-void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) {
+static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd)
+{
int len = RFIFOW(fd, 2);
unsigned short limit, i, j;
unsigned int kafra_pay;
@@ -18563,9 +18769,9 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) {
}
}
-void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/* [Ind/Hercules] */
-void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd)
+static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20110222
short tab = RFIFOW(fd, 2);
@@ -18590,7 +18796,7 @@ void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd)
}
/* [Ind/Hercules] */
-void clif_maptypeproperty2(struct block_list *bl,enum send_target t)
+static void clif_maptypeproperty2(struct block_list *bl, enum send_target t)
{
#if PACKETVER >= 20121010
struct packet_maptypeproperty2 p;
@@ -18618,7 +18824,8 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t)
#endif
}
-void clif_status_change2(struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3) {
+static void clif_status_change2(struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3)
+{
struct packet_status_change2 p;
p.PacketType = status_change2Type;
@@ -18633,7 +18840,8 @@ void clif_status_change2(struct block_list *bl, int tid, enum send_target target
clif->send(&p,sizeof(p), bl, target);
}
-void clif_partytickack(struct map_session_data* sd, bool flag) {
+static void clif_partytickack(struct map_session_data *sd, bool flag)
+{
nullpo_retv(sd);
WFIFOHEAD(sd->fd, packet_len(0x2c9));
@@ -18642,7 +18850,7 @@ void clif_partytickack(struct map_session_data* sd, bool flag) {
WFIFOSET(sd->fd, packet_len(0x2c9));
}
-void clif_ShowScript(struct block_list *bl, const char *message)
+static void clif_ShowScript(struct block_list *bl, const char *message)
{
#if PACKETVER >= 20110111
char buf[256];
@@ -18667,7 +18875,8 @@ void clif_ShowScript(struct block_list *bl, const char *message)
#endif
}
-void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type) {
+static void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type)
+{
struct packet_status_change_end p;
nullpo_retv(bl);
@@ -18683,7 +18892,8 @@ void clif_status_change_end(struct block_list *bl, int tid, enum send_target tar
clif->send(&p,sizeof(p), bl, target);
}
-void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id) {
+static void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id)
+{
switch (response) {
case BGQA_FAIL_COOLDOWN:
case BGQA_FAIL_DESERTER:
@@ -18703,7 +18913,7 @@ void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK
}
}
-void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name)
+static void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name)
{
struct packet_bgqueue_notice_delete p;
@@ -18715,8 +18925,8 @@ void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
-void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_bgqueue_register(int fd, struct map_session_data *sd)
+static void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_bgqueue_register(int fd, struct map_session_data *sd)
{
const struct packet_bgqueue_register *p = RP2PTR(fd);
struct bg_arena *arena = NULL;
@@ -18740,7 +18950,8 @@ void clif_parse_bgqueue_register(int fd, struct map_session_data *sd)
bg->queue_add(sd, arena, (enum bg_queue_types)p->type);
}
-void clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_id, int position) {
+static void clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_id, int position)
+{
struct packet_bgqueue_update_info p;
nullpo_retv(sd);
@@ -18754,8 +18965,8 @@ void clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_i
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
-void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd)
+static void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd)
{
const struct packet_bgqueue_checkstate *p = RP2PTR(fd);
@@ -18766,8 +18977,8 @@ void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd)
}
}
-void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd)
+static void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd)
{
const struct packet_bgqueue_revoke_req *p = RP2PTR(fd);
@@ -18777,8 +18988,8 @@ void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd)
clif->bgqueue_notice_delete(sd, BGQND_FAIL_NOT_QUEUING,p->bg_name);
}
-void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd)
+static void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd)
{
const struct packet_bgqueue_battlebegin_ack *p = RP2PTR(fd);
struct bg_arena *arena;
@@ -18792,7 +19003,8 @@ void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd)
}
}
-void clif_bgqueue_joined(struct map_session_data *sd, int pos) {
+static void clif_bgqueue_joined(struct map_session_data *sd, int pos)
+{
struct packet_bgqueue_notify_entry p;
nullpo_retv(sd);
@@ -18803,13 +19015,15 @@ void clif_bgqueue_joined(struct map_session_data *sd, int pos) {
clif->send(&p,sizeof(p), &sd->bl, BG_QUEUE);
}
-void clif_bgqueue_pcleft(struct map_session_data *sd) {
+static void clif_bgqueue_pcleft(struct map_session_data *sd)
+{
/* no idea */
return;
}
// Sends BG ready req to all with same bg arena/type as sd
-void clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_id, enum send_target target) {
+static void clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_id, enum send_target target)
+{
struct packet_bgqueue_battlebegins p;
nullpo_retv(sd);
@@ -18821,7 +19035,7 @@ void clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_
clif->send(&p,sizeof(p), &sd->bl, target);
}
-void clif_scriptclear(struct map_session_data *sd, int npcid)
+static void clif_scriptclear(struct map_session_data *sd, int npcid)
{
#if PACKETVER >= 20110928
struct packet_script_clear p;
@@ -18835,7 +19049,8 @@ void clif_scriptclear(struct map_session_data *sd, int npcid)
}
/* Made Possible Thanks to Yommy! */
-void clif_package_item_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) {
+static void clif_package_item_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid)
+{
struct packet_package_item_announce p;
nullpo_retv(sd);
@@ -18852,7 +19067,8 @@ void clif_package_item_announce(struct map_session_data *sd, unsigned short name
}
/* Made Possible Thanks to Yommy! */
-void clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid, char *monsterName) {
+static void clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid, char *monsterName)
+{
struct packet_item_drop_announce p;
nullpo_retv(sd);
@@ -18869,7 +19085,8 @@ void clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid,
}
/* [Ind/Hercules] special thanks to Yommy~! */
-void clif_skill_cooldown_list(int fd, struct skill_cd* cd) {
+static void clif_skill_cooldown_list(int fd, struct skill_cd *cd)
+{
#if PACKETVER >= 20120604
const int offset = 10;
#else
@@ -18909,7 +19126,8 @@ void clif_skill_cooldown_list(int fd, struct skill_cd* cd) {
* - ADDITEM_TO_CART_FAIL_WEIGHT = 0x0
* - ADDITEM_TO_CART_FAIL_COUNT = 0x1
*/
-void clif_cart_additem_ack(struct map_session_data *sd, int flag) {
+static void clif_cart_additem_ack(struct map_session_data *sd, int flag)
+{
struct packet_cart_additem_ack p;
nullpo_retv(sd);
@@ -18920,8 +19138,8 @@ void clif_cart_additem_ack(struct map_session_data *sd, int flag) {
}
/* Bank System [Yommy/Hercules] */
-void clif_parse_BankDeposit(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_BankDeposit(int fd, struct map_session_data *sd)
+static void clif_parse_BankDeposit(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BankDeposit(int fd, struct map_session_data *sd)
{
const struct packet_banking_deposit_req *p = RP2PTR(fd);
int money;
@@ -18936,8 +19154,8 @@ void clif_parse_BankDeposit(int fd, struct map_session_data *sd)
pc->bank_deposit(sd,money);
}
-void clif_parse_BankWithdraw(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_BankWithdraw(int fd, struct map_session_data *sd)
+static void clif_parse_BankWithdraw(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BankWithdraw(int fd, struct map_session_data *sd)
{
const struct packet_banking_withdraw_req *p = RP2PTR(fd);
int money;
@@ -18952,8 +19170,8 @@ void clif_parse_BankWithdraw(int fd, struct map_session_data *sd)
pc->bank_withdraw(sd,money);
}
-void clif_parse_BankCheck(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_BankCheck(int fd, struct map_session_data* sd)
+static void clif_parse_BankCheck(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BankCheck(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20130320
struct packet_banking_check p;
@@ -18971,17 +19189,19 @@ void clif_parse_BankCheck(int fd, struct map_session_data* sd)
#endif
}
-void clif_parse_BankOpen(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_BankOpen(int fd, struct map_session_data* sd) {
+static void clif_parse_BankOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BankOpen(int fd, struct map_session_data *sd)
+{
return;
}
-void clif_parse_BankClose(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_BankClose(int fd, struct map_session_data* sd) {
+static void clif_parse_BankClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_BankClose(int fd, struct map_session_data *sd)
+{
return;
}
-void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason)
+static void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason)
{
#if PACKETVER >= 20130313
struct packet_banking_deposit_ack p;
@@ -18996,7 +19216,7 @@ void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK r
#endif
}
-void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK reason)
+static void clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason)
{
#if PACKETVER >= 20130313
struct packet_banking_withdraw_ack p;
@@ -19013,7 +19233,8 @@ void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK
/* TODO: official response packet (tried 0x8cb/0x97b but the display was quite screwed up.) */
/* currently mimicing */
-void clif_show_modifiers (struct map_session_data *sd) {
+static void clif_show_modifiers(struct map_session_data *sd)
+{
nullpo_retv(sd);
if( sd->status.mod_exp != 100 || sd->status.mod_drop != 100 || sd->status.mod_death != 100 ) {
@@ -19026,7 +19247,8 @@ void clif_show_modifiers (struct map_session_data *sd) {
}
-void clif_notify_bounditem(struct map_session_data *sd, unsigned short index) {
+static void clif_notify_bounditem(struct map_session_data *sd, unsigned short index)
+{
struct packet_notify_bounditem p;
nullpo_retv(sd);
@@ -19036,11 +19258,12 @@ void clif_notify_bounditem(struct map_session_data *sd, unsigned short index) {
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
-void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/**
* Parses the (GM) right click option 'remove all equipment'
**/
-void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
+static void clif_parse_GMFullStrip(int fd, struct map_session_data *sd)
+{
struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2));
int i;
@@ -19057,7 +19280,8 @@ void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
/**
* clif_delay_damage timer, sends the stored data and clears the memory afterwards
**/
-int clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
+static int clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data)
+{
struct cdelayed_damage *dd = (struct cdelayed_damage *)data;
clif->send(&dd->p,sizeof(struct packet_damage),&dd->bl,AREA_WOS);
@@ -19081,7 +19305,8 @@ int clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
*
* @return clif->calc_walkdelay used in further processing
**/
-int clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type) {
+static int clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type)
+{
struct cdelayed_damage *dd;
struct status_change *sc;
#if PACKETVER < 20071113
@@ -19140,15 +19365,17 @@ int clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst
return clif->calc_walkdelay(dst,ddelay,type,damage,div);
}
-void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/* Thanks to Yommy */
-void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) {
+static void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd)
+{
/* TODO track the state <3~ */
sd->npc_shopid = 0;
}
/* NPC Market (by Ind after an extensive debugging of the packet, only possible thanks to Yommy <3) */
-void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
+static void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd)
+{
#if PACKETVER >= 20131223
struct npc_item_list *shop;
unsigned short shop_size, i, c;
@@ -19177,13 +19404,14 @@ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
#endif
}
-void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd) {
+static void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd)
+{
/* TODO track the state <3~ */
sd->npc_shopid = 0;
}
-void clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response)
+static void clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response)
{
#if PACKETVER >= 20131223
unsigned short c = 0;
@@ -19220,8 +19448,8 @@ void clif_npc_market_purchase_ack(struct map_session_data *sd, const struct item
#endif
}
-void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
+static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20131223
const struct packet_npc_market_purchase *p = RP2PTR(fd);
@@ -19250,7 +19478,8 @@ void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
#endif
}
-void clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid) {
+static void clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid)
+{
struct packet_party_leader_changed p;
nullpo_retv(sd);
@@ -19262,9 +19491,10 @@ void clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, i
clif->send(&p,sizeof(p),&sd->bl,PARTY);
}
-void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_RouletteOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/* Roulette System [Yommy/Hercules] */
-void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) {
+static void clif_parse_RouletteOpen(int fd, struct map_session_data *sd)
+{
#if PACKETVER >= 20140612
struct packet_roulette_open_ack p;
@@ -19287,8 +19517,8 @@ void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) {
#endif
}
-void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_RouletteInfo(int fd, struct map_session_data* sd)
+static void clif_parse_RouletteInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RouletteInfo(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20140612
struct packet_roulette_info_ack p;
@@ -19319,8 +19549,9 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd)
#endif
}
-void clif_parse_RouletteClose(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_RouletteClose(int fd, struct map_session_data* sd) {
+static void clif_parse_RouletteClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RouletteClose(int fd, struct map_session_data *sd)
+{
if( !battle_config.feature_roulette ) {
clif->message(fd, msg_fd(fd,82)); // Roulette is disabled
return;
@@ -19332,8 +19563,9 @@ void clif_parse_RouletteClose(int fd, struct map_session_data* sd) {
return;
}
-void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
+static void clif_parse_RouletteGenerate(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_RouletteGenerate(int fd, struct map_session_data *sd)
+{
unsigned char result = GENERATE_ROULETTE_SUCCESS;
short stage = sd->roulette.stage;
@@ -19386,11 +19618,11 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
sd->roulette.stage++;
}
-void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
+static void clif_parse_RouletteRecvItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/**
* Request to cash in!
**/
-void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd)
+static void clif_parse_RouletteRecvItem(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20140612
struct packet_roulette_itemrecv_ack p;
@@ -19438,7 +19670,8 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd)
#endif
}
-bool clif_parse_roulette_db(void) {
+static bool clif_parse_roulette_db(void)
+{
struct config_t roulette_conf;
struct config_setting_t *roulette = NULL, *levels = NULL;
const char *config_filename = "db/roulette_db.conf"; // FIXME hardcoded name
@@ -19530,7 +19763,7 @@ bool clif_parse_roulette_db(void) {
/**
*
**/
-void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID)
+static void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID)
{
#if PACKETVER >= 20140612
struct packet_roulette_generate_ack p;
@@ -19552,7 +19785,7 @@ void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char resul
/**
* Stackable items merger
*/
-void clif_openmergeitem(int fd, struct map_session_data *sd)
+static void clif_openmergeitem(int fd, struct map_session_data *sd)
{
#if PACKETVER > 20120228
int i = 0, n = 0, j = 0;
@@ -19600,7 +19833,7 @@ void clif_openmergeitem(int fd, struct map_session_data *sd)
#endif
}
-int clif_comparemergeitem(const void *a, const void *b)
+static int clif_comparemergeitem(const void *a, const void *b)
{
const struct merge_item *a_ = a;
const struct merge_item *b_ = b;
@@ -19612,7 +19845,7 @@ int clif_comparemergeitem(const void *a, const void *b)
return a_->nameid > b_->nameid ? -1 : 1;
}
-void clif_ackmergeitems(int fd, struct map_session_data *sd)
+static void clif_ackmergeitems(int fd, struct map_session_data *sd)
{
#if PACKETVER > 20120228
int i = 0, n = 0, length = 0, count = 0;
@@ -19697,13 +19930,13 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd)
#endif
}
-void clif_cancelmergeitem (int fd, struct map_session_data *sd)
+static void clif_cancelmergeitem(int fd, struct map_session_data *sd)
{
//Track The merge item cancelation ?
return;
}
-void clif_dressroom_open(struct map_session_data *sd, int view)
+static void clif_dressroom_open(struct map_session_data *sd, int view)
{
#if PACKETVER >= 20150513
int fd;
@@ -19720,7 +19953,7 @@ void clif_dressroom_open(struct map_session_data *sd, int view)
/// Request to select cart's visual look for new cart design (ZC_SELECTCART).
/// 097f <Length>.W <identity>.L <type>.B
-void clif_selectcart(struct map_session_data *sd)
+static void clif_selectcart(struct map_session_data *sd)
{
#if PACKETVER >= 20150805
int i = 0, fd;
@@ -19741,7 +19974,7 @@ void clif_selectcart(struct map_session_data *sd)
}
/// Starts navigation to the given target on client side
-void clif_navigate_to(struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id)
+static void clif_navigate_to(struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id)
{
// probably this packet with other fields present in older packet versions
#if PACKETVER >= 20120307
@@ -19788,7 +20021,7 @@ void clif_navigate_to(struct map_session_data *sd, const char* mapname, uint16 x
* @param bl The requested bl.
* @return The bl's name (guaranteed to be non-NULL).
*/
-const char *clif_get_bl_name(const struct block_list *bl)
+static const char *clif_get_bl_name(const struct block_list *bl)
{
const char *name = status->get_name(bl);
@@ -19803,7 +20036,7 @@ const char *clif_get_bl_name(const struct block_list *bl)
* 098a <length>.W <clan id>.L <clan name>.24B <clan master>.24B <clan map>.16B <alliance count>.B
* <antagonist count>.B { <alliance>.24B } * alliance count { <antagonist>.24B } * antagonist count (ZC_CLANINFO)
*/
-void clif_clan_basicinfo(struct map_session_data *sd)
+static void clif_clan_basicinfo(struct map_session_data *sd)
{
#if PACKETVER >= 20120716
int len, i, fd;
@@ -19860,7 +20093,7 @@ void clif_clan_basicinfo(struct map_session_data *sd)
* Clan System: Updates the online and maximum player count of a clan.
* 0988 <online count>.W <maximum member amount>.W (ZC_NOTIFY_CLAN_CONNECTINFO)
*/
-void clif_clan_onlinecount(struct clan *c)
+static void clif_clan_onlinecount(struct clan *c)
{
#if PACKETVER >= 20120716
struct map_session_data *sd;
@@ -19879,10 +20112,10 @@ void clif_clan_onlinecount(struct clan *c)
}
/**
-* Clan System: Notifies the client that the player has left his clan.
-* 0989 (ZC_ACK_CLAN_LEAVE)
-**/
-void clif_clan_leave(struct map_session_data* sd)
+ * Clan System: Notifies the client that the player has left his clan.
+ * 0989 (ZC_ACK_CLAN_LEAVE)
+ */
+static void clif_clan_leave(struct map_session_data *sd)
{
#if PACKETVER >= 20131223
struct PACKET_ZC_ACK_CLAN_LEAVE p;
@@ -19899,7 +20132,7 @@ void clif_clan_leave(struct map_session_data* sd)
* Clan System: Sends a clan message to a player
* 098e <length>.W <name>.24B <message>.?B (ZC_NOTIFY_CLAN_CHAT)
*/
-void clif_clan_message(struct clan *c, const char *mes, int len)
+static void clif_clan_message(struct clan *c, const char *mes, int len)
{
#if PACKETVER >= 20120716
struct map_session_data *sd;
@@ -19930,12 +20163,12 @@ void clif_clan_message(struct clan *c, const char *mes, int len)
#endif
}
-void clif_parse_ClanMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ClanMessage(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/**
* Clan System: Parses a clan message from a player.
* 098d <length>.W <text>.?B (<name> : <message>) (CZ_CLAN_CHAT)
*/
-void clif_parse_ClanMessage(int fd, struct map_session_data *sd)
+static void clif_parse_ClanMessage(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20120716
const struct packet_chat_message *packet = RP2PTR(fd);
@@ -19949,20 +20182,23 @@ void clif_parse_ClanMessage(int fd, struct map_session_data *sd)
}
/* */
-unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) {
+static unsigned short clif_decrypt_cmd(int cmd, struct map_session_data *sd)
+{
if( sd ) {
return (cmd ^ ((sd->cryptKey >> 16) & 0x7FFF));
}
return (cmd ^ (((( clif->cryptKey[0] * clif->cryptKey[1] ) + clif->cryptKey[2]) >> 16) & 0x7FFF));
}
-unsigned short clif_parse_cmd_normal( int fd, struct map_session_data *sd ) {
+static unsigned short clif_parse_cmd_normal(int fd, struct map_session_data *sd)
+{
unsigned short cmd = RFIFOW(fd,0);
return cmd;
}
-unsigned short clif_parse_cmd_decrypt( int fd, struct map_session_data *sd ) {
+static unsigned short clif_parse_cmd_decrypt(int fd, struct map_session_data *sd)
+{
unsigned short cmd = RFIFOW(fd,0);
cmd = clif->decrypt_cmd(cmd, sd);
@@ -19970,7 +20206,8 @@ unsigned short clif_parse_cmd_decrypt( int fd, struct map_session_data *sd ) {
return cmd;
}
-unsigned short clif_parse_cmd_optional( int fd, struct map_session_data *sd ) {
+static unsigned short clif_parse_cmd_optional(int fd, struct map_session_data *sd)
+{
unsigned short cmd = RFIFOW(fd,0);
// filter out invalid / unsupported packets
@@ -19989,8 +20226,8 @@ unsigned short clif_parse_cmd_optional( int fd, struct map_session_data *sd ) {
* RoDEX
*------------------------------------------*/
-void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_OPEN_WRITE_MAIL *rPacket = RFIFOP(fd, 0);
int8 result = (rodex->isenabled() == true && sd->npc_id == 0) ? 1 : 0;
@@ -19998,7 +20235,7 @@ void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd)
clif->rodex_open_write_mail(fd, rPacket->receiveName, result);
}
-void clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result)
+static void clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result)
{
#if PACKETVER >= 20140416
struct PACKET_ZC_ACK_OPEN_WRITE_MAIL *sPacket = NULL;
@@ -20014,8 +20251,8 @@ void clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result)
#endif
}
-void clif_parse_rodex_add_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_add_item(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_add_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_add_item(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_ADD_ITEM_TO_MAIL *rPacket = RFIFOP(fd, 0);
int16 idx = rPacket->index - 2;
@@ -20023,7 +20260,7 @@ void clif_parse_rodex_add_item(int fd, struct map_session_data *sd)
rodex->add_item(sd, idx, (int16)rPacket->count);
}
-void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result)
+static void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result)
{
#if PACKETVER >= 20141119
struct PACKET_ZC_ADD_ITEM_TO_MAIL *packet;
@@ -20065,8 +20302,8 @@ void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 am
#endif
}
-void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL *rPacket = RFIFOP(fd, 0);
int16 idx = rPacket->index - 2;
@@ -20074,7 +20311,7 @@ void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd)
rodex->remove_item(sd, idx, (int16)rPacket->cnt);
}
-void clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16 amount)
+static void clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16 amount)
{
#if PACKETVER >= 20140521
struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL *packet;
@@ -20096,8 +20333,8 @@ void clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16
#endif
}
-void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_CHECKNAME *rPacket = RFIFOP(fd, 0);
int char_id = 0, base_level = 0;
@@ -20109,7 +20346,7 @@ void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
rodex->check_player(sd, name, &base_level, &char_id, &class);
}
-void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name)
+static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name)
{
#if PACKETVER >= 20140521
struct PACKET_ZC_CHECKNAME *sPacket;
@@ -20137,8 +20374,8 @@ void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short
#endif
}
-void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_SEND_MAIL *rPacket = RFIFOP(fd, 0);
int8 result;
@@ -20164,7 +20401,7 @@ void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd)
rodex->clean(sd, 1);
}
-void clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 result)
+static void clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 result)
{
#if PACKETVER >= 20131230
struct PACKET_ZC_WRITE_MAIL_RESULT *sPacket;
@@ -20177,7 +20414,7 @@ void clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 resul
#endif
}
-void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_type, int64 page_start)
+static void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_type, int64 page_start)
{
#if PACKETVER >= 20131218
struct PACKET_ZC_MAIL_LIST *packet;
@@ -20235,7 +20472,7 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
#endif
}
-void clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_id)
+static void clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_id)
{
#if PACKETVER >= 20170419
struct PACKET_ZC_MAIL_LIST *packet;
@@ -20307,7 +20544,7 @@ void clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_i
#endif
}
-void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count)
+static void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count)
{
#if PACKETVER >= 20131218
struct PACKET_ZC_MAIL_LIST *packet;
@@ -20367,23 +20604,23 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
#endif
}
-void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_NEXT_MAIL_LIST *packet = RFIFOP(fd, 0);
rodex->next_page(sd, packet->opentype, packet->Lower_MailID);
}
-void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_READ_MAIL *rPacket = RFIFOP(fd, 0);
rodex->read_mail(sd, rPacket->MailID);
}
-void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg)
+static void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg)
{
#if PACKETVER >= 20140115
struct PACKET_ZC_READ_MAIL *sPacket;
@@ -20438,15 +20675,15 @@ void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rod
#endif
}
-void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_DELETE_MAIL *rPacket = RFIFOP(fd, 0);
rodex->delete_mail(sd, rPacket->MailID);
}
-void clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 mail_id)
+static void clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 mail_id)
{
#if PACKETVER >= 20131218
struct PACKET_ZC_ACK_DELETE_MAIL *sPacket;
@@ -20465,15 +20702,15 @@ void clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 ma
#endif
}
-void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_ZENY_FROM_MAIL *rPacket = RFIFOP(fd, 0);
rodex->get_zeny(sd, rPacket->opentype, rPacket->MailID);
}
-void clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result)
+static void clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result)
{
#if PACKETVER >= 20140409
struct PACKET_ZC_ACK_ZENY_FROM_MAIL *sPacket;
@@ -20493,15 +20730,15 @@ void clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 m
#endif
}
-void clif_parse_rodex_request_items(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_request_items(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_request_items(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_request_items(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_ITEM_FROM_MAIL *rPacket = RFIFOP(fd, 0);
rodex->get_items(sd, rPacket->opentype, rPacket->MailID);
}
-void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result)
+static void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result)
{
#if PACKETVER >= 20140409
struct PACKET_ZC_ACK_ITEM_FROM_MAIL *sPacket;
@@ -20521,7 +20758,7 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
#endif
}
-void clif_rodex_icon(int fd, bool show)
+static void clif_rodex_icon(int fd, bool show)
{
// packet add date is 20140716, but from players reports it wrong. Using closer known correct version.
#if PACKETVER >= 20141112
@@ -20532,8 +20769,8 @@ void clif_rodex_icon(int fd, bool show)
#endif
}
-void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0);
#if PACKETVER >= 20170419
@@ -20543,8 +20780,8 @@ void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
#endif
}
-void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0);
#if PACKETVER >= 20170419
@@ -20555,20 +20792,20 @@ void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
rodex->clean(sd, 1);
}
-void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd)
{
rodex->clean(sd, 0);
intif->rodex_checkhasnew(sd);
}
-void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd)
+static void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd)
{
rodex->clean(sd, 1);
}
-void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime)
+static void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime)
{
#if PACKETVER >= 20151223
struct PACKET_ZC_SKILL_SCALE p;
@@ -20596,7 +20833,7 @@ void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 sk
/// Send hat effects to the client (ZC_HAT_EFFECT).
/// 0A3B <Length>.W <AID>.L <Status>.B { <HatEffectId>.W }
-void clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_target target)
+static void clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_target target)
{
#if PACKETVER >= 20150422
unsigned char *buf;
@@ -20632,7 +20869,7 @@ void clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_ta
#endif
}
-void clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable){
+static void clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable){
#if PACKETVER >= 20150422
unsigned char buf[13];
@@ -20648,7 +20885,7 @@ void clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable)
#endif
}
-bool clif_parse_attendance_db(void)
+static bool clif_parse_attendance_db(void)
{
struct config_t attendance_conf;
struct config_setting_t *attendance = NULL, *it = NULL;
@@ -20670,7 +20907,7 @@ bool clif_parse_attendance_db(void)
return true;
}
-bool clif_attendancedb_libconfig_sub(struct config_setting_t *it, int n, const char *source)
+static bool clif_attendancedb_libconfig_sub(struct config_setting_t *it, int n, const char *source)
{
struct attendance_entry entry = { 0 };
int i32 = 0;
@@ -20695,7 +20932,7 @@ bool clif_attendancedb_libconfig_sub(struct config_setting_t *it, int n, const c
return true;
}
-bool clif_attendance_timediff(struct map_session_data *sd)
+static bool clif_attendance_timediff(struct map_session_data *sd)
{
int64 timediff;
@@ -20707,7 +20944,7 @@ bool clif_attendance_timediff(struct map_session_data *sd)
return false;
return true;
}
-time_t clif_attendance_getendtime(void)
+static time_t clif_attendance_getendtime(void)
{
time_t timestamp;
struct tm tmtime = { 0 };
@@ -20726,8 +20963,8 @@ time_t clif_attendance_getendtime(void)
return timestamp;
}
-void clif_parse_open_ui_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
+static void clif_parse_open_ui_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_OPEN_UI *p = RP2PTR(fd);
@@ -20745,7 +20982,7 @@ void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
clif->open_ui(sd, p->UIType);
}
-void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
+static void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
{
#if PACKETVER >= 20150128
struct PACKET_ZC_OPEN_UI p;
@@ -20785,8 +21022,8 @@ void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
#endif
}
-void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
+static void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
{
#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
@@ -20836,12 +21073,12 @@ void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
#endif
}
-void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd)
+static void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd)
{
}
-void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data)
+static void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data)
{
struct PACKET_ZC_UI_ACTION p;
@@ -20855,8 +21092,8 @@ void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data)
clif->send(&p, sizeof(p), &sd->bl, SELF);
}
-void clif_parse_private_airship_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
+static void clif_parse_private_airship_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
{
#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
char evname[EVENT_NAME_LENGTH];
@@ -20876,7 +21113,7 @@ void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
#endif
}
-void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
+static void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
{
#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE p;
@@ -20897,7 +21134,7 @@ void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
#endif
}
-void clif_stylist_vector_init(void)
+static void clif_stylist_vector_init(void)
{
int i;
for (i = 0; i < MAX_STYLIST_TYPE; i++) {
@@ -20905,7 +21142,7 @@ void clif_stylist_vector_init(void)
}
}
-void clif_stylist_vector_clear(void)
+static void clif_stylist_vector_clear(void)
{
int i;
for (i = 0; i < MAX_STYLIST_TYPE; i++) {
@@ -20913,7 +21150,7 @@ void clif_stylist_vector_clear(void)
}
}
-bool clif_stylist_read_db_libconfig(void)
+static bool clif_stylist_read_db_libconfig(void)
{
struct config_t stylist_conf;
struct config_setting_t *stylist = NULL, *it = NULL;
@@ -20939,7 +21176,7 @@ bool clif_stylist_read_db_libconfig(void)
return true;
}
-bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
+static bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
{
struct stylist_data_entry entry = { 0 };
int i32 = 0, type = 0;
@@ -20978,7 +21215,7 @@ bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, co
return true;
}
-bool clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx)
+static bool clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx)
{
struct item it;
struct stylist_data_entry *entry;
@@ -21009,7 +21246,7 @@ bool clif_style_change_validate_requirements(struct map_session_data *sd, int ty
}
return false;
}
-void clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid)
+static void clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid)
{
struct rodex_message msg = { 0 };
@@ -21030,8 +21267,8 @@ void clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid)
intif->rodex_sendmail(&msg);
}
-void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
-void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
+static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_STYLE_CHANGE *p = RP2PTR(fd);
@@ -21052,7 +21289,7 @@ void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
return;
}
-void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem)
+static void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem)
{
struct stylist_data_entry *entry;
@@ -21071,7 +21308,7 @@ void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 i
}
}
-void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
+static void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
{
#if PACKETVER >= 20151104
struct PACKET_ZC_STYLE_CHANGE_RES p;
@@ -21090,7 +21327,8 @@ void clif_style_change_response(struct map_session_data *sd, enum stylist_shop f
/*==========================================
* Main client packet processing function
*------------------------------------------*/
-int clif_parse(int fd) {
+static int clif_parse(int fd)
+{
int cmd, packet_len;
struct map_session_data *sd;
int pnum;
@@ -21243,14 +21481,15 @@ int clif_parse(int fd) {
* @param packet_id The packet ID.
* @return The corresponding packet_db entry, if any.
*/
-const struct s_packet_db *clif_packet(int packet_id)
+static const struct s_packet_db *clif_packet(int packet_id)
{
if (packet_id < MIN_PACKET_DB || packet_id > MAX_PACKET_DB || packet_db[packet_id].len == 0)
return NULL;
return &packet_db[packet_id];
}
-static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...) {
+static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...)
+{
va_list va;
int i;
int pos;
@@ -21294,7 +21533,9 @@ static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...)
}
va_end(va);
}
-void packetdb_loaddb(void) {
+
+static void packetdb_loaddb(void)
+{
memset(packet_db,0,sizeof(packet_db));
#define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF)
@@ -21317,7 +21558,9 @@ void packetdb_loaddb(void) {
#endif // defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3)
#undef packetKeys
}
-void clif_bc_ready(void) {
+
+static void clif_bc_ready(void)
+{
if( battle_config.display_status_timers )
clif->status_change = clif_status_change;
else
@@ -21339,7 +21582,7 @@ void clif_bc_ready(void) {
/*==========================================
*
*------------------------------------------*/
-int do_init_clif(bool minimal)
+static int do_init_clif(bool minimal)
{
if (minimal)
return 0;
@@ -21361,7 +21604,7 @@ int do_init_clif(bool minimal)
return 0;
}
-void do_final_clif(void)
+static void do_final_clif(void)
{
unsigned char i;
@@ -21384,7 +21627,9 @@ void do_final_clif(void)
}
}
-void clif_defaults(void) {
+
+void clif_defaults(void)
+{
clif = &clif_s;
/* vars */
clif->bind_ip = INADDR_ANY;