summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c44
-rw-r--r--src/char/int_auction.c11
-rw-r--r--src/char/int_guild.c5
-rw-r--r--src/char/inter.c8
-rw-r--r--src/common/console.c2
-rw-r--r--src/common/console.h2
-rw-r--r--src/common/mmo.h10
-rw-r--r--src/common/random.c12
-rw-r--r--src/common/socket.c5
-rw-r--r--src/common/socket.h3
-rw-r--r--src/common/sql.c2
-rw-r--r--src/common/timer.c94
-rw-r--r--src/common/timer.h21
-rw-r--r--src/login/ipban_sql.c5
-rw-r--r--src/login/login.c15
-rw-r--r--src/map/atcommand.c36
-rw-r--r--src/map/battle.c18
-rw-r--r--src/map/battle.h8
-rw-r--r--src/map/battleground.c6
-rw-r--r--src/map/battleground.h6
-rw-r--r--src/map/chrif.c12
-rw-r--r--src/map/chrif.h16
-rw-r--r--src/map/clif.c751
-rw-r--r--src/map/clif.h57
-rw-r--r--src/map/elemental.c14
-rw-r--r--src/map/elemental.h10
-rw-r--r--src/map/guild.c6
-rw-r--r--src/map/guild.h4
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/instance.c2
-rw-r--r--src/map/instance.h2
-rw-r--r--src/map/irc-bot.c6
-rw-r--r--src/map/irc-bot.h8
-rw-r--r--src/map/map.c10
-rw-r--r--src/map/map.h13
-rw-r--r--src/map/mapreg.h2
-rw-r--r--src/map/mapreg_sql.c2
-rw-r--r--src/map/mercenary.c4
-rw-r--r--src/map/mercenary.h4
-rw-r--r--src/map/mob.c81
-rw-r--r--src/map/mob.h30
-rw-r--r--src/map/npc.c23
-rw-r--r--src/map/npc.h12
-rw-r--r--src/map/packets_struct.h255
-rw-r--r--src/map/party.c3
-rw-r--r--src/map/party.h2
-rw-r--r--src/map/pc.c97
-rw-r--r--src/map/pc.h101
-rw-r--r--src/map/pet.c29
-rw-r--r--src/map/pet.h20
-rw-r--r--src/map/script.c17
-rw-r--r--src/map/script.h5
-rw-r--r--src/map/skill.c231
-rw-r--r--src/map/skill.h58
-rw-r--r--src/map/status.c44
-rw-r--r--src/map/status.h12
-rw-r--r--src/map/unit.c34
-rw-r--r--src/map/unit.h24
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc823
62 files changed, 1761 insertions, 1400 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 0b35c0143..310163e3a 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -179,7 +179,7 @@ static DBMap* auth_db; // int account_id -> struct auth_node*
// Online User Database
//-----------------------------------------------------
-static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, intptr_t data);
+static int chardb_waiting_disconnect(int tid, int64 tick, int id, intptr_t data);
int delete_char_sql(int char_id);
/**
@@ -742,7 +742,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &item.equip, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL);
@@ -886,7 +886,7 @@ int inventory_to_sql(const struct item items[], int max, int id) {
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &item.equip, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL);
@@ -1241,7 +1241,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &tmp_item.equip, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL)
@@ -1272,7 +1272,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &tmp_item.equip, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL)
@@ -2097,7 +2097,7 @@ static void char_auth_ok(int fd, struct char_session_data *sd)
// continues when account data is received...
}
-int send_accounts_tologin(int tid, unsigned int tick, int id, intptr_t data);
+int send_accounts_tologin(int tid, int64 tick, int id, intptr_t data);
void mapif_server_reset(int id);
@@ -2491,8 +2491,7 @@ int parse_fromlogin(int fd) {
return 0;
}
-int check_connect_login_server(int tid, unsigned int tick, int id, intptr_t data);
-int send_accounts_tologin(int tid, unsigned int tick, int id, intptr_t data);
+int check_connect_login_server(int tid, int64 tick, int id, intptr_t data);
void do_init_loginif(void)
{
@@ -2850,8 +2849,7 @@ int parse_frommap(int fd)
Sql_ShowDebug(sql_handle);
break;
}
- if( SQL->NumRows(sql_handle) > 0 )
- {
+ if( SQL->NumRows(sql_handle) > 0 ) {
struct status_change_data scdata;
int count;
char* data;
@@ -2872,8 +2870,7 @@ int parse_frommap(int fd)
}
if (count >= 50)
ShowWarning("Too many status changes for %d:%d, some of them were not loaded.\n", aid, cid);
- if (count > 0)
- {
+ if (count > 0) {
WFIFOW(fd,2) = 14 + count*sizeof(struct status_change_data);
WFIFOW(fd,12) = count;
WFIFOSET(fd,WFIFOW(fd,2));
@@ -2882,6 +2879,14 @@ int parse_frommap(int fd)
if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, aid, cid) )
Sql_ShowDebug(sql_handle);
}
+ } else { //no sc (needs a response)
+ WFIFOHEAD(fd,14);
+ WFIFOW(fd,0) = 0x2b1d;
+ WFIFOW(fd,2) = 14;
+ WFIFOL(fd,4) = aid;
+ WFIFOL(fd,8) = cid;
+ WFIFOW(fd,12) = 0;
+ WFIFOSET(fd,WFIFOW(fd,2));
}
SQL->FreeResult(sql_handle);
#endif
@@ -4488,8 +4493,7 @@ int mapif_send(int fd, unsigned char *buf, unsigned int len)
return 0;
}
-int broadcast_user_count(int tid, unsigned int tick, int id, intptr_t data)
-{
+int broadcast_user_count(int tid, int64 tick, int id, intptr_t data) {
uint8 buf[6];
int users = count_users();
@@ -4534,8 +4538,7 @@ static int send_accounts_tologin_sub(DBKey key, DBData *data, va_list ap)
return 0;
}
-int send_accounts_tologin(int tid, unsigned int tick, int id, intptr_t data)
-{
+int send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) {
if (login_fd > 0 && session[login_fd])
{
// send account list to login server
@@ -4552,8 +4555,7 @@ int send_accounts_tologin(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
-int check_connect_login_server(int tid, unsigned int tick, int id, intptr_t data)
-{
+int check_connect_login_server(int tid, int64 tick, int id, intptr_t data) {
if (login_fd > 0 && session[login_fd] != NULL)
return 0;
@@ -4588,8 +4590,7 @@ int check_connect_login_server(int tid, unsigned int tick, int id, intptr_t data
//Invoked 15 seconds after mapif_disconnectplayer in case the map server doesn't
//replies/disconnect the player we tried to kick. [Skotlex]
//------------------------------------------------
-static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int chardb_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) {
struct online_char_data* character;
if ((character = (struct online_char_data*)idb_get(online_char_db, id)) != NULL && character->waiting_disconnect == tid)
{ //Mark it offline due to timeout.
@@ -4615,8 +4616,7 @@ static int online_data_cleanup_sub(DBKey key, DBData *data, va_list ap)
return 0;
}
-static int online_data_cleanup(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
online_char_db->foreach(online_char_db, online_data_cleanup_sub);
return 0;
}
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 0dad9d2de..47f3421c3 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -22,7 +22,7 @@
static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data*
void auction_delete(struct auction_data *auction);
-static int auction_end_timer(int tid, unsigned int tick, int id, intptr_t data);
+static int auction_end_timer(int tid, int64 tick, int id, intptr_t data);
static int auction_count(int char_id, bool buy)
{
@@ -108,7 +108,7 @@ unsigned int auction_create(struct auction_data *auction)
else
{
struct auction_data *auction_;
- unsigned int tick = auction->hours * 3600000;
+ int64 tick = auction->hours * 3600000;
auction->item.amount = 1;
auction->item.identify = 1;
@@ -139,8 +139,7 @@ static void mapif_Auction_message(int char_id, unsigned char result)
mapif_sendall(buf,7);
}
-static int auction_end_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int auction_end_timer(int tid, int64 tick, int id, intptr_t data) {
struct auction_data *auction;
if( (auction = (struct auction_data *)idb_get(auction_db_, id)) != NULL )
{
@@ -182,7 +181,7 @@ void inter_auctions_fromsql(void)
struct item *item;
char *data;
StringBuf buf;
- unsigned int tick = timer->gettick(), endtick;
+ int64 tick = timer->gettick(), endtick;
time_t now = time(NULL);
StrBuf->Init(&buf);
@@ -230,7 +229,7 @@ void inter_auctions_fromsql(void)
}
if( auction->timestamp > now )
- endtick = ((unsigned int)(auction->timestamp - now) * 1000) + tick;
+ endtick = ((int64)(auction->timestamp - now) * 1000) + tick;
else
endtick = tick + 10000; // 10 Second's to process ended auctions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index fab63894e..5f033f4d7 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -46,8 +46,7 @@ int mapif_guild_info(int fd,struct guild *g);
int guild_break_sub(int key,void *data,va_list ap);
int inter_guild_tosql(struct guild *g,int flag);
-static int guild_save_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int guild_save_timer(int tid, int64 tick, int id, intptr_t data) {
static int last_id = 0; //To know in which guild we were.
int state = 0; //0: Have not reached last guild. 1: Reached last guild, ready for save. 2: Some guild saved, don't do further saving.
DBIterator *iter = db_iterator(guild_db_);
@@ -86,7 +85,7 @@ static int guild_save_timer(int tid, unsigned int tick, int id, intptr_t data)
state = guild_db_->size(guild_db_);
if( state < 1 ) state = 1; //Calculate the time slot for the next save.
- timer->add(tick + autosave_interval/state, guild_save_timer, 0, 0);
+ timer->add(tick + autosave_interval/state, guild_save_timer, 0, 0);
return 0;
}
diff --git a/src/char/inter.c b/src/char/inter.c
index 2dc15933b..040246c31 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -61,7 +61,7 @@ int inter_recv_packet_length[] = {
struct WisData {
int id, fd, count, len;
- unsigned long tick;
+ int64 tick;
unsigned char src[24], dst[24], msg[512];
};
static DBMap* wis_db = NULL; // int wis_id -> struct WisData*
@@ -974,9 +974,9 @@ int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
*/
int check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap)
{
- unsigned long tick;
+ int64 tick;
struct WisData *wd = DB->data2ptr(data);
- tick = va_arg(ap, unsigned long);
+ tick = va_arg(ap, int64);
if (DIFF_TICK(tick, wd->tick) > WISDATA_TTL && wis_delnum < WISDELLIST_MAX)
wis_dellist[wis_delnum++] = wd->id;
@@ -986,7 +986,7 @@ int check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap)
int check_ttl_wisdata(void)
{
- unsigned long tick = timer->gettick();
+ int64 tick = timer->gettick();
int i;
do {
diff --git a/src/common/console.c b/src/common/console.c
index b25de84b3..cb8ed5917 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -344,7 +344,7 @@ void *cThread_main(void *x) {
return NULL;
}
-int console_parse_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int console_parse_timer(int tid, int64 tick, int id, intptr_t data) {
int i;
EnterSpinLock(&console->ptlock);
for(i = 0; i < cinput.count; i++) {
diff --git a/src/common/console.h b/src/common/console.h
index cef898f17..1beed964a 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -56,7 +56,7 @@ struct console_interface {
/* */
void (*parse_init) (void);
void (*parse_final) (void);
- int (*parse_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*parse_timer) (int tid, int64 tick, int id, intptr_t data);
void *(*pthread_main) (void *x);
void (*parse) (char* line);
void (*parse_sub) (char* line);
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 7977042d8..9281314dc 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -216,7 +216,7 @@ struct item {
int id;
short nameid;
short amount;
- unsigned short equip; // Location(s) where item is equipped (using enum equip_pos for bitmasking).
+ unsigned int equip; // Location(s) where item is equipped (using enum equip_pos for bitmasking).
char identify;
char refine;
char attribute;
@@ -838,6 +838,14 @@ enum ammo_type {
A_THROWWEAPON //9
};
+/* packet size constant for itemlist */
+#if MAX_INVENTORY > MAX_STORAGE && MAX_INVENTORY > MAX_CART
+#define MAX_ITEMLIST MAX_INVENTORY
+#elif MAX_CART > MAX_INVENTORY && MAX_CART > MAX_STORAGE
+#define MAX_ITEMLIST MAX_CART
+#else
+#define MAX_ITEMLIST MAX_STORAGE
+#endif
// sanity checks...
#if MAX_ZENY > INT_MAX
diff --git a/src/common/random.c b/src/common/random.c
index 2f1b62934..e46c52cad 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -17,17 +17,17 @@
/// Initializes the random number generator with an appropriate seed.
void rnd_init(void)
{
- uint32 seed = timer->gettick();
- seed += (uint32)time(NULL);
+ unsigned long seed = (unsigned long)timer->gettick();
+ seed += (unsigned long)time(NULL);
#if defined(WIN32)
- seed += GetCurrentProcessId();
- seed += GetCurrentThreadId();
+ seed += (unsigned long)GetCurrentProcessId();
+ seed += (unsigned long)GetCurrentThreadId();
#else
#if defined(HAVE_GETPID)
- seed += (uint32)getpid();
+ seed += (unsigned long)getpid();
#endif // HAVE_GETPID
#if defined(HAVE_GETTID)
- seed += (uint32)gettid();
+ seed += (unsigned long)gettid();
#endif // HAVE_GETTID
#endif
init_genrand(seed);
diff --git a/src/common/socket.c b/src/common/socket.c
index 7c8b3738b..c66153550 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -896,7 +896,7 @@ int do_sockets(int next)
typedef struct _connect_history {
struct _connect_history* next;
uint32 ip;
- uint32 tick;
+ int64 tick;
int count;
unsigned ddos : 1;
} ConnectHistory;
@@ -1043,8 +1043,7 @@ static int connect_check_(uint32 ip)
/// Timer function.
/// Deletes old connection history records.
-static int connect_check_clear(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
int i;
int clear = 0;
int list = 0;
diff --git a/src/common/socket.h b/src/common/socket.h
index 0e34da660..923fa2515 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -77,8 +77,7 @@ typedef int (*RecvFunc)(int fd);
typedef int (*SendFunc)(int fd);
typedef int (*ParseFunc)(int fd);
-struct socket_data
-{
+struct socket_data {
struct {
unsigned char eof : 1;
unsigned char server : 1;
diff --git a/src/common/sql.c b/src/common/sql.c
index 9b7fe4108..dc6c4c569 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -180,7 +180,7 @@ int Sql_Ping(Sql* self)
/// Wrapper function for Sql_Ping.
///
/// @private
-static int Sql_P_KeepaliveTimer(int tid, unsigned int tick, int id, intptr_t data)
+static int Sql_P_KeepaliveTimer(int tid, int64 tick, int id, intptr_t data)
{
Sql* self = (Sql*)data;
ShowInfo("Pinging SQL server to keep connection alive...\n");
diff --git a/src/common/timer.c b/src/common/timer.c
index a2378a5aa..e5cf5df2a 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -65,8 +65,7 @@ struct timer_func_list {
} *tfl_root = NULL;
/// Sets the name of a timer function.
-int timer_add_func_list(TimerFunc func, char* name)
-{
+int timer_add_func_list(TimerFunc func, char* name) {
struct timer_func_list* tfl;
if (name) {
@@ -139,22 +138,62 @@ static void rdtsc_calibrate(){
#endif
-/// platform-abstracted tick retrieval
-static unsigned int tick(void) {
+/**
+ * platform-abstracted tick retrieval
+ * @return server's current tick
+ */
+static int64 tick(void) {
#if defined(WIN32)
- return GetTickCount();
+ // Windows: GetTickCount/GetTickCount64: Return the number of
+ // milliseconds that have elapsed since the system was started.
+
+ // TODO: GetTickCount/GetTickCount64 has a resolution of only 10~15ms.
+ // Ai4rei recommends that we replace it with either performance
+ // counters or multimedia timers if we want it to be more accurate.
+ // I'm leaving this for a future follow-up patch.
+
+ // GetTickCount64 is only available in Windows Vista / Windows Server
+ // 2008 or newer. Since we still support older versions, this runtime
+ // check is required in order not to crash.
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/ms724411%28v=vs.85%29.aspx
+ static bool first = true;
+ static ULONGLONG (WINAPI *pGetTickCount64)(void) = NULL;
+
+ if( first ) {
+ HMODULE hlib = GetModuleHandle(TEXT("KERNEL32.DLL"));
+ if( hlib != NULL )
+ pGetTickCount64 = (ULONGLONG (WINAPI *)(void))GetProcAddress(hlib, "GetTickCount64");
+ first = false;
+ }
+ if (pGetTickCount64)
+ return (int64)pGetTickCount64();
+ // 32-bit fallback. Note: This will wrap around every ~49 days since system startup!!!
+ return (int64)GetTickCount();
#elif defined(ENABLE_RDTSC)
- //
- return (unsigned int)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
- //
+ // RDTSC: Returns the number of CPU cycles since reset. Unreliable if
+ // the CPU frequency is variable.
+ return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
#elif defined(HAVE_MONOTONIC_CLOCK)
+ // Monotinic clock: Implementation-defined.
+ // Clock that cannot be set and represents monotonic time since some
+ // unspecified starting point. This clock is not affected by
+ // discontin‐uous jumps in the system time (e.g., if the system
+ // administrator manually changes the clock), but is affected by
+ // the incremental adjustments performed by adjtime(3) and NTP.
struct timespec tval;
clock_gettime(CLOCK_MONOTONIC, &tval);
- return tval.tv_sec * 1000 + tval.tv_nsec / 1000000;
+ // int64 cast to avoid overflows on platforms where time_t is 32 bit
+ return (int64)tval.tv_sec * 1000 + tval.tv_nsec / 1000000;
#else
+ // Fallback, regular clock: Number of milliseconds since epoch.
+ // The time returned by gettimeofday() is affected by discontinuous
+ // jumps in the system time (e.g., if the system administrator
+ // manually changes the system time). If you need a monotonically
+ // increasing clock, see clock_gettime(2).
struct timeval tval;
gettimeofday(&tval, NULL);
- return tval.tv_sec * 1000 + tval.tv_usec / 1000;
+ // int64 cast to avoid overflows on platforms where time_t is 32 bit
+ return (int64)tval.tv_sec * 1000 + tval.tv_usec / 1000;
#endif
}
@@ -162,28 +201,28 @@ static unsigned int tick(void) {
#if defined(TICK_CACHE) && TICK_CACHE > 1
//////////////////////////////////////////////////////////////////////////
// tick is cached for TICK_CACHE calls
-static unsigned int gettick_cache;
+static int64 gettick_cache;
static int gettick_count = 1;
-unsigned int timer_gettick_nocache(void) {
+int64 timer_gettick_nocache(void) {
gettick_count = TICK_CACHE;
gettick_cache = tick();
return gettick_cache;
}
-unsigned int timer_gettick(void) {
+int64 timer_gettick(void) {
return ( --gettick_count == 0 ) ? gettick_nocache() : gettick_cache;
}
//////////////////////////////
#else
//////////////////////////////
// tick doesn't get cached
-unsigned int timer_gettick_nocache(void)
+int64 timer_gettick_nocache(void)
{
return tick();
}
-unsigned int timer_gettick(void) {
+int64 timer_gettick(void) {
return tick();
}
//////////////////////////////////////////////////////////////////////////
@@ -237,7 +276,7 @@ static int acquire_timer(void) {
/// Starts a new timer that is deleted once it expires (single-use).
/// Returns the timer's id.
-int timer_add(unsigned int tick, TimerFunc func, int id, intptr_t data) {
+int timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
int tid;
tid = acquire_timer();
@@ -254,12 +293,11 @@ int timer_add(unsigned int tick, TimerFunc func, int id, intptr_t data) {
/// Starts a new timer that automatically restarts itself (infinite loop until manually removed).
/// Returns the timer's id, or INVALID_TIMER if it fails.
-int timer_add_interval(unsigned int tick, TimerFunc func, int id, intptr_t data, int interval)
-{
+int timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) {
int tid;
if( interval < 1 ) {
- ShowError("timer_add_interval: invalid interval (tick=%u %p[%s] id=%d data=%d diff_tick=%d)\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, timer->gettick()));
+ ShowError("timer_add_interval: invalid interval (tick=%"PRId64" %p[%s] id=%d data=%d diff_tick=%"PRId64")\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, timer->gettick()));
return INVALID_TIMER;
}
@@ -301,13 +339,13 @@ int timer_do_delete(int tid, TimerFunc func) {
/// Adjusts a timer's expiration time.
/// Returns the new tick value, or -1 if it fails.
-int timer_addtick(int tid, unsigned int tick) {
+int64 timer_addtick(int tid, int64 tick) {
return timer->settick(tid, timer_data[tid].tick+tick);
}
/// Modifies a timer's expiration time (an alternative to deleting a timer and starting a new one).
/// Returns the new tick value, or -1 if it fails.
-int timer_settick(int tid, unsigned int tick) {
+int64 timer_settick(int tid, int64 tick) {
size_t i;
// search timer position
@@ -317,23 +355,23 @@ int timer_settick(int tid, unsigned int tick) {
return -1;
}
- if( (int)tick == -1 )
- tick = 0;// add 1ms to avoid the error value -1
+ if( tick == -1 )
+ tick = 0; // add 1ms to avoid the error value -1
if( timer_data[tid].tick == tick )
- return (int)tick;// nothing to do, already in propper position
+ return tick; // nothing to do, already in proper position
// pop and push adjusted timer
BHEAP_POPINDEX(timer_heap, i, DIFFTICK_MINTOPCMP, swap);
timer_data[tid].tick = tick;
BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap);
- return (int)tick;
+ return tick;
}
/// Executes all expired timers.
/// Returns the value of the smallest non-expired timer (or 1 second if there aren't any).
-int do_timer(unsigned int tick) {
- int diff = TIMER_MAX_INTERVAL; // return value
+int do_timer(int64 tick) {
+ int64 diff = TIMER_MAX_INTERVAL; // return value
// process all timers one by one
while( BHEAP_LENGTH(timer_heap) ) {
@@ -381,7 +419,7 @@ int do_timer(unsigned int tick) {
}
}
- return cap_value(diff, TIMER_MIN_INTERVAL, TIMER_MAX_INTERVAL);
+ return (int)cap_value(diff, TIMER_MIN_INTERVAL, TIMER_MAX_INTERVAL);
}
unsigned long timer_get_uptime(void) {
diff --git a/src/common/timer.h b/src/common/timer.h
index 600f9fd02..4a2bebe7d 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -5,7 +5,8 @@
#define _TIMER_H_
#include "../common/cbasetypes.h"
-#define DIFF_TICK(a,b) ((int)((a)-(b)))
+#define DIFF_TICK(a,b) ((a)-(b))
+#define DIFF_TICK32(a,b) ((int32)((a)-(b)))
#define INVALID_TIMER -1
@@ -18,10 +19,10 @@ enum {
// Struct declaration
-typedef int (*TimerFunc)(int tid, unsigned int tick, int id, intptr_t data);
+typedef int (*TimerFunc)(int tid, int64 tick, int id, intptr_t data);
struct TimerData {
- unsigned int tick;
+ int64 tick;
TimerFunc func;
unsigned char type;
int interval;
@@ -40,22 +41,22 @@ struct TimerData {
struct timer_interface {
/* funcs */
- unsigned int (*gettick) (void);
- unsigned int (*gettick_nocache) (void);
+ int64 (*gettick) (void);
+ int64 (*gettick_nocache) (void);
- int (*add) (unsigned int tick, TimerFunc func, int id, intptr_t data);
- int (*add_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval);
+ int (*add) (int64 tick, TimerFunc func, int id, intptr_t data);
+ int (*add_interval) (int64 tick, TimerFunc func, int id, intptr_t data, int interval);
const struct TimerData *(*get) (int tid);
int (*delete) (int tid, TimerFunc func);
- int (*addtick) (int tid, unsigned int tick);
- int (*settick) (int tid, unsigned int tick);
+ int64 (*addtick) (int tid, int64 tick);
+ int64 (*settick) (int tid, int64 tick);
int (*add_func_list) (TimerFunc func, char* name);
unsigned long (*get_uptime) (void);
- int (*do_timer) (unsigned int tick);
+ int (*do_timer) (int64 tick);
void (*init) (void);
void (*final) (void);
};
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index 9b074b368..74f45e418 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -36,7 +36,7 @@ static Sql* sql_handle = NULL;
static int cleanup_timer_id = INVALID_TIMER;
static bool ipban_inited = false;
-int ipban_cleanup(int tid, unsigned int tick, int id, intptr_t data);
+int ipban_cleanup(int tid, int64 tick, int id, intptr_t data);
// initialize
@@ -247,8 +247,7 @@ void ipban_log(uint32 ip)
}
// remove expired bans
-int ipban_cleanup(int tid, unsigned int tick, int id, intptr_t data)
-{
+int ipban_cleanup(int tid, int64 tick, int id, intptr_t data) {
if( !login_config.ipban )
return 0;// ipban disabled
diff --git a/src/login/login.c b/src/login/login.c
index 7de5dbb76..f47f1519c 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -81,7 +81,7 @@ struct online_login_data {
};
static DBMap* online_db; // int account_id -> struct online_login_data*
-static int waiting_disconnect_timer(int tid, unsigned int tick, int id, intptr_t data);
+static int waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data);
/**
* @see DBCreateData
@@ -121,8 +121,7 @@ void remove_online_user(int account_id)
idb_remove(online_db, account_id);
}
-static int waiting_disconnect_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data) {
struct online_login_data* p = (struct online_login_data*)idb_get(online_db, id);
if( p != NULL && p->waiting_disconnect == tid && p->account_id == id )
{
@@ -165,8 +164,7 @@ static int online_data_cleanup_sub(DBKey key, DBData *data, va_list ap)
return 0;
}
-static int online_data_cleanup(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
online_db->foreach(online_db, online_data_cleanup_sub);
return 0;
}
@@ -234,8 +232,7 @@ void chrif_on_disconnect(int id)
//-----------------------------------------------------
// periodic ip address synchronization
//-----------------------------------------------------
-static int sync_ip_addresses(int tid, unsigned int tick, int id, intptr_t data)
-{
+static int sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) {
uint8 buf[2];
ShowInfo("IP Sync in progress...\n");
WBUFW(buf,0) = 0x2735;
@@ -901,8 +898,8 @@ int parse_fromchar(int fd)
//-------------------------------------
int mmo_auth_new(const char* userid, const char* pass, const char sex, const char* last_ip) {
static int num_regs = 0; // registration counter
- static unsigned int new_reg_tick = 0;
- unsigned int tick = timer->gettick();
+ static int64 new_reg_tick = 0;
+ int64 tick = timer->gettick();
struct mmo_account acc;
//Account Registration Flood Protection by [Kevin]
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 7d4008faf..7ec589956 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -4260,7 +4260,8 @@ ACMD(servertime) {
} else if (battle_config.night_duration == 0) {
if (map->night_flag == 1) { // we start with night
timer_data = timer->get(pc->day_timer_tid);
- sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in night for %s.
+ sprintf(temp, msg_txt(233), // Game time: The game is actually in night for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000)));
clif->message(fd, temp);
clif->message(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight.
} else
@@ -4268,7 +4269,8 @@ ACMD(servertime) {
} else if (battle_config.day_duration == 0) {
if (map->night_flag == 0) { // we start with day
timer_data = timer->get(pc->night_timer_tid);
- sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf(temp, msg_txt(235), // Game time: The game is actualy in daylight for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000)));
clif->message(fd, temp);
clif->message(fd, msg_txt(236)); // Game time: After, the game will be in permanent night.
} else
@@ -4277,22 +4279,28 @@ ACMD(servertime) {
if (map->night_flag == 0) {
timer_data = timer->get(pc->night_timer_tid);
timer_data2 = timer->get(pc->day_timer_tid);
- sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf(temp, msg_txt(235), // Game time: The game is actualy in daylight for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000)));
clif->message(fd, temp);
if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
- sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
+ sprintf(temp, msg_txt(237), // Game time: After, the game will be in night for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)));
else
- sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
+ sprintf(temp, msg_txt(237), // Game time: After, the game will be in night for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)));
clif->message(fd, temp);
} else {
timer_data = timer->get(pc->day_timer_tid);
timer_data2 = timer->get(pc->night_timer_tid);
- sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick()) / 1000)); // Game time: The game is actualy in night for %s.
+ sprintf(temp, msg_txt(233), // Game time: The game is actualy in night for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick()) / 1000)));
clif->message(fd, temp);
if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0)
- sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf(temp, msg_txt(239), // Game time: After, the game will be in daylight for %s.
+ txt_time((unsigned int)((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)));
else
- sprintf(temp, msg_txt(239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf(temp, msg_txt(239), // Game time: After, the game will be in daylight for %s.
+ txt_time((unsigned int)(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)));
clif->message(fd, temp);
}
sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
@@ -5250,7 +5258,7 @@ ACMD(useskill) {
*------------------------------------------*/
ACMD(displayskill) {
struct status_data *st;
- unsigned int tick;
+ int64 tick;
uint16 skill_id;
uint16 skill_lv = 1;
@@ -6086,8 +6094,8 @@ ACMD(summon)
int mob_id = 0;
int duration = 0;
struct mob_data *md;
- unsigned int tick=timer->gettick();
-
+ int64 tick=timer->gettick();
+
if (!message || !*message || sscanf(message, "%23s %d", name, &duration) < 1)
{
clif->message(fd, msg_txt(1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
@@ -7333,7 +7341,7 @@ ACMD(mapflag) {
CHECKFLAG(nojobexp); CHECKFLAG(nomobloot); CHECKFLAG(nomvploot); CHECKFLAG(nightenabled);
CHECKFLAG(nodrop); CHECKFLAG(novending); CHECKFLAG(loadevent);
CHECKFLAG(nochat); CHECKFLAG(partylock); CHECKFLAG(guildlock); CHECKFLAG(src4instance);
- CHECKFLAG(notomb);
+ CHECKFLAG(notomb); CHECKFLAG(nocashshop);
clif->message(sd->fd," ");
clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
clif->message(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags.
@@ -7370,7 +7378,7 @@ ACMD(mapflag) {
SETFLAG(nojobexp); SETFLAG(nomobloot); SETFLAG(nomvploot); SETFLAG(nightenabled);
SETFLAG(nodrop); SETFLAG(novending); SETFLAG(loadevent);
SETFLAG(nochat); SETFLAG(partylock); SETFLAG(guildlock); SETFLAG(src4instance);
- SETFLAG(notomb);
+ SETFLAG(notomb); SETFLAG(nocashshop);
clif->message(sd->fd,msg_txt(1314)); // Invalid flag name or flag.
clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
@@ -7382,7 +7390,7 @@ ACMD(mapflag) {
clif->message(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,");
clif->message(sd->fd,"fog, fireworks, sakura, leaves, nobaseexp, nojobexp, nomobloot,");
clif->message(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,");
- clif->message(sd->fd,"guildlock, src4instance, notomb");
+ clif->message(sd->fd,"guildlock, src4instance, notomb, nocashshop");
#undef CHECKFLAG
#undef SETFLAG
diff --git a/src/map/battle.c b/src/map/battle.c
index 050f3f26e..94222f663 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -196,7 +196,7 @@ struct block_list* battle_getenemyarea(struct block_list *src, int x, int y, int
return bl_list[rnd()%c];
}
-int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
struct delay_damage *dat = (struct delay_damage *)data;
if ( dat ) {
@@ -244,7 +244,7 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) {
return 0;
}
-int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) {
+int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) {
struct delay_damage *dat;
struct status_change *sc;
nullpo_ret(src);
@@ -349,7 +349,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
y = sg->val3 & 0xffff;
skill->unitsetting(src,su->group->skill_id,su->group->skill_lv,x,y,1);
sg->val3 = -1;
- sg->limit = DIFF_TICK(timer->gettick(),sg->tick)+300;
+ sg->limit = DIFF_TICK32(timer->gettick(),sg->tick)+300;
}
}
}
@@ -5269,14 +5269,14 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldama
status_zap(tbl, rhp, rsp);
}
// Deals the same damage to targets in area. [pakpil]
-int battle_damage_area( struct block_list *bl, va_list ap) {
- unsigned int tick;
+int battle_damage_area(struct block_list *bl, va_list ap) {
+ int64 tick;
int amotion, dmotion, damage;
struct block_list *src;
nullpo_ret(bl);
- tick=va_arg(ap, unsigned int);
+ tick = va_arg(ap, int64);
src=va_arg(ap,struct block_list *);
amotion=va_arg(ap,int);
dmotion=va_arg(ap,int);
@@ -5302,7 +5302,7 @@ int battle_damage_area( struct block_list *bl, va_list ap) {
/*==========================================
* Do a basic physical attack (call trough unit_attack_timer)
*------------------------------------------*/
-enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag) {
+enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* target, int64 tick, int flag) {
struct map_session_data *sd = NULL, *tsd = NULL;
struct status_data *sstatus, *tstatus;
struct status_change *sc, *tsc;
@@ -6617,7 +6617,7 @@ void Hercules_report(char* date, char *time_c) {
#undef BFLAG_LENGTH
}
-static int Hercules_report_timer(int tid, unsigned int tick, int id, intptr_t data) {
+static int Hercules_report_timer(int tid, int64 tick, int id, intptr_t data) {
if( chrif->isconnected() ) {/* char server relays it, so it must be online. */
Hercules_report(__DATE__,__TIME__);
}
@@ -6761,7 +6761,7 @@ int battle_config_read(const char* cfgName)
void do_init_battle(void) {
battle->delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR);
- timer->add_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
+ timer->add_func_list(battle->delay_damage_sub, "battle_delay_damage_sub");
#ifndef STATS_OPT_OUT
timer->add_func_list(Hercules_report_timer, "Hercules_report_timer");
diff --git a/src/map/battle.h b/src/map/battle.h
index a2212a647..bf08ab8d6 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -518,11 +518,11 @@ struct battle_interface {
/* battlegrounds final damage calculation */
int64 (*calc_bg_damage) (struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag);
/* normal weapon attack */
- enum damage_lv (*weapon_attack) (struct block_list *bl, struct block_list *target, unsigned int tick, int flag);
+ enum damage_lv (*weapon_attack) (struct block_list *bl, struct block_list *target, int64 tick, int flag);
/* calculate weapon attack */
struct Damage (*calc_weapon_attack) (struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int wflag);
/* delays damage or skills by a timer */
- int (*delay_damage) (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects);
+ int (*delay_damage) (int64 tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects);
/* drain damage */
void (*drain) (struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss);
/* damage return/reflect */
@@ -566,7 +566,7 @@ struct battle_interface {
int (*get_targeted_sub) (struct block_list *bl, va_list ap);
int (*get_enemy_sub) (struct block_list *bl, va_list ap);
int (*get_enemy_area_sub) (struct block_list *bl, va_list ap);
- int (*delay_damage_sub) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*delay_damage_sub) (int tid, int64 tick, int id, intptr_t data);
int (*blewcount_bonus) (struct map_session_data *sd, uint16 skill_id);
/* skill range criteria */
int (*range_type) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv);
@@ -587,7 +587,7 @@ struct battle_interface {
/* picks a random enemy within the specified range */
struct block_list* (*get_enemy_area) (struct block_list *src, int x, int y, int range, int type, int ignore_id);
/* damages area, originally for royal guard's reflect damage */
- int (*damage_area) ( struct block_list *bl, va_list ap);
+ int (*damage_area) (struct block_list *bl, va_list ap);
};
struct battle_interface *battle;
diff --git a/src/map/battleground.c b/src/map/battleground.c
index e7fe4085b..62688659e 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -249,7 +249,7 @@ int bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
return 0;
}
-int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
bg->team_db->foreach(bg->team_db, bg->send_xy_timer_sub, tick);
return 0;
}
@@ -534,7 +534,7 @@ void bg_begin(struct bg_arena *arena) {
/* currently running only on solo mode so we do it evenly */
}
}
-int bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int bg_begin_timer(int tid, int64 tick, int id, intptr_t data) {
bg->begin(bg->arena[id]);
bg->arena[id]->begin_timer = INVALID_TIMER;
return 0;
@@ -553,7 +553,7 @@ void bg_queue_pregame(struct bg_arena *arena) {
}
arena->begin_timer = timer->add( timer->gettick() + (arena->pregame_duration*1000), bg->begin_timer, arena->id, 0 );
}
-int bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) {
bg->queue_pregame(bg->arena[id]);
bg->arena[id]->fillup_timer = INVALID_TIMER;
return 0;
diff --git a/src/map/battleground.h b/src/map/battleground.h
index 1c224e1c2..a5e540924 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -84,9 +84,9 @@ struct battleground_interface {
int (*id2pos) (int queue_id, int account_id);
void (*queue_pc_cleanup) (struct map_session_data *sd);
void (*begin) (struct bg_arena *arena);
- int (*begin_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*begin_timer) (int tid, int64 tick, int id, intptr_t data);
void (*queue_pregame) (struct bg_arena *arena);
- int (*fillup_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*fillup_timer) (int tid, int64 tick, int id, intptr_t data);
void (*queue_ready_ack) (struct bg_arena *arena, struct map_session_data *sd, bool response);
void (*match_over) (struct bg_arena *arena, bool canceled);
void (*queue_check) (struct bg_arena *arena);
@@ -102,7 +102,7 @@ struct battleground_interface {
int (*team_get_id) (struct block_list *bl);
int (*send_message) (struct map_session_data *sd, const char *mes, int len);
int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
- int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*send_xy_timer) (int tid, int64 tick, int id, intptr_t data);
/* */
void (*config_read) (void);
};
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 5308eada9..a13217060 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -682,7 +682,7 @@ int auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) {
return 0;
}
-int auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data) {
+int auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) {
chrif_check(0);
chrif->auth_db->foreach(chrif->auth_db, chrif->auth_db_cleanup_sub);
return 0;
@@ -1139,7 +1139,7 @@ int chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of the
#ifdef ENABLE_SC_SAVING
int i, count=0;
- unsigned int tick;
+ int64 tick;
struct status_change_data data;
struct status_change *sc = &sd->sc;
const struct TimerData *td;
@@ -1159,7 +1159,7 @@ int chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of the
td = timer->get(sc->data[i]->timer);
if (td == NULL || td->func != status->change_timer || DIFF_TICK(td->tick,tick) < 0)
continue;
- data.tick = DIFF_TICK(td->tick,tick); //Duration that is left before ending.
+ data.tick = DIFF_TICK32(td->tick,tick); //Duration that is left before ending.
} else
data.tick = -1; //Infinite duration
data.type = i;
@@ -1212,6 +1212,8 @@ int chrif_load_scdata(int fd) {
data = (struct status_change_data*)RFIFOP(fd,14 + i*sizeof(struct status_change_data));
status->change_start(&sd->bl, (sc_type)data->type, 10000, data->val1, data->val2, data->val3, data->val4, data->tick, 15);
}
+
+ pc->scdata_received(sd);
#endif
return 0;
@@ -1462,7 +1464,7 @@ int chrif_parse(int fd) {
return 0;
}
-int send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data) {
+int send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) {
chrif_check(-1);
WFIFOHEAD(chrif->fd,4);
@@ -1509,7 +1511,7 @@ int send_users_tochar(void) {
* timerFunction
* Chk the connection to char server, (if it down)
*------------------------------------------*/
-int check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data) {
+int check_connect_char_server(int tid, int64 tick, int id, intptr_t data) {
static int displayed = 0;
if ( chrif->fd <= 0 || session[chrif->fd] == NULL ) {
if ( !displayed ) {
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 0617a6702..9df4b9931 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -30,11 +30,11 @@ enum sd_state { ST_LOGIN, ST_LOGOUT, ST_MAPCHANGE };
struct auth_node {
int account_id, char_id;
int login_id1, login_id2, sex, fd;
- time_t expiration_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
- struct map_session_data *sd; //Data from logged on char.
- struct mmo_charstatus *char_dat; //Data from char server.
- unsigned int node_created; //timestamp for node timeouts
- enum sd_state state; //To track whether player was login in/out or changing maps.
+ time_t expiration_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ struct map_session_data *sd; //Data from logged on char.
+ struct mmo_charstatus *char_dat; //Data from char server.
+ int64 node_created; //timestamp for node timeouts
+ enum sd_state state; //To track whether player was login in/out or changing maps.
};
/*=====================================
@@ -109,15 +109,15 @@ struct chrif_interface {
void (*skillid2idx) (int fd);
bool (*sd_to_auth) (TBL_PC* sd, enum sd_state state);
- int (*check_connect_char_server) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*check_connect_char_server) (int tid, int64 tick, int id, intptr_t data);
bool (*auth_logout) (TBL_PC* sd, enum sd_state state);
void (*save_ack) (int fd);
int (*reconnect) (DBKey key, DBData *data, va_list ap);
int (*auth_db_cleanup_sub) (DBKey key, DBData *data, va_list ap);
void (*char_ask_name_answer) (int acc, const char* player_name, uint16 type, uint16 answer);
int (*auth_db_final) (DBKey key, DBData *data, va_list ap);
- int (*send_usercount_tochar) (int tid, unsigned int tick, int id, intptr_t data);
- int (*auth_db_cleanup) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*send_usercount_tochar) (int tid, int64 tick, int id, intptr_t data);
+ int (*auth_db_cleanup) (int tid, int64 tick, int id, intptr_t data);
int (*connect) (int fd);
int (*connectack) (int fd);
diff --git a/src/map/clif.c b/src/map/clif.c
index 4b8baf401..957f75d99 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -56,6 +56,13 @@
struct clif_interface clif_s;
+/* re-usable */
+static struct packet_itemlist_normal itemlist_normal;
+static struct packet_itemlist_equip itemlist_equip;
+static struct packet_storelist_normal storelist_normal;
+static struct packet_storelist_equip storelist_equip;
+static struct packet_viewequip_ack viewequip_list;
+
//#define DUMP_UNKNOWN_PACKET
//#define DUMP_INVALID_PACKET
@@ -282,7 +289,7 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
len = va_arg(ap,int);
nullpo_ret(src_bl = va_arg(ap,struct block_list*));
type = va_arg(ap,int);
-
+
switch(type) {
case AREA_WOS:
if (bl == src_bl)
@@ -314,6 +321,10 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
#endif
}
+ /* unless visible, hold it here */
+ if( clif->ally_only && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 )
+ return 0;
+
WFIFOHEAD(fd, len);
if (WFIFOP(fd,0) == buf) {
ShowError("WARNING: Invalid use of clif->send function\n");
@@ -595,7 +606,7 @@ void clif_authok(struct map_session_data *sd)
struct packet_authok p;
p.PacketType = authokType;
- p.startTime = timer->gettick();
+ p.startTime = (unsigned int)timer->gettick();
WBUFPOS(&p.PosDir[0],0,sd->bl.x,sd->bl.y,sd->ud.dir); /* do the stupid client math */
p.xSize = p.ySize = 5; /* not-used */
@@ -707,7 +718,7 @@ void clif_dropflooritem(struct flooritem_data* fitem) {
#if PACKETVER >= 20130000 /* not sure date */
p.type = itemtype(itemdb_type(fitem->item_data.nameid));
#endif
- p.IsIdentified = fitem->item_data.identify;
+ p.IsIdentified = fitem->item_data.identify ? 1 : 0;
p.xPos = fitem->bl.x;
p.yPos = fitem->bl.y;
p.subX = fitem->subx;
@@ -787,14 +798,13 @@ 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, unsigned int tick, int id, intptr_t data) {
+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, unsigned int tick)
-{
+void clif_clearunit_delayed(struct block_list* bl, clr_type type, int64 tick) {
struct block_list *tbl = ers_alloc(clif->delay_clearunit_ers, struct block_list);
memcpy (tbl, bl, sizeof (struct block_list));
timer->add(tick, clif->clearunit_delayed_sub, (int)type, (intptr_t)tbl);
@@ -900,7 +910,7 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en
p.GEmblemVer = status->get_emblem_id(bl);
p.honor = (sd) ? sd->status.manner : 0;
p.virtue = (sc) ? sc->opt3 : 0;
- p.isPKModeON = (sd) ? sd->status.karma : 0;
+ p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
p.sex = vd->sex;
WBUFPOS(&p.PosDir[0],0,bl->x,bl->y,unit->getdir(bl));
p.xSize = p.ySize = (sd) ? 5 : 0;
@@ -965,7 +975,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
p.GEmblemVer = status->get_emblem_id(bl);
p.honor = (sd) ? sd->status.manner : 0;
p.virtue = (sc) ? sc->opt3 : 0;
- p.isPKModeON = (sd) ? sd->status.karma : 0;
+ p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
p.sex = vd->sex;
WBUFPOS(&p.PosDir[0],0,bl->x,bl->y,unit->getdir(bl));
p.xSize = p.ySize = (sd) ? 5 : 0;
@@ -1034,7 +1044,7 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) {
p.headpalette = vd->hair_color;
p.bodypalette = vd->cloth_color;
p.headDir = (sd)? sd->head_dir : 0;
- p.isPKModeON = (sd) ? sd->status.karma : 0;
+ p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
p.sex = vd->sex;
WBUFPOS(&p.PosDir[0],0,bl->x,bl->y,unit->getdir(bl));
p.xSize = p.ySize = (sd) ? 5 : 0;
@@ -1094,7 +1104,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
p.GEmblemVer = status->get_emblem_id(bl);
p.honor = (sd) ? sd->status.manner : 0;
p.virtue = (sc) ? sc->opt3 : 0;
- p.isPKModeON = (sd) ? sd->status.karma : 0;
+ p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
p.sex = vd->sex;
WBUFPOS(&p.PosDir[0],0,bl->x,bl->y,unit->getdir(bl));
p.xSize = p.ySize = (sd) ? 5 : 0;
@@ -1156,7 +1166,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
p.head = vd->hair_style;
p.weapon = vd->weapon;
p.accessory = vd->head_bottom;
- p.moveStartTime = timer->gettick();
+ p.moveStartTime = (unsigned int)timer->gettick();
#if PACKETVER < 7
p.shield = vd->shield;
#endif
@@ -1172,7 +1182,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
p.GEmblemVer = status->get_emblem_id(bl);
p.honor = (sd) ? sd->status.manner : 0;
p.virtue = (sc) ? sc->opt3 : 0;
- p.isPKModeON = (sd) ? sd->status.karma : 0;
+ p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
p.sex = vd->sex;
WBUFPOS2(&p.MoveData[0],0,bl->x,bl->y,ud->to_x,ud->to_y,8,8);
p.xSize = p.ySize = (sd) ? 5 : 0;
@@ -1526,13 +1536,17 @@ void clif_walkok(struct map_session_data *sd)
WFIFOHEAD(fd, packet_len(0x87));
WFIFOW(fd,0)=0x87;
- WFIFOL(fd,2)=timer->gettick();
+ WFIFOL(fd,2)=(unsigned int)timer->gettick();
WFIFOPOS2(fd,6,sd->bl.x,sd->bl.y,sd->ud.to_x,sd->ud.to_y,8,8);
WFIFOSET(fd,packet_len(0x87));
}
void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) {
+ struct status_change *sc = NULL;
+
+ if( (sc = status->get_sc(bl)) && sc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE|OPTION_CHASEWALK) )
+ clif->ally_only = true;
clif->set_unit_walking(bl,NULL,ud,AREA_WOS);
@@ -1564,6 +1578,8 @@ void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *u
clif->send_petdata(NULL, (TBL_PET*)bl, 3, vd->head_bottom);
break;
}
+
+ clif->ally_only = false;
}
@@ -1573,9 +1589,9 @@ void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *u
void clif_move(struct unit_data *ud)
{
unsigned char buf[16];
- struct view_data* vd;
- struct block_list* bl = ud->bl;
-
+ struct view_data *vd;
+ struct block_list *bl = ud->bl;
+ struct status_change *sc = NULL;
vd = status->get_viewdata(bl);
if (!vd || vd->class_ == INVISIBLE_CLASS)
return; //This performance check is needed to keep GM-hidden objects from being notified to bots.
@@ -1593,23 +1609,28 @@ void clif_move(struct unit_data *ud)
clif->move2(bl, vd, ud);
return;
}
+
+ if( (sc = status->get_sc(bl)) && sc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE|OPTION_CHASEWALK) )
+ clif->ally_only = true;
WBUFW(buf,0)=0x86;
WBUFL(buf,2)=bl->id;
WBUFPOS2(buf,6,bl->x,bl->y,ud->to_x,ud->to_y,8,8);
- WBUFL(buf,12)=timer->gettick();
+ WBUFL(buf,12)=(unsigned int)timer->gettick();
clif->send(buf, packet_len(0x86), bl, AREA_WOS);
if (disguised(bl)) {
WBUFL(buf,2)=-bl->id;
clif->send(buf, packet_len(0x86), bl, SELF);
}
+
+ clif->ally_only = false;
}
/*==========================================
* Delays the map->quit of a player after they are disconnected. [Skotlex]
*------------------------------------------*/
-int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) {
+int clif_delayquit(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = NULL;
//Remove player from map server
@@ -1680,11 +1701,11 @@ 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)
-{
+void clif_fixpos(struct block_list *bl) {
unsigned char buf[10];
+
nullpo_retv(bl);
-
+
WBUFW(buf,0) = 0x88;
WBUFL(buf,2) = bl->id;
WBUFW(buf,6) = bl->x;
@@ -2198,8 +2219,8 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
else
p.nameid = sd->status.inventory[n].nameid;
- p.IsIdentified = sd->status.inventory[n].identify;
- p.IsDamaged = sd->status.inventory[n].attribute;
+ p.IsIdentified = sd->status.inventory[n].identify ? 1 : 0;
+ p.IsDamaged = sd->status.inventory[n].attribute ? 1 : 0;
p.refiningLevel =sd->status.inventory[n].refine;
clif->addcards2(&p.slot.card[0], &sd->status.inventory[n]);
p.location = pc->equippoint(sd,n);
@@ -2290,311 +2311,229 @@ void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *
}
}
-//Unified inventory function which sends all of the inventory (requires two packets, one for equipable items and one for stackable ones. [Skotlex]
-void clif_inventorylist(struct map_session_data *sd) {
- int i,n,ne,arrow=-1;
- unsigned char *buf;
- unsigned char *bufe;
+void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) {
-#if PACKETVER < 5
- const int s = 10; //Entry size.
-#elif PACKETVER < 20080102
- const int s = 18;
-#else
- const int s = 22;
-#endif
-#if PACKETVER < 20071002
- const int se = 20;
-#elif PACKETVER < 20100629
- const int se = 26;
-#else
- const int se = 28;
-#endif
+ p->index = idx;
+
+ if (id->view_id > 0)
+ p->ITID = id->view_id;
+ else
+ p->ITID = i->nameid;
- buf = (unsigned char*)aMalloc(MAX_INVENTORY * s + 4);
- bufe = (unsigned char*)aMalloc(MAX_INVENTORY * se + 4);
+ p->type = itemtype(id->type);
- for( i = 0, n = 0, ne = 0; i < MAX_INVENTORY; i++ )
- {
- if( sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL )
- continue;
+#if PACKETVER < 20120925
+ p->IsIdentified = i->identify ? 1 : 0;
+#endif
+
+ p->location = eqp_pos;
+ p->WearState = i->equip;
+
+#if PACKETVER < 20120925
+ p->IsDamaged = i->attribute ? 1 : 0;
+#endif
+ p->RefiningLevel = i->refine;
+
+ clif->addcards2(&p->slot.card[0], i);
- if( !itemdb->isstackable2(sd->inventory_data[i]) )
- { //Non-stackable (Equippable)
- WBUFW(bufe,ne*se+4)=i+2;
- clif->item_sub(bufe, ne*se+6, &sd->status.inventory[i], sd->inventory_data[i], pc->equippoint(sd,i));
- clif->addcards(WBUFP(bufe, ne*se+16), &sd->status.inventory[i]);
#if PACKETVER >= 20071002
- WBUFL(bufe,ne*se+24)=sd->status.inventory[i].expire_time;
- WBUFW(bufe,ne*se+28)=0; //Unknown
+ p->HireExpireDate = i->expire_time;
+#endif
+
+#if PACKETVER >= 20080102
+ p->bindOnEquipType = 0;
#endif
+
#if PACKETVER >= 20100629
- if (sd->inventory_data[i]->equip&EQP_VISIBLE)
- WBUFW(bufe,ne*se+30)= sd->inventory_data[i]->look;
- else
- WBUFW(bufe,ne*se+30)=0;
+ p->wItemSpriteNumber = id->equip&EQP_VISIBLE ? id->look : 0;
#endif
- ne++;
- }
- else
- { //Stackable.
- WBUFW(buf,n*s+4)=i+2;
- clif->item_sub(buf, n*s+6, &sd->status.inventory[i], sd->inventory_data[i], -2);
- if( sd->inventory_data[i]->equip == EQP_AMMO && sd->status.inventory[i].equip )
- arrow=i;
+
+#if PACKETVER >= 20120925
+ p->Flag.IsIdentified = i->identify ? 1 : 0;
+ p->Flag.IsDamaged = i->attribute ? 1 : 0;
+ p->Flag.PlaceETCTab = i->favorite ? 1 : 0;
+ p->Flag.SpareBits = 0;
+#endif
+}
+void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id) {
+ p->index = idx;
+
+ if (id->view_id > 0)
+ p->ITID = id->view_id;
+ else
+ p->ITID = i->nameid;
+
+ p->type = itemtype(id->type);
+
+#if PACKETVER < 20120925
+ p->IsIdentified = i->identify ? 1 : 0;
+#endif
+
+ p->count = i->amount;
+ p->WearState = id->equip;
+
#if PACKETVER >= 5
- clif->addcards(WBUFP(buf, n*s+14), &sd->status.inventory[i]);
+ clif->addcards2(&p->slot.card[0], i);
#endif
+
#if PACKETVER >= 20080102
- WBUFL(buf,n*s+22)=sd->status.inventory[i].expire_time;
+ p->HireExpireDate = i->expire_time;
#endif
- n++;
- }
- }
- if( n ) {
-#if PACKETVER < 5
- WBUFW(buf,0)=0xa3;
-#elif PACKETVER < 20080102
- WBUFW(buf,0)=0x1ee;
-#else
- WBUFW(buf,0)=0x2e8;
+
+#if PACKETVER >= 20120925
+ p->Flag.IsIdentified = i->identify ? 1 : 0;
+ p->Flag.PlaceETCTab = i->favorite ? 1 : 0;
+ p->Flag.SpareBits = 0;
#endif
- WBUFW(buf,2)=4+n*s;
- clif->send(buf, WBUFW(buf,2), &sd->bl, SELF);
+}
+void clif_inventorylist(struct map_session_data *sd) {
+ int i, normal = 0, equip = 0;
+
+ for( i = 0; i < MAX_INVENTORY; i++ ) {
+
+ if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
+ continue;
+ if( !itemdb->isstackable2(sd->inventory_data[i]) ) //Non-stackable (Equippable)
+ clif_item_equip(i+2,&itemlist_equip.list[equip++],&sd->status.inventory[i],sd->inventory_data[i],pc->equippoint(sd,i));
+ else //Stackable (Normal)
+ clif_item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.inventory[i],sd->inventory_data[i]);
+ }
+
+ if( normal ) {
+ itemlist_normal.PacketType = inventorylistnormalType;
+ itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal);
+
+ clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF);
}
- if( arrow >= 0 )
- clif->arrowequip(sd,arrow);
+
+ if( sd->equip_index[EQI_AMMO] >= 0 )
+ clif->arrowequip(sd,sd->equip_index[EQI_AMMO]);
+
+ if( equip ) {
+ itemlist_equip.PacketType = inventorylistequipType;
+ itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip);
- if( ne ) {
-#if PACKETVER < 20071002
- WBUFW(bufe,0)=0xa4;
-#else
- WBUFW(bufe,0)=0x2d0;
-#endif
- WBUFW(bufe,2)=4+ne*se;
- clif->send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
+ clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF);
}
-#if PACKETVER >= 20111122
+/* on 20120925 onwards this is a field on clif_item_equip/normal */
+#if PACKETVER >= 20111122 && PACKETVER < 20120925
for( i = 0; i < MAX_INVENTORY; i++ ) {
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
-
+
if ( sd->status.inventory[i].favorite )
clif->favorite_item(sd, i);
}
#endif
-
- if( buf ) aFree(buf);
- if( bufe ) aFree(bufe);
}
//Required when items break/get-repaired. Only sends equippable item list.
-void clif_equiplist(struct map_session_data *sd)
-{
- int i,n,fd = sd->fd;
- unsigned char *buf;
-#if PACKETVER < 20071002
- const int cmd = 20;
-#elif PACKETVER < 20100629
- const int cmd = 26;
-#else
- const int cmd = 28;
-#endif
-
- WFIFOHEAD(fd, MAX_INVENTORY * cmd + 4);
- buf = WFIFOP(fd,0);
-
- for(i=0,n=0;i<MAX_INVENTORY;i++){
- if (sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL)
+void clif_equiplist(struct map_session_data *sd) {
+ int i, equip = 0;
+
+ for( i = 0; i < MAX_INVENTORY; i++ ) {
+
+ if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
-
- if(itemdb->isstackable2(sd->inventory_data[i]))
+ if( !itemdb->isstackable2(sd->inventory_data[i]) ) //Non-stackable (Equippable)
+ clif_item_equip(i+2,&itemlist_equip.list[equip++],&sd->status.inventory[i],sd->inventory_data[i],pc->equippoint(sd,i));
+ }
+
+ if( equip ) {
+ itemlist_equip.PacketType = inventorylistequipType;
+ itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip);
+
+ clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF);
+ }
+
+ /* on 20120925 onwards this is a field on clif_item_equip */
+#if PACKETVER >= 20111122 && PACKETVER < 20120925
+ for( i = 0; i < MAX_INVENTORY; i++ ) {
+ if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
- //Equippable
- WBUFW(buf,n*cmd+4)=i+2;
- clif->item_sub(buf, n*cmd+6, &sd->status.inventory[i], sd->inventory_data[i], pc->equippoint(sd,i));
- clif->addcards(WBUFP(buf, n*cmd+16), &sd->status.inventory[i]);
-#if PACKETVER >= 20071002
- WBUFL(buf,n*cmd+24)=sd->status.inventory[i].expire_time;
- WBUFW(buf,n*cmd+28)=0; //Unknown
-#endif
-#if PACKETVER >= 20100629
- if (sd->inventory_data[i]->equip&EQP_VISIBLE)
- WBUFW(buf,n*cmd+30)= sd->inventory_data[i]->look;
- else
- WBUFW(buf,n*cmd+30)=0;
-#endif
- n++;
+
+ if ( sd->status.inventory[i].favorite )
+ clif->favorite_item(sd, i);
}
- if (n) {
-#if PACKETVER < 20071002
- WBUFW(buf,0)=0xa4;
-#else
- WBUFW(buf,0)=0x2d0;
#endif
- WBUFW(buf,2)=4+n*cmd;
- WFIFOSET(fd,WFIFOW(fd,2));
- }
}
-void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length)
-{
+void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length) {
+ int i = 0;
struct item_data *id;
- int i,n,ne;
- unsigned char *buf;
- unsigned char *bufe;
-#if PACKETVER < 5
- const int s = 10; //Entry size.
-#elif PACKETVER < 20080102
- const int s = 18;
-#else
- const int s = 22;
-#endif
-#if PACKETVER < 20071002
- const int cmd = 20;
-#elif PACKETVER < 20100629
- const int cmd = 26;
-#else
- const int cmd = 28;
-#endif
-
- buf = (unsigned char*)aMalloc(items_length * s + 4);
- bufe = (unsigned char*)aMalloc(items_length * cmd + 4);
+
+ do {
+ int normal = 0, equip = 0, k = 0;
- for( i = 0, n = 0, ne = 0; i < items_length; i++ )
- {
- if( items[i].nameid <= 0 )
- continue;
- id = itemdb->search(items[i].nameid);
- if( !itemdb->isstackable2(id) )
- { //Equippable
- WBUFW(bufe,ne*cmd+4)=i+1;
- clif->item_sub(bufe, ne*cmd+6, &items[i], id, id->equip);
- clif->addcards(WBUFP(bufe, ne*cmd+16), &items[i]);
-#if PACKETVER >= 20071002
- WBUFL(bufe,ne*cmd+24)=items[i].expire_time;
- WBUFW(bufe,ne*cmd+28)=0; //Unknown
-#endif
- ne++;
+ for( ; i < items_length && k < 500; i++, k++ ) {
+
+ if( items[i].nameid <= 0 )
+ continue;
+
+ id = itemdb->search(items[i].nameid);
+
+ if( !itemdb->isstackable2(id) ) //Non-stackable (Equippable)
+ clif_item_equip(i+1,&storelist_equip.list[equip++],&items[i],id,id->equip);
+ else //Stackable (Normal)
+ clif_item_normal(i+1,&storelist_normal.list[normal++],&items[i],id);
}
- else
- { //Stackable
- WBUFW(buf,n*s+4)=i+1;
- clif->item_sub(buf, n*s+6, &items[i], id,-1);
-#if PACKETVER >= 5
- clif->addcards(WBUFP(buf,n*s+14), &items[i]);
-#endif
-#if PACKETVER >= 20080102
- WBUFL(buf,n*s+22)=items[i].expire_time;
+
+ if( normal ) {
+ storelist_normal.PacketType = storagelistnormalType;
+ storelist_normal.PacketLength = ( sizeof( storelist_normal ) - sizeof( storelist_normal.list ) ) + (sizeof(struct NORMALITEM_INFO) * normal);
+
+#if PACKETVER >= 20120925
+ safestrncpy(storelist_normal.name, "Storage", NAME_LENGTH);
#endif
- n++;
+
+ clif->send(&storelist_normal, storelist_normal.PacketLength, &sd->bl, SELF);
}
- }
- if( n )
- {
-#if PACKETVER < 5
- WBUFW(buf,0)=0xa5;
-#elif PACKETVER < 20080102
- WBUFW(buf,0)=0x1f0;
-#else
- WBUFW(buf,0)=0x2ea;
-#endif
- WBUFW(buf,2)=4+n*s;
- clif->send(buf, WBUFW(buf,2), &sd->bl, SELF);
- }
- if( ne )
- {
-#if PACKETVER < 20071002
- WBUFW(bufe,0)=0xa6;
-#else
- WBUFW(bufe,0)=0x2d1;
+
+ if( equip ) {
+ storelist_equip.PacketType = storagelistequipType;
+ storelist_equip.PacketLength = ( sizeof( storelist_equip ) - sizeof( storelist_equip.list ) ) + (sizeof(struct EQUIPITEM_INFO) * equip);
+
+#if PACKETVER >= 20120925
+ safestrncpy(storelist_equip.name, "Storage", NAME_LENGTH);
#endif
- WBUFW(bufe,2)=4+ne*cmd;
- clif->send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
- }
- if( buf ) aFree(buf);
- if( bufe ) aFree(bufe);
+ clif->send(&storelist_equip, storelist_equip.PacketLength, &sd->bl, SELF);
+ }
+
+ } while ( i < items_length );
+
}
-void clif_cartlist(struct map_session_data *sd)
-{
+void clif_cartlist(struct map_session_data *sd) {
+ int i, normal = 0, equip = 0;
struct item_data *id;
- int i,n,ne;
- unsigned char *buf;
- unsigned char *bufe;
-#if PACKETVER < 5
- const int s = 10; //Entry size.
-#elif PACKETVER < 20080102
- const int s = 18;
-#else
- const int s = 22;
-#endif
-#if PACKETVER < 20071002
- const int cmd = 20;
-#elif PACKETVER < 20100629
- const int cmd = 26;
-#else
- const int cmd = 28;
-#endif
-
- buf = (unsigned char*)aMalloc(MAX_CART * s + 4);
- bufe = (unsigned char*)aMalloc(MAX_CART * cmd + 4);
-
- for( i = 0, n = 0, ne = 0; i < MAX_CART; i++ )
- {
+
+ for( i = 0; i < MAX_CART; i++ ) {
+
if( sd->status.cart[i].nameid <= 0 )
continue;
+
id = itemdb->search(sd->status.cart[i].nameid);
- if( !itemdb->isstackable2(id) )
- { //Equippable
- WBUFW(bufe,ne*cmd+4)=i+2;
- clif->item_sub(bufe, ne*cmd+6, &sd->status.cart[i], id, id->equip);
- clif->addcards(WBUFP(bufe, ne*cmd+16), &sd->status.cart[i]);
-#if PACKETVER >= 20071002
- WBUFL(bufe,ne*cmd+24)=sd->status.cart[i].expire_time;
- WBUFW(bufe,ne*cmd+28)=0; //Unknown
-#endif
- ne++;
- }
- else
- { //Stackable
- WBUFW(buf,n*s+4)=i+2;
- clif->item_sub(buf, n*s+6, &sd->status.cart[i], id,-1);
-#if PACKETVER >= 5
- clif->addcards(WBUFP(buf,n*s+14), &sd->status.cart[i]);
-#endif
-#if PACKETVER >= 20080102
- WBUFL(buf,n*s+22)=sd->status.cart[i].expire_time;
-#endif
- n++;
- }
+
+ if( !itemdb->isstackable2(id) ) //Non-stackable (Equippable)
+ clif_item_equip(i+2,&itemlist_equip.list[equip++],&sd->status.cart[i],id,id->equip);
+ else //Stackable (Normal)
+ clif_item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.cart[i],id);
}
- if( n )
- {
-#if PACKETVER < 5
- WBUFW(buf,0)=0x123;
-#elif PACKETVER < 20080102
- WBUFW(buf,0)=0x1ef;
-#else
- WBUFW(buf,0)=0x2e9;
-#endif
- WBUFW(buf,2)=4+n*s;
- clif->send(buf, WBUFW(buf,2), &sd->bl, SELF);
+
+ if( normal ) {
+ itemlist_normal.PacketType = cartlistnormalType;
+ itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal);
+
+ clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF);
}
- if( ne )
- {
-#if PACKETVER < 20071002
- WBUFW(bufe,0)=0x122;
-#else
- WBUFW(bufe,0)=0x2d2;
-#endif
- WBUFW(bufe,2)=4+ne*cmd;
- clif->send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
+
+ if( equip ) {
+ itemlist_equip.PacketType = cartlistequipType;
+ itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip);
+
+ clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF);
}
-
- if( buf ) aFree(buf);
- if( bufe ) aFree(bufe);
}
@@ -3001,7 +2940,8 @@ void clif_updatestatus(struct map_session_data *sd,int type)
case SP_HP:
WFIFOL(fd,4)=sd->battle_status.hp;
// TODO: Won't these overwrite the current packet?
- clif->hpmeter(sd);
+ if( map->list[sd->bl.m].hpmeter_visible )
+ clif->hpmeter(sd);
if( !battle_config.party_hp_mode && sd->status.party_id )
clif->party_hp(sd);
if( sd->bg_id )
@@ -3528,52 +3468,39 @@ 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)
-/// result:
-/// 0 = failure
-/// 1 = success
-/// 2 = failure due to low level
-void clif_equipitemack(struct map_session_data *sd,int n,int pos,int ok)
-{
- int fd;
+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);
- fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0xaa));
- WFIFOW(fd,0)=0xaa;
- WFIFOW(fd,2)=n+2;
- WFIFOW(fd,4)=pos;
-#if PACKETVER < 20100629
- WFIFOB(fd,6)=ok;
-#else
- if (ok && sd->inventory_data[n]->equip&EQP_VISIBLE)
- WFIFOW(fd,6)=sd->inventory_data[n]->look;
+ p.PacketType = equipitemackType;
+ p.index = n+2;
+ p.wearLocation = pos;
+#if PACKETVER >= 20100629
+ if (result == EIA_SUCCESS && sd->inventory_data[n]->equip&EQP_VISIBLE)
+ p.wItemSpriteNumber = sd->inventory_data[n]->look;
else
- WFIFOW(fd,6)=0;
- WFIFOB(fd,8)=ok;
+ p.wItemSpriteNumber = 0;
#endif
- WFIFOSET(fd,packet_len(0xaa));
+ p.result = (unsigned char)result;
+
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
}
/// 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
-/// result:
-/// 0 = failure
-/// 1 = success
-void clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
-{
- int fd;
+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);
- fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0xac));
- WFIFOW(fd,0)=0xac;
- WFIFOW(fd,2)=n+2;
- WFIFOW(fd,4)=pos;
- WFIFOB(fd,6)=ok;
- WFIFOSET(fd,packet_len(0xac));
+ p.PacketType = unequipitemackType;
+ p.index = n+2;
+ p.wearLocation = pos;
+ p.result = (unsigned char)result;
+
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
}
@@ -4430,8 +4357,7 @@ int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, i
/// 10 = critical hit
/// 11 = lucky dodge
/// 12 = (touch skill?)
-int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int64 in_damage, int div, int type, int64 in_damage2)
-{
+int clif_damage(struct block_list* src, struct block_list* dst, int64 tick, int sdelay, int ddelay, int64 in_damage, int div, int type, int64 in_damage2) {
unsigned char buf[33];
struct status_change *sc;
int damage,damage2;
@@ -4459,7 +4385,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
WBUFW(buf,0)=cmd;
WBUFL(buf,2)=src->id;
WBUFL(buf,6)=dst->id;
- WBUFL(buf,10)=tick;
+ WBUFL(buf,10)=(uint32)tick;
WBUFL(buf,14)=sdelay;
WBUFL(buf,18)=ddelay;
#if PACKETVER < 20071113
@@ -4516,7 +4442,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
*------------------------------------------*/
void clif_takeitem(struct block_list* src, struct block_list* dst)
{
- //clif_damage(src,dst,0,0,0,0,0,1,0);
+ //clif->damage(src,dst,0,0,0,0,0,1,0);
unsigned char buf[32];
nullpo_retv(src);
@@ -4821,7 +4747,7 @@ int clif_insight(struct block_list *bl,va_list ap)
tsd = BL_CAST(BL_PC, tbl);
if (tsd && tsd->fd) { //Tell tsd that bl entered into his view
- switch(bl->type){
+ switch(bl->type) {
case BL_ITEM:
clif->getareachar_item(tsd,(struct flooritem_data*)bl);
break;
@@ -5097,7 +5023,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 tick)
+void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration)
{
#if PACKETVER>=20081112
int fd;
@@ -5108,7 +5034,7 @@ void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned
WFIFOHEAD(fd,packet_len(0x43d));
WFIFOW(fd,0) = 0x43d;
WFIFOW(fd,2) = skill_id;
- WFIFOL(fd,4) = tick;
+ WFIFOL(fd,4) = duration;
WFIFOSET(fd,packet_len(0x43d));
#endif
}
@@ -5117,7 +5043,7 @@ 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,unsigned int tick,int sdelay,int ddelay,int64 in_damage,int div,uint16 skill_id,uint16 skill_lv,int type) {
+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;
@@ -5138,7 +5064,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
WBUFW(buf,2)=skill_id;
WBUFL(buf,4)=src->id;
WBUFL(buf,8)=dst->id;
- WBUFL(buf,12)=tick;
+ WBUFL(buf,12)=(uint32)tick;
WBUFL(buf,16)=sdelay;
WBUFL(buf,20)=ddelay;
if (battle_config.hide_woe_damage && map_flag_gvg2(src->m)) {
@@ -5169,7 +5095,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
WBUFW(buf,2)=skill_id;
WBUFL(buf,4)=src->id;
WBUFL(buf,8)=dst->id;
- WBUFL(buf,12)=tick;
+ WBUFL(buf,12)=(uint32)tick;
WBUFL(buf,16)=sdelay;
WBUFL(buf,20)=ddelay;
if (battle_config.hide_woe_damage && map_flag_gvg2(src->m)) {
@@ -5205,7 +5131,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
/// 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,unsigned int tick,int sdelay,int ddelay,int damage,int div,uint16 skill_id,uint16 skill_lv,int type) {
+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;
@@ -5225,7 +5151,7 @@ int clif_skill_damage2(struct block_list *src,struct block_list *dst,unsigned in
WBUFW(buf,2)=skill_id;
WBUFL(buf,4)=src->id;
WBUFL(buf,8)=dst->id;
- WBUFL(buf,12)=tick;
+ WBUFL(buf,12)=(uint32)tick;
WBUFL(buf,16)=sdelay;
WBUFL(buf,20)=ddelay;
WBUFW(buf,24)=dst->x;
@@ -5295,8 +5221,7 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,uint16 ski
/// 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,int tick)
-{
+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);
@@ -5307,7 +5232,7 @@ void clif_skill_poseffect(struct block_list *src,uint16 skill_id,int val,int x,i
WBUFW(buf,8)=val;
WBUFW(buf,10)=x;
WBUFW(buf,12)=y;
- WBUFL(buf,14)=tick;
+ WBUFL(buf,14)=(uint32)tick;
if(disguised(src)) {
clif->send(buf,packet_len(0x117),src,AREA_WOS);
WBUFL(buf,4)=-src->id;
@@ -8951,69 +8876,41 @@ 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)
-{
- uint8* buf;
- int i, n, fd, offset = 0;
-#if PACKETVER < 20100629
- const int s = 26;
-#else
- const int s = 28;
-#endif
+void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd) {
+ int i, k, equip = 0;
+
nullpo_retv(sd);
nullpo_retv(tsd);
- fd = sd->fd;
-
- WFIFOHEAD(fd, MAX_INVENTORY * s + 43);
- buf = WFIFOP(fd,0);
+
+ for( i = 0; i < EQI_MAX; i++ ) {
+ if( (k = tsd->equip_index[i]) >= 0 ) {
+
+ if (tsd->status.inventory[k].nameid <= 0 || tsd->inventory_data[k] == NULL) // Item doesn't exist
+ continue;
+
+ clif_item_equip(k+2,&viewequip_list.list[equip++],&tsd->status.inventory[k],tsd->inventory_data[k],pc->equippoint(tsd,k));
-#if PACKETVER < 20101124
- WBUFW(buf, 0) = 0x2d7;
-#else
- WBUFW(buf, 0) = 0x859;
-#endif
- safestrncpy((char*)WBUFP(buf, 4), tsd->status.name, NAME_LENGTH);
- WBUFW(buf,28) = tsd->status.class_;
- WBUFW(buf,30) = tsd->vd.hair_style;
- WBUFW(buf,32) = tsd->vd.head_bottom;
- WBUFW(buf,34) = tsd->vd.head_mid;
- WBUFW(buf,36) = tsd->vd.head_top;
+ }
+ }
+
+ viewequip_list.PacketType = viewequipackType;
+ viewequip_list.PacketLength = ( sizeof( viewequip_list ) - sizeof( viewequip_list.list ) ) + ( sizeof(struct EQUIPITEM_INFO) * equip );
+
+ safestrncpy(viewequip_list.characterName, tsd->status.name, NAME_LENGTH);
+
+ viewequip_list.job = tsd->status.class_;
+ viewequip_list.head = tsd->vd.hair_style;
+ viewequip_list.accessory = tsd->vd.head_bottom;
+ viewequip_list.accessory2 = tsd->vd.head_mid;
+ viewequip_list.accessory3 = tsd->vd.head_top;
#if PACKETVER >= 20110111
- WBUFW(buf,38) = tsd->vd.robe;
- offset+= 2;
- buf = WBUFP(buf,2);
-#endif
- WBUFW(buf,38) = tsd->vd.hair_color;
- WBUFW(buf,40) = tsd->vd.cloth_color;
- WBUFB(buf,42) = tsd->vd.sex;
-
- for(i=0,n=0; i < MAX_INVENTORY; i++)
- {
- if (tsd->status.inventory[i].nameid <= 0 || tsd->inventory_data[i] == NULL) // Item doesn't exist
- continue;
- if (!itemdb->isequip2(tsd->inventory_data[i])) // Is not equippable
- continue;
-
- // Inventory position
- WBUFW(buf, n*s+43) = i + 2;
- // Add refine, identify flag, element, etc.
- clif->item_sub(WBUFP(buf,0), n*s+45, &tsd->status.inventory[i], tsd->inventory_data[i], pc->equippoint(tsd, i));
- // Add cards
- clif->addcards(WBUFP(buf, n*s+55), &tsd->status.inventory[i]);
- // Expiration date stuff, if all of those are set to 0 then the client doesn't show anything related (6 bytes)
- WBUFL(buf, n*s+63) = tsd->status.inventory[i].expire_time;
- WBUFW(buf, n*s+67) = 0;
-#if PACKETVER >= 20100629
- if (tsd->inventory_data[i]->equip&EQP_VISIBLE)
- WBUFW(buf, n*s+69) = tsd->inventory_data[i]->look;
- else
- WBUFW(buf, n*s+69) = 0;
+ viewequip_list.robe = tsd->vd.robe;
#endif
- n++;
- }
-
- WFIFOW(fd, 2) = 43+offset+n*s; // Set length
- WFIFOSET(fd, WFIFOW(fd, 2));
+ viewequip_list.headpalette = tsd->vd.hair_color;
+ viewequip_list.bodypalette = tsd->vd.cloth_color;
+ viewequip_list.sex = tsd->vd.sex;
+
+ clif->send(&viewequip_list, viewequip_list.PacketLength, &sd->bl, SELF);
}
@@ -9371,13 +9268,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if( map->list[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs )
map->spawnmobs(sd->bl.m);
+
if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map
map->list[sd->bl.m].users_pvp++;
}
- if( map->list[sd->bl.m].instance_id >= 0 ) {
- instance->list[map->list[sd->bl.m].instance_id].users++;
- instance->check_idle(map->list[sd->bl.m].instance_id);
- }
+
sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS]
// reset the callshop flag if the player changes map
@@ -9431,7 +9326,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->spawn(&sd->pd->bl);
clif->send_petdata(sd,sd->pd,0,0);
clif->send_petstatus(sd);
-// skill->unit_move(&sd->pd->bl,gettick(),1);
+// skill->unit_move(&sd->pd->bl,timer->gettick(),1);
}
}
@@ -9567,6 +9462,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF);
}
+ if( map->list[sd->bl.m].instance_id >= 0 ) {
+ instance->list[map->list[sd->bl.m].instance_id].users++;
+ instance->check_idle(map->list[sd->bl.m].instance_id);
+ }
+
+ if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
+ map->list[sd->bl.m].hpmeter_visible++;
+ sd->state.hpmeter_visible = 1;
+ }
+
map->iwall_get(sd); // Updates Walls Info on this Map to Client
status_calc_pc(sd, false);/* some conditions are map-dependent so we must recalculate */
sd->state.changemap = false;
@@ -9649,12 +9554,12 @@ 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, unsigned long time) {
+void clif_notify_time(struct map_session_data* sd, int64 time) {
int fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x7f));
WFIFOW(fd,0) = 0x7f;
- WFIFOL(fd,2) = time;
+ WFIFOL(fd,2) = (uint32)time;
WFIFOSET(fd,packet_len(0x7f));
}
@@ -9750,7 +9655,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd)
if( timer->gettick() < sd->progressbar.timeout && sd->st )
sd->st->state = END;
- sd->state.workinprogress = sd->progressbar.npc_id = sd->progressbar.timeout = 0;
+ sd->progressbar.timeout = sd->state.workinprogress = sd->progressbar.npc_id = 0;
npc->scriptcont(sd, npc_id, false);
}
@@ -9783,7 +9688,8 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
RFIFOPOS(fd, packet_db[RFIFOW(fd,0)].pos[0], &x, &y, NULL);
//Set last idle time... [Skotlex]
- sd->idletime = last_tick;
+ if( battle_config.idletime_criteria & BCIDLE_WALK )
+ sd->idletime = last_tick;
unit->walktoxy(&sd->bl, x, y, 4);
}
@@ -9862,7 +9768,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
clif->charnameack(fd, bl);
}
-int clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) {
+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;
@@ -10130,8 +10036,7 @@ void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) {
}
-void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick)
-{
+void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick) {
if (pc_isdead(sd)) {
clif->clearunit_area(&sd->bl, CLR_DEAD);
return;
@@ -10668,18 +10573,19 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
/// Request to equip an item (CZ_REQ_WEAR_EQUIP).
/// 00a9 <index>.W <position>.W
-void clif_parse_EquipItem(int fd,struct map_session_data *sd)
-{
- int index;
+/// 0998 <index>.W <position>.L
+void clif_parse_EquipItem(int fd,struct map_session_data *sd) {
+ struct packet_equip_item *p = P2PTR(fd);
if(pc_isdead(sd)) {
clif->clearunit_area(&sd->bl,CLR_DEAD);
return;
}
- index = RFIFOW(fd,2)-2;
- if (index < 0 || index >= MAX_INVENTORY)
- return; //Out of bounds check.
+ p->index = p->index - 2;
+ if (p->index >= MAX_INVENTORY)
+ return; //Out of bounds check.
+
if( sd->npc_id ) {
if ( !sd->npc_item_flag )
return;
@@ -10688,16 +10594,16 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
else if ( pc_cant_act2(sd) || sd->state.prerefining )
return;
- if(!sd->status.inventory[index].identify) {
- clif->equipitemack(sd,index,0,0); // fail
+ if(!sd->status.inventory[p->index].identify) {
+ clif->equipitemack(sd,p->index,0,EIA_FAIL);// fail
return;
}
- if(!sd->inventory_data[index])
+ if(!sd->inventory_data[p->index])
return;
- if(sd->inventory_data[index]->type == IT_PETARMOR){
- pet->equipitem(sd,index);
+ if(sd->inventory_data[p->index]->type == IT_PETARMOR){
+ pet->equipitem(sd,p->index);
return;
}
@@ -10705,10 +10611,10 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
sd->idletime = last_tick;
//Client doesn't send the position for ammo.
- if(sd->inventory_data[index]->type == IT_AMMO)
- pc->equipitem(sd,index,EQP_AMMO);
+ if(sd->inventory_data[p->index]->type == IT_AMMO)
+ pc->equipitem(sd,p->index,EQP_AMMO);
else
- pc->equipitem(sd,index,RFIFOW(fd,4));
+ pc->equipitem(sd,p->index,p->wearLocation);
}
void clif_hercules_chsys_delete(struct hChSysCh *channel) {
@@ -11253,8 +11159,7 @@ 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, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id)
-{
+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;
if( !hd )
@@ -11275,8 +11180,7 @@ 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, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo)
-{
+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;
if( !hd )
return;
@@ -11296,8 +11200,7 @@ 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, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id)
-{
+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;
if( !md )
@@ -11318,8 +11221,7 @@ 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, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo)
-{
+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;
if( !md )
return;
@@ -11350,7 +11252,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
{
uint16 skill_id, skill_lv;
int tmp, target_id;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
skill_lv = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]);
skill_id = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[1]);
@@ -11451,7 +11353,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
*------------------------------------------*/
void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo)
{
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
if( !(skill->get_inf(skill_id)&INF_GROUND_SKILL) )
return; //Using a target skill on the ground? WRONG.
@@ -15580,7 +15482,7 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
unsigned int seconds;
int hours, minutes;
- seconds = DIFF_TICK(timer_data->tick, timer->gettick()) / 1000 + 60;
+ seconds = (unsigned int)(DIFF_TICK(timer_data->tick, timer->gettick()) / 1000 + 60);
hours = seconds / (60 * 60);
seconds = seconds - (60 * 60 * hours);
minutes = seconds / 60;
@@ -18213,6 +18115,7 @@ void clif_defaults(void) {
/* vars */
clif->bind_ip = INADDR_ANY;
clif->map_port = 5121;
+ clif->ally_only = false;
/* core */
clif->init = do_init_clif;
clif->final = do_final_clif;
diff --git a/src/map/clif.h b/src/map/clif.h
index 6d0fc0fc1..cbe3fa857 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -426,6 +426,29 @@ enum e_BANKING_WITHDRAW_ACK {
BWA_UNKNOWN_ERROR = 0x2,
};
+/* because the client devs were replaced by monkeys. */
+enum e_EQUIP_ITEM_ACK {
+#if PACKETVER >= 20120925
+ EIA_SUCCESS = 0x0,
+ EIA_FAIL_LV = 0x1,
+ EIA_FAIL = 0x2,
+#else
+ EIA_SUCCESS = 0x1,
+ EIA_FAIL_LV = 0x2,
+ EIA_FAIL = 0x0,
+#endif
+};
+
+/* and again. because the client devs were replaced by monkeys. */
+enum e_UNEQUIP_ITEM_ACK {
+#if PACKETVER >= 20120925
+ UIA_SUCCESS = 0x0,
+ UIA_FAIL = 0x1,
+#else
+ UIA_SUCCESS = 0x1,
+ UIA_FAIL = 0x0,
+#endif
+};
/**
* Structures
@@ -500,6 +523,8 @@ struct clif_interface {
} cs;
/* */
unsigned int cryptKey[3];
+ /* */
+ bool ally_only;
/* core */
int (*init) (void);
void (*final) (void);
@@ -529,8 +554,8 @@ struct clif_interface {
void (*use_card) (struct map_session_data *sd,int idx);
void (*cart_additem) (struct map_session_data *sd,int n,int amount,int fail);
void (*cart_delitem) (struct map_session_data *sd,int n,int amount);
- void (*equipitemack) (struct map_session_data *sd,int n,int pos,int ok);
- void (*unequipitemack) (struct map_session_data *sd,int n,int pos,int ok);
+ void (*equipitemack) (struct map_session_data *sd,int n,int pos,enum e_EQUIP_ITEM_ACK result);
+ void (*unequipitemack) (struct map_session_data *sd,int n,int pos,enum e_UNEQUIP_ITEM_ACK result);
void (*useitemack) (struct map_session_data *sd,int index,int amount,bool ok);
void (*addcards) (unsigned char* buf, struct item* item);
void (*addcards2) (unsigned short *cards, struct item* item);
@@ -542,7 +567,7 @@ struct clif_interface {
/* unit-related */
void (*clearunit_single) (int id, clr_type type, int fd);
void (*clearunit_area) (struct block_list* bl, clr_type type);
- void (*clearunit_delayed) (struct block_list* bl, clr_type type, unsigned int tick);
+ void (*clearunit_delayed) (struct block_list* bl, clr_type type, int64 tick);
void (*walkok) (struct map_session_data *sd);
void (*move) (struct unit_data *ud);
void (*move2) (struct block_list *bl, struct view_data *vd, struct unit_data *ud);
@@ -556,7 +581,7 @@ struct clif_interface {
void (*skill_setunit) (struct skill_unit *su);
void (*skill_delunit) (struct skill_unit *su);
void (*skillunit_update) (struct block_list* bl);
- int (*clearunit_delayed_sub) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*clearunit_delayed_sub) (int tid, int64 tick, int id, intptr_t data);
void (*set_unit_idle) (struct block_list* bl, struct map_session_data *tsd,enum send_target target);
void (*spawn_unit) (struct block_list* bl, enum send_target target);
void (*spawn_unit2) (struct block_list* bl, enum send_target target);
@@ -600,7 +625,7 @@ struct clif_interface {
void (*scriptclear) (struct map_session_data *sd, int npcid);
/* client-user-interface-related */
void (*viewpoint) (struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color);
- int (*damage) (struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2);
+ int (*damage) (struct block_list* src, struct block_list* dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2);
void (*sitting) (struct block_list* bl);
void (*standing) (struct block_list* bl);
void (*arrow_create_list) (struct map_session_data *sd);
@@ -616,7 +641,7 @@ struct clif_interface {
int (*outsight) (struct block_list *bl,va_list ap);
void (*skillcastcancel) (struct block_list* bl);
void (*skill_fail) (struct map_session_data *sd,uint16 skill_id,enum useskill_fail_cause cause,int btype);
- void (*skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int tick);
+ void (*skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int duration);
void (*skill_memomessage) (struct map_session_data* sd, int type);
void (*skill_mapinfomessage) (struct map_session_data *sd, int type);
void (*skill_produce_mix_list) (struct map_session_data *sd, int skill_id, int trigger);
@@ -682,7 +707,7 @@ struct clif_interface {
void (*movetoattack) (struct map_session_data *sd,struct block_list *bl);
void (*solved_charname) (int fd, int charid, const char* name);
void (*charnameupdate) (struct map_session_data *ssd);
- int (*delayquit) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*delayquit) (int tid, int64 tick, int id, intptr_t data);
void (*getareachar_pc) (struct map_session_data* sd,struct map_session_data* dstsd);
void (*disconnect_ack) (struct map_session_data* sd, short result);
void (*PVPInfo) (struct map_session_data* sd);
@@ -700,9 +725,9 @@ struct clif_interface {
void (*wedding_effect) (struct block_list *bl);
void (*divorced) (struct map_session_data* sd, const char* name);
void (*callpartner) (struct map_session_data *sd);
- int (*skill_damage) (struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int64 damage,int div,uint16 skill_id,uint16 skill_lv,int type);
+ int (*skill_damage) (struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type);
int (*skill_nodamage) (struct block_list *src,struct block_list *dst,uint16 skill_id,int heal,int fail);
- void (*skill_poseffect) (struct block_list *src,uint16 skill_id,int val,int x,int y,int tick);
+ void (*skill_poseffect) (struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick);
void (*skill_estimation) (struct map_session_data *sd,struct block_list *dst);
void (*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);
void (*skillcasting) (struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, int property, int casttime);
@@ -960,11 +985,11 @@ struct clif_interface {
void (*adopt_reply) (struct map_session_data *sd, int type);
void (*adopt_request) (struct map_session_data *sd, struct map_session_data *src, int p_id);
void (*readbook) (int fd, int book_id, int page);
- void (*notify_time) (struct map_session_data* sd, unsigned long time);
+ void (*notify_time) (struct map_session_data* sd, int64 time);
void (*user_count) (struct map_session_data* sd, int count);
void (*noask_sub) (struct map_session_data *src, struct map_session_data *target, int type);
void (*bc_ready) (void);
- int (*undisguise_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*undisguise_timer) (int tid, int64 tick, int id, intptr_t data);
/* Hercules Channel System */
void (*chsys_create) (struct hChSysCh *channel, char *name, char *pass, unsigned char color);
void (*chsys_msg) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
@@ -998,7 +1023,7 @@ struct clif_interface {
void (*pEmotion) (int fd, struct map_session_data *sd);
void (*pHowManyConnections) (int fd, struct map_session_data *sd);
void (*pActionRequest) (int fd, struct map_session_data *sd);
- void (*pActionRequest_sub) (struct map_session_data *sd, int action_type, int target_id, unsigned int tick);
+ void (*pActionRequest_sub) (struct map_session_data *sd, int action_type, int target_id, int64 tick);
void (*pRestart) (int fd, struct map_session_data *sd);
void (*pWisMessage) (int fd, struct map_session_data* sd);
void (*pBroadcast) (int fd, struct map_session_data* sd);
@@ -1032,12 +1057,12 @@ struct clif_interface {
void (*pStatusUp) (int fd,struct map_session_data *sd);
void (*pSkillUp) (int fd,struct map_session_data *sd);
void (*pUseSkillToId) (int fd, struct map_session_data *sd);
- void (*pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id);
- void (*pUseSkillToId_mercenary) (struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id);
+ void (*pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id);
+ void (*pUseSkillToId_mercenary) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id);
void (*pUseSkillToPos) (int fd, struct map_session_data *sd);
void (*pUseSkillToPosSub) (int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo);
- void (*pUseSkillToPos_homun) (struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo);
- void (*pUseSkillToPos_mercenary) (struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo);
+ void (*pUseSkillToPos_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo);
+ void (*pUseSkillToPos_mercenary) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo);
void (*pUseSkillToPosMoreInfo) (int fd, struct map_session_data *sd);
void (*pUseSkillMap) (int fd, struct map_session_data* sd);
void (*pRequestMemo) (int fd,struct map_session_data *sd);
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 3251ca992..f15b735b2 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -148,7 +148,7 @@ int elemental_get_lifetime(struct elemental_data *ed) {
return 0;
td = timer->get(ed->summon_timer);
- return (td != NULL) ? DIFF_TICK(td->tick, timer->gettick()) : 0;
+ return (td != NULL) ? DIFF_TICK32(td->tick, timer->gettick()) : 0;
}
int elemental_save(struct elemental_data *ed) {
@@ -169,7 +169,7 @@ int elemental_save(struct elemental_data *ed) {
return 1;
}
-int elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
struct elemental_data *ed;
@@ -388,7 +388,7 @@ int elemental_clean_effect(struct elemental_data *ed) {
return 1;
}
-int elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned int tick) {
+int elemental_action(struct elemental_data *ed, struct block_list *bl, int64 tick) {
struct skill_condition req;
uint16 skill_id, skill_lv;
int i;
@@ -636,7 +636,7 @@ int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
return 0;
}
-int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
+int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, int64 tick) {
struct block_list *target = NULL;
int master_dist, view_range, mode;
@@ -723,7 +723,7 @@ int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *s
}
if( battle->check_range(&ed->bl,target,view_range) && rnd()%100 < 2 ) { // 2% chance to cast attack skill.
- if( elemental->action(ed,target,tick) )
+ if( elemental->action(ed,target,tick) )
return 1;
}
@@ -746,14 +746,14 @@ int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *s
}
int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap,int64);
if(sd->status.ele_id && sd->ed)
elemental->ai_sub_timer(sd->ed,sd,tick);
return 0;
}
-int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) {
map->foreachpc(elemental->ai_sub_foreachclient,tick);
return 0;
}
diff --git a/src/map/elemental.h b/src/map/elemental.h
index b42d5c0b7..3cd819d53 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -57,7 +57,7 @@ struct elemental_data {
int summon_timer;
int skill_timer;
- unsigned last_thinktime, last_linktime, last_spdrain_time;
+ int64 last_thinktime, last_linktime, last_spdrain_time;
short min_chase;
int target_id, attacked_id;
};
@@ -99,7 +99,7 @@ struct elemental_interface {
int (*set_target) (struct map_session_data *sd, struct block_list *bl);
int (*clean_single_effect) (struct elemental_data *ed, uint16 skill_id);
int (*clean_effect) (struct elemental_data *ed);
- int (*action) (struct elemental_data *ed, struct block_list *bl, unsigned int tick);
+ int (*action) (struct elemental_data *ed, struct block_list *bl, int64 tick);
struct skill_condition (*skill_get_requirements) (uint16 skill_id, uint16 skill_lv);
int (*read_skilldb) (void);
@@ -108,11 +108,11 @@ struct elemental_interface {
int (*search_index) (int class_);
void (*summon_init) (struct elemental_data *ed);
- int (*summon_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*summon_end_timer) (int tid, int64 tick, int id, intptr_t data);
int (*ai_sub_timer_activesearch) (struct block_list *bl, va_list ap);
- int (*ai_sub_timer) (struct elemental_data *ed, struct map_session_data *sd, unsigned int tick);
+ int (*ai_sub_timer) (struct elemental_data *ed, struct map_session_data *sd, int64 tick);
int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
- int (*ai_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_timer) (int tid, int64 tick, int id, intptr_t data);
int (*read_db) (void);
};
diff --git a/src/map/guild.c b/src/map/guild.c
index 9b3eaaff8..0ae45bede 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -279,8 +279,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
return 0;
}
-int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) {
guild->expcache_db->clear(guild->expcache_db,guild->payexp_timer_sub);
return 0;
}
@@ -314,8 +313,7 @@ int guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
}
//Code from party_send_xy_timer [Skotlex]
-int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
guild->db->foreach(guild->db,guild->send_xy_timer_sub,tick);
return 0;
}
diff --git a/src/map/guild.h b/src/map/guild.h
index 566ca7ce4..348a6c7e4 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -148,13 +148,13 @@ struct guild_interface {
/* guild aura */
void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
/* */
- int (*payexp_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*payexp_timer) (int tid, int64 tick, int id, intptr_t data);
TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id);
bool (*read_guildskill_tree_db) (char* split[], int columns, int current);
bool (*read_castledb) (char* str[], int columns, int current);
int (*payexp_timer_sub) (DBKey key, DBData *data, va_list ap);
int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
- int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*send_xy_timer) (int tid, int64 tick, int id, intptr_t data);
DBData (*create_expcache) (DBKey key, va_list args);
int (*eventlist_db_final) (DBKey key, DBData *data, va_list ap);
int (*expcache_db_final) (DBKey key, DBData *data, va_list ap);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 1e47053fe..52f0572c0 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -615,7 +615,7 @@ bool homunculus_feed(struct map_session_data *sd, struct homun_data *hd) {
return true;
}
-int homunculus_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int homunculus_hunger_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
struct homun_data *hd;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index 2cb558930..e3ec38f7b 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -117,7 +117,7 @@ struct homunculus_interface {
void (*save) (struct homun_data *hd);
unsigned char (*menu) (struct map_session_data *sd,unsigned char menu_num);
bool (*feed) (struct map_session_data *sd, struct homun_data *hd);
- int (*hunger_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*hunger_timer) (int tid, int64 tick, int id, intptr_t data);
void (*hunger_timer_delete) (struct homun_data *hd);
int (*change_name) (struct map_session_data *sd,char *name);
bool (*change_name_ack) (struct map_session_data *sd, char* name, int flag);
diff --git a/src/map/instance.c b/src/map/instance.c
index 83b538ffc..6b96c3112 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -480,7 +480,7 @@ void instance_del_map(int16 m) {
/*--------------------------------------
* Timer to destroy instance by process or idle
*--------------------------------------*/
-int instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) {
instance->destroy(id);
return 0;
}
diff --git a/src/map/instance.h b/src/map/instance.h
index 449ca42c6..27a9401b4 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -70,7 +70,7 @@ struct instance_interface {
void (*check_kick) (struct map_session_data *sd);
void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout);
bool (*valid) (int instance_id);
- int (*destroy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*destroy_timer) (int tid, int64 tick, int id, intptr_t data);
};
struct instance_interface *instance;
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index 5225672af..f67446629 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -29,7 +29,7 @@ char send_string[IRC_MESSAGE_LENGTH];
* Timer callback to (re-)connect to an IRC server
* @see timer->do_timer
*/
-int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int irc_connect_timer(int tid, int64 tick, int id, intptr_t data) {
struct hSockOpt opt;
if( ircbot->isOn || ++ircbot->fails >= 3 )
return 0;
@@ -52,7 +52,7 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
* Timer callback to send identification commands to an IRC server
* @see timer->do_timer
*/
-int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int irc_identify_timer(int tid, int64 tick, int id, intptr_t data) {
if( !ircbot->isOn )
return 0;
@@ -70,7 +70,7 @@ int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) {
* Timer callback to join channels (and optionally send NickServ commands)
* @see timer->do_timer
*/
-int irc_join_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int irc_join_timer(int tid, int64 tick, int id, intptr_t data) {
if( !ircbot->isOn )
return 0;
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index aafbfccde..52ff0c9be 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -22,7 +22,7 @@ struct irc_func {
struct irc_bot_interface {
int fd;
bool isIn, isOn;
- unsigned int last_try;
+ int64 last_try;
unsigned char fails;
unsigned long ip;
unsigned short port;
@@ -43,9 +43,9 @@ struct irc_bot_interface {
/* */
struct irc_func* (*func_search) (char* function_name);
/* */
- int (*connect_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*identify_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*join_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*connect_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*identify_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*join_timer) (int tid, int64 tick, int id, intptr_t data);
/* */
void (*send)(char *str);
void (*relay) (char *name, const char *msg);
diff --git a/src/map/map.c b/src/map/map.c
index 81bd732df..b50297ca6 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -134,7 +134,7 @@ int map_freeblock_unlock (void) {
// Timer function to check if there some remaining lock and remove them if so.
// Called each 1s
-int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) {
if (map->block_free_lock > 0) {
ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", map->block_free_lock);
map->block_free_lock = 1;
@@ -266,8 +266,7 @@ int map_delblock(struct block_list* bl)
* Pass flag as 1 to prevent doing skill->unit_move checks
* (which are executed by default on BL_CHAR types)
*------------------------------------------*/
-int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
-{
+int map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
int x0 = bl->x, y0 = bl->y;
struct status_change *sc = NULL;
int moveblock = ( x0/BLOCK_SIZE != x1/BLOCK_SIZE || y0/BLOCK_SIZE != y1/BLOCK_SIZE);
@@ -1312,7 +1311,7 @@ int map_get_new_object_id(void)
* Timered function to clear the floor (remove remaining item)
* Called each flooritem_lifetime ms
*------------------------------------------*/
-int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) {
struct flooritem_data* fitem = (struct flooritem_data*)idb_get(map->id_db, id);
if (fitem == NULL || fitem->bl.type != BL_ITEM || (fitem->cleartimer != tid)) {
@@ -2296,8 +2295,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_t data)
-{
+int map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) {
int count;
const int16 m = id;
diff --git a/src/map/map.h b/src/map/map.h
index 6e4878dfd..6b7d2a630 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -339,7 +339,7 @@ struct flooritem_data {
unsigned char subx,suby;
int cleartimer;
int first_get_charid,second_get_charid,third_get_charid;
- unsigned int first_get_tick,second_get_tick,third_get_tick;
+ int64 first_get_tick,second_get_tick,third_get_tick;
struct item item_data;
};
@@ -706,6 +706,9 @@ struct map_data {
/* ShowEvent Data Cache */
struct questinfo *qi_data;
unsigned short qi_count;
+
+ /* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */
+ unsigned short hpmeter_visible;
};
/// Stores information about a remote map (for multi-mapserver setups).
@@ -900,7 +903,7 @@ struct map_interface {
// blocklist manipulation
int (*addblock) (struct block_list* bl);
int (*delblock) (struct block_list* bl);
- int (*moveblock) (struct block_list *bl, int x1, int y1, unsigned int tick);
+ int (*moveblock) (struct block_list *bl, int x1, int y1, int64 tick);
//blocklist nb in one cell
int (*count_oncell) (int16 m,int16 x,int16 y,int type);
struct skill_unit * (*find_skill_unit_oncell) (struct block_list* target,int16 x,int16 y,uint16 skill_id,struct skill_unit* out_unit, int flag);
@@ -912,8 +915,8 @@ struct map_interface {
// npc
bool (*addnpc) (int16 m,struct npc_data *nd);
// map item
- int (*clearflooritem_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*removemobs_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*clearflooritem_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*removemobs_timer) (int tid, int64 tick, int id, intptr_t data);
void (*clearflooritem) (struct block_list* bl);
int (*addflooritem) (struct item *item_data,int amount,int16 m,int16 x,int16 y,int first_charid,int second_charid,int third_charid,int flags);
// player to map session
@@ -1001,7 +1004,7 @@ struct map_interface {
void (*do_shutdown) (void);
- int (*freeblock_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*freeblock_timer) (int tid, int64 tick, int id, intptr_t data);
int (*searchrandfreecell) (int16 m, int16 *x, int16 *y, int stack);
int (*count_sub) (struct block_list *bl, va_list ap);
DBData (*create_charid2nick) (DBKey key, va_list args);
diff --git a/src/map/mapreg.h b/src/map/mapreg.h
index 3c1d0ba0e..c8f229cef 100644
--- a/src/map/mapreg.h
+++ b/src/map/mapreg.h
@@ -34,7 +34,7 @@ struct mapreg_interface {
bool (*setregstr) (int uid, const char *str);
void (*load) (void);
void (*save) (void);
- int (*save_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*save_timer) (int tid, int64 tick, int id, intptr_t data);
void (*reload) (void);
bool (*config_read) (const char *w1, const char *w2);
};
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 902b7c39b..c94e42d5d 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -228,7 +228,7 @@ void script_save_mapreg(void) {
}
}
-int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr_t data) {
+int script_autosave_mapreg(int tid, int64 tick, int id, intptr_t data) {
mapreg->save();
return 0;
}
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 8b8353f46..8c74a5e1e 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -94,7 +94,7 @@ int mercenary_get_lifetime(struct mercenary_data *md)
return 0;
td = timer->get(md->contract_timer);
- return (td != NULL) ? DIFF_TICK(td->tick, timer->gettick()) : 0;
+ return (td != NULL) ? DIFF_TICK32(td->tick, timer->gettick()) : 0;
}
int mercenary_get_guild(struct mercenary_data *md)
@@ -217,7 +217,7 @@ int mercenary_save(struct mercenary_data *md)
return 1;
}
-int merc_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int merc_contract_end_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
struct mercenary_data *md;
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 47f37ac66..3245606cf 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -43,7 +43,7 @@ struct mercenary_data {
int contract_timer;
unsigned devotion_flag : 1;
- unsigned int masterteleport_timer;
+ int64 masterteleport_timer;
};
/*=====================================
@@ -89,7 +89,7 @@ struct mercenary_interface {
int (*killbonus) (struct mercenary_data *md);
int (*search_index) (int class_);
- int (*contract_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*contract_end_timer) (int tid, int64 tick, int id, intptr_t data);
bool (*read_db_sub) (char* str[], int columns, int current);
bool (*read_skill_db_sub) (char* str[], int columns, int current);
};
diff --git a/src/map/mob.c b/src/map/mob.c
index 7023bcb9d..97f8ea6c1 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -332,8 +332,7 @@ int mob_get_random_id(int type, int flag, int lv)
/*==========================================
* Kill Steal Protection [Zephyrus]
*------------------------------------------*/
-bool mob_ksprotected (struct block_list *src, struct block_list *target)
-{
+bool mob_ksprotected(struct block_list *src, struct block_list *target) {
struct block_list *s_bl, *t_bl;
struct map_session_data
*sd, // Source
@@ -341,7 +340,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target)
*t_sd; // Mob Target
struct status_change_entry *sce;
struct mob_data *md;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
char output[128];
if( !battle_config.ksprotection )
@@ -559,8 +558,8 @@ int mob_once_spawn_area(struct map_session_data* sd, int16 m, int16 x0, int16 y0
/*==========================================
* Set a Guardian's guild data [Skotlex]
*------------------------------------------*/
-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.
+int mob_spawn_guardian_sub(int tid, int64 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;
struct guild* g;
@@ -779,18 +778,17 @@ int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state
/*==========================================
* Links nearby mobs (supportive mobs)
*------------------------------------------*/
-int mob_linksearch(struct block_list *bl,va_list ap)
-{
+int mob_linksearch(struct block_list *bl,va_list ap) {
struct mob_data *md;
int class_;
struct block_list *target;
- unsigned int tick;
+ int64 tick;
nullpo_ret(bl);
md=(struct mob_data *)bl;
class_ = va_arg(ap, int);
target = va_arg(ap, struct block_list *);
- tick=va_arg(ap, unsigned int);
+ tick = va_arg(ap, int64);
if (md->class_ == class_ && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME
&& !md->target_id)
@@ -809,7 +807,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_t data) {
+int mob_delayspawn(int tid, int64 tick, int id, intptr_t data) {
struct block_list* bl = map->id2bl(id);
struct mob_data* md = BL_CAST(BL_MOB, bl);
@@ -884,8 +882,8 @@ int mob_count_sub(struct block_list *bl, va_list ap) {
int mob_spawn (struct mob_data *md)
{
int i=0;
- unsigned int tick = timer->gettick();
- int c =0;
+ int64 tick = timer->gettick();
+ int64 c = 0;
md->last_thinktime = tick;
if (md->bl.prev != NULL)
@@ -1185,7 +1183,7 @@ int mob_warpchase_sub(struct block_list *bl,va_list ap) {
/*==========================================
* Processing of slave monsters
*------------------------------------------*/
-int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) {
+int mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) {
struct block_list *bl;
bl=map->id2bl(md->master_id);
@@ -1268,8 +1266,7 @@ int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) {
* when trying to pick new targets when the current chosen target is
* unreachable.
*------------------------------------------*/
-int mob_unlocktarget(struct mob_data *md, unsigned int tick)
-{
+int mob_unlocktarget(struct mob_data *md, int64 tick) {
nullpo_ret(md);
switch (md->state.skillstate) {
@@ -1308,8 +1305,7 @@ int mob_unlocktarget(struct mob_data *md, unsigned int tick)
/*==========================================
* Random walk
*------------------------------------------*/
-int mob_randomwalk(struct mob_data *md,unsigned int tick)
-{
+int mob_randomwalk(struct mob_data *md, int64 tick) {
const int retrycount=20;
int i,x,y,c,d;
int speed;
@@ -1383,8 +1379,7 @@ int mob_warpchase(struct mob_data *md, struct block_list *target)
/*==========================================
* AI of MOB whose is near a Player
*------------------------------------------*/
-bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
-{
+bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
struct block_list *tbl = NULL, *abl = NULL;
int mode;
int view_range, can_move;
@@ -1645,10 +1640,9 @@ bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
return true;
}
-int mob_ai_sub_hard_timer(struct block_list *bl,va_list ap)
-{
+int mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) {
struct mob_data *md = (struct mob_data*)bl;
- unsigned int tick = va_arg(ap, unsigned int);
+ int64 tick = va_arg(ap, int64);
if (mob->ai_sub_hard(md, tick))
{ //Hard AI triggered.
if(!md->state.spotted)
@@ -1661,9 +1655,9 @@ int mob_ai_sub_hard_timer(struct block_list *bl,va_list ap)
/*==========================================
* Serious processing for mob in PC field of view (foreachclient)
*------------------------------------------*/
-int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) {
- unsigned int tick;
- tick=va_arg(ap,unsigned int);
+int mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+ int64 tick;
+ tick=va_arg(ap, int64);
map->foreachinrange(mob->ai_sub_hard_timer,&sd->bl, AREA_SIZE+ACTIVE_AI_RANGE, BL_MOB,tick);
return 0;
@@ -1672,16 +1666,15 @@ int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) {
/*==========================================
* Negligent mode MOB AI (PC is not in near)
*------------------------------------------*/
-int mob_ai_sub_lazy(struct mob_data *md, va_list args)
-{
- unsigned int tick;
+int mob_ai_sub_lazy(struct mob_data *md, va_list args) {
+ int64 tick;
nullpo_ret(md);
if(md->bl.prev == NULL)
return 0;
- tick = va_arg(args,unsigned int);
+ tick = va_arg(args, int64);
if (battle_config.mob_ai&0x20 && map->list[md->bl.m].users>0)
return (int)mob->ai_sub_hard(md, tick);
@@ -1715,7 +1708,7 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args)
md->last_thinktime=tick;
if (md->master_id) {
- mob->ai_sub_hard_slavemob (md,tick);
+ mob->ai_sub_hard_slavemob(md,tick);
return 0;
}
@@ -1740,7 +1733,7 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args)
/*==========================================
* Negligent processing for mob outside PC field of view (interval timer function)
*------------------------------------------*/
-int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
+int mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) {
map->foreachmob(mob->ai_sub_lazy,tick);
return 0;
}
@@ -1748,7 +1741,7 @@ int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
/*==========================================
* Serious processing for mob in PC field of view (interval timer function)
*------------------------------------------*/
-int mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+int mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
if (battle_config.mob_ai&0x20)
map->foreachmob(mob->ai_sub_lazy,tick);
@@ -1785,8 +1778,7 @@ struct item_drop* mob_setlootitem(struct item* item)
/*==========================================
* item drop with delay (timer function)
*------------------------------------------*/
-int mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data)
-{
+int mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
list=(struct item_drop_list *)data;
@@ -1840,7 +1832,7 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite
dlist->item = ditem;
}
-int mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) {
+int mob_timer_delete(int tid, int64 tick, int id, intptr_t data) {
struct block_list* bl = map->id2bl(id);
struct mob_data* md = BL_CAST(BL_MOB, bl);
@@ -1885,7 +1877,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_t data) {
+int mob_respawn(int tid, int64 tick, int id, intptr_t data) {
struct block_list *bl = map->id2bl(id);
if(!bl) return 0;
@@ -2069,7 +2061,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
} pt[DAMAGELOG_SIZE];
int i, temp, count, m = md->bl.m, pnum = 0;
int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution
- unsigned int mvp_damage, tick = timer->gettick();
+ unsigned int mvp_damage;
+ int64 tick = timer->gettick();
bool rebirth, homkillonly;
mstatus = &md->status;
@@ -2610,7 +2603,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
void mob_revive(struct mob_data *md, unsigned int hp)
{
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
md->state.skillstate = MSS_IDLE;
md->last_thinktime = tick;
md->next_walktime = tick+rnd()%50+5000;
@@ -2695,8 +2688,8 @@ int mob_random_class (int *value, size_t count)
*------------------------------------------*/
int mob_class_change (struct mob_data *md, int class_)
{
- unsigned int tick = timer->gettick();
- int i, c, hp_rate;
+ int64 tick = timer->gettick(), c = 0;
+ int i, hp_rate;
nullpo_ret(md);
@@ -3032,8 +3025,7 @@ struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2) {
/*==========================================
* Skill use judging
*------------------------------------------*/
-int mobskill_use(struct mob_data *md, unsigned int tick, int event)
-{
+int mobskill_use(struct mob_data *md, int64 tick, int event) {
struct mob_skill *ms;
struct block_list *fbl = NULL; //Friend bl, which can either be a BL_PC or BL_MOB depending on the situation. [Skotlex]
struct block_list *bl;
@@ -3249,8 +3241,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
/*==========================================
* Skill use event processing
*------------------------------------------*/
-int mobskill_event(struct mob_data *md, struct block_list *src, unsigned int tick, int flag)
-{
+int mobskill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) {
int target_id, res = 0;
if(md->bl.prev == NULL || md->status.hp <= 0)
@@ -3487,7 +3478,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
{
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (timer->gettick() + duration, mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(timer->gettick() + duration, mob->timer_delete, md->bl.id, 0);
}
}
diff --git a/src/map/mob.h b/src/map/mob.h
index 210983675..2f425e285 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -166,7 +166,7 @@ struct mob_data {
int areanpc_id; //Required in OnTouchNPC (to avoid multiple area touchs)
unsigned int bg_id; // BattleGround System
- unsigned int next_walktime,last_thinktime,last_linktime,last_pcneartime,dmgtick;
+ int64 next_walktime, last_thinktime, last_linktime, last_pcneartime, dmgtick;
short move_fail_count;
short lootitem_count;
short min_chase;
@@ -175,7 +175,7 @@ struct mob_data {
int master_id,master_dist;
int8 skill_idx;// key of array
- unsigned int skilldelay[MAX_MOBSKILL];
+ int64 skilldelay[MAX_MOBSKILL];
char npc_event[EVENT_NAME_LENGTH];
/**
* Did this monster summon something?
@@ -266,7 +266,7 @@ struct mob_interface {
struct mob_db* (*db) (int index);
struct mob_chat* (*chat) (short id);
int (*makedummymobdb) (int);
- int (*spawn_guardian_sub) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*spawn_guardian_sub) (int tid, int64 tick, int id, intptr_t data);
int (*skill_id2skill_idx) (int class_, uint16 skill_id);
int (*db_searchname) (const char *str);
int (*db_searchname_array_sub) (struct mob_db *mob, const char *str, int flag);
@@ -287,7 +287,7 @@ struct mob_interface {
int (*spawn_bg) (const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id);
int (*can_reach) (struct mob_data *md, struct block_list *bl, int range, int state);
int (*linksearch) (struct block_list *bl, va_list ap);
- int (*delayspawn) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*delayspawn) (int tid, int64 tick, int id, intptr_t data);
int (*setdelayspawn) (struct mob_data *md);
int (*count_sub) (struct block_list *bl, va_list ap);
int (*spawn) (struct mob_data *md);
@@ -298,24 +298,24 @@ struct mob_interface {
int (*ai_sub_hard_bg_ally) (struct block_list *bl, va_list ap);
int (*ai_sub_hard_lootsearch) (struct block_list *bl, va_list ap);
int (*warpchase_sub) (struct block_list *bl, va_list ap);
- int (*ai_sub_hard_slavemob) (struct mob_data *md, unsigned int tick);
- int (*unlocktarget) (struct mob_data *md, unsigned int tick);
- int (*randomwalk) (struct mob_data *md, unsigned int tick);
+ int (*ai_sub_hard_slavemob) (struct mob_data *md, int64 tick);
+ int (*unlocktarget) (struct mob_data *md, int64 tick);
+ int (*randomwalk) (struct mob_data *md, int64 tick);
int (*warpchase) (struct mob_data *md, struct block_list *target);
- bool (*ai_sub_hard) (struct mob_data *md, unsigned int tick);
+ bool (*ai_sub_hard) (struct mob_data *md, int64 tick);
int (*ai_sub_hard_timer) (struct block_list *bl, va_list ap);
int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
int (*ai_sub_lazy) (struct mob_data *md, va_list args);
- int (*ai_lazy) (int tid, unsigned int tick, int id, intptr_t data);
- int (*ai_hard) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_lazy) (int tid, int64 tick, int id, intptr_t data);
+ int (*ai_hard) (int tid, int64 tick, int id, intptr_t data);
struct item_drop* (*setdropitem) (int nameid, int qty, struct item_data *data);
struct item_drop* (*setlootitem) (struct item *item);
- int (*delay_item_drop) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*delay_item_drop) (int tid, int64 tick, int id, intptr_t data);
void (*item_drop) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag);
- int (*timer_delete) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*timer_delete) (int tid, int64 tick, int id, intptr_t data);
int (*deleteslave_sub) (struct block_list *bl, va_list ap);
int (*deleteslave) (struct mob_data *md);
- int (*respawn) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*respawn) (int tid, int64 tick, int id, intptr_t data);
void (*log_damage) (struct mob_data *md, struct block_list *src, int damage);
void (*damage) (struct mob_data *md, struct block_list *src, int damage);
int (*dead) (struct mob_data *md, struct block_list *src, int type);
@@ -334,8 +334,8 @@ struct mob_interface {
struct block_list* (*getmasterhpltmaxrate) (struct mob_data *md, int rate);
int (*getfriendstatus_sub) (struct block_list *bl, va_list ap);
struct mob_data* (*getfriendstatus) (struct mob_data *md, int cond1, int cond2);
- int (*skill_use) (struct mob_data *md, unsigned int tick, int event);
- int (*skill_event) (struct mob_data *md, struct block_list *src, unsigned int tick, int flag);
+ int (*skill_use) (struct mob_data *md, int64 tick, int event);
+ int (*skill_event) (struct mob_data *md, struct block_list *src, int64 tick, int flag);
int (*is_clone) (int class_);
int (*clone_spawn) (struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, int mode, int flag, unsigned int duration);
int (*clone_delete) (struct mob_data *md);
diff --git a/src/map/npc.c b/src/map/npc.c
index e4416c19f..ff95cf82d 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -215,7 +215,7 @@ struct npc_data* npc_name2id(const char* name)
/**
* Timer to check for idle time and timeout the dialog if necessary
**/
-int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int npc_rr_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
#ifdef SECURE_NPCTIMEOUT
struct map_session_data* sd = NULL;
unsigned int timeout = NPC_SECURE_TIMEOUT_NEXT;
@@ -394,8 +394,7 @@ int npc_event_doall(const char* name)
* Clock event execution
* OnMinute/OnClock/OnHour/OnDay/OnDDHHMM
*------------------------------------------*/
-int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data)
-{
+int npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) {
static struct tm ev_tm_b; // tracks previous execution time
time_t clock;
struct tm* t;
@@ -493,9 +492,9 @@ struct timer_event_data {
/*==========================================
* triger 'OnTimerXXXX' events
*------------------------------------------*/
-int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
+int npc_timerevent(int tid, int64 tick, int id, intptr_t data) {
int old_rid, old_timer;
- unsigned int old_tick;
+ int64 old_tick;
struct npc_data* nd=(struct npc_data *)map->id2bl(id);
struct npc_timerevent_list *te;
struct timer_event_data *ted = (struct timer_event_data*)data;
@@ -529,8 +528,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
ted->next++;
if( nd->u.scr.timeramount > ted->next )
{
- int next;
- next = nd->u.scr.timer_event[ ted->next ].timer - nd->u.scr.timer_event[ ted->next - 1 ].timer;
+ int 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 = timer->add(tick+next,npc->timerevent,id,(intptr_t)ted);
@@ -564,7 +562,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
*------------------------------------------*/
int npc_timerevent_start(struct npc_data* nd, int rid) {
int j;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
struct map_session_data *sd = NULL; //Player to whom script is attached.
nullpo_ret(nd);
@@ -642,7 +640,7 @@ int npc_timerevent_stop(struct npc_data* nd)
if( !sd && nd->u.scr.timertick )
{
- nd->u.scr.timer += DIFF_TICK(timer->gettick(),nd->u.scr.timertick); // Set 'timer' to the time that has passed since the beginning of the timers
+ nd->u.scr.timer += DIFF_TICK32(timer->gettick(),nd->u.scr.timertick); // Set 'timer' to the time that has passed since the beginning of the timers
nd->u.scr.timertick = 0; // Set 'tick' to zero so that we know it's off.
}
@@ -688,7 +686,7 @@ void npc_timerevent_quit(struct map_session_data* sd)
if( ev )
{
int old_rid,old_timer;
- unsigned int old_tick;
+ int64 old_tick;
//Set timer related info.
old_rid = (nd->u.scr.rid == sd->bl.id ? 0 : nd->u.scr.rid); // Detach rid if the last attached player logged off.
@@ -715,9 +713,8 @@ void npc_timerevent_quit(struct map_session_data* sd)
* Get the tick value of an NPC timer
* If it's stopped, return stopped time
*------------------------------------------*/
-int npc_gettimerevent_tick(struct npc_data* nd)
-{
- int tick;
+int64 npc_gettimerevent_tick(struct npc_data* nd) {
+ int64 tick;
nullpo_ret(nd);
// TODO: Get player attached timer's tick. Now we can just get it by using 'getnpctimer' inside OnTimer event.
diff --git a/src/map/npc.h b/src/map/npc.h
index f809cb19c..e1ec6e5e4 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -35,7 +35,7 @@ struct npc_data {
char exname[NAME_LENGTH+1];// unique npc name
int chat_id;
int touching_id;
- unsigned int next_walktime;
+ int64 next_walktime;
uint8 dir;
unsigned size : 2;
@@ -54,7 +54,7 @@ struct npc_data {
short xs,ys; // OnTouch area radius
int guild_id;
int timer,timerid,timeramount,rid;
- unsigned int timertick;
+ int64 timertick;
struct npc_timerevent_list *timer_event;
int label_list_num;
struct npc_label_list *label_list;
@@ -160,14 +160,14 @@ struct npc_interface {
int (*event_do) (const char *name);
int (*event_doall_id) (const char *name, int rid);
int (*event_doall) (const char *name);
- int (*event_do_clock) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*event_do_clock) (int tid, int64 tick, int id, intptr_t data);
void (*event_do_oninit) (void);
int (*timerevent_export) (struct npc_data *nd, int i);
- int (*timerevent) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*timerevent) (int tid, int64 tick, int id, intptr_t data);
int (*timerevent_start) (struct npc_data *nd, int rid);
int (*timerevent_stop) (struct npc_data *nd);
void (*timerevent_quit) (struct map_session_data *sd);
- int (*gettimerevent_tick) (struct npc_data *nd);
+ int64 (*gettimerevent_tick) (struct npc_data *nd);
int (*settimerevent_tick) (struct npc_data *nd, int newtimer);
int (*event) (struct map_session_data *sd, const char *eventname, int ontouch);
int (*touch_areanpc_sub) (struct block_list *bl, va_list ap);
@@ -229,7 +229,7 @@ struct npc_interface {
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
- int (*secure_timeout_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*secure_timeout_timer) (int tid, int64 tick, int id, intptr_t data);
};
struct npc_interface *npc;
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 9d7282c92..813aebee0 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -9,12 +9,6 @@
#include "../common/mmo.h"
/**
- * structs for data
- */
-struct EQUIPSLOTINFO {
- unsigned short card[4];
-};
-/**
*
**/
enum packet_headers {
@@ -111,12 +105,161 @@ enum packet_headers {
#else
dropflooritemType = 0x9e,
#endif
+#if PACKETVER >= 20120925
+ inventorylistnormalType = 0x991,
+#elif PACKETVER >= 20080102
+ inventorylistnormalType = 0x2e8,
+#elif PACKETVER >= 20071002
+ inventorylistnormalType = 0x1ee,
+#else
+ inventorylistnormalType = 0xa3,
+#endif
+#if PACKETVER >= 20120925
+ inventorylistequipType = 0x992,
+#elif PACKETVER >= 20080102
+ inventorylistequipType = 0x2d0,
+#elif PACKETVER >= 20071002
+ inventorylistequipType = 0x295,
+#else
+ inventorylistequipType = 0xa4,
+#endif
+#if PACKETVER >= 20120925
+ storagelistnormalType = 0x995,
+#elif PACKETVER >= 20080102
+ storagelistnormalType = 0x2ea,
+#elif PACKETVER >= 20071002
+ storagelistnormalType = 0x295,
+#else
+ storagelistnormalType = 0xa5,
+#endif
+#if PACKETVER >= 20120925
+ storagelistequipType = 0x996,
+#elif PACKETVER >= 20080102
+ storagelistequipType = 0x2d1,
+#elif PACKETVER >= 20071002
+ storagelistequipType = 0x296,
+#else
+ storagelistequipType = 0xa6,
+#endif
+#if PACKETVER >= 20120925
+ cartlistnormalType = 0x993,
+#elif PACKETVER >= 20080102
+ cartlistnormalType = 0x2e9,
+#elif PACKETVER >= 20071002
+ cartlistnormalType = 0x1ef,
+#else
+ cartlistnormalType = 0x123,
+#endif
+#if PACKETVER >= 20120925
+ cartlistequipType = 0x994,
+#elif PACKETVER >= 20080102
+ cartlistequipType = 0x2d2,
+#elif PACKETVER >= 20071002
+ cartlistequipType = 0x297,
+#else
+ cartlistequipType = 0x122,
+#endif
+#if PACKETVER >= 20120925
+ equipitemType = 0x998,
+#else
+ equipitemType = 0xa9,
+#endif
+#if PACKETVER >= 20120925
+ equipitemackType = 0x999,
+#else
+ equipitemackType = 0xaa,
+#endif
+#if PACKETVER >= 20120925
+ unequipitemackType = 0x99a,
+#else
+ unequipitemackType = 0xac,
+#endif
+#if PACKETVER >= 20120925
+ viewequipackType = 0x997,
+#elif PACKETVER >= 20101124
+ viewequipackType = 0x859,
+#else
+ viewequipackType = 0x2d7,
+#endif
monsterhpType = 0x977,
maptypeproperty2Type = 0x99b,
};
#pragma pack(push, 1)
+/**
+ * structs for data
+ */
+struct EQUIPSLOTINFO {
+ unsigned short card[4];
+} __attribute__((packed));
+
+struct NORMALITEM_INFO {
+ short index;
+ unsigned short ITID;
+ unsigned char type;
+#if PACKETVER < 20120925
+ uint8 IsIdentified;
+#endif
+ short count;
+#if PACKETVER >= 20120925
+ unsigned int WearState;
+#else
+ unsigned short WearState;
+#endif
+#if PACKETVER >= 5
+ struct EQUIPSLOTINFO slot;
+#endif
+#if PACKETVER >= 20080102
+ int HireExpireDate;
+#endif
+#if PACKETVER >= 20120925
+ struct {
+ unsigned char IsIdentified : 1;
+ unsigned char PlaceETCTab : 1;
+ unsigned char SpareBits : 6;
+ } Flag;
+#endif
+} __attribute__((packed));
+
+struct EQUIPITEM_INFO {
+ short index;
+ unsigned short ITID;
+ unsigned char type;
+#if PACKETVER < 20120925
+ uint8 IsIdentified;
+#endif
+#if PACKETVER >= 20120925
+ unsigned int location;
+ unsigned int WearState;
+#else
+ unsigned short location;
+ unsigned short WearState;
+#endif
+#if PACKETVER < 20120925
+ uint8 IsDamaged;
+#endif
+ unsigned char RefiningLevel;
+ struct EQUIPSLOTINFO slot;
+#if PACKETVER >= 20071002
+ int HireExpireDate;
+#endif
+#if PACKETVER >= 20080102
+ unsigned short bindOnEquipType;
+#endif
+#if PACKETVER >= 20100629
+ unsigned short wItemSpriteNumber;
+#endif
+#if PACKETVER >= 20120925
+ struct {
+ unsigned char IsIdentified : 1;
+ unsigned char IsDamaged : 1;
+ unsigned char PlaceETCTab : 1;
+ unsigned char SpareBits : 5;
+ } Flag;
+#endif
+} __attribute__((packed));
+
struct packet_authok {
short PacketType;
unsigned int startTime;
@@ -147,8 +290,8 @@ struct packet_additem {
unsigned short Index;
unsigned short count;
unsigned short nameid;
- bool IsIdentified;
- bool IsDamaged;
+ uint8 IsIdentified;
+ uint8 IsDamaged;
unsigned char refiningLevel;
struct EQUIPSLOTINFO slot;
#if PACKETVER >= 20120925
@@ -173,7 +316,7 @@ struct packet_dropflooritem {
#if PACKETVER >= 20130000 /* not sure date */
unsigned short type;
#endif
- bool IsIdentified;
+ uint8 IsIdentified;
short xPos;
short yPos;
unsigned char subX;
@@ -205,7 +348,7 @@ struct packet_idle_unit2 {
short GEmblemVer;
short honor;
short virtue;
- bool isPKModeON;
+ uint8 isPKModeON;
unsigned char sex;
unsigned char PosDir[3];
unsigned char xSize;
@@ -233,7 +376,7 @@ struct packet_spawn_unit2 {
short headpalette;
short bodypalette;
short headDir;
- bool isPKModeON;
+ uint8 isPKModeON;
unsigned char sex;
unsigned char PosDir[3];
unsigned char xSize;
@@ -282,7 +425,7 @@ struct packet_spawn_unit {
#else
short virtue;
#endif
- bool isPKModeON;
+ uint8 isPKModeON;
unsigned char sex;
unsigned char PosDir[3];
unsigned char xSize;
@@ -343,7 +486,7 @@ struct packet_unit_walking {
#else
short virtue;
#endif
- bool isPKModeON;
+ uint8 isPKModeON;
unsigned char sex;
unsigned char MoveData[6];
unsigned char xSize;
@@ -401,7 +544,7 @@ struct packet_idle_unit {
#else
short virtue;
#endif
- bool isPKModeON;
+ uint8 isPKModeON;
unsigned char sex;
unsigned char PosDir[3];
unsigned char xSize;
@@ -578,6 +721,90 @@ struct packet_banking_withdraw_ack {
int Balance;
} __attribute__((packed));
+struct packet_itemlist_normal {
+ short PacketType;
+ short PacketLength;
+ struct NORMALITEM_INFO list[MAX_ITEMLIST];
+} __attribute__((packed));
+
+struct packet_itemlist_equip {
+ short PacketType;
+ short PacketLength;
+ struct EQUIPITEM_INFO list[MAX_ITEMLIST];
+} __attribute__((packed));
+
+struct packet_storelist_normal {
+ short PacketType;
+ short PacketLength;
+#if PACKETVER >= 20120925
+ char name[NAME_LENGTH];
+#endif
+ struct NORMALITEM_INFO list[MAX_ITEMLIST];
+} __attribute__((packed));
+
+struct packet_storelist_equip {
+ short PacketType;
+ short PacketLength;
+#if PACKETVER >= 20120925
+ char name[NAME_LENGTH];
+#endif
+ struct EQUIPITEM_INFO list[MAX_ITEMLIST];
+} __attribute__((packed));
+
+struct packet_equip_item {
+ short PacketType;
+ unsigned short index;
+#if PACKETVER >= 20120925
+ unsigned int wearLocation;
+#else
+ unsigned short wearLocation;
+#endif
+} __attribute__((packed));
+
+struct packet_equipitem_ack {
+ short PacketType;
+ unsigned short index;
+#if PACKETVER >= 20120925
+ unsigned int wearLocation;
+#else
+ unsigned short wearLocation;
+#endif
+#if PACKETVER >= 20100629
+ unsigned short wItemSpriteNumber;
+#endif
+ unsigned char result;
+} __attribute__((packed));
+
+struct packet_unequipitem_ack {
+ short PacketType;
+ unsigned short index;
+#if PACKETVER >= 20120925
+ unsigned int wearLocation;
+#else
+ unsigned short wearLocation;
+#endif
+ unsigned char result;
+} __attribute__((packed));
+
+struct packet_viewequip_ack {
+ short PacketType;
+ short PacketLength;
+ char characterName[NAME_LENGTH];
+ short job;
+ short head;
+ short accessory;
+ short accessory2;
+ short accessory3;
+#if PACKETVER >= 20101124
+ short robe;
+#endif
+ short headpalette;
+ short bodypalette;
+ unsigned char sex;
+ struct EQUIPITEM_INFO list[MAX_INVENTORY];
+} __attribute__((packed));
+
+
#pragma pack(pop)
#endif /* _PACKETS_STRUCT_H_ */
diff --git a/src/map/party.c b/src/map/party.c
index 904110452..ab05c23f7 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -831,8 +831,7 @@ int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id
return 0;
}
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
struct party_data* p;
DBIterator *iter = db_iterator(party->db);
diff --git a/src/map/party.h b/src/map/party.h
index 208edb846..ab14d1a31 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -123,7 +123,7 @@ struct party_interface {
/* */
int (*vforeachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range, va_list ap);
int (*foreachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
- int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*send_xy_timer) (int tid, int64 tick, int id, intptr_t data);
void (*fill_member) (struct party_member* member, struct map_session_data* sd, unsigned int leader);
TBL_PC* (*sd_check) (int party_id, int account_id, int char_id);
void (*check_state) (struct party_data *p);
diff --git a/src/map/pc.c b/src/map/pc.c
index b39ae1c59..0244c6c84 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -117,7 +117,7 @@ bool pc_should_log_commands(struct map_session_data *sd)
return pc_group_should_log_commands(sd->group);
}
-int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL || sd->bl.type!=BL_PC )
@@ -155,7 +155,7 @@ void pc_delinvincibletimer(struct map_session_data* sd)
}
}
-int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
int i;
@@ -419,7 +419,7 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
/*==========================================
Rental System
*------------------------------------------*/
-int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
if( sd == NULL )
return 0;
@@ -443,11 +443,24 @@ int pc_inventory_rental_clear(struct map_session_data *sd)
return 1;
}
-
+/* assumes i is valid (from default areas where it is called, it is) */
+void pc_rental_expire(struct map_session_data *sd, int i) {
+ short nameid = sd->status.inventory[i].nameid;
+
+ /* Soon to be dropped, we got plans to integrate it with item db */
+ switch( nameid ) {
+ case ITEMID_REINS_OF_MOUNT:
+ status_change_end(&sd->bl,SC_ALL_RIDING,INVALID_TIMER);
+ break;
+ }
+
+ clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
+ pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
+}
void pc_inventory_rentals(struct map_session_data *sd)
{
int i, c = 0;
- unsigned int expire_tick, next_tick = UINT_MAX;
+ int64 expire_tick, next_tick = INT64_MAX;
for( i = 0; i < MAX_INVENTORY; i++ )
{ // Check for Rentals on Inventory
@@ -457,14 +470,9 @@ void pc_inventory_rentals(struct map_session_data *sd)
continue;
if( sd->status.inventory[i].expire_time <= time(NULL) ) {
- if( sd->status.inventory[i].nameid == ITEMID_REINS_OF_MOUNT
- && sd->sc.data[SC_ALL_RIDING] ) {
- status_change_end(&sd->bl,SC_ALL_RIDING,INVALID_TIMER);
- }
- clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
- pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
+ pc->rental_expire(sd,i);
} else {
- expire_tick = (unsigned int)(sd->status.inventory[i].expire_time - time(NULL)) * 1000;
+ expire_tick = (int64)(sd->status.inventory[i].expire_time - time(NULL)) * 1000;
clif->rental_time(sd->fd, sd->status.inventory[i].nameid, (int)(expire_tick / 1000));
next_tick = min(expire_tick, next_tick);
c++;
@@ -611,6 +619,8 @@ int pc_equippoint(struct map_session_data *sd,int n)
if(ep == EQP_HAND_R && (pc->checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
return EQP_ARMS;
+ if( ep == EQP_SHADOW_SHIELD )/* are there conditions for those? */
+ return EQP_SHADOW_WEAPON|EQP_SHADOW_SHIELD;
}
return ep;
}
@@ -927,7 +937,7 @@ int pc_isequip(struct map_session_data *sd,int n)
*------------------------------------------*/
bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) {
int i;
- unsigned long tick = timer->gettick();
+ int64 tick = timer->gettick();
uint32 ip = session[sd->fd]->client_addr;
sd->login_id2 = login_id2;
@@ -1267,8 +1277,6 @@ int pc_reg_received(struct map_session_data *sd)
clif->pLoadEndAck(sd->fd, sd);
}
- pc->inventory_rentals(sd);
-
if( sd->sc.option & OPTION_INVISIBLE ) {
sd->vd.class_ = INVISIBLE_CLASS;
clif->message(sd->fd, msg_txt(11)); // Invisible: On
@@ -1971,7 +1979,7 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
return 0;
}
-int pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_endautobonus(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
struct s_autobonus *autobonus = (struct s_autobonus *)data;
@@ -3927,8 +3935,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
/* rental item check */
if( item_data->expire_time ) {
if( time(NULL) > item_data->expire_time ) {
- clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
- pc->delitem(sd, i, sd->status.inventory[i].amount, 1, 0, LOG_TYPE_OTHER);
+ pc->rental_expire(sd,i);
} else {
int seconds = (int)( item_data->expire_time - time(NULL) );
clif->rental_time(sd->fd, sd->status.inventory[i].nameid, seconds);
@@ -4026,7 +4033,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
{
int flag=0;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
struct map_session_data *first_sd = NULL,*second_sd = NULL,*third_sd = NULL;
struct party_data *p=NULL;
@@ -4276,7 +4283,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
* 1 = success
*------------------------------------------*/
int pc_useitem(struct map_session_data *sd,int n) {
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
int amount, nameid, i;
struct script_code *item_script;
@@ -4343,7 +4350,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if( i < MAX_ITEMDELAYS ) {
if( sd->item_delay[i].nameid ) {// found
if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) {
- int e_tick = DIFF_TICK(sd->item_delay[i].tick, tick)/1000;
+ int e_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick)/1000);
clif->msgtable_num(sd->fd, 0x746, e_tick + 1); // [%d] seconds left until you can use
return 0; // Delay has not expired yet
}
@@ -5642,7 +5649,7 @@ const char* job_name(int class_)
}
}
-int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_follow_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
struct block_list *tbl;
@@ -6600,7 +6607,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.
}
-int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
if( sd != NULL )
{
@@ -6647,7 +6654,7 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h
*------------------------------------------*/
int pc_dead(struct map_session_data *sd,struct block_list *src) {
int i=0,j=0,k=0;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
for(k = 0; k < 5; k++)
if (sd->devotion[k]){
@@ -8250,7 +8257,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v
/*==========================================
* Exec eventtimer for player sd (retrieved from map_session (id))
*------------------------------------------*/
-int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_eventtimer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
char *p = (char *)data;
int i;
@@ -8526,13 +8533,13 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
nullpo_ret(sd);
if( n < 0 || n >= MAX_INVENTORY ) {
- clif->equipitemack(sd,0,0,0);
+ clif->equipitemack(sd,0,0,EIA_FAIL);
return 0;
}
if( DIFF_TICK(sd->canequip_tick,timer->gettick()) > 0 )
{
- clif->equipitemack(sd,n,0,0);
+ clif->equipitemack(sd,n,0,EIA_FAIL);
return 0;
}
@@ -8543,13 +8550,13 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
ShowInfo("equip %d(%d) %x:%x\n",sd->status.inventory[n].nameid,n,id?id->equip:0,req_pos);
if(!pc->isequip(sd,n) || !(pos&req_pos) || sd->status.inventory[n].equip != 0 || sd->status.inventory[n].attribute==1 ) { // [Valaris]
// FIXME: pc->isequip: equip level failure uses 2 instead of 0
- clif->equipitemack(sd,n,0,0); // fail
+ clif->equipitemack(sd,n,0,EIA_FAIL); // fail
return 0;
}
if (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAY_NIGHT_FEVER])
{
- clif->equipitemack(sd,n,0,0); // fail
+ clif->equipitemack(sd,n,0,EIA_FAIL); // fail
return 0;
}
@@ -8589,7 +8596,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
clif->arrow_fail(sd,3);
}
else
- clif->equipitemack(sd,n,pos,1);
+ clif->equipitemack(sd,n,pos,EIA_SUCCESS);
sd->status.inventory[n].equip=pos;
@@ -8738,20 +8745,20 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
nullpo_ret(sd);
if( n < 0 || n >= MAX_INVENTORY ) {
- clif->unequipitemack(sd,0,0,0);
+ clif->unequipitemack(sd,0,0,UIA_FAIL);
return 0;
}
// if player is berserk then cannot unequip
if (!(flag & 2) && sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAY_NIGHT_FEVER]))
{
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
if( !(flag&2) && sd->sc.count && sd->sc.data[SC_KYOUGAKU] )
{
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
@@ -8759,7 +8766,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
ShowInfo("unequip %d %x:%x\n",n,pc->equippoint(sd,n),sd->status.inventory[n].equip);
if(!sd->status.inventory[n].equip){ //Nothing to unequip
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
for(i=0;i<EQI_MAX;i++) {
@@ -8821,7 +8828,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
}
- clif->unequipitemack(sd,n,sd->status.inventory[n].equip,1);
+ clif->unequipitemack(sd,n,sd->status.inventory[n].equip,UIA_SUCCESS);
if((sd->status.inventory[n].equip & EQP_ARMS) &&
sd->weapontype1 == 0 && sd->weapontype2 == 0 && (!sd->sc.data[SC_TK_SEVENWIND] || sd->sc.data[SC_ASPERSIO])) //Check for seven wind (but not level seven!)
@@ -9011,7 +9018,7 @@ int pc_calc_pvprank(struct map_session_data *sd) {
/*==========================================
* Calculate next sd ranking calculation from config
*------------------------------------------*/
-int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
sd=map->id2sd(id);
@@ -9224,10 +9231,9 @@ int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
}
/*==========================================
- * Save 1 player data at autosave intervalle
+ * Save 1 player data at autosave intervall
*------------------------------------------*/
-int pc_autosave(int tid, unsigned int tick, int id, intptr_t data)
-{
+int pc_autosave(int tid, int64 tick, int id, intptr_t data) {
int interval;
struct s_mapiterator* iter;
struct map_session_data* sd;
@@ -9278,7 +9284,7 @@ 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_t data) {
+int map_day_timer(int tid, int64 tick, int id, intptr_t data) {
char tmp_soutput[1024];
if (data == 0 && battle_config.day_duration <= 0) // if we want a day
@@ -9298,7 +9304,7 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr_t 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_t data) {
+int map_night_timer(int tid, int64 tick, int id, intptr_t data) {
char tmp_soutput[1024];
if (data == 0 && battle_config.night_duration <= 0) // if we want a night
@@ -9370,7 +9376,7 @@ bool pc_can_use_command(struct map_session_data *sd, const char *command) {
return atcommand->can_use(sd,command);
}
-int pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_charm_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
int i, type;
@@ -10131,6 +10137,10 @@ void pc_bank_withdraw(struct map_session_data *sd, int money) {
clif->bank_withdraw(sd,BWA_SUCCESS);
}
}
+/* status change data arrived from char-server */
+void pc_scdata_received(struct map_session_data *sd) {
+ pc->inventory_rentals(sd);
+}
/*==========================================
* pc Init/Terminate
@@ -10458,4 +10468,7 @@ void pc_defaults(void) {
pc->bank_withdraw = pc_bank_withdraw;
pc->bank_deposit = pc_bank_deposit;
+
+ pc->rental_expire = pc_rental_expire;
+ pc->scdata_received = pc_scdata_received;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index ff6246b22..5f12052ca 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -48,6 +48,12 @@ enum equip_index {
EQI_COSTUME_LOW,
EQI_COSTUME_GARMENT,
EQI_AMMO,
+ EQI_SHADOW_ARMOR,
+ EQI_SHADOW_WEAPON,
+ EQI_SHADOW_SHIELD,
+ EQI_SHADOW_SHOES,
+ EQI_SHADOW_ACC_R,
+ EQI_SHADOW_ACC_L,
EQI_MAX
};
struct weapon_data {
@@ -171,6 +177,7 @@ struct map_session_data {
unsigned int workinprogress : 3; // 1 = disable skill/item, 2 = disable npc interaction, 3 = disable both
unsigned int hold_recalc : 1;
unsigned int snovice_call_flag : 3; //Summon Angel (stage 1~3)
+ unsigned int hpmeter_visible : 1;
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
@@ -210,10 +217,10 @@ struct map_session_data {
char npc_str[CHATBOX_SIZE]; // for passing npc input box text to script engine
int npc_timer_id; //For player attached npc timers. [Skotlex]
unsigned int chatID;
- time_t idletime;
- struct{
+ int64 idletime;
+ struct {
int npc_id;
- unsigned int timeout;
+ int64 timeout;
} progressbar; //Progress Bar [Inkfish]
struct{
char name[NAME_LENGTH];
@@ -229,17 +236,17 @@ struct map_session_data {
int cloneskill_id, reproduceskill_id;
int menuskill_id, menuskill_val, menuskill_val2;
int invincible_timer;
- unsigned int canlog_tick;
- unsigned int canuseitem_tick; // [Skotlex]
- unsigned int canusecashfood_tick;
- unsigned int canequip_tick; // [Inkfish]
- unsigned int cantalk_tick;
- unsigned int canskill_tick; // used to prevent abuse from no-delay ACT files
- unsigned int cansendmail_tick; // [Mail System Flood Protection]
- unsigned int ks_floodprotect_tick; // [Kill Steal Protection]
+ int64 canlog_tick;
+ int64 canuseitem_tick; // [Skotlex]
+ int64 canusecashfood_tick;
+ int64 canequip_tick; // [Inkfish]
+ int64 cantalk_tick;
+ int64 canskill_tick; /// used to prevent abuse from no-delay ACT files
+ int64 cansendmail_tick; /// Mail System Flood Protection
+ int64 ks_floodprotect_tick; /// [Kill Steal Protection]
struct {
short nameid;
- unsigned int tick;
+ int64 tick;
} item_delay[MAX_ITEMDELAYS]; // [Paradox924X]
short weapontype1,weapontype2;
short disguise; // [Valaris]
@@ -460,7 +467,7 @@ struct map_session_data {
* @info
* - It is updated on every NPC iteration as mentioned above
**/
- unsigned int npc_idle_tick;
+ int64 npc_idle_tick;
/* */
enum npc_timeout_type npc_idle_type;
#endif
@@ -485,7 +492,7 @@ struct map_session_data {
bool stealth;
unsigned char fontcolor;
unsigned int fontcolor_tid;
- unsigned int hchsysch_tick;
+ int64 hchsysch_tick;
/* [Ind/Hercules] */
struct sc_display_entry **sc_display;
@@ -526,21 +533,28 @@ struct map_session_data {
//Equip position constants
enum equip_pos {
- EQP_HEAD_LOW = 0x0001,
- EQP_HEAD_MID = 0x0200, //512
- EQP_HEAD_TOP = 0x0100, //256
- EQP_HAND_R = 0x0002, //2
- EQP_HAND_L = 0x0020, //32
- EQP_ARMOR = 0x0010, //16
- EQP_SHOES = 0x0040, //64
- EQP_GARMENT = 0x0004, //4
- EQP_ACC_L = 0x0008, //8
- EQP_ACC_R = 0x0080, //128
- EQP_COSTUME_HEAD_TOP = 0x0400, //1024
- EQP_COSTUME_HEAD_MID = 0x0800, //2048
- EQP_COSTUME_HEAD_LOW = 0x1000, //4096
- EQP_COSTUME_GARMENT = 0x2000, //8192
- EQP_AMMO = 0x8000, //32768
+ EQP_HEAD_LOW = 0x000001,
+ EQP_HEAD_MID = 0x000200, //512
+ EQP_HEAD_TOP = 0x000100, //256
+ EQP_HAND_R = 0x000002, //2
+ EQP_HAND_L = 0x000020, //32
+ EQP_ARMOR = 0x000010, //16
+ EQP_SHOES = 0x000040, //64
+ EQP_GARMENT = 0x000004, //4
+ EQP_ACC_L = 0x000008, //8
+ EQP_ACC_R = 0x000080, //128
+ EQP_COSTUME_HEAD_TOP = 0x000400, //1024
+ EQP_COSTUME_HEAD_MID = 0x000800, //2048
+ EQP_COSTUME_HEAD_LOW = 0x001000, //4096
+ EQP_COSTUME_GARMENT = 0x002000, //8192
+ //UNUSED_COSTUME_FLOOR = 0x004000, //16384
+ EQP_AMMO = 0x008000, //32768
+ EQP_SHADOW_ARMOR = 0x010000, //65536
+ EQP_SHADOW_WEAPON = 0x020000, //131072
+ EQP_SHADOW_SHIELD = 0x040000, //262144
+ EQP_SHADOW_SHOES = 0x080000, //524288
+ EQP_SHADOW_ACC_R = 0x100000, //1048576
+ EQP_SHADOW_ACC_L = 0x200000, //2097152
};
#define EQP_WEAPON EQP_HAND_R
@@ -695,7 +709,7 @@ enum { ADDITEM_EXIST , ADDITEM_NEW , ADDITEM_OVERAMOUNT };
* All cooldowns are reset when server is restarted.
**/
struct item_cd {
- unsigned int tick[MAX_ITEMDELAYS];//tick
+ int64 tick[MAX_ITEMDELAYS];//tick
short nameid[MAX_ITEMDELAYS];//skill id
};
@@ -796,7 +810,7 @@ struct pc_interface {
int (*addautobonus) (struct s_autobonus *bonus,char max,const char *bonus_script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned short pos,bool onskill);
int (*exeautobonus) (struct map_session_data* sd,struct s_autobonus *bonus);
- int (*endautobonus) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*endautobonus) (int tid, int64 tick, int id, intptr_t data);
int (*delautobonus) (struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore);
int (*bonus) (struct map_session_data *sd,int type,int val);
@@ -878,7 +892,7 @@ struct pc_interface {
int (*addeventtimercount) (struct map_session_data *sd,const char *name,int tick);
int (*calc_pvprank) (struct map_session_data *sd);
- int (*calc_pvprank_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*calc_pvprank_timer) (int tid, int64 tick, int id, intptr_t data);
int (*ismarried) (struct map_session_data *sd);
int (*marriage) (struct map_session_data *sd,struct map_session_data *dstsd);
@@ -909,8 +923,8 @@ struct pc_interface {
int (*set_hate_mob) (struct map_session_data *sd, int pos, struct block_list *bl);
int (*readdb) (void);
- 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]
+ int (*map_day_timer) (int tid, int64 tick, int id, intptr_t data); // by [yor]
+ int (*map_night_timer) (int tid, int64 tick, int id, intptr_t data); // by [yor]
// Rental System
void (*inventory_rentals) (struct map_session_data *sd);
int (*inventory_rental_clear) (struct map_session_data *sd);
@@ -934,10 +948,10 @@ struct pc_interface {
int (*level_penalty_mod) (int diff, unsigned char race, unsigned short mode, int type);
int (*calc_skillpoint) (struct map_session_data* sd);
- int (*invincible_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*spiritball_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*invincible_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*spiritball_timer) (int tid, int64 tick, int id, intptr_t data);
int (*check_banding) ( struct block_list *bl, va_list ap );
- int (*inventory_rental_end) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*inventory_rental_end) (int tid, int64 tick, int id, intptr_t data);
void (*check_skilltree) (struct map_session_data *sd, int skill_id);
int (*bonus_autospell) (struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id);
int (*bonus_autospell_onskill) (struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id);
@@ -945,16 +959,16 @@ struct pc_interface {
int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
int (*bonus_item_drop) (struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
void (*calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
- int (*respawn_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*respawn_timer) (int tid, int64 tick, int id, intptr_t data);
int (*jobchange_killclone) (struct block_list *bl, va_list ap);
int (*getstat) (struct map_session_data* sd, int type);
int (*setstat) (struct map_session_data* sd, int type, int val);
- int (*eventtimer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*eventtimer) (int tid, int64 tick, int id, intptr_t data);
int (*daynight_timer_sub) (struct map_session_data *sd,va_list ap);
- int (*charm_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*charm_timer) (int tid, int64 tick, int id, intptr_t data);
bool (*readdb_levelpenalty) (char* fields[], int columns, int current);
- int (*autosave) (int tid, unsigned int tick, int id, intptr_t data);
- int (*follow_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*autosave) (int tid, int64 tick, int id, intptr_t data);
+ int (*follow_timer) (int tid, int64 tick, int id, intptr_t data);
void (*read_skill_tree) (void);
int (*isUseitem) (struct map_session_data *sd,int n);
int (*show_steal) (struct block_list *bl,va_list ap);
@@ -964,6 +978,9 @@ struct pc_interface {
void (*bank_deposit) (struct map_session_data *sd, int money);
void (*bank_withdraw) (struct map_session_data *sd, int money);
+
+ void (*rental_expire) (struct map_session_data *sd, int i);
+ void (*scdata_received) (struct map_session_data *sd);
};
struct pc_interface *pc;
diff --git a/src/map/pet.c b/src/map/pet.c
index 023059a6b..7dcf06c02 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -186,7 +186,7 @@ int pet_sc_check(struct map_session_data *sd, int type)
return 0;
}
-int pet_hungry(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_hungry(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd;
struct pet_data *pd;
int interval;
@@ -656,7 +656,7 @@ int pet_equipitem(struct map_session_data *sd,int index) {
nameid = sd->status.inventory[index].nameid;
if(pd->petDB->AcceID == 0 || nameid != pd->petDB->AcceID || pd->pet.equip != 0) {
- clif->equipitemack(sd,0,0,0);
+ clif->equipitemack(sd,0,0,EIA_FAIL);
return 1;
}
@@ -666,7 +666,7 @@ int pet_equipitem(struct map_session_data *sd,int index) {
clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom);
if (battle_config.pet_equip_required) {
//Skotlex: start support timers if need
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
if (pd->s_skill && pd->s_skill->timer == INVALID_TIMER) {
if (pd->s_skill->id)
pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000, pet->skill_support_timer, sd->bl.id, 0);
@@ -771,8 +771,7 @@ int pet_food(struct map_session_data *sd, struct pet_data *pd)
return 0;
}
-int pet_randomwalk(struct pet_data *pd,unsigned int tick)
-{
+int pet_randomwalk(struct pet_data *pd, int64 tick) {
nullpo_ret(pd);
Assert((pd->msd == 0) || (pd->msd->pd == pd));
@@ -812,8 +811,7 @@ int pet_randomwalk(struct pet_data *pd,unsigned int tick)
return 0;
}
-int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned int tick)
-{
+int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) {
struct block_list *target = NULL;
if(pd->bl.prev == NULL || sd == NULL || sd->bl.prev == NULL)
@@ -924,16 +922,15 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned i
return 0;
}
-int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
-{
- unsigned int tick = va_arg(ap,unsigned int);
+int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap) {
+ int64 tick = va_arg(ap,int64);
if(sd->status.pet_id && sd->pd)
pet->ai_sub_hard(sd->pd,sd,tick);
return 0;
}
-int pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_ai_hard(int tid, int64 tick, int id, intptr_t data) {
map->foreachpc(pet->ai_sub_foreachclient,tick);
return 0;
@@ -966,7 +963,7 @@ int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
return 0;
}
-int pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
struct item_drop_list *list;
struct item_drop *ditem, *ditem_prev;
list=(struct item_drop_list *)data;
@@ -1034,7 +1031,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_t data) {
+int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
int bonus;
@@ -1075,7 +1072,7 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) {
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
*------------------------------------------*/
-int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1102,7 +1099,7 @@ int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
return 0;
}
-int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_heal_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct status_data *st;
struct pet_data *pd;
@@ -1139,7 +1136,7 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
/*==========================================
* pet support skills [Skotlex]
*------------------------------------------*/
-int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
struct status_data *st;
diff --git a/src/map/pet.h b/src/map/pet.h
index 2f8e0b7c2..f95e860a2 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -86,7 +86,7 @@ struct pet_data {
unsigned skillbonus : 1;
} state;
int move_fail_count;
- unsigned int next_walktime,last_thinktime;
+ int64 next_walktime, last_thinktime;
short rate_fix; //Support rate as modified by intimacy (1000 = 100%) [Skotlex]
struct pet_recovery* recovery;
@@ -116,7 +116,7 @@ struct pet_interface {
int (*attackskill) (struct pet_data *pd, int target_id);
int (*target_check) (struct map_session_data *sd, struct block_list *bl, int type);
int (*sc_check) (struct map_session_data *sd, int type);
- int (*hungry) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*hungry) (int tid, int64 tick, int id, intptr_t data);
int (*search_petDB_index) (int key, int type);
int (*hungry_timer_delete) (struct pet_data *pd);
int (*performance) (struct map_session_data *sd, struct pet_data *pd);
@@ -135,16 +135,16 @@ struct pet_interface {
int (*change_name) (struct map_session_data *sd, char *name);
int (*change_name_ack) (struct map_session_data *sd, char *name, int flag);
int (*equipitem) (struct map_session_data *sd, int index);
- int (*randomwalk) (struct pet_data *pd, unsigned int tick);
- int (*ai_sub_hard) (struct pet_data *pd, struct map_session_data *sd, unsigned int tick);
+ int (*randomwalk) (struct pet_data *pd, int64 tick);
+ int (*ai_sub_hard) (struct pet_data *pd, struct map_session_data *sd, int64 tick);
int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
- int (*ai_hard) (int tid, unsigned int tick, int id, intptr_t data);
- int (*delay_item_drop) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_hard) (int tid, int64 tick, int id, intptr_t data);
+ int (*delay_item_drop) (int tid, int64 tick, int id, intptr_t data);
int (*lootitem_drop) (struct pet_data *pd, struct map_session_data *sd);
- int (*skill_bonus_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*recovery_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*heal_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*skill_support_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*skill_bonus_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*recovery_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*heal_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*skill_support_timer) (int tid, int64 tick, int id, intptr_t data);
int (*read_db) ();
};
diff --git a/src/map/script.c b/src/map/script.c
index c1281bf59..2a83f3918 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3184,7 +3184,7 @@ void script_stop_instances(struct script_code *code) {
/*==========================================
* Timer function for sleep
*------------------------------------------*/
-int run_script_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int run_script_timer(int tid, int64 tick, int id, intptr_t data) {
struct script_state *st = idb_get(script->st_db,(int)data);
if( st ) {
TBL_PC *sd = map->id2sd(st->rid);
@@ -7993,7 +7993,7 @@ BUILDIN(gettimetick) { /* Asgard Version */
case 0:
default:
//type 0:(System Ticks)
- script_pushint(st,timer->gettick());
+ script_pushint(st,(int)timer->gettick()); // TODO: change this to int64 when we'll support 64 bit script values
break;
}
return true;
@@ -8821,7 +8821,7 @@ BUILDIN(getnpctimer) {
}
switch( type ) {
- case 0: val = npc->gettimerevent_tick(nd); break;
+ case 0: val = (int)npc->gettimerevent_tick(nd); break; // FIXME: change this to int64 when we'll support 64 bit script values
case 1:
if( nd->u.scr.rid ) {
sd = map->id2sd(nd->u.scr.rid);
@@ -9505,7 +9505,7 @@ BUILDIN(getstatus)
if( td ) {
// return the amount of time remaining
- script_pushint(st, td->tick - timer->gettick());
+ script_pushint(st, (int)(td->tick - timer->gettick())); // TODO: change this to int64 when we'll support 64 bit script values
}
}
break;
@@ -10201,6 +10201,7 @@ BUILDIN(getmapflag)
case MF_BATTLEGROUND: script_pushint(st,map->list[m].flag.battleground); break;
case MF_RESET: script_pushint(st,map->list[m].flag.reset); break;
case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break;
+ case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break;
}
}
@@ -10317,6 +10318,7 @@ BUILDIN(setmapflag) {
case MF_BATTLEGROUND: map->list[m].flag.battleground = (val <= 0 || val > 2) ? 1 : val; break;
case MF_RESET: map->list[m].flag.reset = 1; break;
case MF_NOTOMB: map->list[m].flag.notomb = 1; break;
+ case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break;
}
}
@@ -10402,6 +10404,7 @@ BUILDIN(removemapflag) {
case MF_BATTLEGROUND: map->list[m].flag.battleground = 0; break;
case MF_RESET: map->list[m].flag.reset = 0; break;
case MF_NOTOMB: map->list[m].flag.notomb = 0; break;
+ case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 0; break;
}
}
@@ -12685,7 +12688,7 @@ BUILDIN(summon)
const char *str,*event="";
TBL_PC *sd;
struct mob_data *md;
- int tick = timer->gettick();
+ int64 tick = timer->gettick();
sd=script->rid2sd(st);
if (!sd) return true;
@@ -14012,7 +14015,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
if( SQL_ERROR == SQL->QueryStr(handle, query) ) {
Sql_ShowDebug(handle);
- script_pushint(st, 0);
+ st->state = END;
return false;
}
@@ -14540,7 +14543,7 @@ BUILDIN(checkidle) {
sd = script->rid2sd(st);
if (sd)
- script_pushint(st, DIFF_TICK(last_tick, sd->idletime));
+ script_pushint(st, DIFF_TICK32(last_tick, sd->idletime)); // TODO: change this to int64 when we'll support 64 bit script values
else
script_pushint(st, 0);
diff --git a/src/map/script.h b/src/map/script.h
index c00086ef9..c6cb6070b 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -287,7 +287,8 @@ enum {
MF_PVP_NOCALCRANK, //50
MF_BATTLEGROUND,
MF_RESET,
- MF_NOTOMB
+ MF_NOTOMB,
+ MF_NOCASHSHOP
};
/**
@@ -535,7 +536,7 @@ struct script_interface {
void (*label_add)(int key, int pos);
void (*run) (struct script_code *rootscript,int pos,int rid,int oid);
void (*run_main) (struct script_state *st);
- int (*run_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*run_timer) (int tid, int64 tick, int id, intptr_t data);
int (*set_var) (struct map_session_data *sd, char *name, void *val);
void (*stop_instances) (struct script_code *code);
void (*free_code) (struct script_code* code);
diff --git a/src/map/skill.c b/src/map/skill.c
index 36a509876..b70e58c46 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -639,7 +639,7 @@ struct s_skill_unit_layout* skill_get_unit_layout (uint16 skill_id, uint16 skill
/*==========================================
*
*------------------------------------------*/
-int skill_additional_effect(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, unsigned int tick) {
+int skill_additional_effect(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick) {
struct map_session_data *sd, *dstsd;
struct mob_data *md, *dstmd;
struct status_data *sstatus, *tstatus;
@@ -1569,7 +1569,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
return 0;
}
-int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, unsigned int tick) {
+int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) {
int temp, skill_lv, i, type, notok;
struct block_list *tbl;
@@ -1667,7 +1667,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
* type of skills, so not every instance of skill->additional_effect needs a call
* to this one.
*/
-int skill_counter_additional_effect(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, unsigned int tick) {
+int skill_counter_additional_effect(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) {
int rate;
struct map_session_data *sd=NULL;
struct map_session_data *dstsd=NULL;
@@ -2109,7 +2109,7 @@ int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type)
* flag&0x2000 is used to signal that the skill_lv should be passed as -1 to the
* client (causes player characters to not scream skill name)
*-------------------------------------------------------------------------*/
-int skill_attack (int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct Damage dmg;
struct status_data *sstatus, *tstatus;
struct status_change *sc;
@@ -2357,7 +2357,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
break;
} //Switch End
if (flag) { //Possible to chain
- if ( (flag = DIFF_TICK(sd->ud.canact_tick, tick)) < 50 ) flag = 50;/* less is a waste. */
+ if ( (flag = DIFF_TICK32(sd->ud.canact_tick, tick)) < 50 ) flag = 50;/* less is a waste. */
sc_start2(src,SC_COMBOATTACK,100,skill_id,bl->id,flag);
clif->combo_delay(src, flag);
}
@@ -2767,21 +2767,21 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
* Checking bl battle flag and display dammage
* then call func with source,target,skill_id,skill_lv,tick,flag
*------------------------------------------*/
-int skill_area_sub (struct block_list *bl, va_list ap) {
+int skill_area_sub(struct block_list *bl, va_list ap) {
struct block_list *src;
uint16 skill_id,skill_lv;
int flag;
- unsigned int tick;
+ int64 tick;
SkillFunc func;
nullpo_ret(bl);
- src=va_arg(ap,struct block_list *);
- skill_id=va_arg(ap,int);
- skill_lv=va_arg(ap,int);
- tick=va_arg(ap,unsigned int);
- flag=va_arg(ap,int);
- func=va_arg(ap,SkillFunc);
+ src = va_arg(ap,struct block_list *);
+ skill_id = va_arg(ap,int);
+ skill_lv = va_arg(ap,int);
+ tick = va_arg(ap,int64);
+ flag = va_arg(ap,int);
+ func = va_arg(ap,SkillFunc);
if(battle->check_target(src,bl,flag) > 0) {
// several splash skills need this initial dummy packet to display correctly
@@ -3036,14 +3036,14 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
/*==========================================
* what the hell it doesn't need to receive this many params, it doesn't do anything ~_~
*------------------------------------------*/
-int skill_area_sub_count (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
return 1;
}
/*==========================================
*
*------------------------------------------*/
-int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
+int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
struct block_list *src = map->id2bl(id),*target;
struct unit_data *ud = unit->bl2ud(src);
struct skill_timerskill *skl;
@@ -3153,7 +3153,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
case WL_TETRAVORTEX_WIND:
case WL_TETRAVORTEX_GROUND:
clif->skill_nodamage(src, target, skl->skill_id, skl->skill_lv, 1);
- skill_attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag);
+ skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag);
skill->toggle_magicpower(src, skl->skill_id); // only the first hit will be amplify
if( skl->type == 4 ){
const enum sc_type scs[] = { SC_BURNING, SC_BLOODING, SC_FROSTMISTY, SC_STUN }; // status inflicts are depend on what summoned element is used.
@@ -3269,8 +3269,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
/*==========================================
*
*------------------------------------------*/
-int skill_addtimerskill (struct block_list *src, unsigned int tick, int target, int x,int y, uint16 skill_id, uint16 skill_lv, int type, int flag)
-{
+int skill_addtimerskill(struct block_list *src, int64 tick, int target, int x,int y, uint16 skill_id, uint16 skill_lv, int type, int flag) {
int i;
struct unit_data *ud;
nullpo_retr(1, src);
@@ -3334,7 +3333,7 @@ int skill_activate_reverbetion( struct block_list *bl, va_list ap) {
return 0;
if( su->alive && (sg = su->group) && sg->skill_id == WM_REVERBERATION ) {
map->foreachinrange(skill->trap_splash, bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, timer->gettick());
- su->limit=DIFF_TICK(timer->gettick(),sg->tick);
+ su->limit=DIFF_TICK32(timer->gettick(),sg->tick);
sg->unit_id = UNT_USED_TRAPS;
}
return 0;
@@ -3355,7 +3354,7 @@ int skill_reveal_trap (struct block_list *bl, va_list ap) {
*
*
*------------------------------------------*/
-int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct map_session_data *sd = NULL;
struct status_data *tstatus;
struct status_change *sc;
@@ -4557,8 +4556,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
/*==========================================
*
*------------------------------------------*/
-int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
-{
+int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
struct block_list *target, *src;
struct map_session_data *sd;
struct mob_data *md;
@@ -4885,8 +4883,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
/*==========================================
*
*------------------------------------------*/
-int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag)
-{
+int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct map_session_data *sd, *dstsd;
struct mob_data *md, *dstmd;
struct homun_data *hd;
@@ -4965,11 +4962,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
- return skill->castend_damage_id (src, bl, skill_id, skill_lv, tick, flag);
+ return skill->castend_damage_id(src, bl, skill_id, skill_lv, tick, flag);
}
break;
case NPC_SMOKING: //Since it is a self skill, this one ends here rather than in damage_id. [Skotlex]
- return skill->castend_damage_id (src, bl, skill_id, skill_lv, tick, flag);
+ return skill->castend_damage_id(src, bl, skill_id, skill_lv, tick, flag);
case MH_STEINWAND: {
struct block_list *s_src = battle->get_master(src);
short ret = 0;
@@ -7107,8 +7104,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case UNT_TALKIEBOX:
su->group->unit_id = UNT_USED_TRAPS;
clif->changetraplook(bl, UNT_USED_TRAPS);
- su->group->limit=DIFF_TICK(tick+1500,su->group->tick);
- su->limit=DIFF_TICK(tick+1500,su->group->tick);
+ su->group->limit=DIFF_TICK32(tick+1500,su->group->tick);
+ su->limit=DIFF_TICK32(tick+1500,su->group->tick);
}
}
}
@@ -9119,7 +9116,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
md->special_state.ai = AI_ZANZOU;
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
mob->spawn( md );
pc->setinvincibletimer(sd,500);// unlock target lock
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -9352,7 +9349,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
/*==========================================
*
*------------------------------------------*/
-int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) {
+int skill_castend_pos(int tid, int64 tick, int id, intptr_t data) {
struct block_list* src = map->id2bl(id);
int maxcount;
struct map_session_data *sd;
@@ -9652,8 +9649,7 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
/*==========================================
*
*------------------------------------------*/
-int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag)
-{
+int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct map_session_data* sd;
struct status_change* sc;
struct status_change_entry *sce;
@@ -9968,7 +9964,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
md->special_state.ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id,skill_lv), mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id,skill_lv), mob->timer_delete, md->bl.id, 0);
mob->spawn (md); //Now it is ready for spawning.
}
}
@@ -10066,7 +10062,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
{
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (tick + i, mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(tick + i, mob->timer_delete, md->bl.id, 0);
}
mob->spawn (md);
}
@@ -10197,7 +10193,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
md->special_state.ai = AI_FLORA;
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
mob->spawn( md );
}
}
@@ -10605,7 +10601,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
old_sg->skill_id == SA_VIOLENTGALE
) && old_sg->limit > 0)
{ //Use the previous limit (minus the elapsed time) [Skotlex]
- limit = old_sg->limit - DIFF_TICK(timer->gettick(), old_sg->tick);
+ limit = old_sg->limit - DIFF_TICK32(timer->gettick(), old_sg->tick);
if (limit < 0) //This can happen...
limit = skill->get_time(skill_id,skill_lv);
}
@@ -10962,7 +10958,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
/*==========================================
*
*------------------------------------------*/
-int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) {
struct skill_unit_group *sg;
struct block_list *ss;
struct status_change *sc;
@@ -11002,14 +10998,14 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
if( status->change_start(bl,type,10000,sg->skill_lv,1,sg->group_id,0,sec,8) ) {
const struct TimerData* td = sc->data[type]?timer->get(sc->data[type]->timer):NULL;
if( td )
- sec = DIFF_TICK(td->tick, tick);
+ sec = DIFF_TICK32(td->tick, tick);
map->moveblock(bl, src->bl.x, src->bl.y, tick);
clif->fixpos(bl);
sg->val2 = bl->id;
}
else
sec = 3000; //Couldn't trap it?
- sg->limit = DIFF_TICK(tick,sg->tick)+sec;
+ sg->limit = DIFF_TICK32(tick,sg->tick)+sec;
}
break;
case UNT_SAFETYWALL:
@@ -11135,7 +11131,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
// case UNT_ICEWALL: //Destroy the cell. [Skotlex]
// src->val1 = 0;
// if(src->limit + sg->tick > tick + 700)
- // src->limit = DIFF_TICK(tick+700,sg->tick);
+ // src->limit = DIFF_TICK32(tick+700,sg->tick);
// break;
case UNT_MOONLIT:
@@ -11173,7 +11169,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
/*==========================================
*
*------------------------------------------*/
-int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) {
struct skill_unit_group *sg;
struct block_list *ss;
TBL_PC* tsd;
@@ -11217,7 +11213,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if ((ts = skill->unitgrouptickset_search(bl,sg,tick))) {
//Not all have it, eg: Traps don't have it even though they can be hit by Heaven's Drive [Skotlex]
- diff = DIFF_TICK(tick,ts->tick);
+ diff = DIFF_TICK32(tick,ts->tick);
if (diff < 0)
return 0;
ts->tick = tick+sg->interval;
@@ -11317,7 +11313,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
status->charge(ss, 0, 8); //costs additional 8 SP if miss
} else { // mobs
//should end when out of sp.
- sg->limit = DIFF_TICK(tick,sg->tick);
+ sg->limit = DIFF_TICK32(tick,sg->tick);
break;
}
} while( x == bl->x && y == bl->y
@@ -11360,7 +11356,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
skill->blown(&src->bl,bl,skill->get_blewcount(sg->skill_id,sg->skill_lv),unit->getdir(bl),0);
sg->unit_id = UNT_USED_TRAPS;
clif->changetraplook(&src->bl, UNT_USED_TRAPS);
- sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->limit=DIFF_TICK32(tick,sg->tick)+1500;
}
break;
@@ -11371,7 +11367,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( status->change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,sec, 8) ) {
const struct TimerData* td = tsc->data[type]?timer->get(tsc->data[type]->timer):NULL;
if( td )
- sec = DIFF_TICK(td->tick, tick);
+ sec = DIFF_TICK32(td->tick, tick);
if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg2(src->bl.m) ) {
unit->movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif->fixpos(bl);
@@ -11388,7 +11384,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
**/
clif->changetraplook(&src->bl, UNT_ANKLESNARE);
}
- sg->limit = DIFF_TICK(tick,sg->tick)+sec;
+ sg->limit = DIFF_TICK32(tick,sg->tick)+sec;
sg->interval = -1;
src->range = 0;
}
@@ -11440,7 +11436,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
clif->changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
- sg->limit=DIFF_TICK(tick,sg->tick)+1500 +
+ sg->limit=DIFF_TICK32(tick,sg->tick)+1500 +
(sg->unit_id== UNT_CLUSTERBOMB || sg->unit_id== UNT_ICEBOUNDTRAP?1000:0);// Cluster Bomb/Icebound has 1s to disappear once activated.
sg->unit_id = UNT_USED_TRAPS; //Changed ID so it does not invoke a for each in area again.
break;
@@ -11452,7 +11448,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
clif->talkiebox(&src->bl, sg->valstr);
sg->unit_id = UNT_USED_TRAPS;
clif->changetraplook(&src->bl, UNT_USED_TRAPS);
- sg->limit = DIFF_TICK(tick, sg->tick) + 5000;
+ sg->limit = DIFF_TICK32(tick, sg->tick) + 5000;
sg->val2 = -1;
}
break;
@@ -11629,7 +11625,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
&src->bl,tick);
sg->unit_id = UNT_USED_TRAPS;
//clif->changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
- sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->limit=DIFF_TICK32(tick,sg->tick)+1500;
break;
/**
* 3rd stuff
@@ -11682,7 +11678,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_REVERBERATION:
clif->changetraplook(&src->bl,UNT_USED_TRAPS);
map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
- sg->limit = DIFF_TICK(tick,sg->tick)+1000;
+ sg->limit = DIFF_TICK32(tick,sg->tick)+1000;
sg->unit_id = UNT_USED_TRAPS;
break;
@@ -11694,7 +11690,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( !(status_get_mode(bl)&MD_BOSS) && ss != bl && battle->check_target(&src->bl, bl, BCT_PARTY) > 0 ) {
if( !(tsc && tsc->data[type]) ){
sc_start(bl, type, 100, sg->skill_lv, skill->get_time2(sg->skill_id,sg->skill_lv));
- sg->limit = DIFF_TICK(tick,sg->tick);
+ sg->limit = DIFF_TICK32(tick,sg->tick);
sg->unit_id = UNT_USED_TRAPS;
}
}
@@ -11706,13 +11702,13 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( sc_start(bl, type, 100, sg->skill_lv, sec) ) {
const struct TimerData* td = tsc->data[type]?timer->get(tsc->data[type]->timer):NULL;
if( td )
- sec = DIFF_TICK(td->tick, tick);
+ sec = DIFF_TICK32(td->tick, tick);
///map->moveblock(bl, src->bl.x, src->bl.y, tick); // in official server it doesn't behave like this. [malufett]
clif->fixpos(bl);
sg->val2 = bl->id;
} else
sec = 3000; // Couldn't trap it?
- sg->limit = DIFF_TICK(tick, sg->tick) + sec;
+ sg->limit = DIFF_TICK32(tick, sg->tick) + sec;
} else if( tsc->data[SC_THORNS_TRAP] && bl->id == sg->val2 )
skill->attack(skill->get_type(GN_THORNS_TRAP), ss, ss, bl, sg->skill_id, sg->skill_lv, tick, SD_LEVEL|SD_ANIMATION);
}
@@ -11750,7 +11746,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( battle->check_target(&src->bl,bl,BCT_ENEMY) > 0 )
skill->attack(skill->get_type(GN_HELLS_PLANT_ATK), ss, &src->bl, bl, GN_HELLS_PLANT_ATK, sg->skill_lv, tick, 0);
if( ss != bl) //The caster is the only one who can step on the Plants, without destroying them
- sg->limit = DIFF_TICK(tick, sg->tick) + 100;
+ sg->limit = DIFF_TICK32(tick, sg->tick) + 100;
break;
case UNT_CLOUD_KILL:
@@ -11800,7 +11796,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_VACUUM_EXTREME:
{// TODO: official behavior in gvg area. [malufett]
- int sec = sg->limit - DIFF_TICK(tick, sg->tick);
+ int sec = sg->limit - DIFF_TICK32(tick, sg->tick);
int range = skill->get_unit_range(sg->skill_id, sg->skill_lv);
if( tsc && !tsc->data[type] &&
@@ -11863,7 +11859,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_LAVA_SLIDE:
skill->attack(BF_WEAPON, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
if(++sg->val1 > 4) //after 5 stop hit and destroy me
- sg->limit = DIFF_TICK(tick, sg->tick);
+ sg->limit = DIFF_TICK32(tick, sg->tick);
break;
case UNT_POISON_MIST:
@@ -11880,7 +11876,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
/*==========================================
* Triggered when a char steps out of a skill cell
*------------------------------------------*/
-int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) {
struct skill_unit_group *sg;
struct status_change *sc;
struct status_change_entry *sce;
@@ -11923,7 +11919,7 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
if (target && target==bl) {
if (sce && sce->val3 == sg->group_id)
status_change_end(bl, type, INVALID_TIMER);
- sg->limit = DIFF_TICK(tick,sg->tick)+1000;
+ sg->limit = DIFF_TICK32(tick,sg->tick)+1000;
}
}
break;
@@ -11934,7 +11930,7 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
/*==========================================
* Triggered when a char steps out of a skill group (entirely) [Skotlex]
*------------------------------------------*/
-int skill_unit_onleft (uint16 skill_id, struct block_list *bl, unsigned int tick) {
+int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
struct status_change *sc;
struct status_change_entry *sce;
enum sc_type type;
@@ -12040,10 +12036,10 @@ int skill_unit_onleft (uint16 skill_id, struct block_list *bl, unsigned int tick
* flag&1: Invoke onplace function (otherwise invoke onout)
* flag&4: Invoke a onleft call (the unit might be scheduled for deletion)
*------------------------------------------*/
-int skill_unit_effect (struct block_list* bl, va_list ap) {
+int skill_unit_effect(struct block_list* bl, va_list ap) {
struct skill_unit* su = va_arg(ap,struct skill_unit*);
struct skill_unit_group* group = su->group;
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap,int64);
unsigned int flag = va_arg(ap,unsigned int);
uint16 skill_id;
bool dissonance;
@@ -12079,8 +12075,7 @@ int skill_unit_effect (struct block_list* bl, va_list ap) {
/*==========================================
*
*------------------------------------------*/
-int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int64 damage, unsigned int tick)
-{
+int skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) {
struct skill_unit_group *sg;
nullpo_ret(src);
@@ -14187,8 +14182,7 @@ void skill_brandishspear_dir (struct square* tc, uint8 dir, int are) {
}
}
-void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag)
-{
+void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int c,n=4;
uint8 dir = map->calc_dir(src,bl->x,bl->y);
struct square tc;
@@ -14525,10 +14519,10 @@ int skill_sit (struct map_session_data *sd, int type)
/*==========================================
*
*------------------------------------------*/
-int skill_frostjoke_scream (struct block_list *bl, va_list ap) {
+int skill_frostjoke_scream(struct block_list *bl, va_list ap) {
struct block_list *src;
uint16 skill_id,skill_lv;
- unsigned int tick;
+ int64 tick;
nullpo_ret(bl);
nullpo_ret(src=va_arg(ap,struct block_list*));
@@ -14536,7 +14530,7 @@ int skill_frostjoke_scream (struct block_list *bl, va_list ap) {
skill_id=va_arg(ap,int);
skill_lv=va_arg(ap,int);
if(!skill_lv) return 0;
- tick=va_arg(ap,unsigned int);
+ tick=va_arg(ap,int64);
if (src == bl || status->isdead(bl))
return 0;
@@ -14569,22 +14563,22 @@ void skill_unitsetmapcell (struct skill_unit *src, uint16 skill_id, uint16 skill
/*==========================================
*
*------------------------------------------*/
-int skill_attack_area (struct block_list *bl, va_list ap) {
+int skill_attack_area(struct block_list *bl, va_list ap) {
struct block_list *src,*dsrc;
int atk_type,skill_id,skill_lv,flag,type;
- unsigned int tick;
+ int64 tick;
if(status->isdead(bl))
return 0;
atk_type = va_arg(ap,int);
- src=va_arg(ap,struct block_list*);
- dsrc=va_arg(ap,struct block_list*);
- skill_id=va_arg(ap,int);
- skill_lv=va_arg(ap,int);
- tick=va_arg(ap,unsigned int);
- flag=va_arg(ap,int);
- type=va_arg(ap,int);
+ src = va_arg(ap,struct block_list*);
+ dsrc = va_arg(ap,struct block_list*);
+ skill_id = va_arg(ap,int);
+ skill_lv = va_arg(ap,int);
+ tick = va_arg(ap,int64);
+ flag = va_arg(ap,int);
+ type = va_arg(ap,int);
if (skill->area_temp[1] == bl->id) //This is the target of the skill, do a full attack and skip target checks.
@@ -14739,7 +14733,7 @@ int skill_detonator(struct block_list *bl, va_list ap) {
map->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag,bl,su->group->tick);
}
clif->changetraplook(bl, UNT_USED_TRAPS);
- su->group->limit = DIFF_TICK(timer->gettick(),su->group->tick) +
+ su->group->limit = DIFF_TICK32(timer->gettick(),su->group->tick) +
(unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : (unit_id == UNT_FIRINGTRAP ? 0 : 1500)) );
su->group->unit_id = UNT_USED_TRAPS;
break;
@@ -14876,15 +14870,15 @@ int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap)
/*==========================================
*
*------------------------------------------*/
-int skill_trap_splash (struct block_list *bl, va_list ap) {
+int skill_trap_splash(struct block_list *bl, va_list ap) {
struct block_list *src;
- int tick;
+ int64 tick;
struct skill_unit *su;
struct skill_unit_group *sg;
struct block_list *ss;
src = va_arg(ap,struct block_list *);
su = (struct skill_unit *)src;
- tick = va_arg(ap,int);
+ tick = va_arg(ap,int64);
if( !su->alive || bl->prev == NULL )
return 0;
@@ -14962,7 +14956,7 @@ int skill_trap_splash (struct block_list *bl, va_list ap) {
case UNT_FIRINGTRAP:
case UNT_ICEBOUNDTRAP:
clif->changetraplook(bl, UNT_USED_TRAPS);
- su->group->limit = DIFF_TICK(timer->gettick(),su->group->tick) + 1500;
+ su->group->limit = DIFF_TICK32(timer->gettick(),su->group->tick) + 1500;
su->group->unit_id = UNT_USED_TRAPS;
}
break;
@@ -15288,11 +15282,11 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count,
if(i == MAX_SKILLUNITGROUP) {
// array is full, make room by discarding oldest group
int j=0;
- unsigned maxdiff=0,x,tick=timer->gettick();
+ int64 maxdiff = 0, x, tick = timer->gettick();
for(i=0;i<MAX_SKILLUNITGROUP && ud->skillunit[i];i++)
- if((x=DIFF_TICK(tick,ud->skillunit[i]->tick))>maxdiff){
- maxdiff=x;
- j=i;
+ if( (x=DIFF_TICK(tick,ud->skillunit[i]->tick)) > maxdiff ) {
+ maxdiff = x;
+ j = i;
}
skill->del_unitgroup(ud->skillunit[j],ALC_MARK);
//Since elements must have shifted, we use the last slot.
@@ -15479,7 +15473,7 @@ int skill_clear_unitgroup (struct block_list *src)
/*==========================================
*
*------------------------------------------*/
-struct skill_unit_group_tickset *skill_unitgrouptickset_search (struct block_list *bl, struct skill_unit_group *group, int tick) {
+struct skill_unit_group_tickset *skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) {
int i,j=-1,k,s,id;
struct unit_data *ud;
struct skill_unit_group_tickset *set;
@@ -15519,10 +15513,10 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search (struct block_lis
/*==========================================
*
*------------------------------------------*/
-int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) {
+int skill_unit_timer_sub_onplace(struct block_list* bl, va_list ap) {
struct skill_unit* su = va_arg(ap,struct skill_unit *);
struct skill_unit_group* group = su->group;
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap,int64);
if( !su->alive || bl->prev == NULL )
return 0;
@@ -15546,7 +15540,7 @@ int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) {
int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
struct skill_unit* su = DB->data2ptr(data);
struct skill_unit_group* group = su->group;
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap,int64);
bool dissonance;
struct block_list* bl = &su->bl;
@@ -15570,8 +15564,8 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
case UNT_GROUNDDRIFT_FIRE:
group->unit_id = UNT_USED_TRAPS;
//clif->changetraplook(bl, UNT_FIREPILLAR_ACTIVE);
- group->limit=DIFF_TICK(tick+1500,group->tick);
- su->limit=DIFF_TICK(tick+1500,group->tick);
+ group->limit=DIFF_TICK32(tick+1500,group->tick);
+ su->limit=DIFF_TICK32(tick+1500,group->tick);
break;
case UNT_ANKLESNARE:
@@ -15650,8 +15644,8 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
}
clif->changetraplook(bl,UNT_USED_TRAPS);
map->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick);
- group->limit = DIFF_TICK(tick,group->tick)+1000;
- su->limit = DIFF_TICK(tick,group->tick)+1000;
+ group->limit = DIFF_TICK32(tick,group->tick)+1000;
+ su->limit = DIFF_TICK32(tick,group->tick)+1000;
group->unit_id = UNT_USED_TRAPS;
break;
@@ -15672,8 +15666,8 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
break;
}
// This unit isn't removed while SC_BANDING is active.
- group->limit = DIFF_TICK(tick+group->interval,group->tick);
- su->limit = DIFF_TICK(tick+group->interval,group->tick);
+ group->limit = DIFF_TICK32(tick+group->interval,group->tick);
+ su->limit = DIFF_TICK32(tick+group->interval,group->tick);
}
break;
@@ -15686,7 +15680,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
// icewall loses 50 hp every second
su->val1 -= SKILLUNITTIMER_INTERVAL/20; // trap's hp
if( su->val1 <= 0 && su->limit + group->tick > tick + 700 )
- su->limit = DIFF_TICK(tick+700,group->tick);
+ su->limit = DIFF_TICK32(tick+700,group->tick);
break;
case UNT_BLASTMINE:
case UNT_SKIDTRAP:
@@ -15703,7 +15697,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
skill->delunit(su);
else {
clif->changetraplook(bl, group->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
- group->limit = DIFF_TICK(tick, group->tick) + 1500;
+ group->limit = DIFF_TICK32(tick, group->tick) + 1500;
group->unit_id = UNT_USED_TRAPS;
}
}
@@ -15712,15 +15706,15 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
if( su->val1 <= 0 ) {
clif->changetraplook(bl,UNT_USED_TRAPS);
map->foreachinrange(skill->trap_splash, bl, skill->get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick);
- group->limit = DIFF_TICK(tick,group->tick)+1000;
- su->limit = DIFF_TICK(tick,group->tick)+1000;
+ group->limit = DIFF_TICK32(tick,group->tick)+1000;
+ su->limit = DIFF_TICK32(tick,group->tick)+1000;
group->unit_id = UNT_USED_TRAPS;
}
break;
case UNT_WALLOFTHORN:
if( su->val1 <= 0 ) {
group->unit_id = UNT_USED_TRAPS;
- group->limit = DIFF_TICK(tick, group->tick) + 1500;
+ group->limit = DIFF_TICK32(tick, group->tick) + 1500;
}
break;
}
@@ -15757,7 +15751,7 @@ int skill_unit_timer_sub(DBKey key, DBData *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_t data) {
+int skill_unit_timer(int tid, int64 tick, int id, intptr_t data) {
map->freeblock_lock();
skill->unit_db->foreach(skill->unit_db, skill->unit_timer_sub, tick);
@@ -15770,12 +15764,12 @@ int skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) {
/*==========================================
*
*------------------------------------------*/
-int skill_unit_move_sub (struct block_list* bl, va_list ap) {
+int skill_unit_move_sub(struct block_list* bl, va_list ap) {
struct skill_unit* su = (struct skill_unit *)bl;
struct skill_unit_group* group = su->group;
struct block_list* target = va_arg(ap,struct block_list*);
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap,int64);
int flag = va_arg(ap,int);
bool dissonance;
@@ -15867,7 +15861,7 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap) {
* units to figure out when they have left a group.
* flag&4: Force a onleft event (triggered when the bl is killed, for example)
*------------------------------------------*/
-int skill_unit_move (struct block_list *bl, unsigned int tick, int flag) {
+int skill_unit_move(struct block_list *bl, int64 tick, int flag) {
nullpo_ret(bl);
if( bl->prev == NULL )
@@ -15892,10 +15886,9 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag) {
/*==========================================
*
*------------------------------------------*/
-int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 dx, int16 dy)
-{
+int skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) {
int i,j;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
int *m_flag;
struct skill_unit *su1;
struct skill_unit *su2;
@@ -16749,7 +16742,7 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) {
md->special_state.ai = AI_FLORA;
if( md->deletetimer != INVALID_TIMER )
timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add (timer->gettick() + skill->get_time(NC_MAGICDECOY,skill_id), mob->timer_delete, md->bl.id, 0);
+ md->deletetimer = timer->add(timer->gettick() + skill->get_time(NC_MAGICDECOY,skill_id), mob->timer_delete, md->bl.id, 0);
mob->spawn(md);
md->status.matk_min = md->status.matk_max = 250 + (50 * skill_id);
}
@@ -16947,13 +16940,13 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite
/**
* for Royal Guard's LG_TRAMPLE
**/
-int skill_destroy_trap( struct block_list *bl, va_list ap ) {
+int skill_destroy_trap(struct block_list *bl, va_list ap) {
struct skill_unit *su = (struct skill_unit *)bl;
struct skill_unit_group *sg;
- unsigned int tick;
+ int64 tick;
nullpo_ret(su);
- tick = va_arg(ap, unsigned int);
+ tick = va_arg(ap, int64);
if (su->alive && (sg = su->group) && skill->get_inf2(sg->skill_id)&INF2_TRAP) {
switch( sg->unit_id ) {
@@ -16980,7 +16973,7 @@ int skill_destroy_trap( struct block_list *bl, va_list ap ) {
/*==========================================
*
*------------------------------------------*/
-int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
+int skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
struct skill_cd * cd = NULL;
@@ -17035,7 +17028,7 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) {
struct skill_cd* cd = NULL;
uint16 idx = skill->get_index(skill_id);
- unsigned int now = timer->gettick();
+ int64 now = timer->gettick();
nullpo_retr (-1, sd);
@@ -17099,7 +17092,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
return 0;
}
-int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) { //[orn]
+int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn]
struct homun_data *hd = (TBL_HOM*)map->id2bl(id);
if (data <= 0 || data >= MAX_SKILL)
return 0;
@@ -17124,7 +17117,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { /
return timer->add(timer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx);
}
-int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {//[orn]
+int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {//[orn]
struct mercenary_data *md = (TBL_MER*)map->id2bl(id);
if( data <= 0 || data >= MAX_SKILL )
return 0;
@@ -17592,7 +17585,7 @@ int skill_get_elemental_type( uint16 skill_id , uint16 skill_lv ) {
void skill_cooldown_save(struct map_session_data * sd) {
int i;
struct skill_cd* cd = NULL;
- unsigned int now = 0;
+ int64 now = 0;
// always check to make sure the session properly exists
nullpo_retv(sd);
@@ -17605,7 +17598,7 @@ void skill_cooldown_save(struct map_session_data * sd) {
// process each individual cooldown associated with the character
for( i = 0; i < cd->cursor; i++ ) {
- cd->entry[i]->duration = DIFF_TICK(cd->entry[i]->started+cd->entry[i]->duration,now);
+ cd->entry[i]->duration = DIFF_TICK32(cd->entry[i]->started+cd->entry[i]->duration,now);
if( cd->entry[i]->timer != INVALID_TIMER ) {
timer->delete(cd->entry[i]->timer,skill->blockpc_end);
cd->entry[i]->timer = INVALID_TIMER;
@@ -17620,7 +17613,7 @@ void skill_cooldown_save(struct map_session_data * sd) {
void skill_cooldown_load(struct map_session_data * sd) {
int i;
struct skill_cd* cd = NULL;
- unsigned int now = 0;
+ int64 now = 0;
// always check to make sure the session properly exists
nullpo_retv(sd);
diff --git a/src/map/skill.h b/src/map/skill.h
index c968eebde..fca4952ef 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1686,7 +1686,7 @@ struct skill_unit_group {
int map;
int target_flag; //Holds BCT_* flag for battle_check_target
int bl_flag; //Holds BL_* flag for map_foreachin* functions
- unsigned int tick;
+ int64 tick;
int limit,interval;
uint16 skill_id,skill_lv;
@@ -1715,7 +1715,7 @@ struct skill_unit {
};
struct skill_unit_group_tickset {
- unsigned int tick;
+ int64 tick;
int id;
};
@@ -1750,7 +1750,7 @@ struct skill_cd_entry {
int total;/* used for display on newer clients */
#endif
short skidx;//the skill index entries belong to
- unsigned int started;/* gettick() of when it started, used vs duration to measure how much left upon logout */
+ int64 started;/* gettick() of when it started, used vs duration to measure how much left upon logout */
int timer;/* timer id */
uint16 skill_id;//skill id
};
@@ -1791,7 +1791,7 @@ struct s_skill_spellbook_db {
int point;
};
-typedef int (*SkillFunc)(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag);
+typedef int (*SkillFunc)(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
/**
* Skill.c Interface
@@ -1883,13 +1883,13 @@ struct skill_interface {
int (*get_casttype2) (uint16 index);
int (*name2id) (const char* name);
int (*isammotype) (struct map_session_data *sd, int skill);
- int (*castend_id) (int tid, unsigned int tick, int id, intptr_t data);
- int (*castend_pos) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*castend_id) (int tid, int64 tick, int id, intptr_t data);
+ int (*castend_pos) (int tid, int64 tick, int id, intptr_t data);
int (*castend_map) ( struct map_session_data *sd,uint16 skill_id, const char *mapname);
int (*cleartimerskill) (struct block_list *src);
- int (*addtimerskill) (struct block_list *src,unsigned int tick,int target,int x,int y,uint16 skill_id,uint16 skill_lv,int type,int flag);
- int (*additional_effect) ( struct block_list* src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,int attack_type,int dmg_lv,unsigned int tick);
- int (*counter_additional_effect) ( struct block_list* src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,int attack_type,unsigned int tick);
+ int (*addtimerskill) (struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag);
+ int (*additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick);
+ int (*counter_additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick);
int (*blown) (struct block_list* src, struct block_list* target, int count, int8 dir, int flag);
int (*break_equip) (struct block_list *bl, unsigned short where, int rate, int flag);
int (*strip_equip) (struct block_list *bl, unsigned short where, int rate, int lv, int time);
@@ -1901,8 +1901,8 @@ struct skill_interface {
int (*del_unitgroup) (struct skill_unit_group *group, const char* file, int line, const char* func);
int (*clear_unitgroup) (struct block_list *src);
int (*clear_group) (struct block_list *bl, int flag);
- int (*unit_onplace) (struct skill_unit *src, struct block_list *bl, unsigned int tick);
- int (*unit_ondamaged) (struct skill_unit *src,struct block_list *bl,int64 damage,unsigned int tick);
+ int (*unit_onplace) (struct skill_unit *src, struct block_list *bl, int64 tick);
+ int (*unit_ondamaged) (struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick);
int (*cast_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv);
int (*cast_fix_sc) ( struct block_list *bl, int time);
int (*vf_cast_fix) ( struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv);
@@ -1912,12 +1912,12 @@ struct skill_interface {
int (*consume_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
struct skill_condition (*get_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int (*check_pc_partner) (struct map_session_data *sd, uint16 skill_id, uint16* skill_lv, int range, int cast_flag);
- int (*unit_move) (struct block_list *bl,unsigned int tick,int flag);
- int (*unit_onleft) (uint16 skill_id, struct block_list *bl,unsigned int tick);
- int (*unit_onout) (struct skill_unit *src, struct block_list *bl, unsigned int tick);
+ int (*unit_move) (struct block_list *bl, int64 tick, int flag);
+ int (*unit_onleft) (uint16 skill_id, struct block_list *bl, int64 tick);
+ int (*unit_onout) (struct skill_unit *src, struct block_list *bl, int64 tick);
int (*unit_move_unit_group) ( struct skill_unit_group *group, int16 m,int16 dx,int16 dy);
int (*sit) (struct map_session_data *sd, int type);
- void (*brandishspear) (struct block_list* src, struct block_list* bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag);
+ void (*brandishspear) (struct block_list* src, struct block_list* bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
void (*repairweapon) (struct map_session_data *sd, int idx);
void (*identify) (struct map_session_data *sd,int idx);
void (*weaponrefine) (struct map_session_data *sd,int idx);
@@ -1932,25 +1932,25 @@ struct skill_interface {
int (*can_produce_mix) ( struct map_session_data *sd, int nameid, int trigger, int qty);
int (*produce_mix) ( struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty );
int (*arrow_create) ( struct map_session_data *sd,int nameid);
- int (*castend_nodamage_id) ( struct block_list *src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
- int (*castend_damage_id) ( struct block_list* src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
- int (*castend_pos2) ( struct block_list *src, int x,int y,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag);
+ int (*castend_nodamage_id) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
+ int (*castend_damage_id) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick,int flag);
+ int (*castend_pos2) (struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
int (*blockpc_start) (struct map_session_data *sd, uint16 skill_id, int tick);
int (*blockhomun_start) (struct homun_data *hd, uint16 skill_id, int tick);
int (*blockmerc_start) (struct mercenary_data *md, uint16 skill_id, int tick);
- int (*attack) ( int attack_type, struct block_list* src, struct block_list *dsrc,struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
+ int (*attack) (int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
int (*attack_area) (struct block_list *bl,va_list ap);
int (*area_sub) (struct block_list *bl, va_list ap);
- int (*area_sub_count) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag);
+ int (*area_sub_count) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
int (*check_unit_range) (struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv);
int (*check_unit_range_sub) (struct block_list *bl, va_list ap);
int (*check_unit_range2) (struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv);
int (*check_unit_range2_sub) (struct block_list *bl, va_list ap);
void (*toggle_magicpower) (struct block_list *bl, uint16 skill_id);
int (*magic_reflect) (struct block_list* src, struct block_list* bl, int type);
- int (*onskillusage) (struct map_session_data *sd, struct block_list *bl, uint16 skill_id, unsigned int tick);
+ int (*onskillusage) (struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick);
int (*cell_overlap) (struct block_list *bl, va_list ap);
- int (*timerskill) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*timerskill) (int tid, int64 tick, int id, intptr_t data);
int (*trap_splash) (struct block_list *bl, va_list ap);
int (*check_condition_mercenary) (struct block_list *bl, int skill_id, int lv, int type);
struct skill_unit_group *(*locate_element_field) (struct block_list *bl);
@@ -1963,26 +1963,26 @@ struct skill_interface {
int (*greed) (struct block_list *bl, va_list ap);
int (*destroy_trap) ( struct block_list *bl, va_list ap );
int (*icewall_block) (struct block_list *bl,va_list ap);
- struct skill_unit_group_tickset *(*unitgrouptickset_search) (struct block_list *bl, struct skill_unit_group *group, int tick);
+ struct skill_unit_group_tickset *(*unitgrouptickset_search) (struct block_list *bl, struct skill_unit_group *group, int64 tick);
bool (*dance_switch) (struct skill_unit* su, int flag);
int (*check_condition_char_sub) (struct block_list *bl, va_list ap);
int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap);
void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y);
void (*brandishspear_dir) (struct square* tc, uint8 dir, int are);
- int (*get_fixed_cast) ( uint16 skill_id ,uint16 skill_lv );
+ int (*get_fixed_cast) ( uint16 skill_id ,uint16 skill_lv );
int (*sit_count) (struct block_list *bl, va_list ap);
int (*sit_in) (struct block_list *bl, va_list ap);
int (*sit_out) (struct block_list *bl, va_list ap);
void (*unitsetmapcell) (struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag);
- int (*unit_onplace_timer) (struct skill_unit *src, struct block_list *bl, unsigned int tick);
+ int (*unit_onplace_timer) (struct skill_unit *src, struct block_list *bl, int64 tick);
int (*unit_effect) (struct block_list* bl, va_list ap);
int (*unit_timer_sub_onplace) (struct block_list* bl, va_list ap);
int (*unit_move_sub) (struct block_list* bl, va_list ap);
- int (*blockpc_end) (int tid, unsigned int tick, int id, intptr_t data);
- int (*blockhomun_end) (int tid, unsigned int tick, int id, intptr_t data);
- int (*blockmerc_end) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*blockpc_end) (int tid, int64 tick, int id, intptr_t data);
+ int (*blockhomun_end) (int tid, int64 tick, int id, intptr_t data);
+ int (*blockmerc_end) (int tid, int64 tick, int id, intptr_t data);
int (*split_atoi) (char *str, int *val);
- int (*unit_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*unit_timer) (int tid, int64 tick, int id, intptr_t data);
int (*unit_timer_sub) (DBKey key, DBData *data, va_list ap);
void (*init_unit_layout) (void);
bool (*parse_row_skilldb) (char* split[], int columns, int current);
diff --git a/src/map/status.c b/src/map/status.c
index 5f6444971..9e98b2801 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -906,6 +906,8 @@ void initChangeTables(void) {
status->IconChangeTable[SC_REBOUND] = SI_REBOUND;
status->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
status->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
+ status->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
+ status->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
//Other SC which are not necessarily associated to skills.
status->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
@@ -995,6 +997,9 @@ void initChangeTables(void) {
status->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
status->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
+ status->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
+ status->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
+
/* status->DisplayType Table [Ind/Hercules] */
status->DisplayType[SC_ALL_RIDING] = true;
status->DisplayType[SC_PUSH_CART] = true;
@@ -1019,6 +1024,8 @@ void initChangeTables(void) {
status->DisplayType[SC__SHADOWFORM] = true;
status->DisplayType[SC__MANHOLE] = true;
status->DisplayType[SC_MONSTER_TRANSFORM] = true;
+ status->DisplayType[SC_MOONSTAR] = true;
+ status->DisplayType[SC_SUPER_STAR] = true;
#ifdef RENEWAL_EDP
// renewal EDP increases your weapon atk
@@ -7806,7 +7813,13 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = 11-val1; //Chance to consume: 11-skill_lv%
break;
case SC_RUN:
- val4 = timer->gettick(); //Store time at which you started running.
+ {
+ //Store time at which you started running.
+ int64 currenttick = timer->gettick();
+ // Note: this int64 value is stored in two separate int32 variables (FIXME)
+ val3 = (int)(currenttick&0x00000000ffffffffLL);
+ val4 = (int)((currenttick&0xffffffff00000000LL)>>32);
+ }
tick = -1;
break;
case SC_KAAHI:
@@ -8189,7 +8202,13 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 1000; // [GodLesZ] tick time
break;
case SC_WUGDASH:
- val4 = timer->gettick(); //Store time at which you started running.
+ {
+ //Store time at which you started running.
+ int64 currenttick = timer->gettick();
+ // Note: this int64 value is stored in two separate int32 variables (FIXME)
+ val3 = (int)(currenttick&0x00000000ffffffffLL);
+ val4 = (int)((currenttick&0xffffffff00000000LL)>>32);
+ }
tick = -1;
break;
case SC__SHADOWFORM: {
@@ -9315,6 +9334,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
{
struct unit_data *ud = unit->bl2ud(bl);
bool begin_spurt = true;
+ // Note: this int64 value is stored in two separate int32 variables (FIXME)
+ int64 starttick = (int64)sce->val3&0x00000000ffffffffLL;
+ starttick |= ((int64)sce->val4<<32)&0xffffffff00000000LL;
+
if (ud) {
if(!ud->state.running)
begin_spurt = false;
@@ -9323,7 +9346,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
unit->stop_walking(bl,1);
}
if (begin_spurt && sce->val1 >= 7
- && DIFF_TICK(timer->gettick(), sce->val4) <= 1000
+ && DIFF_TICK(timer->gettick(), starttick) <= 1000
&& (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0))
)
sc_start(bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1));
@@ -9932,7 +9955,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_t data) {
+int kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) {
struct block_list *bl;
struct status_change *sc;
struct status_change_entry *sce;
@@ -9970,7 +9993,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
* For recusive status, like for each 5s we drop sp etc.
* Reseting the end timer.
*------------------------------------------*/
-int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
enum sc_type type = (sc_type)data;
struct block_list *bl;
struct map_session_data *sd;
@@ -10786,7 +10809,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) {
struct block_list* src = va_arg(ap,struct block_list*);
struct status_change_entry* sce = va_arg(ap,struct status_change_entry*);
enum sc_type type = (sc_type)va_arg(ap,int); //gcc: enum args get promoted to int
- unsigned int tick = va_arg(ap,unsigned int);
+ int64 tick = va_arg(ap, int64);
if (status->isdead(bl))
return 0;
@@ -11040,7 +11063,7 @@ int status_change_clear_buffs (struct block_list* bl, int type) {
int status_change_spread( struct block_list *src, struct block_list *bl ) {
int i, flag = 0;
struct status_change *sc = status->get_sc(src);
- unsigned int tick;
+ int64 tick;
struct status_change_data data;
if( !sc || !sc->count )
@@ -11082,7 +11105,7 @@ int status_change_spread( struct block_list *src, struct block_list *bl ) {
const struct TimerData *td = timer->get(sc->data[i]->timer);
if (td == NULL || td->func != status->change_timer || DIFF_TICK(td->tick,tick) < 0)
continue;
- data.tick = DIFF_TICK(td->tick,tick);
+ data.tick = DIFF_TICK32(td->tick,tick);
} else
data.tick = INVALID_TIMER;
break;
@@ -11310,8 +11333,9 @@ int status_natural_heal(struct block_list* bl, va_list args) {
}
//Natural heal main timer.
-int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
- status->natural_heal_diff_tick = DIFF_TICK(tick,status->natural_heal_prev_tick);
+int status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) {
+ // This difference is always positive and lower than UINT_MAX (~24 days)
+ status->natural_heal_diff_tick = (unsigned int)cap_value(DIFF_TICK(tick,status->natural_heal_prev_tick), 0, UINT_MAX);
map->foreachregen(status->natural_heal);
status->natural_heal_prev_tick = tick;
return 0;
diff --git a/src/map/status.h b/src/map/status.h
index 9b1721d1a..254f3bfab 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -677,6 +677,9 @@ typedef enum sc_type {
SC_MTF_MLEATKED,
SC_MTF_CRIDAMAGE,
+ SC_MOONSTAR,
+ SC_SUPER_STAR,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;
// Official status change ids, used to display status icons on the client.
@@ -1858,7 +1861,8 @@ struct status_interface {
sc_conf_type sc_conf[SC_MAX];
struct eri *data_ers; //For sc_data entries
struct status_data dummy;
- unsigned int natural_heal_prev_tick,natural_heal_diff_tick;
+ int64 natural_heal_prev_tick;
+ unsigned int natural_heal_diff_tick;
/* */
int (*init) (void);
void (*final) (void);
@@ -1902,8 +1906,8 @@ struct status_interface {
int (*get_sc_def) (struct block_list *bl, enum sc_type type, int rate, int tick, int flag);
int (*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 (*change_end_) (struct block_list* bl, enum sc_type type, int tid, const char* file, int line);
- int (*kaahi_heal_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*change_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*kaahi_heal_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*change_timer) (int tid, int64 tick, int id, intptr_t data);
int (*change_timer_sub) (struct block_list* bl, va_list ap);
int (*change_clear) (struct block_list* bl, int type);
int (*change_clear_buffs) (struct block_list* bl, int type);
@@ -1967,7 +1971,7 @@ struct status_interface {
void (*display_add) (struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3);
void (*display_remove) (struct map_session_data *sd, enum sc_type type);
int (*natural_heal) (struct block_list *bl, va_list args);
- int (*natural_heal_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*natural_heal_timer) (int tid, int64 tick, int id, intptr_t data);
bool (*readdb_job1) (char *fields[], int columns, int current);
bool (*readdb_job2) (char *fields[], int columns, int current);
bool (*readdb_sizefix) (char *fields[], int columns, int current);
diff --git a/src/map/unit.c b/src/map/unit.c
index a9cbd605e..08e97cfee 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -82,9 +82,6 @@ struct unit_data* unit_bl2ud2(struct block_list *bl) {
return unit->bl2ud(bl);
}
-int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data);
-int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
int unit_walktoxy_sub(struct block_list *bl)
{
int i;
@@ -137,7 +134,7 @@ int unit_walktoxy_sub(struct block_list *bl)
return 1;
}
-int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
int i;
int x,y,dx,dy;
uint8 dir;
@@ -322,7 +319,7 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
return 0;
}
-int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
struct block_list *bl = map->id2bl(id);
if (!bl || bl->prev == NULL)
@@ -402,7 +399,7 @@ static inline void set_mobstate(struct block_list* bl, int flag)
md->state.skillstate = md->state.aggressive ? MSS_FOLLOW : MSS_RUSH;
}
-int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) {
struct block_list *bl = map->id2bl(id);
struct unit_data *ud = bl?unit->bl2ud(bl):NULL;
@@ -854,7 +851,7 @@ int unit_stop_walking(struct block_list *bl,int type)
{
struct unit_data *ud;
const struct TimerData* td;
- unsigned int tick;
+ int64 tick;
nullpo_ret(bl);
ud = unit->bl2ud(bl);
@@ -1001,7 +998,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_t data) {
+int unit_resume_running(int tid, int64 tick, int id, intptr_t data) {
struct unit_data *ud = (struct unit_data *)data;
TBL_PC * sd = map->id2sd(id);
@@ -1025,8 +1022,7 @@ int unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) {
* if type is 0, this is a damage induced delay: if previous delay is active, do not change it.
* if type is 1, this is a skill induced delay: walk-delay may only be increased, not decreased.
*------------------------------------------*/
-int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type)
-{
+int unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type) {
struct unit_data *ud = unit->bl2ud(bl);
if (delay <= 0 || !ud) return 0;
@@ -1073,7 +1069,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
struct status_change *sc;
struct map_session_data *sd = NULL;
struct block_list * target = NULL;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
int temp = 0, range;
nullpo_ret(src);
@@ -1437,7 +1433,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
struct unit_data *ud = NULL;
struct status_change *sc;
struct block_list bl;
- unsigned int tick = timer->gettick();
+ int64 tick = timer->gettick();
int range;
nullpo_ret(src);
@@ -1795,8 +1791,7 @@ int unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir)
/*==========================================
* Continuous Attack (function timer)
*------------------------------------------*/
-int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick)
-{
+int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) {
struct block_list *target;
struct unit_data *ud;
struct status_data *sstatus;
@@ -1923,7 +1918,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick)
return 1;
}
-int unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int unit_attack_timer(int tid, int64 tick, int id, intptr_t data) {
struct block_list *bl;
bl = map->id2bl(id);
if(bl && unit->attack_timer_sub(bl, tid, tick) == 0)
@@ -1940,7 +1935,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
{
struct map_session_data *sd = NULL;
struct unit_data *ud = unit->bl2ud( bl);
- unsigned int tick=timer->gettick();
+ int64 tick = timer->gettick();
int ret=0, skill_id;
nullpo_ret(bl);
@@ -2021,8 +2016,7 @@ int unit_counttargeted(struct block_list* bl)
/*==========================================
*
*------------------------------------------*/
-int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int tick,int sdelay,int ddelay,int64 damage,int div,int type,int64 damage2)
-{
+int unit_fixdamage(struct block_list *src, struct block_list *target, int64 tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
nullpo_ret(target);
if(damage+damage2 <= 0)
@@ -2200,6 +2194,10 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
instance->list[map->list[bl->m].instance_id].users--;
instance->check_idle(map->list[bl->m].instance_id);
}
+ if( sd->state.hpmeter_visible ) {
+ map->list[bl->m].hpmeter_visible--;
+ sd->state.hpmeter_visible = 0;
+ }
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]
sd->debug_file = file;
sd->debug_line = line;
diff --git a/src/map/unit.h b/src/map/unit.h
index be7b789d9..0567688a1 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -30,10 +30,10 @@ struct unit_data {
int target_to;
int attacktimer;
int walktimer;
- int chaserange;
- unsigned int attackabletime;
- unsigned int canact_tick;
- unsigned int canmove_tick;
+ int chaserange;
+ int64 attackabletime;
+ int64 canact_tick;
+ int64 canmove_tick;
uint8 dir;
unsigned char walk_count;
unsigned char target_count;
@@ -77,12 +77,12 @@ struct unit_interface {
/* */
struct unit_data* (*bl2ud) (struct block_list *bl);
struct unit_data* (*bl2ud2) (struct block_list *bl);
- int (*attack_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*walktoxy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*attack_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*walktoxy_timer) (int tid, int64 tick, int id, intptr_t data);
int (*walktoxy_sub) (struct block_list *bl);
- int (*delay_walktoxy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*delay_walktoxy_timer) (int tid, int64 tick, int id, intptr_t data);
int (*walktoxy) (struct block_list *bl, short x, short y, int flag);
- int (*walktobl_sub) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*walktobl_sub) (int tid, int64 tick, int id, intptr_t data);
int (*walktobl) (struct block_list *bl, struct block_list *tbl, int range, int flag);
int (*run) (struct block_list *bl);
int (*wugdash) (struct block_list *bl, struct map_session_data *sd);
@@ -96,8 +96,8 @@ struct unit_interface {
int (*skilluse_id) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv);
int (*is_walking) (struct block_list *bl);
int (*can_move) (struct block_list *bl);
- int (*resume_running) (int tid, unsigned int tick, int id, intptr_t data);
- int (*set_walkdelay) (struct block_list *bl, unsigned int tick, int delay, int type);
+ int (*resume_running) (int tid, int64 tick, int id, intptr_t data);
+ int (*set_walkdelay) (struct block_list *bl, int64 tick, int delay, int type);
int (*skilluse_id2) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel);
int (*skilluse_pos) (struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv);
int (*skilluse_pos2) (struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel);
@@ -109,11 +109,11 @@ struct unit_interface {
bool (*can_reach_pos) (struct block_list *bl, int x, int y, int easy);
bool (*can_reach_bl) (struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y);
int (*calc_pos) (struct block_list *bl, int tx, int ty, uint8 dir);
- int (*attack_timer_sub) (struct block_list *src, int tid, unsigned int tick);
+ int (*attack_timer_sub) (struct block_list *src, int tid, int64 tick);
int (*skillcastcancel) (struct block_list *bl, int type);
void (*dataset) (struct block_list *bl);
int (*counttargeted) (struct block_list *bl);
- int (*fixdamage) (struct block_list *src, struct block_list *target, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2);
+ int (*fixdamage) (struct block_list *src, struct block_list *target, int64 tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2);
int (*changeviewsize) (struct block_list *bl, short size);
int (*remove_map) (struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func);
void (*remove_map_pc) (struct map_session_data *sd, clr_type clrtype);
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 8d5449b4b..87d169e1c 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -2859,6 +2859,10 @@ struct {
struct HPMHookPoint *HP_map_delblcell_post;
struct HPMHookPoint *HP_map_get_new_bonus_id_pre;
struct HPMHookPoint *HP_map_get_new_bonus_id_post;
+ struct HPMHookPoint *HP_map_add_questinfo_pre;
+ struct HPMHookPoint *HP_map_add_questinfo_post;
+ struct HPMHookPoint *HP_map_remove_questinfo_pre;
+ struct HPMHookPoint *HP_map_remove_questinfo_post;
struct HPMHookPoint *HP_mapit_alloc_pre;
struct HPMHookPoint *HP_mapit_alloc_post;
struct HPMHookPoint *HP_mapit_free_pre;
@@ -3797,6 +3801,10 @@ struct {
struct HPMHookPoint *HP_pc_bank_deposit_post;
struct HPMHookPoint *HP_pc_bank_withdraw_pre;
struct HPMHookPoint *HP_pc_bank_withdraw_post;
+ struct HPMHookPoint *HP_pc_rental_expire_pre;
+ struct HPMHookPoint *HP_pc_rental_expire_post;
+ struct HPMHookPoint *HP_pc_scdata_received_pre;
+ struct HPMHookPoint *HP_pc_scdata_received_post;
struct HPMHookPoint *HP_pet_init_pre;
struct HPMHookPoint *HP_pet_init_post;
struct HPMHookPoint *HP_pet_final_pre;
@@ -7750,6 +7758,10 @@ struct {
int HP_map_delblcell_post;
int HP_map_get_new_bonus_id_pre;
int HP_map_get_new_bonus_id_post;
+ int HP_map_add_questinfo_pre;
+ int HP_map_add_questinfo_post;
+ int HP_map_remove_questinfo_pre;
+ int HP_map_remove_questinfo_post;
int HP_mapit_alloc_pre;
int HP_mapit_alloc_post;
int HP_mapit_free_pre;
@@ -8688,6 +8700,10 @@ struct {
int HP_pc_bank_deposit_post;
int HP_pc_bank_withdraw_pre;
int HP_pc_bank_withdraw_post;
+ int HP_pc_rental_expire_pre;
+ int HP_pc_rental_expire_post;
+ int HP_pc_scdata_received_pre;
+ int HP_pc_scdata_received_post;
int HP_pet_init_pre;
int HP_pet_init_post;
int HP_pet_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 4db9e28f2..97761842e 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1451,6 +1451,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->addblcell, HP_map_addblcell) },
{ HP_POP(map->delblcell, HP_map_delblcell) },
{ HP_POP(map->get_new_bonus_id, HP_map_get_new_bonus_id) },
+ { HP_POP(map->add_questinfo, HP_map_add_questinfo) },
+ { HP_POP(map->remove_questinfo, HP_map_remove_questinfo) },
/* mapit */
{ HP_POP(mapit->alloc, HP_mapit_alloc) },
{ HP_POP(mapit->free, HP_mapit_free) },
@@ -1928,6 +1930,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->removecombo, HP_pc_removecombo) },
{ HP_POP(pc->bank_deposit, HP_pc_bank_deposit) },
{ HP_POP(pc->bank_withdraw, HP_pc_bank_withdraw) },
+ { HP_POP(pc->rental_expire, HP_pc_rental_expire) },
+ { HP_POP(pc->scdata_received, HP_pc_scdata_received) },
/* pet */
{ HP_POP(pet->init, HP_pet_init) },
{ HP_POP(pet->final, HP_pet_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 67a3ae731..7ba95face 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -945,11 +945,11 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in
}
return retVal___;
}
-enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, unsigned int tick, int flag) {
+enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, int64 tick, int flag) {
int hIndex = 0;
enum damage_lv retVal___ = ATK_NONE;
if( HPMHooks.count.HP_battle_weapon_attack_pre ) {
- enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag);
+ enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_weapon_attack_pre[hIndex].func;
retVal___ = preHookFunc(bl, target, &tick, &flag);
@@ -963,7 +963,7 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list
retVal___ = HPMHooks.source.battle.weapon_attack(bl, target, tick, flag);
}
if( HPMHooks.count.HP_battle_weapon_attack_post ) {
- enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag);
+ enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_weapon_attack_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, target, &tick, &flag);
@@ -998,11 +998,11 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_
}
return retVal___;
}
-int HP_battle_delay_damage(unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) {
+int HP_battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_battle_delay_damage_pre ) {
- int (*preHookFunc) (unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
+ int (*preHookFunc) (int64 *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_delay_damage_pre[hIndex].func;
retVal___ = preHookFunc(&tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects);
@@ -1016,7 +1016,7 @@ int HP_battle_delay_damage(unsigned int tick, int amotion, struct block_list *sr
retVal___ = HPMHooks.source.battle.delay_damage(tick, amotion, src, target, attack_type, skill_id, skill_lv, damage, dmg_lv, ddelay, additional_effects);
}
if( HPMHooks.count.HP_battle_delay_damage_post ) {
- int (*postHookFunc) (int retVal___, unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
+ int (*postHookFunc) (int retVal___, int64 *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_delay_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects);
@@ -1638,11 +1638,11 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -1656,7 +1656,7 @@ int HP_battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data
retVal___ = HPMHooks.source.battle.delay_damage_sub(tid, tick, id, data);
}
if( HPMHooks.count.HP_battle_delay_damage_sub_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -2290,11 +2290,11 @@ void HP_bg_begin(struct bg_arena *arena) {
}
return;
}
-int HP_bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_begin_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_begin_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2308,7 +2308,7 @@ int HP_bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.bg.begin_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_bg_begin_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_begin_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -2341,11 +2341,11 @@ void HP_bg_queue_pregame(struct bg_arena *arena) {
}
return;
}
-int HP_bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_fillup_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_fillup_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2359,7 +2359,7 @@ int HP_bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.bg.fillup_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_bg_fillup_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_fillup_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -2760,11 +2760,11 @@ int HP_bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
}
return retVal___;
}
-int HP_bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_send_xy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2778,7 +2778,7 @@ int HP_bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.bg.send_xy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_bg_send_xy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_send_xy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -4335,11 +4335,11 @@ bool HP_chrif_sd_to_auth(TBL_PC *sd, enum sd_state state) {
}
return retVal___;
}
-int HP_chrif_check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4353,7 +4353,7 @@ int HP_chrif_check_connect_char_server(int tid, unsigned int tick, int id, intpt
retVal___ = HPMHooks.source.chrif.check_connect_char_server(tid, tick, id, data);
}
if( HPMHooks.count.HP_chrif_check_connect_char_server_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -4533,11 +4533,11 @@ int HP_chrif_auth_db_final(DBKey key, DBData *data, va_list ap) {
}
return retVal___;
}
-int HP_chrif_send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4551,7 +4551,7 @@ int HP_chrif_send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t
retVal___ = HPMHooks.source.chrif.send_usercount_tochar(tid, tick, id, data);
}
if( HPMHooks.count.HP_chrif_send_usercount_tochar_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -4559,11 +4559,11 @@ int HP_chrif_send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t
}
return retVal___;
}
-int HP_chrif_auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4577,7 +4577,7 @@ int HP_chrif_auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.chrif.auth_db_cleanup(tid, tick, id, data);
}
if( HPMHooks.count.HP_chrif_auth_db_cleanup_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -5816,13 +5816,13 @@ void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) {
}
return;
}
-void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, int ok) {
+void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_equipitemack_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func;
- preHookFunc(sd, &n, &pos, &ok);
+ preHookFunc(sd, &n, &pos, &result);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -5830,24 +5830,24 @@ void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, int ok) {
}
}
{
- HPMHooks.source.clif.equipitemack(sd, n, pos, ok);
+ HPMHooks.source.clif.equipitemack(sd, n, pos, result);
}
if( HPMHooks.count.HP_clif_equipitemack_post ) {
- void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_equipitemack_post[hIndex].func;
- postHookFunc(sd, &n, &pos, &ok);
+ postHookFunc(sd, &n, &pos, &result);
}
}
return;
}
-void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, int ok) {
+void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_unequipitemack_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func;
- preHookFunc(sd, &n, &pos, &ok);
+ preHookFunc(sd, &n, &pos, &result);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -5855,13 +5855,13 @@ void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, int ok)
}
}
{
- HPMHooks.source.clif.unequipitemack(sd, n, pos, ok);
+ HPMHooks.source.clif.unequipitemack(sd, n, pos, result);
}
if( HPMHooks.count.HP_clif_unequipitemack_post ) {
- void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_unequipitemack_post[hIndex].func;
- postHookFunc(sd, &n, &pos, &ok);
+ postHookFunc(sd, &n, &pos, &result);
}
}
return;
@@ -6116,10 +6116,10 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
}
return;
}
-void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, unsigned int tick) {
+void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) {
- void (*preHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick);
+ void (*preHookFunc) (struct block_list *bl, clr_type *type, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func;
preHookFunc(bl, &type, &tick);
@@ -6133,7 +6133,7 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, unsigned in
HPMHooks.source.clif.clearunit_delayed(bl, type, tick);
}
if( HPMHooks.count.HP_clif_clearunit_delayed_post ) {
- void (*postHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick);
+ void (*postHookFunc) (struct block_list *bl, clr_type *type, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_post[hIndex].func;
postHookFunc(bl, &type, &tick);
@@ -6466,11 +6466,11 @@ void HP_clif_skillunit_update(struct block_list *bl) {
}
return;
}
-int HP_clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -6484,7 +6484,7 @@ int HP_clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t d
retVal___ = HPMHooks.source.clif.clearunit_delayed_sub(tid, tick, id, data);
}
if( HPMHooks.count.HP_clif_clearunit_delayed_sub_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -7426,11 +7426,11 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x,
}
return;
}
-int HP_clif_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
+int HP_clif_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_clif_damage_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ int (*preHookFunc) (struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
@@ -7444,7 +7444,7 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, unsigned int
retVal___ = HPMHooks.source.clif.damage(src, dst, tick, sdelay, ddelay, damage, div, type, damage2);
}
if( HPMHooks.count.HP_clif_damage_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
@@ -7841,13 +7841,13 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk
}
return;
}
-void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int tick) {
+void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_cooldown_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick);
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *duration);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_cooldown_pre[hIndex].func;
- preHookFunc(sd, &skill_id, &tick);
+ preHookFunc(sd, &skill_id, &duration);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -7855,13 +7855,13 @@ void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsign
}
}
{
- HPMHooks.source.clif.skill_cooldown(sd, skill_id, tick);
+ HPMHooks.source.clif.skill_cooldown(sd, skill_id, duration);
}
if( HPMHooks.count.HP_clif_skill_cooldown_post ) {
- void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick);
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *duration);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_skill_cooldown_post[hIndex].func;
- postHookFunc(sd, &skill_id, &tick);
+ postHookFunc(sd, &skill_id, &duration);
}
}
return;
@@ -9480,11 +9480,11 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) {
}
return;
}
-int HP_clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_clif_delayquit_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_delayquit_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -9498,7 +9498,7 @@ int HP_clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.clif.delayquit(tid, tick, id, data);
}
if( HPMHooks.count.HP_clif_delayquit_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_delayquit_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -9906,11 +9906,11 @@ void HP_clif_callpartner(struct map_session_data *sd) {
}
return;
}
-int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
+int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_clif_skill_damage_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ int (*preHookFunc) (struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type);
@@ -9924,7 +9924,7 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, unsigne
retVal___ = HPMHooks.source.clif.skill_damage(src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type);
}
if( HPMHooks.count.HP_clif_skill_damage_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_skill_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type);
@@ -9958,10 +9958,10 @@ int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint1
}
return retVal___;
}
-void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int tick) {
+void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_poseffect_pre ) {
- void (*preHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick);
+ void (*preHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_poseffect_pre[hIndex].func;
preHookFunc(src, &skill_id, &val, &x, &y, &tick);
@@ -9975,7 +9975,7 @@ void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, i
HPMHooks.source.clif.skill_poseffect(src, skill_id, val, x, y, tick);
}
if( HPMHooks.count.HP_clif_skill_poseffect_post ) {
- void (*postHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick);
+ void (*postHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_skill_poseffect_post[hIndex].func;
postHookFunc(src, &skill_id, &val, &x, &y, &tick);
@@ -15772,10 +15772,10 @@ void HP_clif_readbook(int fd, int book_id, int page) {
}
return;
}
-void HP_clif_notify_time(struct map_session_data *sd, unsigned long time) {
+void HP_clif_notify_time(struct map_session_data *sd, int64 time) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_notify_time_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, unsigned long *time);
+ void (*preHookFunc) (struct map_session_data *sd, int64 *time);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_notify_time_pre[hIndex].func;
preHookFunc(sd, &time);
@@ -15789,7 +15789,7 @@ void HP_clif_notify_time(struct map_session_data *sd, unsigned long time) {
HPMHooks.source.clif.notify_time(sd, time);
}
if( HPMHooks.count.HP_clif_notify_time_post ) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned long *time);
+ void (*postHookFunc) (struct map_session_data *sd, int64 *time);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_notify_time_post[hIndex].func;
postHookFunc(sd, &time);
@@ -15872,11 +15872,11 @@ void HP_clif_bc_ready(void) {
}
return;
}
-int HP_clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_clif_undisguise_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -15890,7 +15890,7 @@ int HP_clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_clif_undisguise_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_undisguise_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -16598,10 +16598,10 @@ void HP_clif_pActionRequest(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick) {
+void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pActionRequest_sub_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick);
+ void (*preHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_pre[hIndex].func;
preHookFunc(sd, &action_type, &target_id, &tick);
@@ -16615,7 +16615,7 @@ void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, in
HPMHooks.source.clif.pActionRequest_sub(sd, action_type, target_id, tick);
}
if( HPMHooks.count.HP_clif_pActionRequest_sub_post ) {
- void (*postHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick);
+ void (*postHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_post[hIndex].func;
postHookFunc(sd, &action_type, &target_id, &tick);
@@ -17448,10 +17448,10 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToId_homun_pre ) {
- void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_pre[hIndex].func;
preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17465,7 +17465,7 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data
HPMHooks.source.clif.pUseSkillToId_homun(hd, sd, tick, skill_id, skill_lv, target_id);
}
if( HPMHooks.count.HP_clif_pUseSkillToId_homun_post ) {
- void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_post[hIndex].func;
postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17473,10 +17473,10 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data
}
return;
}
-void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre ) {
- void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_pre[hIndex].func;
preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17490,7 +17490,7 @@ void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_sessi
HPMHooks.source.clif.pUseSkillToId_mercenary(md, sd, tick, skill_id, skill_lv, target_id);
}
if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post ) {
- void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_post[hIndex].func;
postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17548,10 +17548,10 @@ void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill
}
return;
}
-void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+void HP_clif_pUseSkillToPos_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 hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre ) {
- void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_pre[hIndex].func;
preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -17565,7 +17565,7 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data
HPMHooks.source.clif.pUseSkillToPos_homun(hd, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo);
}
if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_post ) {
- void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_post[hIndex].func;
postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -17573,10 +17573,10 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data
}
return;
}
-void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+void HP_clif_pUseSkillToPos_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 hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre ) {
- void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_pre[hIndex].func;
preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -17590,7 +17590,7 @@ void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_sess
HPMHooks.source.clif.pUseSkillToPos_mercenary(md, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo);
}
if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post ) {
- void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_post[hIndex].func;
postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -22443,11 +22443,11 @@ int HP_elemental_clean_effect(struct elemental_data *ed) {
}
return retVal___;
}
-int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned int tick) {
+int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_action_pre ) {
- int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, unsigned int *tick);
+ int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_action_pre[hIndex].func;
retVal___ = preHookFunc(ed, bl, &tick);
@@ -22461,7 +22461,7 @@ int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, unsign
retVal___ = HPMHooks.source.elemental.action(ed, bl, tick);
}
if( HPMHooks.count.HP_elemental_action_post ) {
- int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_elemental_action_post[hIndex].func;
retVal___ = postHookFunc(retVal___, ed, bl, &tick);
@@ -22623,11 +22623,11 @@ void HP_elemental_summon_init(struct elemental_data *ed) {
}
return;
}
-int HP_elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -22641,7 +22641,7 @@ int HP_elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t d
retVal___ = HPMHooks.source.elemental.summon_end_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_elemental_summon_end_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -22681,11 +22681,11 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
+int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) {
- int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick);
+ int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_pre[hIndex].func;
retVal___ = preHookFunc(ed, sd, &tick);
@@ -22699,7 +22699,7 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data
retVal___ = HPMHooks.source.elemental.ai_sub_timer(ed, sd, tick);
}
if( HPMHooks.count.HP_elemental_ai_sub_timer_post ) {
- int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, ed, sd, &tick);
@@ -22739,11 +22739,11 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
}
return retVal___;
}
-int HP_elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_ai_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -22757,7 +22757,7 @@ int HP_elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.elemental.ai_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_elemental_ai_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_elemental_ai_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -24546,11 +24546,11 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16
}
return;
}
-int HP_guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_payexp_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_payexp_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -24564,7 +24564,7 @@ int HP_guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.guild.payexp_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_guild_payexp_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_payexp_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -24714,11 +24714,11 @@ int HP_guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
}
return retVal___;
}
-int HP_guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_xy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -24732,7 +24732,7 @@ int HP_guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.guild.send_xy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_guild_send_xy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_send_xy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -26132,11 +26132,11 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) {
}
return retVal___;
}
-int HP_homun_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_homun_hunger_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_hunger_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -26150,7 +26150,7 @@ int HP_homun_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.homun.hunger_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_homun_hunger_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_homun_hunger_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -27115,11 +27115,11 @@ bool HP_instance_valid(int instance_id) {
}
return retVal___;
}
-int HP_instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_instance_destroy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_destroy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -27133,7 +27133,7 @@ int HP_instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.instance.destroy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_instance_destroy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_instance_destroy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -30594,11 +30594,11 @@ struct irc_func* HP_ircbot_func_search(char *function_name) {
}
return retVal___;
}
-int HP_ircbot_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_connect_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_connect_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -30612,7 +30612,7 @@ int HP_ircbot_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.ircbot.connect_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_ircbot_connect_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_ircbot_connect_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -30620,11 +30620,11 @@ int HP_ircbot_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_ircbot_identify_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_identify_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_identify_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -30638,7 +30638,7 @@ int HP_ircbot_identify_timer(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.ircbot.identify_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_ircbot_identify_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_ircbot_identify_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -30646,11 +30646,11 @@ int HP_ircbot_identify_timer(int tid, unsigned int tick, int id, intptr_t data)
}
return retVal___;
}
-int HP_ircbot_join_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_join_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_join_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -30664,7 +30664,7 @@ int HP_ircbot_join_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.ircbot.join_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_ircbot_join_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_ircbot_join_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -33632,11 +33632,11 @@ int HP_map_delblock(struct block_list *bl) {
}
return retVal___;
}
-int HP_map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
+int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_moveblock_pre ) {
- int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, unsigned int *tick);
+ int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x1, &y1, &tick);
@@ -33650,7 +33650,7 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick);
}
if( HPMHooks.count.HP_map_moveblock_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_moveblock_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, &x1, &y1, &tick);
@@ -33814,11 +33814,11 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) {
}
return retVal___;
}
-int HP_map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -33832,7 +33832,7 @@ int HP_map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t dat
retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_map_clearflooritem_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -33840,11 +33840,11 @@ int HP_map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t dat
}
return retVal___;
}
-int HP_map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_removemobs_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -33858,7 +33858,7 @@ int HP_map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_map_removemobs_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_removemobs_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -35449,11 +35449,11 @@ void HP_map_do_shutdown(void) {
}
return;
}
-int HP_map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_freeblock_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -35467,7 +35467,7 @@ int HP_map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_map_freeblock_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_freeblock_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -36638,6 +36638,57 @@ int HP_map_get_new_bonus_id(void) {
}
return retVal___;
}
+void HP_map_add_questinfo(int m, struct questinfo *qi) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_add_questinfo_pre ) {
+ void (*preHookFunc) (int *m, struct questinfo *qi);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func;
+ preHookFunc(&m, qi);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.add_questinfo(m, qi);
+ }
+ if( HPMHooks.count.HP_map_add_questinfo_post ) {
+ void (*postHookFunc) (int *m, struct questinfo *qi);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func;
+ postHookFunc(&m, qi);
+ }
+ }
+ return;
+}
+bool HP_map_remove_questinfo(int m, struct npc_data *nd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_remove_questinfo_pre ) {
+ bool (*preHookFunc) (int *m, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.remove_questinfo(m, nd);
+ }
+ if( HPMHooks.count.HP_map_remove_questinfo_post ) {
+ bool (*postHookFunc) (bool retVal___, int *m, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_remove_questinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, nd);
+ }
+ }
+ return retVal___;
+}
/* mapit */
struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) {
int hIndex = 0;
@@ -37025,11 +37076,11 @@ void HP_mapreg_save(void) {
}
return;
}
-int HP_mapreg_save_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapreg_save_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -37043,7 +37094,7 @@ int HP_mapreg_save_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_mapreg_save_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapreg_save_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -37672,11 +37723,11 @@ int HP_mercenary_search_index(int class_) {
}
return retVal___;
}
-int HP_mercenary_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -37690,7 +37741,7 @@ int HP_mercenary_contract_end_timer(int tid, unsigned int tick, int id, intptr_t
retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -37906,11 +37957,11 @@ int HP_mob_makedummymobdb(int p1) {
}
return retVal___;
}
-int HP_mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -37924,7 +37975,7 @@ int HP_mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -38430,11 +38481,11 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_delayspawn_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -38448,7 +38499,7 @@ int HP_mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_delayspawn_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_delayspawn_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -38752,11 +38803,11 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) {
+int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) {
- int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ int (*preHookFunc) (struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -38770,7 +38821,7 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) {
retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick);
}
if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) {
- int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, &tick);
@@ -38778,11 +38829,11 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) {
}
return retVal___;
}
-int HP_mob_unlocktarget(struct mob_data *md, unsigned int tick) {
+int HP_mob_unlocktarget(struct mob_data *md, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_unlocktarget_pre ) {
- int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ int (*preHookFunc) (struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -38796,7 +38847,7 @@ int HP_mob_unlocktarget(struct mob_data *md, unsigned int tick) {
retVal___ = HPMHooks.source.mob.unlocktarget(md, tick);
}
if( HPMHooks.count.HP_mob_unlocktarget_post ) {
- int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_unlocktarget_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, &tick);
@@ -38804,11 +38855,11 @@ int HP_mob_unlocktarget(struct mob_data *md, unsigned int tick) {
}
return retVal___;
}
-int HP_mob_randomwalk(struct mob_data *md, unsigned int tick) {
+int HP_mob_randomwalk(struct mob_data *md, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_randomwalk_pre ) {
- int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ int (*preHookFunc) (struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -38822,7 +38873,7 @@ int HP_mob_randomwalk(struct mob_data *md, unsigned int tick) {
retVal___ = HPMHooks.source.mob.randomwalk(md, tick);
}
if( HPMHooks.count.HP_mob_randomwalk_post ) {
- int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_randomwalk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, &tick);
@@ -38856,11 +38907,11 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) {
}
return retVal___;
}
-bool HP_mob_ai_sub_hard(struct mob_data *md, unsigned int tick) {
+bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) {
- bool (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ bool (*preHookFunc) (struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -38874,7 +38925,7 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, unsigned int tick) {
retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick);
}
if( HPMHooks.count.HP_mob_ai_sub_hard_post ) {
- bool (*postHookFunc) (bool retVal___, struct mob_data *md, unsigned int *tick);
+ bool (*postHookFunc) (bool retVal___, struct mob_data *md, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, &tick);
@@ -38978,11 +39029,11 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) {
}
return retVal___;
}
-int HP_mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_lazy_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -38996,7 +39047,7 @@ int HP_mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_ai_lazy_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_ai_lazy_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -39004,11 +39055,11 @@ int HP_mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_hard_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39022,7 +39073,7 @@ int HP_mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_ai_hard_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_ai_hard_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -39082,11 +39133,11 @@ struct item_drop* HP_mob_setlootitem(struct item *item) {
}
return retVal___;
}
-int HP_mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_delay_item_drop_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39100,7 +39151,7 @@ int HP_mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_delay_item_drop_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_delay_item_drop_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -39133,11 +39184,11 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct
}
return;
}
-int HP_mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_timer_delete_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39151,7 +39202,7 @@ int HP_mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_timer_delete_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_timer_delete_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -39217,11 +39268,11 @@ int HP_mob_deleteslave(struct mob_data *md) {
}
return retVal___;
}
-int HP_mob_respawn(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_respawn_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39235,7 +39286,7 @@ int HP_mob_respawn(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data);
}
if( HPMHooks.count.HP_mob_respawn_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_respawn_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -39731,11 +39782,11 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond
}
return retVal___;
}
-int HP_mob_skill_use(struct mob_data *md, unsigned int tick, int event) {
+int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_skill_use_pre ) {
- int (*preHookFunc) (struct mob_data *md, unsigned int *tick, int *event);
+ int (*preHookFunc) (struct mob_data *md, int64 *tick, int *event);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick, &event);
@@ -39749,7 +39800,7 @@ int HP_mob_skill_use(struct mob_data *md, unsigned int tick, int event) {
retVal___ = HPMHooks.source.mob.skill_use(md, tick, event);
}
if( HPMHooks.count.HP_mob_skill_use_post ) {
- int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick, int *event);
+ int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick, int *event);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_skill_use_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, &tick, &event);
@@ -39757,11 +39808,11 @@ int HP_mob_skill_use(struct mob_data *md, unsigned int tick, int event) {
}
return retVal___;
}
-int HP_mob_skill_event(struct mob_data *md, struct block_list *src, unsigned int tick, int flag) {
+int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_skill_event_pre ) {
- int (*preHookFunc) (struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct mob_data *md, struct block_list *src, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func;
retVal___ = preHookFunc(md, src, &tick, &flag);
@@ -39775,7 +39826,7 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, unsigned int
retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag);
}
if( HPMHooks.count.HP_mob_skill_event_post ) {
- int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_skill_event_post[hIndex].func;
retVal___ = postHookFunc(retVal___, md, src, &tick, &flag);
@@ -40816,11 +40867,11 @@ int HP_npc_event_doall(const char *name) {
}
return retVal___;
}
-int HP_npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_do_clock_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -40834,7 +40885,7 @@ int HP_npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data);
}
if( HPMHooks.count.HP_npc_event_do_clock_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_event_do_clock_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -40893,11 +40944,11 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) {
}
return retVal___;
}
-int HP_npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_timerevent_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -40911,7 +40962,7 @@ int HP_npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data);
}
if( HPMHooks.count.HP_npc_timerevent_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_timerevent_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -40996,11 +41047,11 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) {
}
return;
}
-int HP_npc_gettimerevent_tick(struct npc_data *nd) {
+int64 HP_npc_gettimerevent_tick(struct npc_data *nd) {
int hIndex = 0;
- int retVal___ = 0;
+ int64 retVal___ = 0;
if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) {
- int (*preHookFunc) (struct npc_data *nd);
+ int64 (*preHookFunc) (struct npc_data *nd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func;
retVal___ = preHookFunc(nd);
@@ -41014,7 +41065,7 @@ int HP_npc_gettimerevent_tick(struct npc_data *nd) {
retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd);
}
if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) {
- int (*postHookFunc) (int retVal___, struct npc_data *nd);
+ int64 (*postHookFunc) (int64 retVal___, struct npc_data *nd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_post[hIndex].func;
retVal___ = postHookFunc(retVal___, nd);
@@ -42554,11 +42605,11 @@ void HP_npc_debug_warps(void) {
}
return;
}
-int HP_npc_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -42572,7 +42623,7 @@ int HP_npc_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat
retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -43672,11 +43723,11 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc
}
return retVal___;
}
-int HP_party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_xy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -43690,7 +43741,7 @@ int HP_party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_party_send_xy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_party_send_xy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -45338,11 +45389,11 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) {
}
return retVal___;
}
-int HP_pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_endautobonus_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -45356,7 +45407,7 @@ int HP_pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_endautobonus_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_endautobonus_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -47181,11 +47232,11 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -47199,7 +47250,7 @@ int HP_pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -47773,11 +47824,11 @@ int HP_pc_readdb(void) {
}
return retVal___;
}
-int HP_pc_map_day_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_map_day_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -47791,7 +47842,7 @@ int HP_pc_map_day_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_map_day_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_map_day_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -47799,11 +47850,11 @@ int HP_pc_map_day_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pc_map_night_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_map_night_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -47817,7 +47868,7 @@ int HP_pc_map_night_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_map_night_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_map_night_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48184,11 +48235,11 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_invincible_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48202,7 +48253,7 @@ int HP_pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_invincible_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_invincible_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48210,11 +48261,11 @@ int HP_pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_spiritball_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48228,7 +48279,7 @@ int HP_pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_spiritball_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_spiritball_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48268,11 +48319,11 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48286,7 +48337,7 @@ int HP_pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data
retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_inventory_rental_end_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48474,11 +48525,11 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned
}
return;
}
-int HP_pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_respawn_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48492,7 +48543,7 @@ int HP_pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_respawn_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_respawn_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48584,11 +48635,11 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) {
}
return retVal___;
}
-int HP_pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_eventtimer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48602,7 +48653,7 @@ int HP_pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_eventtimer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_eventtimer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48642,11 +48693,11 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) {
}
return retVal___;
}
-int HP_pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_charm_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48660,7 +48711,7 @@ int HP_pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_charm_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_charm_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48694,11 +48745,11 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) {
}
return retVal___;
}
-int HP_pc_autosave(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_autosave_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48712,7 +48763,7 @@ int HP_pc_autosave(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_autosave_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_autosave_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48720,11 +48771,11 @@ int HP_pc_autosave(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_follow_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48738,7 +48789,7 @@ int HP_pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pc_follow_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_follow_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -48957,6 +49008,56 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) {
}
return;
}
+void HP_pc_rental_expire(struct map_session_data *sd, int i) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_rental_expire_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func;
+ preHookFunc(sd, &i);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.rental_expire(sd, i);
+ }
+ if( HPMHooks.count.HP_pc_rental_expire_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func;
+ postHookFunc(sd, &i);
+ }
+ }
+ return;
+}
+void HP_pc_scdata_received(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_scdata_received_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.scdata_received(sd);
+ }
+ if( HPMHooks.count.HP_pc_scdata_received_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
/* pet */
int HP_pet_init(void) {
int hIndex = 0;
@@ -49191,11 +49292,11 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) {
}
return retVal___;
}
-int HP_pet_hungry(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_hungry_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49209,7 +49310,7 @@ int HP_pet_hungry(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_hungry_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_hungry_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49691,11 +49792,11 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) {
}
return retVal___;
}
-int HP_pet_randomwalk(struct pet_data *pd, unsigned int tick) {
+int HP_pet_randomwalk(struct pet_data *pd, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_randomwalk_pre ) {
- int (*preHookFunc) (struct pet_data *pd, unsigned int *tick);
+ int (*preHookFunc) (struct pet_data *pd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func;
retVal___ = preHookFunc(pd, &tick);
@@ -49709,7 +49810,7 @@ int HP_pet_randomwalk(struct pet_data *pd, unsigned int tick) {
retVal___ = HPMHooks.source.pet.randomwalk(pd, tick);
}
if( HPMHooks.count.HP_pet_randomwalk_post ) {
- int (*postHookFunc) (int retVal___, struct pet_data *pd, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_randomwalk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, pd, &tick);
@@ -49717,11 +49818,11 @@ int HP_pet_randomwalk(struct pet_data *pd, unsigned int tick) {
}
return retVal___;
}
-int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned int tick) {
+int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) {
- int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, unsigned int *tick);
+ int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func;
retVal___ = preHookFunc(pd, sd, &tick);
@@ -49735,7 +49836,7 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigne
retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick);
}
if( HPMHooks.count.HP_pet_ai_sub_hard_post ) {
- int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_post[hIndex].func;
retVal___ = postHookFunc(retVal___, pd, sd, &tick);
@@ -49775,11 +49876,11 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
}
return retVal___;
}
-int HP_pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_hard_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49793,7 +49894,7 @@ int HP_pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_ai_hard_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_ai_hard_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49801,11 +49902,11 @@ int HP_pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_delay_item_drop_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49819,7 +49920,7 @@ int HP_pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_delay_item_drop_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_delay_item_drop_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49853,11 +49954,11 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49871,7 +49972,7 @@ int HP_pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data)
retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49879,11 +49980,11 @@ int HP_pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data)
}
return retVal___;
}
-int HP_pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_recovery_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49897,7 +49998,7 @@ int HP_pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_recovery_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_recovery_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49905,11 +50006,11 @@ int HP_pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_heal_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49923,7 +50024,7 @@ int HP_pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.pet.heal_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_heal_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_heal_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -49931,11 +50032,11 @@ int HP_pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_skill_support_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49949,7 +50050,7 @@ int HP_pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data
retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_pet_skill_support_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_skill_support_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -50988,11 +51089,11 @@ void HP_script_run_main(struct script_state *st) {
}
return;
}
-int HP_script_run_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_script_run_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51006,7 +51107,7 @@ int HP_script_run_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_script_run_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_script_run_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -55077,11 +55178,11 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill) {
}
return retVal___;
}
-int HP_skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_id_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -55095,7 +55196,7 @@ int HP_skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_castend_id_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_castend_id_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -55103,11 +55204,11 @@ int HP_skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_pos_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -55121,7 +55222,7 @@ int HP_skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_castend_pos_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_castend_pos_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -55181,11 +55282,11 @@ int HP_skill_cleartimerskill(struct block_list *src) {
}
return retVal___;
}
-int HP_skill_addtimerskill(struct block_list *src, unsigned int tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) {
+int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_addtimerskill_pre ) {
- int (*preHookFunc) (struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
+ int (*preHookFunc) (struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func;
retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag);
@@ -55199,7 +55300,7 @@ int HP_skill_addtimerskill(struct block_list *src, unsigned int tick, int target
retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag);
}
if( HPMHooks.count.HP_skill_addtimerskill_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_addtimerskill_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag);
@@ -55207,11 +55308,11 @@ int HP_skill_addtimerskill(struct block_list *src, unsigned int tick, int target
}
return retVal___;
}
-int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, unsigned int tick) {
+int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_additional_effect_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick);
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick);
@@ -55225,7 +55326,7 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui
retVal___ = HPMHooks.source.skill.additional_effect(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick);
}
if( HPMHooks.count.HP_skill_additional_effect_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_additional_effect_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick);
@@ -55233,11 +55334,11 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui
}
return retVal___;
}
-int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, unsigned int tick) {
+int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick);
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick);
@@ -55251,7 +55352,7 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list
retVal___ = HPMHooks.source.skill.counter_additional_effect(src, bl, skill_id, skill_lv, attack_type, tick);
}
if( HPMHooks.count.HP_skill_counter_additional_effect_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &tick);
@@ -55545,11 +55646,11 @@ int HP_skill_clear_group(struct block_list *bl, int flag) {
}
return retVal___;
}
-int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onplace_pre ) {
- int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -55563,7 +55664,7 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigne
retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick);
}
if( HPMHooks.count.HP_skill_unit_onplace_post ) {
- int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_onplace_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &tick);
@@ -55571,11 +55672,11 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigne
}
return retVal___;
}
-int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, unsigned int tick) {
+int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) {
- int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick);
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &damage, &tick);
@@ -55589,7 +55690,7 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64
retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick);
}
if( HPMHooks.count.HP_skill_unit_ondamaged_post ) {
- int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &damage, &tick);
@@ -55832,11 +55933,11 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint
}
return retVal___;
}
-int HP_skill_unit_move(struct block_list *bl, unsigned int tick, int flag) {
+int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_move_pre ) {
- int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct block_list *bl, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func;
retVal___ = preHookFunc(bl, &tick, &flag);
@@ -55850,7 +55951,7 @@ int HP_skill_unit_move(struct block_list *bl, unsigned int tick, int flag) {
retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag);
}
if( HPMHooks.count.HP_skill_unit_move_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_move_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, &tick, &flag);
@@ -55858,11 +55959,11 @@ int HP_skill_unit_move(struct block_list *bl, unsigned int tick, int flag) {
}
return retVal___;
}
-int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, unsigned int tick) {
+int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onleft_pre ) {
- int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, unsigned int *tick);
+ int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, bl, &tick);
@@ -55876,7 +55977,7 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, unsigned int ti
retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick);
}
if( HPMHooks.count.HP_skill_unit_onleft_post ) {
- int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_onleft_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &skill_id, bl, &tick);
@@ -55884,11 +55985,11 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, unsigned int ti
}
return retVal___;
}
-int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onout_pre ) {
- int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -55902,7 +56003,7 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, unsigned
retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick);
}
if( HPMHooks.count.HP_skill_unit_onout_post ) {
- int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_onout_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &tick);
@@ -55962,10 +56063,10 @@ int HP_skill_sit(struct map_session_data *sd, int type) {
}
return retVal___;
}
-void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_brandishspear_pre ) {
- void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func;
preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -55979,7 +56080,7 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1
HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_brandishspear_post ) {
- void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_brandishspear_post[hIndex].func;
postHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56354,11 +56455,11 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) {
}
return retVal___;
}
-int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56372,7 +56473,7 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl,
retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56380,11 +56481,11 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl,
}
return retVal___;
}
-int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_damage_id_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56398,7 +56499,7 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui
retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_castend_damage_id_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56406,11 +56507,11 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui
}
return retVal___;
}
-int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_pos2_pre ) {
- int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func;
retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
@@ -56424,7 +56525,7 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id,
retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_castend_pos2_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_castend_pos2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
@@ -56510,11 +56611,11 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic
}
return retVal___;
}
-int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_attack_pre ) {
- int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56528,7 +56629,7 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *
retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_attack_post ) {
- int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_attack_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -56600,11 +56701,11 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_area_sub_count_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag);
@@ -56618,7 +56719,7 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u
retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag);
}
if( HPMHooks.count.HP_skill_area_sub_count_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_area_sub_count_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &tick, &flag);
@@ -56793,11 +56894,11 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty
}
return retVal___;
}
-int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, unsigned int tick) {
+int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_onskillusage_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick);
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl, &skill_id, &tick);
@@ -56811,7 +56912,7 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui
retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick);
}
if( HPMHooks.count.HP_skill_onskillusage_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_onskillusage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, bl, &skill_id, &tick);
@@ -56851,11 +56952,11 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_timerskill_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -56869,7 +56970,7 @@ int HP_skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_timerskill_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_timerskill_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -57237,11 +57338,11 @@ int HP_skill_icewall_block(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int tick) {
+struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) {
int hIndex = 0;
struct skill_unit_group_tickset* retVal___ = NULL;
if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) {
- struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int *tick);
+ struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func;
retVal___ = preHookFunc(bl, group, &tick);
@@ -57255,7 +57356,7 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l
retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick);
}
if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) {
- struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int *tick);
+ struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, group, &tick);
@@ -57550,11 +57651,11 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski
}
return;
}
-int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) {
- int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -57568,7 +57669,7 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, u
retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick);
}
if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) {
- int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, &tick);
@@ -57672,11 +57773,11 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockpc_end_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57690,7 +57791,7 @@ int HP_skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_blockpc_end_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_blockpc_end_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -57698,11 +57799,11 @@ int HP_skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockhomun_end_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57716,7 +57817,7 @@ int HP_skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_blockhomun_end_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_blockhomun_end_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -57724,11 +57825,11 @@ int HP_skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockmerc_end_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57742,7 +57843,7 @@ int HP_skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_blockmerc_end_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_blockmerc_end_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -57776,11 +57877,11 @@ int HP_skill_split_atoi(char *str, int *val) {
}
return retVal___;
}
-int HP_skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57794,7 +57895,7 @@ int HP_skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_skill_unit_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_unit_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -59633,11 +59734,11 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con
}
return retVal___;
}
-int HP_status_kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59651,7 +59752,7 @@ int HP_status_kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data
retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -59659,11 +59760,11 @@ int HP_status_kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data
}
return retVal___;
}
-int HP_status_change_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59677,7 +59778,7 @@ int HP_status_change_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_status_change_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_status_change_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -61299,11 +61400,11 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) {
}
return retVal___;
}
-int HP_status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_status_natural_heal_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -61317,7 +61418,7 @@ int HP_status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t da
retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_status_natural_heal_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_status_natural_heal_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62129,11 +62230,11 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) {
}
return retVal___;
}
-int HP_unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_attack_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_attack_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -62147,7 +62248,7 @@ int HP_unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.unit.attack_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_unit_attack_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_attack_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62155,11 +62256,11 @@ int HP_unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -62173,7 +62274,7 @@ int HP_unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_unit_walktoxy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62207,11 +62308,11 @@ int HP_unit_walktoxy_sub(struct block_list *bl) {
}
return retVal___;
}
-int HP_unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -62225,7 +62326,7 @@ int HP_unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t da
retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data);
}
if( HPMHooks.count.HP_unit_delay_walktoxy_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62259,11 +62360,11 @@ int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) {
}
return retVal___;
}
-int HP_unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktobl_sub_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -62277,7 +62378,7 @@ int HP_unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data);
}
if( HPMHooks.count.HP_unit_walktobl_sub_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_walktobl_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62623,11 +62724,11 @@ int HP_unit_can_move(struct block_list *bl) {
}
return retVal___;
}
-int HP_unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) {
+int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_resume_running_pre ) {
- int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_resume_running_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -62641,7 +62742,7 @@ int HP_unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) {
retVal___ = HPMHooks.source.unit.resume_running(tid, tick, id, data);
}
if( HPMHooks.count.HP_unit_resume_running_post ) {
- int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_resume_running_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
@@ -62649,11 +62750,11 @@ int HP_unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type) {
+int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_set_walkdelay_pre ) {
- int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *delay, int *type);
+ int (*preHookFunc) (struct block_list *bl, int64 *tick, int *delay, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_set_walkdelay_pre[hIndex].func;
retVal___ = preHookFunc(bl, &tick, &delay, &type);
@@ -62667,7 +62768,7 @@ int HP_unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, i
retVal___ = HPMHooks.source.unit.set_walkdelay(bl, tick, delay, type);
}
if( HPMHooks.count.HP_unit_set_walkdelay_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *delay, int *type);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *tick, int *delay, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_set_walkdelay_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, &tick, &delay, &type);
@@ -62961,11 +63062,11 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) {
}
return retVal___;
}
-int HP_unit_attack_timer_sub(struct block_list *src, int tid, unsigned int tick) {
+int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) {
- int (*preHookFunc) (struct block_list *src, int *tid, unsigned int *tick);
+ int (*preHookFunc) (struct block_list *src, int *tid, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_pre[hIndex].func;
retVal___ = preHookFunc(src, &tid, &tick);
@@ -62979,7 +63080,7 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, unsigned int tick)
retVal___ = HPMHooks.source.unit.attack_timer_sub(src, tid, tick);
}
if( HPMHooks.count.HP_unit_attack_timer_sub_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, int *tid, unsigned int *tick);
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *tid, int64 *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, &tid, &tick);
@@ -63064,11 +63165,11 @@ int HP_unit_counttargeted(struct block_list *bl) {
}
return retVal___;
}
-int HP_unit_fixdamage(struct block_list *src, struct block_list *target, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
+int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int64 tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_fixdamage_pre ) {
- int (*preHookFunc) (struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
@@ -63082,7 +63183,7 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, unsigne
retVal___ = HPMHooks.source.unit.fixdamage(src, target, tick, sdelay, ddelay, damage, div, type, damage2);
}
if( HPMHooks.count.HP_unit_fixdamage_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_fixdamage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);