summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/battleground.c2
-rw-r--r--src/map/chrif.c10
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/guild.c10
-rw-r--r--src/map/homunculus.c4
-rw-r--r--src/map/instance.c2
-rw-r--r--src/map/map.c6
-rw-r--r--src/map/map.h4
-rw-r--r--src/map/mapreg_sql.c2
-rw-r--r--src/map/mapreg_txt.c2
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mob.c20
-rw-r--r--src/map/mob.h4
-rw-r--r--src/map/npc.c20
-rw-r--r--src/map/party.c4
-rw-r--r--src/map/pc.c26
-rw-r--r--src/map/pc.h8
-rw-r--r--src/map/pet.c16
-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.c14
-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.c16
28 files changed, 106 insertions, 106 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ac7e2e85e..d414d565d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7018,7 +7018,7 @@ ACMD_FUNC(mobinfo)
* @showmobs by KarLaeda
* => For 5 sec displays the mobs on minimap
*------------------------------------------*/
-int atshowmobs_timer(int tid, unsigned int tick, int id, intptr data)
+int atshowmobs_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data* sd = map_id2sd(id);
if( sd == NULL )
diff --git a/src/map/battle.c b/src/map/battle.c
index 41ba7e189..47a2d70be 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -154,7 +154,7 @@ struct delay_damage {
unsigned short attack_type;
};
-int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data)
+int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data)
{
struct delay_damage *dat = (struct delay_damage *)data;
struct block_list *target = map_id2bl(dat->target);
@@ -208,7 +208,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src,
dat->distance = distance_bl(src, target)+10; //Attack should connect regardless unless you teleported.
if (src->type != BL_PC && amotion > 1000)
amotion = 1000; //Aegis places a damage-delay cap of 1 sec to non player attacks. [Skotlex]
- add_timer(tick+amotion, battle_delay_damage_sub, src->id, (intptr)dat);
+ add_timer(tick+amotion, battle_delay_damage_sub, src->id, (intptr_t)dat);
return 0;
}
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 13f62a042..b456a868a 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -236,7 +236,7 @@ int bg_send_xy_timer_sub(DBKey key, void *data, va_list ap)
return 0;
}
-int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr data)
+int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
bg_team_db->foreach(bg_team_db, bg_send_xy_timer_sub, tick);
return 0;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 8542e618e..a14200a36 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -31,7 +31,7 @@
#include <sys/types.h>
#include <time.h>
-static int check_connect_char_server(int tid, unsigned int tick, int id, intptr data);
+static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data);
static struct eri *auth_db_ers; //For reutilizing player login structures.
static DBMap* auth_db; // int id -> struct auth_node*
@@ -694,7 +694,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, intptr data)
+int auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data)
{
if(!chrif_isconnected()) return 0;
auth_db->foreach(auth_db, auth_db_cleanup_sub);
@@ -1455,7 +1455,7 @@ int chrif_parse(int fd)
return 0;
}
-int ping_char_server(int tid, unsigned int tick, int id, intptr data)
+int ping_char_server(int tid, unsigned int tick, int id, intptr_t data)
{
chrif_check(-1);
chrif_keepalive(char_fd);
@@ -1463,7 +1463,7 @@ int ping_char_server(int tid, unsigned int tick, int id, intptr data)
}
// unused
-int send_usercount_tochar(int tid, unsigned int tick, int id, intptr data)
+int send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data)
{
chrif_check(-1);
@@ -1508,7 +1508,7 @@ int send_users_tochar(void)
* timer関数
* char鯖との接続を確認し、もし切れていたら再度接続する
*------------------------------------------*/
-static int check_connect_char_server(int tid, unsigned int tick, int id, intptr data)
+static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data)
{
static int displayed = 0;
if (char_fd <= 0 || session[char_fd] == NULL)
diff --git a/src/map/clif.c b/src/map/clif.c
index 8a667bb72..d68a50570 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -700,7 +700,7 @@ int clif_clearunit_area(struct block_list* bl, clr_type type)
return 0;
}
-static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr data)
+static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl = (struct block_list *)data;
clif_clearunit_area(bl, CLR_OUTSIGHT);
@@ -713,7 +713,7 @@ int clif_clearunit_delayed(struct block_list* bl, unsigned int tick)
struct block_list *tbl;
tbl = (struct block_list*)aMalloc(sizeof (struct block_list));
memcpy (tbl, bl, sizeof (struct block_list));
- add_timer(tick, clif_clearunit_delayed_sub, 0, (intptr)tbl);
+ add_timer(tick, clif_clearunit_delayed_sub, 0, (intptr_t)tbl);
return 0;
}
@@ -1421,7 +1421,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, intptr data)
+static int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd = NULL;
diff --git a/src/map/guild.c b/src/map/guild.c
index c80b124ef..0b77aa9a1 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -61,8 +61,8 @@ struct{
}need[6];
} guild_skill_tree[MAX_GUILDSKILL];
-int guild_payexp_timer(int tid, unsigned int tick, int id, intptr data);
-static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
+int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data);
+static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
/*==========================================
* Retrieves and validates the sd pointer for this guild member [Skotlex]
@@ -308,7 +308,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, intptr data)
+int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data)
{
guild_expcache_db->clear(guild_expcache_db,guild_payexp_timer_sub);
return 0;
@@ -336,7 +336,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, intptr data)
+static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
guild_db->foreach(guild_db,guild_send_xy_timer_sub,tick);
return 0;
@@ -1840,7 +1840,7 @@ int guild_castlealldataload(int len,struct guild_castle *gc)
}
// update mapserver castle data with new info
- memcpy(&c->guild_id, &gc->guild_id, sizeof(struct guild_castle) - ((uintptr)&c->guild_id - (uintptr)c));
+ memcpy(&c->guild_id, &gc->guild_id, sizeof(struct guild_castle) - ((uintptr_t)&c->guild_id - (uintptr_t)c));
if( c->guild_id )
{
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 02db4ab5c..50b7c2c7a 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -45,7 +45,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, intptr data);
+static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr_t data);
static unsigned int hexptbl[MAX_LEVEL];
@@ -480,7 +480,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, intptr data)
+static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
struct homun_data *hd;
diff --git a/src/map/instance.c b/src/map/instance.c
index e9ff2b409..836543891 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -294,7 +294,7 @@ void instance_destroy_freesvar(void *key, void *data, va_list args)
/*--------------------------------------
* Timer to destroy instance by process or idle
*--------------------------------------*/
-int instance_destroy_timer(int tid, unsigned int tick, int id, intptr data)
+int instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
instance_destroy(id);
return 0;
diff --git a/src/map/map.c b/src/map/map.c
index 8209c1033..0c60e94aa 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -240,7 +240,7 @@ int map_freeblock_unlock (void)
// この関数は、do_timer() のトップレベルから呼ばれるので、
// block_free_lock を直接いじっても支障無いはず。
-int map_freeblock_timer(int tid, unsigned int tick, int id, intptr data)
+int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data)
{
if (block_free_lock > 0) {
ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", block_free_lock);
@@ -1217,7 +1217,7 @@ int map_get_new_object_id(void)
* 後者は、map_clearflooritem(id)へ
* map.h?で#defineしてある
*------------------------------------------*/
-int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr data)
+int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id);
if( fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid) )
@@ -2146,7 +2146,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, intptr data)
+int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data)
{
int count;
const int m = id;
diff --git a/src/map/map.h b/src/map/map.h
index 06514f5d2..d5c4683d2 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -579,8 +579,8 @@ int map_quit(struct map_session_data *);
bool map_addnpc(int,struct npc_data *);
// 床アイテム関連
-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);
+int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data);
+int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t 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/mapreg_sql.c b/src/map/mapreg_sql.c
index f80be56a2..455da0f49 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -184,7 +184,7 @@ static void script_save_mapreg(void)
mapreg_dirty = false;
}
-static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr data)
+static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr_t data)
{
if( mapreg_dirty )
script_save_mapreg();
diff --git a/src/map/mapreg_txt.c b/src/map/mapreg_txt.c
index 555b773ee..95be201e2 100644
--- a/src/map/mapreg_txt.c
+++ b/src/map/mapreg_txt.c
@@ -151,7 +151,7 @@ static void script_save_mapreg(void)
mapreg_dirty = false;
}
-static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr data)
+static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr_t data)
{
if( mapreg_dirty )
script_save_mapreg();
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 8300628d5..f6fa6bdaa 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -215,7 +215,7 @@ int mercenary_save(struct mercenary_data *md)
return 1;
}
-static int merc_contract_end(int tid, unsigned int tick, int id, intptr data)
+static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
struct mercenary_data *md;
diff --git a/src/map/mob.c b/src/map/mob.c
index 57173baee..5fb440b4f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -81,7 +81,7 @@ const int mob_splendide[5] = { 1991, 1992, 1993, 1994, 1995 };
* Local prototype declaration (only required thing)
*------------------------------------------*/
static int mob_makedummymobdb(int);
-static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr data);
+static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data);
int mob_skillid2skillidx(int class_,int skillid);
/*==========================================
@@ -507,7 +507,7 @@ int mob_once_spawn_area(struct map_session_data* sd,int m,int x0,int y0,int x1,i
/*==========================================
* Set a Guardian's guild data [Skotlex]
*------------------------------------------*/
-static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr data)
+static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t 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;
@@ -766,7 +766,7 @@ int mob_linksearch(struct block_list *bl,va_list ap)
/*==========================================
* mob spawn with delay (timer function)
*------------------------------------------*/
-int mob_delayspawn(int tid, unsigned int tick, int id, intptr data)
+int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list* bl = map_id2bl(id);
struct mob_data* md = BL_CAST(BL_MOB, bl);
@@ -1636,7 +1636,7 @@ static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
/*==========================================
* Negligent processing for mob outside PC field of view (interval timer function)
*------------------------------------------*/
-static int mob_ai_lazy(int tid, unsigned int tick, int id, intptr data)
+static int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data)
{
map_foreachmob(mob_ai_sub_lazy,tick);
return 0;
@@ -1645,7 +1645,7 @@ static int mob_ai_lazy(int tid, unsigned int tick, int id, intptr 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, intptr data)
+static int mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data)
{
if (battle_config.mob_ai&0x20)
@@ -1684,7 +1684,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, intptr data)
+static int mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data)
{
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
@@ -1744,7 +1744,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, intptr data)
+int mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list* bl = map_id2bl(id);
struct mob_data* md = BL_CAST(BL_MOB, bl);
@@ -1791,7 +1791,7 @@ 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, intptr data)
+int mob_respawn(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl = map_id2bl(id);
@@ -2296,7 +2296,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
}
if (dlist->item) //There are drop items.
- add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
+ add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr_t)dlist);
else //No drops
ers_free(item_drop_list_ers, dlist);
} else if (md->lootitem && md->lootitem_count) { //Loot MUST drop!
@@ -2310,7 +2310,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
dlist->item = NULL;
for(i = 0; i < md->lootitem_count; i++)
mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
- add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
+ add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr_t)dlist);
}
if(mvp_sd && md->db->mexp > 0 && !md->special_state.ai)
diff --git a/src/map/mob.h b/src/map/mob.h
index 605439f12..9e86b8d63 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -239,7 +239,7 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist);
int mob_unlocktarget(struct mob_data *md, unsigned int tick);
struct mob_data* mob_spawn_dataset(struct spawn_data *data);
int mob_spawn(struct mob_data *md);
-int mob_delayspawn(int tid, unsigned int tick, int id, intptr data);
+int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data);
int mob_setdelayspawn(struct mob_data *md);
int mob_parse_dataset(struct spawn_data *data);
void mob_log_damage(struct mob_data *md, struct block_list *src, int damage);
@@ -256,7 +256,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, intptr data);
+int mob_timer_delete(int tid, unsigned int tick, int id, intptr_t 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 0781cb44c..dd3a671b0 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -356,7 +356,7 @@ bool npc_event_isspecial(const char* eventname)
/*==========================================
* 時計イベント実行
*------------------------------------------*/
-int npc_event_do_clock(int tid, unsigned int tick, int id, intptr data)
+int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data)
{
static struct tm ev_tm_b; // tracks previous execution time
time_t timer;
@@ -455,7 +455,7 @@ struct timer_event_data {
/*==========================================
* triger 'OnTimerXXXX' events
*------------------------------------------*/
-int npc_timerevent(int tid, unsigned int tick, int id, intptr data)
+int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data)
{
int next;
int old_rid, old_timer;
@@ -498,9 +498,9 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr data)
next = nd->u.scr.timer_event[ ted->next ].timer - nd->u.scr.timer_event[ ted->next - 1 ].timer;
ted->time += next;
if( sd )
- sd->npc_timer_id = add_timer(tick+next,npc_timerevent,id,(intptr)ted);
+ sd->npc_timer_id = add_timer(tick+next,npc_timerevent,id,(intptr_t)ted);
else
- nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,id,(intptr)ted);
+ nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,id,(intptr_t)ted);
}
else
{
@@ -570,13 +570,13 @@ int npc_timerevent_start(struct npc_data* nd, int rid)
if( sd )
{
ted->rid = sd->bl.id; // Attach only the player if attachplayerrid was used.
- sd->npc_timer_id = add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr)ted);
+ sd->npc_timer_id = add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr_t)ted);
}
else
{
ted->rid = 0;
nd->u.scr.timertick = tick; // Set when timer is started
- nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr)ted);
+ nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr_t)ted);
}
return 0;
@@ -1164,8 +1164,8 @@ static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* i
// save list of bought items
for( i = 0; i < n; i++ )
{
- script_setarray_pc(sd, "@bought_nameid", i, (void*)(intptr)item_list[i*2+1], &key_nameid);
- script_setarray_pc(sd, "@bought_quantity", i, (void*)(intptr)item_list[i*2], &key_amount);
+ script_setarray_pc(sd, "@bought_nameid", i, (void*)(intptr_t)item_list[i*2+1], &key_nameid);
+ script_setarray_pc(sd, "@bought_quantity", i, (void*)(intptr_t)item_list[i*2], &key_amount);
}
// invoke event
@@ -1402,8 +1402,8 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short*
{
idx = item_list[i*2]-2;
- script_setarray_pc(sd, "@sold_nameid", i, (void*)(intptr)sd->status.inventory[idx].nameid, &key_nameid);
- script_setarray_pc(sd, "@sold_quantity", i, (void*)(intptr)item_list[i*2+1], &key_amount);
+ script_setarray_pc(sd, "@sold_nameid", i, (void*)(intptr_t)sd->status.inventory[idx].nameid, &key_nameid);
+ script_setarray_pc(sd, "@sold_quantity", i, (void*)(intptr_t)item_list[i*2+1], &key_amount);
}
// invoke event
diff --git a/src/map/party.c b/src/map/party.c
index d229c576e..88f53bcb0 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -32,7 +32,7 @@ static DBMap* party_db; // int party_id -> struct party_data*
static DBMap* party_booking_db; // Party Booking [Spiria]
static unsigned long party_booking_nextid = 1;
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
/*==========================================
* Fills the given party_member structure according to the sd provided.
@@ -840,7 +840,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, intptr data)
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;
diff --git a/src/map/pc.c b/src/map/pc.c
index 372c45cb0..ded499f2d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -85,7 +85,7 @@ int pc_isGM(struct map_session_data* sd)
return sd->gmlevel;
}
-static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr data)
+static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
@@ -123,7 +123,7 @@ void pc_delinvincibletimer(struct map_session_data* sd)
}
}
-static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr data)
+static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
int i;
@@ -295,7 +295,7 @@ int pc_setrestartvalue(struct map_session_data *sd,int type)
/*==========================================
Rental System
*------------------------------------------*/
-static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr data)
+static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd = map_id2sd(id);
if( sd == NULL )
@@ -1722,14 +1722,14 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
}
- autobonus->active = add_timer(gettick()+autobonus->duration, pc_endautobonus, sd->bl.id, (intptr)autobonus);
+ autobonus->active = add_timer(gettick()+autobonus->duration, pc_endautobonus, sd->bl.id, (intptr_t)autobonus);
sd->state.autobonus |= autobonus->pos;
status_calc_pc(sd,0);
return 0;
}
-int pc_endautobonus(int tid, unsigned int tick, int id, intptr data)
+int pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd = map_id2sd(id);
struct s_autobonus *autobonus = (struct s_autobonus *)data;
@@ -4783,7 +4783,7 @@ const char* job_name(int class_)
}
}
-int pc_follow_timer(int tid, unsigned int tick, int id, intptr data)
+int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
struct block_list *tbl;
@@ -5665,7 +5665,7 @@ void pc_respawn(struct map_session_data* sd, clr_type 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, intptr data)
+static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd = map_id2sd(id);
if( sd != NULL )
@@ -7028,7 +7028,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v
/*==========================================
* イベントタイマ??理
*------------------------------------------*/
-static int pc_eventtimer(int tid, unsigned int tick, int id, intptr data)
+static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd=map_id2sd(id);
char *p = (char *)data;
@@ -7062,7 +7062,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
if( i == MAX_EVENTTIMER )
return 0;
- sd->eventtimer[i] = add_timer(gettick()+tick, pc_eventtimer, sd->bl.id, (intptr)aStrdup(name));
+ sd->eventtimer[i] = add_timer(gettick()+tick, pc_eventtimer, sd->bl.id, (intptr_t)aStrdup(name));
sd->eventcount++;
return 1;
@@ -7528,7 +7528,7 @@ int pc_calc_pvprank(struct map_session_data *sd)
/*==========================================
* PVP順位計算(timer)
*------------------------------------------*/
-int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr data)
+int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd=NULL;
@@ -7727,7 +7727,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, intptr data)
+int pc_autosave(int tid, unsigned int tick, int id, intptr_t data)
{
int interval;
struct s_mapiterator* iter;
@@ -7781,7 +7781,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, intptr data)
+int map_day_timer(int tid, unsigned int tick, int id, intptr_t data)
{
char tmp_soutput[1024];
@@ -7802,7 +7802,7 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr 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, intptr data)
+int map_night_timer(int tid, unsigned int tick, int id, intptr_t data)
{
char tmp_soutput[1024];
diff --git a/src/map/pc.h b/src/map/pc.h
index f2767dd57..da7052fe8 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -619,7 +619,7 @@ int pc_updateweightstatus(struct map_session_data *sd);
int pc_addautobonus(struct s_autobonus *bonus,char max,const char *script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned short pos,bool onskill);
int pc_exeautobonus(struct map_session_data* sd,struct s_autobonus *bonus);
-int pc_endautobonus(int tid, unsigned int tick, int id, intptr data);
+int pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data);
int pc_delautobonus(struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore);
int pc_bonus(struct map_session_data*,int,int);
@@ -713,7 +713,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, intptr data);
+int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data);
int pc_ismarried(struct map_session_data *sd);
int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd);
@@ -777,8 +777,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 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]
+int map_day_timer(int tid, unsigned int tick, int id, intptr_t data); // by [yor]
+int map_night_timer(int tid, unsigned int tick, int id, intptr_t data); // by [yor]
// Rental System
void pc_inventory_rentals(struct map_session_data *sd);
diff --git a/src/map/pet.c b/src/map/pet.c
index 43c54d74a..a0f652f2b 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -189,7 +189,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, intptr data)
+static int pet_hungry(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd;
struct pet_data *pd;
@@ -935,7 +935,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, intptr data)
+static int pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data)
{
map_foreachpc(pet_ai_sub_foreachclient,tick);
@@ -969,7 +969,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, intptr data)
+static int pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data)
{
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
@@ -1030,7 +1030,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
pd->ud.canact_tick = gettick()+10000; // 10*1000msの間拾わない
if (dlist->item)
- add_timer(gettick()+540,pet_delay_item_drop,0,(intptr)dlist);
+ add_timer(gettick()+540,pet_delay_item_drop,0,(intptr_t)dlist);
else
ers_free(item_drop_list_ers, dlist);
return 1;
@@ -1039,7 +1039,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, intptr data)
+int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
@@ -1081,7 +1081,7 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr data)
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
*------------------------------------------*/
-int pet_recovery_timer(int tid, unsigned int tick, int id, intptr data)
+int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
@@ -1109,7 +1109,7 @@ int pet_recovery_timer(int tid, unsigned int tick, int id, intptr data)
return 0;
}
-int pet_heal_timer(int tid, unsigned int tick, int id, intptr data)
+int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd=map_id2sd(id);
struct status_data *status;
@@ -1147,7 +1147,7 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr data)
/*==========================================
* pet support skills [Skotlex]
*------------------------------------------*/
-int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr data)
+int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t 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 729fdeb92..52f4999df 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -121,10 +121,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, 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]
+int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data); // [Skotlex]
+int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data); // [Valaris]
+int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data); // [Valaris]
+int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t 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 0511a410b..7b27581ae 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3319,7 +3319,7 @@ struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
/*==========================================
* sleep用タイマー関数
*------------------------------------------*/
-int run_script_timer(int tid, unsigned int tick, int id, intptr data)
+int run_script_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct script_state *st = (struct script_state *)data;
struct linkdb_node *node = (struct linkdb_node *)sleep_db;
@@ -3516,7 +3516,7 @@ void run_script_main(struct script_state *st)
sd = map_id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish]
st->sleep.charid = sd?sd->status.char_id:0;
st->sleep.timer = add_timer(gettick()+st->sleep.tick,
- run_script_timer, st->sleep.charid, (intptr)st);
+ run_script_timer, st->sleep.charid, (intptr_t)st);
linkdb_insert(&sleep_db, (void*)st->oid, st);
}
else if(st->state != END && st->rid){
diff --git a/src/map/script.h b/src/map/script.h
index c272f2d32..2ed163a0f 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -153,7 +153,7 @@ void run_script(struct script_code*,int,int,int);
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);
-int run_script_timer(int tid, unsigned int tick, int id, intptr data);
+int run_script_timer(int tid, unsigned int tick, int id, intptr_t 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 58198a355..d33d35d6e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2277,7 +2277,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, intptr data)
+static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *src = map_id2bl(id),*target;
struct unit_data *ud = unit_bl2ud(src);
@@ -5682,7 +5682,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, intptr data)
+int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *target, *src;
struct map_session_data *sd;
@@ -5972,7 +5972,7 @@ 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_pos(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list* src = map_id2bl(id);
int maxcount;
@@ -10490,7 +10490,7 @@ static int skill_unit_timer_sub (DBKey key, void* data, va_list ap)
/*==========================================
* Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds.
*------------------------------------------*/
-int skill_unit_timer(int tid, unsigned int tick, int id, intptr data)
+int skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data)
{
map_freeblock_lock();
@@ -11186,7 +11186,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
/*==========================================
*
*------------------------------------------*/
-int skill_blockpc_end(int tid, unsigned int tick, int id, intptr data)
+int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data)
{
struct map_session_data *sd = map_id2sd(id);
if (data <= 0 || data >= MAX_SKILL)
@@ -11217,7 +11217,7 @@ int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
return 0;
}
-int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr data) //[orn]
+int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) //[orn]
{
struct homun_data *hd = (TBL_HOM*) map_id2bl(id);
if (data <= 0 || data >= MAX_SKILL)
@@ -11243,7 +11243,7 @@ int skill_blockhomun_start(struct homun_data *hd, int skillid, int tick) //[orn]
return add_timer(gettick() + tick, skill_blockhomun_end, hd->bl.id, skillid);
}
-int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr data) //[orn]
+int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) //[orn]
{
struct mercenary_data *md = (TBL_MER*)map_id2bl(id);
if( data <= 0 || data >= MAX_SKILL )
diff --git a/src/map/skill.h b/src/map/skill.h
index 2046fe2c2..1ad6ea25a 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -263,8 +263,8 @@ const char* skill_get_desc( int id ); // [Skotlex]
int skill_name2id(const char* name);
int skill_isammotype(struct map_session_data *sd, int skill);
-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_id(int tid, unsigned int tick, int id, intptr_t data);
+int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t 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 e055c46d3..37dad30b9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6964,7 +6964,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
return 1;
}
-int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr data)
+int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl;
struct status_change *sc;
@@ -7001,7 +7001,7 @@ 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(int tid, unsigned int tick, int id, intptr_t data)
{
enum sc_type type = (sc_type)data;
struct block_list *bl;
@@ -7692,7 +7692,7 @@ static int status_natural_heal(struct block_list* bl, va_list args)
}
//Natural heal main timer.
-static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr data)
+static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
{
natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick);
map_foreachregen(status_natural_heal);
diff --git a/src/map/status.h b/src/map/status.h
index 651b91940..abaeff75e 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1286,8 +1286,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, const char* file, int line);
#define status_change_end(bl,type,tid) status_change_end_(bl,type,tid,__FILE__,__LINE__)
-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 kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data);
+int status_change_timer(int tid, unsigned int tick, int id, intptr_t 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 b1cca0d4c..2165532b4 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -51,8 +51,8 @@ struct unit_data* unit_bl2ud(struct block_list *bl)
return NULL;
}
-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);
+static int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data);
+static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data);
int unit_walktoxy_sub(struct block_list *bl)
{
@@ -106,7 +106,7 @@ int unit_walktoxy_sub(struct block_list *bl)
return 1;
}
-static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
+static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
int i;
int x,y,dx,dy;
@@ -263,7 +263,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
return 0;
}
-static int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
+static int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl = map_id2bl(id);
@@ -327,7 +327,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, intptr data)
+static int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl = map_id2bl(id);
struct unit_data *ud = bl?unit_bl2ud(bl):NULL;
@@ -847,7 +847,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, intptr data)
+int unit_resume_running(int tid, unsigned int tick, int id, intptr_t data)
{
struct unit_data *ud = (struct unit_data *)data;
@@ -891,7 +891,7 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
//Resume running after can move again [Kevin]
if(ud->state.running)
{
- add_timer(ud->canmove_tick, unit_resume_running, bl->id, (intptr)ud);
+ add_timer(ud->canmove_tick, unit_resume_running, bl->id, (intptr_t)ud);
}
else
{
@@ -1655,7 +1655,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, intptr data)
+static int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl;
bl = map_id2bl(id);