summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/chrif.c8
-rw-r--r--src/map/chrif.h2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/guild.c12
-rw-r--r--src/map/irc.c4
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/map.h4
-rw-r--r--src/map/mercenary.c4
-rw-r--r--src/map/mob.c24
-rw-r--r--src/map/mob.h2
-rw-r--r--src/map/npc.c4
-rw-r--r--src/map/party.c4
-rw-r--r--src/map/pc.c18
-rw-r--r--src/map/pc.h6
-rw-r--r--src/map/pet.c14
-rw-r--r--src/map/pet.h8
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/script.h2
-rw-r--r--src/map/skill.c12
-rw-r--r--src/map/skill.h4
-rw-r--r--src/map/status.c6
-rw-r--r--src/map/status.h4
-rw-r--r--src/map/unit.c18
25 files changed, 91 insertions, 91 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index abb9c61d3..691035c61 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6970,13 +6970,13 @@ int atcommand_mobinfo(const int fd, struct map_session_data* sd, const char* com
* @showmobs by KarLaeda
* => For 5 sec displays the mobs on minimap
*------------------------------------------*/
-int atshowmobs_timer(int tid, unsigned int tick, int id, int data)
+int atshowmobs_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data* sd = map_id2sd(id);
if( sd == NULL )
return 0;
- clif_viewpoint(sd, 1, 2, 0, 0, data, 0xFFFFFF);
+ clif_viewpoint(sd, 1, 2, 0, 0, (int)data, 0xFFFFFF);
return 1;
}
static int atshowmobs_sub(struct block_list *bl,va_list ap)
diff --git a/src/map/battle.c b/src/map/battle.c
index ae8f13c17..51c8ca1d8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -150,7 +150,7 @@ struct delay_damage {
unsigned short attack_type;
};
-int battle_delay_damage_sub (int tid, unsigned int tick, int id, int data)
+int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data)
{
struct delay_damage *dat = (struct delay_damage *)data;
struct block_list *target = map_id2bl(dat->target);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 7ca140159..9a69d9fe7 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -682,7 +682,7 @@ int auth_db_cleanup_sub(DBKey key,void *data,va_list ap)
return 0;
}
-int auth_db_cleanup(int tid, unsigned int tick, int id, int data)
+int auth_db_cleanup(int tid, unsigned int tick, int id, intptr data)
{
if(!chrif_isconnected()) return 0;
auth_db->foreach(auth_db, auth_db_cleanup_sub);
@@ -1506,7 +1506,7 @@ int chrif_parse(int fd)
return 0;
}
-int ping_char_server(int tid, unsigned int tick, int id, int data)
+int ping_char_server(int tid, unsigned int tick, int id, intptr data)
{
chrif_check(-1);
chrif_keepalive(char_fd);
@@ -1514,7 +1514,7 @@ int ping_char_server(int tid, unsigned int tick, int id, int data)
}
// unused
-int send_usercount_tochar(int tid, unsigned int tick, int id, int data)
+int send_usercount_tochar(int tid, unsigned int tick, int id, intptr data)
{
chrif_check(-1);
@@ -1565,7 +1565,7 @@ int send_users_tochar(void)
* timer関数
* char鯖との接続を確認し、もし切れていたら再度接続する
*------------------------------------------*/
-int check_connect_char_server(int tid, unsigned int tick, int id, int data)
+int check_connect_char_server(int tid, unsigned int tick, int id, intptr data)
{
static int displayed = 0;
if (char_fd <= 0 || session[char_fd] == NULL)
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 5d0c6bc9d..a8487533c 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -56,7 +56,7 @@ int send_users_tochar(void);
int chrif_char_online(struct map_session_data *sd);
int chrif_changesex(struct map_session_data *sd);
int chrif_chardisconnect(struct map_session_data *sd);
-int check_connect_char_server(int tid, unsigned int tick, int id, int data);
+int check_connect_char_server(int tid, unsigned int tick, int id, intptr data);
int chrif_divorce(int partner_id1, int partner_id2);
int do_final_chrif(void);
diff --git a/src/map/clif.c b/src/map/clif.c
index 4c6d0f833..55e9b1776 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -654,7 +654,7 @@ int clif_clearunit_area(struct block_list* bl, uint8 type)
return 0;
}
-static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, int data)
+static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl = (struct block_list *)id;
clif_clearunit_area(bl, 0);
@@ -1276,7 +1276,7 @@ void clif_move(struct unit_data *ud)
/*==========================================
* Delays the map_quit of a player after they are disconnected. [Skotlex]
*------------------------------------------*/
-static int clif_delayquit(int tid, unsigned int tick, int id, int data)
+static int clif_delayquit(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd = NULL;
diff --git a/src/map/guild.c b/src/map/guild.c
index f008f7abf..92e721042 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -65,9 +65,9 @@ struct{
#define GUILD_SAVE_INTERVAL 300000
int guild_save_timer = -1;
-int guild_payexp_timer(int tid,unsigned int tick,int id,int data);
-int guild_save_sub(int tid,unsigned int tick,int id,int data);
-static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data);
+int guild_payexp_timer(int tid, unsigned int tick, int id, intptr data);
+int guild_save_sub(int tid, unsigned int tick, int id, intptr data);
+static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
/*==========================================
* Retrieves and validates the sd pointer for this guild member [Skotlex]
@@ -355,7 +355,7 @@ int guild_payexp_timer_sub(DBKey dataid, void *data, va_list ap)
return 0;
}
-int guild_payexp_timer(int tid, unsigned int tick, int id, int data)
+int guild_payexp_timer(int tid, unsigned int tick, int id, intptr data)
{
guild_expcache_db->clear(guild_expcache_db,guild_payexp_timer_sub);
return 0;
@@ -383,7 +383,7 @@ int guild_send_xy_timer_sub(DBKey key,void *data,va_list ap)
}
//Code from party_send_xy_timer [Skotlex]
-static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data)
+static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr data)
{
guild_db->foreach(guild_db,guild_send_xy_timer_sub,tick);
return 0;
@@ -1899,7 +1899,7 @@ int guild_agit_end(void)
return 0;
}
-int guild_save_sub(int tid,unsigned int tick,int id,int data)
+int guild_save_sub(int tid, unsigned int tick, int id, intptr data)
{
static int Gid[MAX_GUILDCASTLE]; // previous owning guild
struct guild_castle *gc;
diff --git a/src/map/irc.c b/src/map/irc.c
index 8973dd61f..a93437860 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -47,7 +47,7 @@ IRC_SI *irc_si=NULL;
struct channel_data cd;
int last_cd_user=0;
-int irc_connect_timer(int tid, unsigned int tick, int id, int data)
+int irc_connect_timer(int tid, unsigned int tick, int id, intptr data)
{
if(irc_si && session[irc_si->fd])
return 0;
@@ -148,7 +148,7 @@ int irc_parse(int fd)
return 0;
}
-int irc_keepalive_timer(int tid, unsigned int tick, int id, int data)
+int irc_keepalive_timer(int tid, unsigned int tick, int id, intptr data)
{
char send_string[128];
sprintf(send_string,"PRIVMSG %s : ", irc_nick);
diff --git a/src/map/map.c b/src/map/map.c
index c2260feef..c828ab9c7 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -250,7 +250,7 @@ int map_freeblock_unlock (void)
// この関数は、do_timer() のトップレベルから呼ばれるので、
// block_free_lock を直接いじっても支障無いはず。
-int map_freeblock_timer (int tid, unsigned int tick, int id, int data)
+int map_freeblock_timer(int tid, unsigned int tick, int id, intptr data)
{
if (block_free_lock > 0) {
ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", block_free_lock);
@@ -1249,7 +1249,7 @@ void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...)
* 後者は、map_clearflooritem(id)へ
* map.h?で#defineしてある
*------------------------------------------*/
-int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data)
+int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr data)
{
struct flooritem_data *fitem=NULL;
@@ -1996,7 +1996,7 @@ int map_removemobs_sub(struct block_list *bl, va_list ap)
return 1;
}
-int map_removemobs_timer(int tid, unsigned int tick, int id, int data)
+int map_removemobs_timer(int tid, unsigned int tick, int id, intptr data)
{
int count;
const int m = id;
@@ -2960,7 +2960,7 @@ int log_sql_init(void)
/*=============================================
* Does a mysql_ping to all connection handles
*---------------------------------------------*/
-int map_sql_ping(int tid, unsigned int tick, int id, int data)
+int map_sql_ping(int tid, unsigned int tick, int id, intptr data)
{
ShowInfo("Pinging SQL server to keep connection alive...\n");
Sql_Ping(mmysql_handle);
diff --git a/src/map/map.h b/src/map/map.h
index 2bf12e366..79762fa5b 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -536,8 +536,8 @@ int map_quit(struct map_session_data *);
bool map_addnpc(int,struct npc_data *);
// 床アイテム関連
-int map_clearflooritem_timer(int,unsigned int,int,int);
-int map_removemobs_timer(int,unsigned int,int,int);
+int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr data);
+int map_removemobs_timer(int tid, unsigned int tick, int id, intptr data);
#define map_clearflooritem(id) map_clearflooritem_timer(0,0,id,1)
int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,int first_charid,int second_charid,int third_charid,int flags);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 66658a1d9..2c76ed8d6 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -43,7 +43,7 @@
struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS]; //[orn]
struct skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
-static int merc_hom_hungry(int tid,unsigned int tick,int id,int data);
+static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr data);
static unsigned int hexptbl[MAX_LEVEL];
@@ -478,7 +478,7 @@ int merc_hom_food(struct map_session_data *sd, struct homun_data *hd)
return 0;
}
-static int merc_hom_hungry(int tid,unsigned int tick,int id,int data)
+static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd;
struct homun_data *hd;
diff --git a/src/map/mob.c b/src/map/mob.c
index bb81a779d..2288227b4 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -76,7 +76,7 @@ static DBMap* barricade_db;
* Local prototype declaration (only required thing)
*------------------------------------------*/
static int mob_makedummymobdb(int);
-static int mob_spawn_guardian_sub(int,unsigned int,int,int);
+static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr data);
int mobskill_use(struct mob_data *md,unsigned int tick,int event);
int mob_skillid2skillidx(int class_,int skillid);
@@ -672,7 +672,7 @@ void mod_barricade_clearall(void)
/*==========================================
* Set a Guardian's guild data [Skotlex]
*------------------------------------------*/
-static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
+static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr data)
{ //Needed because the guild_data may not be available at guardian spawn time.
struct block_list* bl = map_id2bl(id);
struct mob_data* md;
@@ -690,11 +690,11 @@ static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
md = (struct mob_data*)bl;
nullpo_retr(0, md->guardian_data);
- g = guild_search(data);
+ g = guild_search((int)data);
if (g == NULL)
{ //Liberate castle, if the guild is not found this is an error! [Skotlex]
- ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n",data);
+ ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n", (int)data);
if (md->class_ == MOBID_EMPERIUM)
{ //Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on.
md->guardian_data->guild_id = 0;
@@ -887,9 +887,9 @@ int mob_linksearch(struct block_list *bl,va_list ap)
/*==========================================
* mob spawn with delay (timer function)
*------------------------------------------*/
-static int mob_delayspawn(int tid, unsigned int tick, int m, int n)
+static int mob_delayspawn(int tid, unsigned int tick, int id, intptr data)
{
- struct block_list *bl = map_id2bl(m);
+ struct block_list *bl = map_id2bl(id);
if (bl && bl->type == BL_MOB)
mob_spawn((TBL_MOB*)bl);
return 0;
@@ -1751,7 +1751,7 @@ static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
/*==========================================
* Negligent processing for mob outside PC field of view (interval timer function)
*------------------------------------------*/
-static int mob_ai_lazy(int tid,unsigned int tick,int id,int data)
+static int mob_ai_lazy(int tid, unsigned int tick, int id, intptr data)
{
map_foreachmob(mob_ai_sub_lazy,tick);
return 0;
@@ -1760,7 +1760,7 @@ static int mob_ai_lazy(int tid,unsigned int tick,int id,int data)
/*==========================================
* Serious processing for mob in PC field of view (interval timer function)
*------------------------------------------*/
-static int mob_ai_hard(int tid,unsigned int tick,int id,int data)
+static int mob_ai_hard(int tid, unsigned int tick, int id, intptr data)
{
if (battle_config.mob_ai&0x20)
@@ -1799,7 +1799,7 @@ static struct item_drop* mob_setlootitem(struct item* item)
/*==========================================
* item drop with delay (timer function)
*------------------------------------------*/
-static int mob_delay_item_drop(int tid, unsigned int tick, int id, int data)
+static int mob_delay_item_drop(int tid, unsigned int tick, int id, intptr data)
{
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
@@ -1858,7 +1858,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
dlist->item = ditem;
}
-int mob_timer_delete(int tid, unsigned int tick, int id, int data)
+int mob_timer_delete(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl=map_id2bl(id);
nullpo_retr(0, bl);
@@ -1927,12 +1927,12 @@ int mob_deleteslave(struct mob_data *md)
return 0;
}
// Mob respawning through KAIZEL or NPC_REBIRTH [Skotlex]
-int mob_respawn(int tid, unsigned int tick, int id,int data )
+int mob_respawn(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl = map_id2bl(id);
if(!bl) return 0;
- status_revive(bl, data, 0);
+ status_revive(bl, (uint8)data, 0);
return 1;
}
diff --git a/src/map/mob.h b/src/map/mob.h
index bad4b6088..f01b4fff1 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -251,7 +251,7 @@ void mob_clear_spawninfo();
int do_init_mob(void);
int do_final_mob(void);
-int mob_timer_delete(int tid, unsigned int tick, int id, int data);
+int mob_timer_delete(int tid, unsigned int tick, int id, intptr data);
int mob_deleteslave(struct mob_data *md);
int mob_random_class (int *value, size_t count);
diff --git a/src/map/npc.c b/src/map/npc.c
index eb6a7effd..92f61564c 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -302,7 +302,7 @@ int npc_event_doall_id(const char* name, int rid)
/*==========================================
* 時計イベント実行
*------------------------------------------*/
-int npc_event_do_clock(int tid, unsigned int tick, int id, int data)
+int npc_event_do_clock(int tid, unsigned int tick, int id, intptr data)
{
static struct tm ev_tm_b; // tracks previous execution time
time_t timer;
@@ -397,7 +397,7 @@ struct timer_event_data {
/*==========================================
* タイマーイベント実行
*------------------------------------------*/
-int npc_timerevent(int tid, unsigned int tick, int id, int data)
+int npc_timerevent(int tid, unsigned int tick, int id, intptr data)
{
int next,t,old_rid,old_timer;
unsigned int old_tick;
diff --git a/src/map/party.c b/src/map/party.c
index 22bac7467..d31ca6686 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -29,7 +29,7 @@
static DBMap* party_db; // int party_id -> struct party_data*
int party_share_level = 10;
-int party_send_xy_timer(int tid,unsigned int tick,int id,int data);
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
/*==========================================
* Fills the given party_member structure according to the sd provided.
@@ -733,7 +733,7 @@ int party_skill_check(struct map_session_data *sd, int party_id, int skillid, in
return 0;
}
-int party_send_xy_timer(int tid,unsigned int tick,int id,int data)
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data)
{
struct party_data* p;
diff --git a/src/map/pc.c b/src/map/pc.c
index be9b6bde2..29dfd1b30 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -115,7 +115,7 @@ int pc_set_gm_level(int account_id, int level)
return 0;
}
-static int pc_invincible_timer(int tid,unsigned int tick,int id,int data)
+static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd;
@@ -153,7 +153,7 @@ void pc_delinvincibletimer(struct map_session_data* sd)
}
}
-static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data)
+static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd;
@@ -4124,7 +4124,7 @@ char* job_name(int class_)
}
}
-int pc_follow_timer(int tid,unsigned int tick,int id,int data)
+int pc_follow_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd;
struct block_list *tbl;
@@ -4912,7 +4912,7 @@ void pc_respawn(struct map_session_data* sd, uint8 clrtype)
clif_resurrection(&sd->bl, 1); //If warping fails, send a normal stand up packet.
}
-static int pc_respawn_timer(int tid,unsigned int tick,int id,int data)
+static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd = map_id2sd(id);
if( sd != NULL )
@@ -6231,7 +6231,7 @@ int pc_setregistry_str(struct map_session_data *sd,char *reg,const char *val,int
/*==========================================
* イベントタイマ??理
*------------------------------------------*/
-static int pc_eventtimer(int tid,unsigned int tick,int id,int data)
+static int pc_eventtimer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=map_id2sd(id);
char *p = (char *)data;
@@ -6721,7 +6721,7 @@ int pc_calc_pvprank(struct map_session_data *sd)
/*==========================================
* PVP順位計算(timer)
*------------------------------------------*/
-int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
+int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=NULL;
@@ -6917,7 +6917,7 @@ int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
/*==========================================
* 自動セ?ブ (timer??)
*------------------------------------------*/
-int pc_autosave(int tid,unsigned int tick,int id,int data)
+int pc_autosave(int tid, unsigned int tick, int id, intptr data)
{
int interval;
struct s_mapiterator* iter;
@@ -6985,7 +6985,7 @@ static int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap)
* timer to do the day [Yor]
* data: 0 = called by timer, 1 = gmcommand/script
*------------------------------------------------*/
-int map_day_timer(int tid, unsigned int tick, int id, int data)
+int map_day_timer(int tid, unsigned int tick, int id, intptr data)
{
char tmp_soutput[1024];
@@ -7006,7 +7006,7 @@ int map_day_timer(int tid, unsigned int tick, int id, int data)
* timer to do the night [Yor]
* data: 0 = called by timer, 1 = gmcommand/script
*------------------------------------------------*/
-int map_night_timer(int tid, unsigned int tick, int id, int data)
+int map_night_timer(int tid, unsigned int tick, int id, intptr data)
{
char tmp_soutput[1024];
diff --git a/src/map/pc.h b/src/map/pc.h
index 8ab170161..24a882431 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -639,7 +639,7 @@ int pc_cleareventtimer(struct map_session_data *sd);
int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick);
int pc_calc_pvprank(struct map_session_data *sd);
-int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data);
+int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr data);
int pc_ismarried(struct map_session_data *sd);
int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd);
@@ -705,8 +705,8 @@ enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
// timer for night.day
extern int day_timer_tid;
extern int night_timer_tid;
-int map_day_timer(int,unsigned int,int,int); // by [yor]
-int map_night_timer(int,unsigned int,int,int); // by [yor]
+int map_day_timer(int tid, unsigned int tick, int id, intptr data); // by [yor]
+int map_night_timer(int tid, unsigned int tick, int id, intptr data); // by [yor]
//Duel functions // [LuzZza]
int duel_create(struct map_session_data* sd, const unsigned int maxpl);
diff --git a/src/map/pet.c b/src/map/pet.c
index 0ccae4701..879edef41 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -227,7 +227,7 @@ int pet_sc_check(struct map_session_data *sd, int type)
return 0;
}
-static int pet_hungry(int tid,unsigned int tick,int id,int data)
+static int pet_hungry(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd;
struct pet_data *pd;
@@ -969,7 +969,7 @@ static int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
return 0;
}
-static int pet_ai_hard(int tid,unsigned int tick,int id,int data)
+static int pet_ai_hard(int tid, unsigned int tick, int id, intptr data)
{
clif_foreachclient(pet_ai_sub_foreachclient,tick);
@@ -1003,7 +1003,7 @@ static int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
return 0;
}
-static int pet_delay_item_drop(int tid,unsigned int tick,int id,int data)
+static int pet_delay_item_drop(int tid, unsigned int tick, int id, intptr data)
{
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
@@ -1072,7 +1072,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
/*==========================================
* pet bonus giving skills [Valaris] / Rewritten by [Skotlex]
*------------------------------------------*/
-int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
+int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
@@ -1114,7 +1114,7 @@ int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
*------------------------------------------*/
-int pet_recovery_timer(int tid,unsigned int tick,int id,int data)
+int pet_recovery_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
@@ -1142,7 +1142,7 @@ int pet_recovery_timer(int tid,unsigned int tick,int id,int data)
return 0;
}
-int pet_heal_timer(int tid,unsigned int tick,int id,int data)
+int pet_heal_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=map_id2sd(id);
struct status_data *status;
@@ -1180,7 +1180,7 @@ int pet_heal_timer(int tid,unsigned int tick,int id,int data)
/*==========================================
* pet support skills [Skotlex]
*------------------------------------------*/
-int pet_skill_support_timer(int tid,unsigned int tick,int id,int data)
+int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
diff --git a/src/map/pet.h b/src/map/pet.h
index 86b9080eb..20538e240 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -119,10 +119,10 @@ int pet_change_name_ack(struct map_session_data *sd, char* name, int flag);
int pet_equipitem(struct map_session_data *sd,int index);
int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd);
int pet_attackskill(struct pet_data *pd, int target_id);
-int pet_skill_support_timer(int tid, unsigned int tick, int id, int data); // [Skotlex]
-int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
-int pet_recovery_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
-int pet_heal_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
+int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr data); // [Skotlex]
+int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr data); // [Valaris]
+int pet_recovery_timer(int tid, unsigned int tick, int id, intptr data); // [Valaris]
+int pet_heal_timer(int tid, unsigned int tick, int id, intptr data); // [Valaris]
#define pet_stop_walking(pd, type) unit_stop_walking(&(pd)->bl, type)
#define pet_stop_attack(pd) unit_stop_attack(&(pd)->bl)
diff --git a/src/map/script.c b/src/map/script.c
index 364dbc8b9..0d520ebc3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3013,7 +3013,7 @@ struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
/*==========================================
* sleep用タイマー関数
*------------------------------------------*/
-int run_script_timer(int tid, unsigned int tick, int id, int data)
+int run_script_timer(int tid, unsigned int tick, int id, intptr data)
{
struct script_state *st = (struct script_state *)data;
struct linkdb_node *node = (struct linkdb_node *)sleep_db;
@@ -3453,7 +3453,7 @@ static int script_save_mapreg(void)
mapreg_dirty=0;
return 0;
}
-static int script_autosave_mapreg(int tid,unsigned int tick,int id,int data)
+static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr data)
{
if(mapreg_dirty)
if (script_save_mapreg() == -1)
diff --git a/src/map/script.h b/src/map/script.h
index 943ce3a4d..7f07185a8 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -129,7 +129,7 @@ int set_var(struct map_session_data *sd, char *name, void *val);
int conv_num(struct script_state *st,struct script_data *data);
const char* conv_str(struct script_state *st,struct script_data *data);
void setd_sub(struct script_state *st, struct map_session_data *sd, char *varname, int elem, void *value, struct linkdb_node **ref);
-int run_script_timer(int tid, unsigned int tick, int id, int data);
+int run_script_timer(int tid, unsigned int tick, int id, intptr data);
void run_script_main(struct script_state *st);
void script_stop_sleeptimers(int id);
diff --git a/src/map/skill.c b/src/map/skill.c
index 6ede18445..ce842e734 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2020,7 +2020,7 @@ int skill_area_sub_count (struct block_list *src, struct block_list *target, int
/*==========================================
*
*------------------------------------------*/
-static int skill_timerskill (int tid, unsigned int tick, int id, int data)
+static int skill_timerskill(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *src = map_id2bl(id),*target;
struct unit_data *ud = unit_bl2ud(src);
@@ -5196,7 +5196,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
/*==========================================
*
*------------------------------------------*/
-int skill_castend_id (int tid, unsigned int tick, int id, int data)
+int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *target, *src = map_id2bl(id);
struct map_session_data* sd = NULL;
@@ -5422,7 +5422,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
/*==========================================
*
*------------------------------------------*/
-int skill_castend_pos (int tid, unsigned int tick, int id, int data)
+int skill_castend_pos(int tid, unsigned int tick, int id, intptr data)
{
struct block_list* src = map_id2bl(id);
int maxcount;
@@ -9703,7 +9703,7 @@ int skill_unit_timer_sub (struct block_list* bl, va_list ap)
/*==========================================
* Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds.
*------------------------------------------*/
-int skill_unit_timer (int tid, unsigned int tick, int id, int data)
+int skill_unit_timer(int tid, unsigned int tick, int id, intptr data)
{
map_freeblock_lock();
@@ -10371,7 +10371,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
/*==========================================
*
*------------------------------------------*/
-int skill_blockpc_end (int tid, unsigned int tick, int id, int data)
+int skill_blockpc_end(int tid, unsigned int tick, int id, intptr data)
{
struct map_session_data *sd = map_id2sd(id);
if (data <= 0 || data >= MAX_SKILL)
@@ -10398,7 +10398,7 @@ int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
return add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid);
}
-int skill_blockmerc_end (int tid, unsigned int tick, int id, int data) //[orn]
+int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr data) //[orn]
{
struct homun_data *hd = (TBL_HOM*) map_id2bl(id);
if (data <= 0 || data >= MAX_SKILL)
diff --git a/src/map/skill.h b/src/map/skill.h
index 864eb4a97..8719e6adf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -249,8 +249,8 @@ const char* skill_get_name( int id ); // [Skotlex]
const char* skill_get_desc( int id ); // [Skotlex]
int skill_isammotype(struct map_session_data *sd, int skill);
-int skill_castend_id( int tid, unsigned int tick, int id,int data );
-int skill_castend_pos( int tid, unsigned int tick, int id,int data );
+int skill_castend_id(int tid, unsigned int tick, int id, intptr data);
+int skill_castend_pos(int tid, unsigned int tick, int id, intptr data);
int skill_castend_map( struct map_session_data *sd,short skill_num, const char *map);
int skill_cleartimerskill(struct block_list *src);
diff --git a/src/map/status.c b/src/map/status.c
index b362a15cd..70c1074d6 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6714,7 +6714,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
return 1;
}
-int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
+int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl;
struct status_change *sc;
@@ -6751,7 +6751,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
/*==========================================
* ステータス異常終了タイマー
*------------------------------------------*/
-int status_change_timer(int tid, unsigned int tick, int id, int data)
+int status_change_timer(int tid, unsigned int tick, int id, intptr data)
{
enum sc_type type = (sc_type)data;
struct block_list *bl;
@@ -7426,7 +7426,7 @@ static int status_natural_heal(DBKey key,void * data,va_list ap)
}
//Natural heal main timer.
-static int status_natural_heal_timer(int tid,unsigned int tick,int id,int data)
+static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr data)
{
natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick);
map_foreachiddb(status_natural_heal);
diff --git a/src/map/status.h b/src/map/status.h
index 0f2e47778..30c52e4d4 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -781,8 +781,8 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val1,int val2,int val3,int val4,int tick,int flag);
int status_change_end(struct block_list* bl, enum sc_type type, int tid);
-int kaahi_heal_timer(int tid, unsigned int tick, int id, int data);
-int status_change_timer(int tid, unsigned int tick, int id, int data);
+int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr data);
+int status_change_timer(int tid, unsigned int tick, int id, intptr data);
int status_change_timer_sub(struct block_list* bl, va_list ap);
int status_change_clear(struct block_list* bl, int type);
int status_change_clear_buffs(struct block_list* bl, int type);
diff --git a/src/map/unit.c b/src/map/unit.c
index 88bfaab47..a6e3ec914 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -46,8 +46,8 @@ struct unit_data* unit_bl2ud(struct block_list *bl)
return NULL;
}
-static int unit_attack_timer(int tid,unsigned int tick,int id,int data);
-static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data);
+static int unit_attack_timer(int tid, unsigned int tick, int id, intptr data);
+static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data);
int unit_walktoxy_sub(struct block_list *bl)
{
@@ -101,7 +101,7 @@ int unit_walktoxy_sub(struct block_list *bl)
return 1;
}
-static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
+static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
{
int i;
int x,y,dx,dy;
@@ -254,13 +254,13 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0;
}
-static int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, int data)
+static int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl = map_id2bl(id);
if (!bl || bl->prev == NULL)
return 0;
- unit_walktoxy(bl, data>>16, data&0xffff, 0);
+ unit_walktoxy(bl, (short)((data>>16)&0xffff), (short)(data&0xffff), 0);
return 1;
}
@@ -318,7 +318,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
if((bl)->type == BL_MOB && (flag)) \
((TBL_MOB*)(bl))->state.skillstate = ((TBL_MOB*)(bl))->state.aggressive?MSS_FOLLOW:MSS_RUSH;
-static int unit_walktobl_sub(int tid,unsigned int tick,int id,int data)
+static int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl = map_id2bl(id);
struct unit_data *ud = bl?unit_bl2ud(bl):NULL;
@@ -762,7 +762,7 @@ int unit_can_move(struct block_list *bl)
* Resume running after a walk delay
*------------------------------------------*/
-int unit_resume_running(int tid,unsigned int tick,int id,int data)
+int unit_resume_running(int tid, unsigned int tick, int id, intptr data)
{
struct unit_data *ud = (struct unit_data *)data;
@@ -1192,7 +1192,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
return 1;
}
-static int unit_attack_timer(int tid,unsigned int tick,int id,int data);
+static int unit_attack_timer(int tid, unsigned int tick, int id, intptr data);
int unit_stop_attack(struct block_list *bl)
{
@@ -1476,7 +1476,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
return 1;
}
-static int unit_attack_timer(int tid,unsigned int tick,int id,int data)
+static int unit_attack_timer(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl;
bl = map_id2bl(id);