From fabedc8b22fdad8b6e2154c1c1f03eb2b6aac359 Mon Sep 17 00:00:00 2001 From: Kisuka Date: Thu, 18 Jul 2013 17:41:55 -0700 Subject: Changed npcdb_checkid to use MAX_NPC_CLASS2_START and END. --- src/map/npc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/npc.h') diff --git a/src/map/npc.h b/src/map/npc.h index 16e6fe74c..48c27b297 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -99,7 +99,7 @@ enum actor_classes //Checks if a given id is a valid npc id. [Skotlex] //Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001) -#define npcdb_checkid(id) ( ( (id) >= 46 && (id) <= 125) || (id) == HIDDEN_WARP_CLASS || ( (id) > 400 && (id) < MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS || ( (id) > 10000 && (id) < 10049 ) ) +#define npcdb_checkid(id) ( ( (id) >= 46 && (id) <= 125) || (id) == HIDDEN_WARP_CLASS || ( (id) > 400 && (id) < MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS || ( (id) > MAX_NPC_CLASS2_START && (id) < MAX_NPC_CLASS2_END ) ) #ifdef PCRE_SUPPORT void npc_chat_finalize(struct npc_data* nd); -- cgit v1.2.3-70-g09d2 From 95e13fe4774a7c46c15c6e41ab28338cca827ecc Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 16 Sep 2013 10:20:29 -0300 Subject: HPM: Npc.c Interface Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind --- src/map/atcommand.c | 40 ++-- src/map/battleground.c | 4 +- src/map/chat.c | 2 +- src/map/chrif.c | 4 +- src/map/clif.c | 54 ++--- src/map/elemental.c | 2 +- src/map/guild.c | 18 +- src/map/homunculus.c | 2 +- src/map/instance.c | 4 +- src/map/map.c | 43 ++-- src/map/mercenary.c | 2 +- src/map/mob.c | 12 +- src/map/npc.c | 615 +++++++++++++++++++++++++++---------------------- src/map/npc.h | 198 +++++++++------- src/map/pc.c | 34 +-- src/map/pet.c | 2 +- src/map/script.c | 116 +++++----- src/map/skill.c | 6 +- src/map/status.c | 6 +- src/map/unit.c | 20 +- 20 files changed, 650 insertions(+), 534 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 6c44f8919..d9b9543e4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3749,7 +3749,7 @@ ACMD(reloadscript) flush_fifos(); iMap->reloadnpc(true); // reload config files seeking for npcs script->reload(); - npc_reload(); + npc->reload(); clif->message(fd, msg_txt(100)); // Scripts have been reloaded. @@ -4237,7 +4237,7 @@ ACMD(tonpc) return false; } - if ((nd = npc_name2id(npcname)) != NULL) { + if ((nd = npc->name2id(npcname)) != NULL) { if (pc->setpos(sd, map_id2index(nd->bl.m), nd->bl.x, nd->bl.y, CLR_TELEPORT) == 0) clif->message(fd, msg_txt(0)); // Warped. else @@ -4265,8 +4265,8 @@ ACMD(shownpc) return false; } - if (npc_name2id(NPCname) != NULL) { - npc_enable(NPCname, 1); + if (npc->name2id(NPCname) != NULL) { + npc->enable(NPCname, 1); clif->message(fd, msg_txt(110)); // Npc Enabled. } else { clif->message(fd, msg_txt(111)); // This NPC doesn't exist. @@ -4291,12 +4291,12 @@ ACMD(hidenpc) return false; } - if (npc_name2id(NPCname) == NULL) { + if (npc->name2id(NPCname) == NULL) { clif->message(fd, msg_txt(111)); // This NPC doesn't exist. return false; } - npc_enable(NPCname, 0); + npc->enable(NPCname, 0); clif->message(fd, msg_txt(112)); // Npc Disabled. return true; } @@ -4318,9 +4318,9 @@ ACMD(loadnpc) fclose(fp); // add to list of script sources and run it - npc_addsrcfile(message); - npc_parsesrcfile(message,true); - npc_read_event_script(); + npc->addsrcfile(message); + npc->parsesrcfile(message,true); + npc->read_event_script(); clif->message(fd, msg_txt(262)); @@ -4340,14 +4340,14 @@ ACMD(unloadnpc) return false; } - if ((nd = npc_name2id(NPCname)) == NULL) { + if ((nd = npc->name2id(NPCname)) == NULL) { clif->message(fd, msg_txt(111)); // This NPC doesn't exist. return false; } - npc_unload_duplicates(nd); - npc_unload(nd,true); - npc_read_event_script(); + npc->unload_duplicates(nd); + npc->unload(nd,true); + npc->read_event_script(); clif->message(fd, msg_txt(112)); // Npc Disabled. return true; } @@ -4749,7 +4749,7 @@ ACMD(disguise) } else { //Acquired a Name if ((id = mob->db_searchname(message)) == 0) { - struct npc_data* nd = npc_name2id(message); + struct npc_data* nd = npc->name2id(message); if (nd != NULL) id = nd->class_; } @@ -4828,7 +4828,7 @@ ACMD(disguiseguild) id = 0; } else { if( (id = mob->db_searchname(monster)) == 0 ) { - struct npc_data* nd = npc_name2id(monster); + struct npc_data* nd = npc->name2id(monster); if( nd != NULL ) id = nd->class_; } @@ -5116,7 +5116,7 @@ ACMD(npcmove) return false; } - if ((nd = npc_name2id(atcmd_player_name)) == NULL) + if ((nd = npc->name2id(atcmd_player_name)) == NULL) { clif->message(fd, msg_txt(111)); // This NPC doesn't exist. return false; @@ -5165,7 +5165,7 @@ ACMD(addwarp) return false; } - nd = npc_add_warp(warpname, sd->bl.m, sd->bl.x, sd->bl.y, 2, 2, m, x, y); + nd = npc->add_warp(warpname, sd->bl.m, sd->bl.x, sd->bl.y, 2, 2, m, x, y); if( nd == NULL ) return false; @@ -6194,7 +6194,7 @@ ACMD(npctalk) } } - if (!(nd = npc_name2id(name))) { + if (!(nd = npc->name2id(name))) { clif->message(fd, msg_txt(111)); // This NPC doesn't exist return false; } @@ -8759,7 +8759,7 @@ ACMD(unloadnpcfile) { return false; } - if( npc_unloadfile(message) ) + if( npc->unloadfile(message) ) clif->message(fd, msg_txt(1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed. else { clif->message(fd, msg_txt(1387)); // File not found. @@ -10018,7 +10018,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if( binding->log ) /* log only if this command should be logged [Ind/Hercules] */ logs->atcommand(sd, atcmd_msg); - npc_do_atcmd_event((invokeFlag ? sd : ssd), command, params, binding->npc_event); + npc->do_atcmd_event((invokeFlag ? sd : ssd), command, params, binding->npc_event); return true; } } diff --git a/src/map/battleground.c b/src/map/battleground.c index 3b2e0b1ce..66586c5fe 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -149,7 +149,7 @@ int bg_team_leave(struct map_session_data *sd, int flag) } if( bg_data->logout_event[0] && flag ) - npc_event(sd, bg_data->logout_event, 0); + npc->event(sd, bg_data->logout_event, 0); if( sd->bg_queue.arena ) { bg->queue_pc_cleanup(sd); @@ -534,7 +534,7 @@ void bg_begin(struct bg_arena *arena) { arena->ongoing = true; mapreg_setreg(script->add_str("$@bg_queue_id"),arena->queue_id);/* TODO: make this a arena-independant var? or just .@? */ mapreg_setregstr(script->add_str("$@bg_delay_var$"),bg->gdelay_var); - npc_event_do(arena->npc_event); + npc->event_do(arena->npc_event); /* we split evenly? */ /* but if a party of say 10 joins, it cant be split evenly unless by luck there are 10 soloers in the queue besides them */ /* not sure how to split T_T needs more info */ diff --git a/src/map/chat.c b/src/map/chat.c index 3a76dd157..28de86fe1 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -388,7 +388,7 @@ int chat_triggerevent(struct chat_data *cd) nullpo_ret(cd); if( cd->users >= cd->trigger && cd->npc_event[0] ) - npc_event_do(cd->npc_event); + npc->event_do(cd->npc_event); return 0; } diff --git a/src/map/chrif.c b/src/map/chrif.c index 6b0397b56..524286da1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -463,10 +463,10 @@ int chrif_connectack(int fd) { chrif_sendmap(fd); - ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit")); + ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInit")); if( !char_init_done ) { char_init_done = true; - ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); + ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInitOnce")); guild->castle_map_init(); } diff --git a/src/map/clif.c b/src/map/clif.c index f8f88c691..391c3c40b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1928,7 +1928,7 @@ void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) int slen = strlen(mes) + 9; struct block_list *bl = NULL; - if (!sd->state.using_fake_npc && (npcid == fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); @@ -1960,7 +1960,7 @@ void clif_scriptinput(struct map_session_data *sd, int npcid) nullpo_retv(sd); - if (!sd->state.using_fake_npc && (npcid == fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); @@ -1991,7 +1991,7 @@ void clif_scriptinputstr(struct map_session_data *sd, int npcid) nullpo_retv(sd); - if (!sd->state.using_fake_npc && (npcid == fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || + if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = iMap->id2bl(npcid)) && (bl->m!=sd->bl.m || bl->xbl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 || bl->ybl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); @@ -9531,7 +9531,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { iMap->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); //Login Event - npc_script_event(sd, NPCE_LOGIN); + npc->script_event(sd, NPCE_LOGIN); } else { //For some reason the client "loses" these on warp/map-change. clif->updatestatus(sd,SP_STR); @@ -9547,7 +9547,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { sd->npc_menu = 0; if(sd->npc_id) - npc_event_dequeue(sd); + npc->event_dequeue(sd); if( sd->guild && ( battle_config.guild_notice_changemap == 2 || ( battle_config.guild_notice_changemap == 1 && sd->state.changemap ) ) ) clif->guild_notice(sd,sd->guild); @@ -9611,7 +9611,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { } if(map[sd->bl.m].flag.loadevent) // Lance - npc_script_event(sd, NPCE_LOADMAP); + npc->script_event(sd, NPCE_LOADMAP); if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd)) //blindness [Komurka] clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_DEVIL1); @@ -9623,7 +9623,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { // For automatic triggering of NPCs after map loading (so you don't need to walk 1 step first) if (iMap->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC)) - npc_touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y); + npc->touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y); else sd->areanpc_id = 0; @@ -9750,7 +9750,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd) sd->st->state = END; sd->state.workinprogress = sd->progressbar.npc_id = sd->progressbar.timeout = 0; - npc_scriptcont(sd, npc_id, false); + npc->scriptcont(sd, npc_id, false); } @@ -10401,8 +10401,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) //-------------------------------------------------------// if (target[0] && (strncasecmp(target,"NPC:",4) == 0) && (strlen(target) > 4)) { char* str = target+4; //Skip the NPC: string part. - struct npc_data* npc; - if ((npc = npc_name2id(str))) { + struct npc_data *nd; + if ((nd = npc->name2id(str))) { char split_data[NUM_WHISPER_VAR][CHAT_SIZE_MAX]; char *split; char output[256]; @@ -10429,8 +10429,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) script->set_var(sd,output,(char *) split_data[i]); } - sprintf(output, "%s::OnWhisperGlobal", npc->exname); - npc_event(sd,output,0); // Calls the NPC label + sprintf(output, "%s::OnWhisperGlobal", nd->exname); + npc->event(sd,output,0); // Calls the NPC label return; } @@ -10837,7 +10837,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) break; } if( bl->m != -1 )// the user can't click floating npcs directly (hack attempt) - npc_click(sd,(TBL_NPC*)bl); + npc->click(sd,(TBL_NPC*)bl); break; } } @@ -10852,7 +10852,7 @@ void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd) { if (sd->state.trading) return; - npc_buysellsel(sd,RFIFOL(fd,2),RFIFOB(fd,6)); + npc->buysellsel(sd,RFIFOL(fd,2),RFIFOB(fd,6)); } @@ -10884,7 +10884,7 @@ void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd) if( sd->state.trading || !sd->npc_shopid ) result = 1; else - result = npc_buylist(sd,n,item_list); + result = npc->buylist(sd,n,item_list); sd->npc_shopid = 0; //Clear shop data. @@ -10920,7 +10920,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd) if (sd->state.trading || !sd->npc_shopid) fail = 1; else - fail = npc_selllist(sd,n,item_list); + fail = npc->selllist(sd,n,item_list); sd->npc_shopid = 0; //Clear shop data. @@ -10949,7 +10949,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,3); return; } - if( npc_isnear(&sd->bl) ) { + if( npc->isnear(&sd->bl) ) { // uncomment for more verbose message. //char output[150]; //sprintf(output, msg_txt(662), battle_config.min_npc_vendchat_distance); @@ -11695,7 +11695,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) } sd->npc_menu = select; - npc_scriptcont(sd,npc_id, false); + npc->scriptcont(sd,npc_id, false); } @@ -11703,7 +11703,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) /// 00b9 .L void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd) { - npc_scriptcont(sd,RFIFOL(fd,2), false); + npc->scriptcont(sd,RFIFOL(fd,2), false); } @@ -11715,7 +11715,7 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd) int amount = (int)RFIFOL(fd,6); sd->npc_amount = amount; - npc_scriptcont(sd, npcid, false); + npc->scriptcont(sd, npcid, false); } @@ -11731,7 +11731,7 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) return; // invalid input safestrncpy(sd->npc_str, message, min(message_len,CHATBOX_SIZE)); - npc_scriptcont(sd, npcid, false); + npc->scriptcont(sd, npcid, false); } @@ -11741,7 +11741,7 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd) { if (!sd->npc_id) //Avoid parsing anything when the script was done with. [Skotlex] return; - npc_scriptcont(sd, RFIFOL(fd,2), true); + npc->scriptcont(sd, RFIFOL(fd,2), true); } @@ -13275,9 +13275,9 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) clif->GM_kickack(sd, 0); return; } - npc_unload_duplicates(nd); - npc_unload(nd,true); - npc_read_event_script(); + npc->unload_duplicates(nd); + npc->unload(nd,true); + npc->read_event_script(); } break; @@ -15293,7 +15293,7 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) short amount = RFIFOW(fd,4); int points = RFIFOL(fd,6); - fail = npc_cashshop_buy(sd, nameid, amount, points); + fail = npc->cashshop_buy(sd, nameid, amount, points); #else int len = RFIFOW(fd,2); int points = RFIFOL(fd,4); @@ -15305,7 +15305,7 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) ShowWarning("Player %u sent incorrect cash shop buy packet (len %u:%u)!\n", sd->status.char_id, len, 10 + count * 4); return; } - fail = npc_cashshop_buylist(sd,points,count,item_list); + fail = npc->cashshop_buylist(sd,points,count,item_list); #endif } diff --git a/src/map/elemental.c b/src/map/elemental.c index 1ef85b3e5..855d9e2c6 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -238,7 +238,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { if( !sd->ed ) { // Initialize it after first summon. sd->ed = ed = (struct elemental_data*)aCalloc(1,sizeof(struct elemental_data)); ed->bl.type = BL_ELEM; - ed->bl.id = npc_get_new_npc_id(); + ed->bl.id = npc->get_new_npc_id(); ed->master = sd; ed->db = db; memcpy(&ed->elemental, ele, sizeof(struct s_elemental)); diff --git a/src/map/guild.c b/src/map/guild.c index 37335f9d0..6219fc770 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -429,7 +429,7 @@ int guild_npc_request_info(int guild_id,const char *event) if( guild->search(guild_id) ) { if( event && *event ) - npc_event_do(event); + npc->event_do(event); return 0; } @@ -622,7 +622,7 @@ int guild_recv_info(struct guild *sg) { if (guild_infoevent_db->remove(guild_infoevent_db, DB->i2key(sg->guild_id), &data)) { struct eventlist *ev = DB->data2ptr(&data), *ev2; while(ev) { - npc_event_do(ev->name); + npc->event_do(ev->name); ev2=ev->next; aFree(ev); ev=ev2; @@ -1736,7 +1736,7 @@ int castle_guild_broken_sub(DBKey key, DBData *data, va_list ap) // We call castle_event::OnGuildBreak of all castles of the guild // You can set all castle_events in the 'db/castle_db.txt' safestrncpy(name, gc->castle_event, sizeof(name)); - npc_event_do(strcat(name, "::OnGuildBreak")); + npc->event_do(strcat(name, "::OnGuildBreak")); //Save the new 'owner', this should invoke guardian clean up and other such things. guild->castledatasave(gc->castle_id, 1, 0); @@ -2044,8 +2044,8 @@ int guild_castledataloadack(int len, struct guild_castle *gc) ev = i; // offset of castle or -1 if( ev < 0 ) { //No castles owned, invoke OnAgitInit as it is. - npc_event_doall("OnAgitInit"); - npc_event_doall("OnAgitInit2"); + npc->event_doall("OnAgitInit"); + npc->event_doall("OnAgitInit2"); } else { // load received castles into memory, one by one for( i = 0; i < n; i++, gc++ ) { struct guild_castle *c = guild->castle_search(gc->castle_id); @@ -2076,7 +2076,7 @@ int guild_castledataloadack(int len, struct guild_castle *gc) *---------------------------------------------------*/ void guild_agit_start(void) { // Run All NPC_Event[OnAgitStart] - int c = npc_event_doall("OnAgitStart"); + int c = npc->event_doall("OnAgitStart"); ShowStatus("NPC_Event:[OnAgitStart] Run (%d) Events by @AgitStart.\n",c); } @@ -2085,7 +2085,7 @@ void guild_agit_start(void) *---------------------------------------------------*/ void guild_agit_end(void) { // Run All NPC_Event[OnAgitEnd] - int c = npc_event_doall("OnAgitEnd"); + int c = npc->event_doall("OnAgitEnd"); ShowStatus("NPC_Event:[OnAgitEnd] Run (%d) Events by @AgitEnd.\n",c); } @@ -2094,7 +2094,7 @@ void guild_agit_end(void) *---------------------------------------------------*/ void guild_agit2_start(void) { // Run All NPC_Event[OnAgitStart2] - int c = npc_event_doall("OnAgitStart2"); + int c = npc->event_doall("OnAgitStart2"); ShowStatus("NPC_Event:[OnAgitStart2] Run (%d) Events by @AgitStart2.\n",c); } @@ -2103,7 +2103,7 @@ void guild_agit2_start(void) *---------------------------------------------------*/ void guild_agit2_end(void) { // Run All NPC_Event[OnAgitEnd2] - int c = npc_event_doall("OnAgitEnd2"); + int c = npc->event_doall("OnAgitEnd2"); ShowStatus("NPC_Event:[OnAgitEnd2] Run (%d) Events by @AgitEnd2.\n",c); } diff --git a/src/map/homunculus.c b/src/map/homunculus.c index e0443f1f6..81971ebef 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -736,7 +736,7 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) { } sd->hd = hd = (struct homun_data*)aCalloc(1,sizeof(struct homun_data)); hd->bl.type = BL_HOM; - hd->bl.id = npc_get_new_npc_id(); + hd->bl.id = npc->get_new_npc_id(); hd->master = sd; hd->homunculusDB = &homun->db[i]; diff --git a/src/map/instance.c b/src/map/instance.c index 204b7c137..98a0dfc8f 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -297,7 +297,7 @@ int instance_map_npcsub(struct block_list* bl, va_list args) { struct npc_data* nd = (struct npc_data*)bl; int16 m = va_arg(args, int); // Destination Map - if ( npc_duplicate4instance(nd, m) ) + if ( npc->duplicate4instance(nd, m) ) ShowDebug("instance_map_npcsub:npc_duplicate4instance failed (%s/%d)\n",nd->name,m); return 1; @@ -341,7 +341,7 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) { iMap->quit((struct map_session_data *) bl); break; case BL_NPC: - npc_unload((struct npc_data *)bl,true); + npc->unload((struct npc_data *)bl,true); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); diff --git a/src/map/map.c b/src/map/map.c index 64e765b27..e55dea152 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -372,7 +372,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) sc->data[SC_PROPERTYWALK]->val3 >= skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) ) status_change_end(bl,SC_PROPERTYWALK,INVALID_TIMER); } else if (bl->type == BL_NPC) - npc_unsetcells((TBL_NPC*)bl); + npc->unsetcells((TBL_NPC*)bl); if (moveblock) iMap->delblock(bl); #ifdef CELL_NOSTACK @@ -443,7 +443,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) } } } else if (bl->type == BL_NPC) - npc_setcells((TBL_NPC*)bl); + npc->setcells((TBL_NPC*)bl); return 0; } @@ -1534,10 +1534,10 @@ int map_quit(struct map_session_data *sd) { } if (sd->npc_timer_id != INVALID_TIMER) //Cancel the event timer. - npc_timerevent_quit(sd); + npc->timerevent_quit(sd); if (sd->npc_id) - npc_event_dequeue(sd); + npc->event_dequeue(sd); if( sd->bg_id && !sd->bg_queue.arena ) /* TODO: dump this chunk after bg_queue is fully enabled */ bg_team_leave(sd,1); @@ -1548,7 +1548,7 @@ int map_quit(struct map_session_data *sd) { for( i = 0; i < sd->queues_count; i++ ) { struct hQueue *queue; if( (queue = script->queue(sd->queues[i])) && queue->onLogOut[0] != '\0' ) { - npc_event(sd, queue->onLogOut, 0); + npc->event(sd, queue->onLogOut, 0); } } /* two times, the npc event above may assign a new one or delete others */ @@ -1557,7 +1557,7 @@ int map_quit(struct map_session_data *sd) { script->queue_remove(sd->queues[i],sd->status.account_id); } - npc_script_event(sd, NPCE_LOGOUT); + npc->script_event(sd, NPCE_LOGOUT); //Unit_free handles clearing the player related data, //iMap->quit handles extra specific data which is related to quitting normally @@ -2104,7 +2104,7 @@ void map_spawnmobs(int16 m) if(map[m].moblist[i]!=NULL) { k+=map[m].moblist[i]->num; - npc_parse_mob2(map[m].moblist[i]); + npc->parse_mob2(map[m].moblist[i]); } if (battle_config.etc_log && k > 0) @@ -2361,7 +2361,7 @@ void map_cellfromcache(struct map_data *m) { m->setcell = map_setcell; for(i = 0; i < m->npc_num; i++) { - npc_setcells(m->npc[i]); + npc->setcells(m->npc[i]); } } } @@ -3274,9 +3274,9 @@ int map_config_read(char *cfgName) { else if (strcmpi(w1, "delmap") == 0) iMap->map_num--; else if (strcmpi(w1, "npc") == 0) - npc_addsrcfile(w2); + npc->addsrcfile(w2); else if (strcmpi(w1, "delnpc") == 0) - npc_delsrcfile(w2); + npc->delsrcfile(w2); else if (strcmpi(w1, "autosave_time") == 0) { iMap->autosave_interval = atoi(w2); if (iMap->autosave_interval < 1) //Revert to default saving. @@ -3379,7 +3379,7 @@ void map_reloadnpc_sub(char *cfgName) *ptr = '\0'; if (strcmpi(w1, "npc") == 0) - npc_addsrcfile(w2); + npc->addsrcfile(w2); else if (strcmpi(w1, "import") == 0) map_reloadnpc_sub(w2); else @@ -3392,7 +3392,7 @@ void map_reloadnpc_sub(char *cfgName) void map_reloadnpc(bool clear) { if (clear) - npc_addsrcfile("clear"); // this will clear the current script list + npc->addsrcfile("clear"); // this will clear the current script list #ifdef RENEWAL map_reloadnpc_sub("npc/re/scripts_main.conf"); @@ -3563,7 +3563,7 @@ void map_zone_remove(int m) { } } - npc_parse_mapflag(map[m].name,empty,flag,params,empty,empty,empty); + npc->parse_mapflag(map[m].name,empty,flag,params,empty,empty,empty); aFree(map[m].zone_mf[k]); map[m].zone_mf[k] = NULL; } @@ -4287,7 +4287,7 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const if( map_zone_mf_cache(m,flag,params) ) continue; - npc_parse_mapflag(map[m].name,empty,flag,params,start,buffer,filepath); + npc->parse_mapflag(map[m].name,empty,flag,params,start,buffer,filepath); } } /* used on npc load and reload to apply all "Normal" and "PK Mode" zones */ @@ -4315,7 +4315,7 @@ void map_zone_init(void) { if( map[j].zone == zone ) { if( map_zone_mf_cache(j,flag,params) ) break; - npc_parse_mapflag(map[j].name,empty,flag,params,empty,empty,empty); + npc->parse_mapflag(map[j].name,empty,flag,params,empty,empty,empty); } } } @@ -4337,7 +4337,7 @@ void map_zone_init(void) { if( map[j].zone == zone ) { if( map_zone_mf_cache(j,flag,params) ) break; - npc_parse_mapflag(map[j].name,empty,flag,params,empty,empty,empty); + npc->parse_mapflag(map[j].name,empty,flag,params,empty,empty,empty); } } } @@ -4869,7 +4869,7 @@ int cleanup_sub(struct block_list *bl, va_list ap) { iMap->quit((struct map_session_data *) bl); break; case BL_NPC: - npc_unload((struct npc_data *)bl,false); + npc->unload((struct npc_data *)bl,false); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); @@ -4917,7 +4917,7 @@ void do_final(void) mapit->free(iter); /* prepares npcs for a faster shutdown process */ - do_clear_npc(); + npc->do_clear_npc(); // remove all objects on maps for (i = 0; i < iMap->map_num; i++) { @@ -4936,7 +4936,7 @@ void do_final(void) chrif->do_final_chrif(); ircbot->final();/* before clif. */ clif->final(); - do_final_npc(); + npc->final(); script->final(); itemdb->final(); instance->final(); @@ -5170,6 +5170,7 @@ void map_hp_symbols(void) { HPM->share(mercenary,"mercenary"); HPM->share(mob,"mob"); HPM->share(unit,"unit"); + HPM->share(npc,"npc"); /* partial */ HPM->share(mapit,"mapit"); @@ -5416,13 +5417,13 @@ int do_init(int argc, char *argv[]) mercenary->init(); elemental->do_init_elemental(); do_init_quest(); - do_init_npc(); + npc->init(); unit->init(); do_init_battleground(); iDuel->do_init_duel(); vending->init(); - npc_event_do_oninit(); // Init npcs (OnInit) + npc->event_do_oninit(); // Init npcs (OnInit) if (battle_config.pk_mode) ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n"); diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 8bafcde97..bf802c643 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -301,7 +301,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag) { sd->md = md = (struct mercenary_data*)aCalloc(1,sizeof(struct mercenary_data)); md->bl.type = BL_MER; - md->bl.id = npc_get_new_npc_id(); + md->bl.id = npc->get_new_npc_id(); md->devotion_flag = 0; md->master = sd; diff --git a/src/map/mob.c b/src/map/mob.c index c566262df..13fdae1ee 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -132,7 +132,7 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time) CREATE(nd, struct npc_data, 1); - nd->bl.id = md->tomb_nid = npc_get_new_npc_id(); + nd->bl.id = md->tomb_nid = npc->get_new_npc_id(); nd->dir = md->ud.dir; nd->bl.m = md->bl.m; @@ -259,7 +259,7 @@ int mob_parse_dataset(struct spawn_data *data) *------------------------------------------*/ struct mob_data* mob_spawn_dataset(struct spawn_data *data) { struct mob_data *md = (struct mob_data*)aCalloc(1, sizeof(struct mob_data)); - md->bl.id= npc_get_new_npc_id(); + md->bl.id= npc->get_new_npc_id(); md->bl.type = BL_MOB; md->bl.m = data->m; md->bl.x = data->x; @@ -2579,15 +2579,15 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if( md->npc_event[0] && !md->state.npc_killmonster ) { if( sd && battle_config.mob_npc_event_type ) { pc->setparam(sd, SP_KILLERRID, sd->bl.id); - npc_event(sd,md->npc_event,0); + npc->event(sd,md->npc_event,0); } else if( mvp_sd ) { pc->setparam(mvp_sd, SP_KILLERRID, sd?sd->bl.id:0); - npc_event(mvp_sd,md->npc_event,0); + npc->event(mvp_sd,md->npc_event,0); } else - npc_event_do(md->npc_event); + npc->event_do(md->npc_event); } else if( mvp_sd && !md->state.npc_killmonster ) { pc->setparam(mvp_sd, SP_KILLEDRID, md->class_); - npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] + npc->script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] } md->status.hp = 1; diff --git a/src/map/npc.c b/src/map/npc.c index c4ef1bcf9..1a813560b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -36,15 +36,7 @@ #include #include - -struct npc_data* fake_nd; - -// linked list of npc source files -struct npc_src_list { - struct npc_src_list* next; - char name[4]; // dynamic array, the structure is allocated with extra bytes (string length) -}; -static struct npc_src_list* npc_src_files = NULL; +struct npc_interface npc_s; static int npc_id=START_NPC_NUM; static int npc_warp=0; @@ -54,46 +46,9 @@ static int npc_mob=0; static int npc_delay_mob=0; static int npc_cache_mob=0; -/// Returns a new npc id that isn't being used in id_db. -/// Fatal error if nothing is available. -int npc_get_new_npc_id(void) { - if( npc_id >= START_NPC_NUM && !iMap->blid_exists(npc_id) ) - return npc_id++;// available - else {// find next id - int base_id = npc_id; - while( base_id != ++npc_id ) { - if( npc_id < START_NPC_NUM ) - npc_id = START_NPC_NUM; - if( !iMap->blid_exists(npc_id) ) - return npc_id++;// available - } - // full loop, nothing available - ShowFatalError("npc_get_new_npc_id: All ids are taken. Exiting..."); - exit(1); - } -} - -static DBMap* ev_db; // const char* event_name -> struct event_data* -static DBMap* ev_label_db; // const char* label_name (without leading "::") -> struct linkdb_node** (key: struct npc_data*; data: struct event_data*) -static DBMap* npcname_db; // const char* npc_name -> struct npc_data* - -struct event_data { - struct npc_data *nd; - int pos; -}; - -static struct eri *timer_event_ers; //For the npc timer data. [Skotlex] - -/* hello */ static char *npc_last_path; static char *npc_last_ref; - -struct npc_path_data { - char* path; - unsigned short references; -}; struct npc_path_data *npc_last_npd; -static DBMap *npc_path_db; //For holding the view data of npc classes. [Skotlex] static struct view_data npc_viewdb[MAX_NPC_CLASS]; @@ -120,7 +75,26 @@ struct view_data* npc_get_viewdata(int class_) return NULL; } -static int npc_isnear_sub(struct block_list* bl, va_list args) { +/// Returns a new npc id that isn't being used in id_db. +/// Fatal error if nothing is available. +int npc_get_new_npc_id(void) { + if( npc_id >= START_NPC_NUM && !iMap->blid_exists(npc_id) ) + return npc_id++;// available + else {// find next id + int base_id = npc_id; + while( base_id != ++npc_id ) { + if( npc_id < START_NPC_NUM ) + npc_id = START_NPC_NUM; + if( !iMap->blid_exists(npc_id) ) + return npc_id++;// available + } + // full loop, nothing available + ShowFatalError("npc_get_new_npc_id: All ids are taken. Exiting..."); + exit(1); + } +} + +int npc_isnear_sub(struct block_list* bl, va_list args) { struct npc_data *nd = (struct npc_data*)bl; if( nd->option & (OPTION_HIDE|OPTION_INVISIBLE) ) @@ -132,7 +106,7 @@ static int npc_isnear_sub(struct block_list* bl, va_list args) { bool npc_isnear(struct block_list * bl) { if( battle_config.min_npc_vendchat_distance > 0 && - iMap->foreachinrange(npc_isnear_sub,bl, battle_config.min_npc_vendchat_distance, BL_NPC) ) + iMap->foreachinrange(npc->isnear_sub,bl, battle_config.min_npc_vendchat_distance, BL_NPC) ) return true; return false; @@ -149,7 +123,7 @@ int npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) return 1; // Can't trigger 'OnTouch_'. try 'OnTouch' later. snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script->config.ontouch_name); - return npc_event(sd,name,1); + return npc->event(sd,name,1); } int npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) @@ -160,7 +134,7 @@ int npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) return 0; snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script->config.ontouch2_name); - return npc_event(sd,name,2); + return npc->event(sd,name,2); } /*========================================== @@ -179,13 +153,13 @@ int npc_enable_sub(struct block_list *bl, va_list ap) if (nd->option&OPTION_INVISIBLE) return 1; - if( npc_ontouch_event(sd,nd) > 0 && npc_ontouch2_event(sd,nd) > 0 ) + if( npc->ontouch_event(sd,nd) > 0 && npc->ontouch2_event(sd,nd) > 0 ) { // failed to run OnTouch event, so just click the npc if (sd->npc_id != 0) return 0; pc_stop_walking(sd,1); - npc_click(sd,nd); + npc->click(sd,nd); } } return 0; @@ -196,7 +170,7 @@ int npc_enable_sub(struct block_list *bl, va_list ap) *------------------------------------------*/ int npc_enable(const char* name, int flag) { - struct npc_data* nd = npc_name2id(name); + struct npc_data* nd = npc->name2id(name); if ( nd == NULL ) { ShowError("npc_enable: Attempted to %s a non-existing NPC '%s' (flag=%d).\n", (flag&3) ? "show" : "hide", name, flag); @@ -224,7 +198,7 @@ int npc_enable(const char* name, int flag) clif->changeoption(&nd->bl); if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) ) //check if player standing on a OnTouchArea - iMap->foreachinarea( npc_enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd ); + iMap->foreachinarea( npc->enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd ); return 0; } @@ -234,7 +208,7 @@ int npc_enable(const char* name, int flag) *------------------------------------------*/ struct npc_data* npc_name2id(const char* name) { - return (struct npc_data *) strdb_get(npcname_db, name); + return (struct npc_data *) strdb_get(npc->name_db, name); } /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] @@ -277,7 +251,7 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat clif->scriptclear(sd,sd->npc_id); sd->npc_idle_timer = INVALID_TIMER; } else //Create a new instance of ourselves to continue - sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); return 0; } #endif @@ -317,7 +291,7 @@ int npc_event_dequeue(struct map_session_data* sd) /** * @see DBCreateData */ -static DBData npc_event_export_create(DBKey key, va_list args) +DBData npc_event_export_create(DBKey key, va_list args) { struct linkdb_node** head_ptr; CREATE(head_ptr, struct linkdb_node*, 1); @@ -329,7 +303,7 @@ static DBData npc_event_export_create(DBKey key, va_list args) * exports a npc event label * called from npc_parse_script *------------------------------------------*/ -static int npc_event_export(struct npc_data *nd, int i) +int npc_event_export(struct npc_data *nd, int i) { char* lname = nd->u.scr.label_list[i].name; int pos = nd->u.scr.label_list[i].pos; @@ -338,14 +312,14 @@ static int npc_event_export(struct npc_data *nd, int i) struct linkdb_node **label_linkdb = NULL; char buf[EVENT_NAME_LENGTH]; snprintf(buf, ARRAYLENGTH(buf), "%s::%s", nd->exname, lname); - if (strdb_exists(ev_db, buf)) // There was already another event of the same name? + if (strdb_exists(npc->ev_db, buf)) // There was already another event of the same name? return 1; // generate the data and insert it CREATE(ev, struct event_data, 1); ev->nd = nd; ev->pos = pos; - strdb_put(ev_db, buf, ev); - label_linkdb = strdb_ensure(ev_label_db, lname, npc_event_export_create); + strdb_put(npc->ev_db, buf, ev); + label_linkdb = strdb_ensure(npc->ev_label_db, lname, npc->event_export_create); linkdb_insert(label_linkdb, nd, ev); } return 0; @@ -373,7 +347,7 @@ void npc_event_doall_sub(void *key, void *data, va_list ap) if(rid) { // a player may only have 1 script running at the same time char buf[EVENT_NAME_LENGTH]; snprintf(buf, ARRAYLENGTH(buf), "%s::%s", ev->nd->exname, name); - npc_event_sub(iMap->id2sd(rid), ev, buf); + npc->event_sub(iMap->id2sd(rid), ev, buf); } else { script->run(ev->nd->u.scr.script, ev->pos, rid, ev->nd->bl.id); @@ -386,10 +360,10 @@ void npc_event_doall_sub(void *key, void *data, va_list ap) int npc_event_do(const char* name) { if( name[0] == ':' && name[1] == ':' ) { - return npc_event_doall(name+2); // skip leading "::" + return npc->event_doall(name+2); // skip leading "::" } else { - struct event_data *ev = strdb_get(ev_db, name); + struct event_data *ev = strdb_get(npc->ev_db, name); if (ev) { script->run(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id); return 1; @@ -402,19 +376,19 @@ int npc_event_do(const char* name) int npc_event_doall_id(const char* name, int rid) { int c = 0; - struct linkdb_node **label_linkdb = strdb_get(ev_label_db, name); + struct linkdb_node **label_linkdb = strdb_get(npc->ev_label_db, name); if (label_linkdb == NULL) return 0; - linkdb_foreach(label_linkdb, npc_event_doall_sub, &c, name, rid); + linkdb_foreach(label_linkdb, npc->event_doall_sub, &c, name, rid); return c; } // runs the specified event (global only) int npc_event_doall(const char* name) { - return npc_event_doall_id(name, 0); + return npc->event_doall_id(name, 0); } /*========================================== @@ -447,23 +421,23 @@ int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) } sprintf(buf,"OnMinute%02d",t->tm_min); - c += npc_event_doall(buf); + c += npc->event_doall(buf); sprintf(buf,"OnClock%02d%02d",t->tm_hour,t->tm_min); - c += npc_event_doall(buf); + c += npc->event_doall(buf); sprintf(buf,"On%s%02d%02d",day,t->tm_hour,t->tm_min); - c += npc_event_doall(buf); + c += npc->event_doall(buf); } if (t->tm_hour != ev_tm_b.tm_hour) { sprintf(buf,"OnHour%02d",t->tm_hour); - c += npc_event_doall(buf); + c += npc->event_doall(buf); } if (t->tm_mday != ev_tm_b.tm_mday) { sprintf(buf,"OnDay%02d%02d",t->tm_mon+1,t->tm_mday); - c += npc_event_doall(buf); + c += npc->event_doall(buf); } memcpy(&ev_tm_b,t,sizeof(ev_tm_b)); @@ -475,9 +449,9 @@ int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) *------------------------------------------*/ void npc_event_do_oninit(void) { - ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs."CL_CLL"\n", npc_event_doall("OnInit")); + ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs."CL_CLL"\n", npc->event_doall("OnInit")); - iTimer->add_timer_interval(iTimer->gettick()+100,npc_event_do_clock,0,0,1000); + iTimer->add_timer_interval(iTimer->gettick()+100,npc->event_do_clock,0,0,1000); } /*========================================== @@ -538,7 +512,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) if( ted->rid && !(sd = iMap->id2sd(ted->rid)) ) { ShowError("npc_timerevent: Attached player not found.\n"); - ers_free(timer_event_ers, ted); + ers_free(npc->timer_event_ers, ted); return 0; } @@ -563,9 +537,9 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) next = nd->u.scr.timer_event[ ted->next ].timer - nd->u.scr.timer_event[ ted->next - 1 ].timer; ted->time += next; if( sd ) - sd->npc_timer_id = iTimer->add_timer(tick+next,npc_timerevent,id,(intptr_t)ted); + sd->npc_timer_id = iTimer->add_timer(tick+next,npc->timerevent,id,(intptr_t)ted); else - nd->u.scr.timerid = iTimer->add_timer(tick+next,npc_timerevent,id,(intptr_t)ted); + nd->u.scr.timerid = iTimer->add_timer(tick+next,npc->timerevent,id,(intptr_t)ted); } else { @@ -574,7 +548,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) else nd->u.scr.timerid = INVALID_TIMER; - ers_free(timer_event_ers, ted); + ers_free(npc->timer_event_ers, ted); } // Run the script @@ -619,20 +593,20 @@ int npc_timerevent_start(struct npc_data* nd, int rid) int next; struct timer_event_data *ted; // Arrange for the next event - ted = ers_alloc(timer_event_ers, struct timer_event_data); + ted = ers_alloc(npc->timer_event_ers, struct timer_event_data); ted->next = j; // Set event index ted->time = nd->u.scr.timer_event[j].timer; next = nd->u.scr.timer_event[j].timer - nd->u.scr.timer; if( sd ) { ted->rid = sd->bl.id; // Attach only the player if attachplayerrid was used. - sd->npc_timer_id = iTimer->add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr_t)ted); + sd->npc_timer_id = iTimer->add_timer(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); } else { ted->rid = 0; nd->u.scr.timertick = tick; // Set when timer is started - nd->u.scr.timerid = iTimer->add_timer(tick+next,npc_timerevent,nd->bl.id,(intptr_t)ted); + nd->u.scr.timerid = iTimer->add_timer(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); } } else if (!sd) { @@ -667,8 +641,8 @@ int npc_timerevent_stop(struct npc_data* nd) { td = iTimer->get_timer(*tid); if( td && td->data ) - ers_free(timer_event_ers, (void*)td->data); - iTimer->delete_timer(*tid,npc_timerevent); + ers_free(npc->timer_event_ers, (void*)td->data); + iTimer->delete_timer(*tid,npc->timerevent); *tid = INVALID_TIMER; } @@ -701,7 +675,7 @@ void npc_timerevent_quit(struct map_session_data* sd) // Delete timer nd = (struct npc_data *)iMap->id2bl(td->id); ted = (struct timer_event_data*)td->data; - iTimer->delete_timer(sd->npc_timer_id, npc_timerevent); + iTimer->delete_timer(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; // Execute OnTimerQuit @@ -711,7 +685,7 @@ void npc_timerevent_quit(struct map_session_data* sd) struct event_data *ev; snprintf(buf, ARRAYLENGTH(buf), "%s::OnTimerQuit", nd->exname); - ev = (struct event_data*)strdb_get(ev_db, buf); + ev = (struct event_data*)strdb_get(npc->ev_db, buf); if( ev && ev->nd != nd ) { ShowWarning("npc_timerevent_quit: Unable to execute \"OnTimerQuit\", two NPCs have the same event name [%s]!\n",buf); @@ -740,7 +714,7 @@ void npc_timerevent_quit(struct map_session_data* sd) nd->u.scr.timertick = old_tick; } } - ers_free(timer_event_ers, ted); + ers_free(npc->timer_event_ers, ted); } /*========================================== @@ -780,9 +754,9 @@ int npc_settimerevent_tick(struct npc_data* nd, int newtimer) // Check if timer is started flag = (nd->u.scr.timerid != INVALID_TIMER || nd->u.scr.timertick); - if( flag ) npc_timerevent_stop(nd); + if( flag ) npc->timerevent_stop(nd); nd->u.scr.timer = newtimer; - if( flag ) npc_timerevent_start(nd, -1); + if( flag ) npc->timerevent_start(nd, -1); nd->u.scr.rid = old_rid; return 0; @@ -807,7 +781,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char if( ev->nd->option&OPTION_INVISIBLE ) { //Disabled npc, shouldn't trigger event. - npc_event_dequeue(sd); + npc->event_dequeue(sd); return 2; } script->run(ev->nd->u.scr.script,ev->pos,sd->bl.id,ev->nd->bl.id); @@ -819,7 +793,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char *------------------------------------------*/ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch) { - struct event_data* ev = (struct event_data*)strdb_get(ev_db, eventname); + struct event_data* ev = (struct event_data*)strdb_get(npc->ev_db, eventname); struct npc_data *nd; nullpo_ret(sd); @@ -840,7 +814,7 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch) break; } - return npc_event_sub(sd,ev,eventname); + return npc->event_sub(sd,ev,eventname); } /*========================================== @@ -865,7 +839,7 @@ int npc_touch_areanpc_sub(struct block_list *bl, va_list ap) if( pc_id == sd->bl.id ) return 0; - npc_event(sd,name,1); + npc->event(sd,name,1); return 1; } @@ -894,7 +868,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap) nd->touching_id = sd->touching_id = 0; snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script->config.ontouch_name); - iMap->forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name); + iMap->forcountinarea(npc->touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name); } return 0; } @@ -969,7 +943,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y) break; } - if( npc_ontouch_event(sd,map[m].npc[i]) > 0 && npc_ontouch2_event(sd,map[m].npc[i]) > 0 ) + if( npc->ontouch_event(sd,map[m].npc[i]) > 0 && npc->ontouch2_event(sd,map[m].npc[i]) > 0 ) { // failed to run OnTouch event, so just click the npc struct unit_data *ud = unit->bl2ud(&sd->bl); if( ud && ud->walkpath.path_pos < ud->walkpath.path_len ) @@ -978,7 +952,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y) ud->walkpath.path_pos = ud->walkpath.path_len; } sd->areanpc_id = map[m].npc[i]->bl.id; - npc_click(sd,map[m].npc[i]); + npc->click(sd,map[m].npc[i]); } break; } @@ -1028,7 +1002,7 @@ int npc_touch_areanpc2(struct mob_data *md) if( map[m].npc[i]->bl.id == md->areanpc_id ) break; // Already touch this NPC snprintf(eventname, ARRAYLENGTH(eventname), "%s::OnTouchNPC", map[m].npc[i]->exname); - if( (ev = (struct event_data*)strdb_get(ev_db, eventname)) == NULL || ev->nd == NULL ) + if( (ev = (struct event_data*)strdb_get(npc->ev_db, eventname)) == NULL || ev->nd == NULL ) break; // No OnTouchNPC Event md->areanpc_id = map[m].npc[i]->bl.id; id = md->bl.id; // Stores Unique ID @@ -1134,7 +1108,7 @@ struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* b *------------------------------------------*/ int npc_globalmessage(const char* name, const char* mes) { - struct npc_data* nd = npc_name2id(name); + struct npc_data* nd = npc->name2id(name); char temp[100]; if (!nd) @@ -1185,7 +1159,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd) } if(!nd) return 1; - if ((nd = npc_checknear(sd,&nd->bl)) == NULL) + if ((nd = npc->checknear(sd,&nd->bl)) == NULL) return 1; //Hidden/Disabled npc. if (nd->class_ < 0 || nd->option&(OPTION_INVISIBLE|OPTION_HIDE)) @@ -1202,7 +1176,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd) script->run(nd->u.scr.script,0,sd->bl.id,nd->bl.id); break; case TOMB: - run_tomb(sd,nd); + npc->run_tomb(sd,nd); break; } @@ -1225,9 +1199,9 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) return 1; } - if(id != fake_nd->bl.id) { // Not item script - if ((npc_checknear(sd,iMap->id2bl(id))) == NULL){ - ShowWarning("npc_scriptcont: failed npc_checknear test.\n"); + if(id != npc->fake_nd->bl.id) { // Not item script + if ((npc->checknear(sd,iMap->id2bl(id))) == NULL){ + ShowWarning("npc_scriptcont: failed npc->checknear test.\n"); return 1; } } @@ -1264,7 +1238,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) nullpo_retr(1, sd); - if ((nd = npc_checknear(sd,iMap->id2bl(id))) == NULL) + if ((nd = npc->checknear(sd,iMap->id2bl(id))) == NULL) return 1; if (nd->subtype!=SHOP) { @@ -1374,7 +1348,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns } //npc_buylist for script-controlled shops. -static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd) +int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd) { char npc_ev[EVENT_NAME_LENGTH]; int i; @@ -1393,7 +1367,7 @@ static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* i // invoke event snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnBuyItem", nd->exname); - npc_event(sd, npc_ev, 0); + npc->event(sd, npc_ev, 0); return 0; } @@ -1492,7 +1466,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(3, sd); nullpo_retr(3, item_list); - nd = npc_checknear(sd,iMap->id2bl(sd->npc_shopid)); + nd = npc->checknear(sd,iMap->id2bl(sd->npc_shopid)); if( nd == NULL ) return 3; if( nd->subtype != SHOP ) @@ -1552,7 +1526,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) } if( nd->master_nd != NULL ) //Script-based shops. - return npc_buylist_sub(sd,n,item_list,nd->master_nd); + return npc->buylist_sub(sd,n,item_list,nd->master_nd); if( z > (double)sd->status.zeny ) return 1; // Not enough Zeny @@ -1597,7 +1571,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) /// npc_selllist for script-controlled shops -static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd) +int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd) { char npc_ev[EVENT_NAME_LENGTH]; char card_slot[NAME_LENGTH]; @@ -1647,7 +1621,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* // invoke event snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnSellItem", nd->exname); - npc_event(sd, npc_ev, 0); + npc->event(sd, npc_ev, 0); return 0; } @@ -1665,7 +1639,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(1, sd); nullpo_retr(1, item_list); - if( ( nd = npc_checknear(sd, iMap->id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP ) { + if( ( nd = npc->checknear(sd, iMap->id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP ) { return 1; } @@ -1698,7 +1672,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) } if( nd->master_nd ) { // Script-controlled shops - return npc_selllist_sub(sd, n, item_list, nd->master_nd); + return npc->selllist_sub(sd, n, item_list, nd->master_nd); } // delete items @@ -1748,7 +1722,7 @@ int npc_remove_map(struct npc_data* nd) { return 1; //Not assigned to a map. m = nd->bl.m; clif->clearunit_area(&nd->bl,CLR_RESPAWN); - npc_unsetcells(nd); + npc->unsetcells(nd); iMap->delblock(&nd->bl); //Remove npc from map[].npc list. [Skotlex] ARR_FIND( 0, map[m].npc_num, i, map[m].npc[i] == nd ); @@ -1763,13 +1737,13 @@ int npc_remove_map(struct npc_data* nd) { /** * @see DBApply */ -static int npc_unload_ev(DBKey key, DBData *data, va_list ap) +int npc_unload_ev(DBKey key, DBData *data, va_list ap) { struct event_data* ev = DB->data2ptr(data); char* npcname = va_arg(ap, char *); if(strcmp(ev->nd->exname,npcname)==0){ - db_remove(ev_db, key); + db_remove(npc->ev_db, key); return 1; } return 0; @@ -1778,7 +1752,7 @@ static int npc_unload_ev(DBKey key, DBData *data, va_list ap) /** * @see DBApply */ -static int npc_unload_ev_label(DBKey key, DBData *data, va_list ap) +int npc_unload_ev_label(DBKey key, DBData *data, va_list ap) { struct linkdb_node **label_linkdb = DB->data2ptr(data); struct npc_data* nd = va_arg(ap, struct npc_data *); @@ -1790,20 +1764,20 @@ static int npc_unload_ev_label(DBKey key, DBData *data, va_list ap) //Chk if npc matches src_id, then unload. //Sub-function used to find duplicates. -static int npc_unload_dup_sub(struct npc_data* nd, va_list args) +int npc_unload_dup_sub(struct npc_data* nd, va_list args) { int src_id; src_id = va_arg(args, int); if (nd->src_id == src_id) - npc_unload(nd, true); + npc->unload(nd, true); return 0; } //Removes all npcs that are duplicates of the passed one. [Skotlex] void npc_unload_duplicates(struct npc_data* nd) { - iMap->map_foreachnpc(npc_unload_dup_sub,nd->bl.id); + iMap->map_foreachnpc(npc->unload_dup_sub,nd->bl.id); } //Removes an npc from map and db. @@ -1811,10 +1785,10 @@ void npc_unload_duplicates(struct npc_data* nd) int npc_unload(struct npc_data* nd, bool single) { nullpo_ret(nd); - npc_remove_map(nd); + npc->remove_map(nd); iMap->deliddb(&nd->bl); if( single ) - strdb_remove(npcname_db, nd->exname); + strdb_remove(npc->name_db, nd->exname); if (nd->chat_id) // remove npc chatroom object and kick users chat->deletenpcchat(nd); @@ -1826,11 +1800,11 @@ int npc_unload(struct npc_data* nd, bool single) { if( single && nd->path ) { struct npc_path_data* npd = NULL; if( nd->path && nd->path != npc_last_ref ) { - npd = strdb_get(npc_path_db, nd->path); + npd = strdb_get(npc->path_db, nd->path); } if( npd && --npd->references == 0 ) { - strdb_remove(npc_path_db, nd->path);/* remove from db */ + strdb_remove(npc->path_db, nd->path);/* remove from db */ aFree(nd->path);/* remove now that no other instances exist */ } } @@ -1842,8 +1816,8 @@ int npc_unload(struct npc_data* nd, bool single) { struct block_list* bl; if( single ) { - ev_db->foreach(ev_db,npc_unload_ev,nd->exname); //Clean up all events related - ev_label_db->foreach(ev_label_db,npc_unload_ev_label,nd); + npc->ev_db->foreach(npc->ev_db,npc->unload_ev,nd->exname); //Clean up all events related + npc->ev_label_db->foreach(npc->ev_label_db,npc->unload_ev_label,nd); } iter = mapit_geteachpc(); @@ -1856,8 +1830,8 @@ int npc_unload(struct npc_data* nd, bool single) { continue; if( td && td->data ) - ers_free(timer_event_ers, (void*)td->data); - iTimer->delete_timer(sd->npc_timer_id, npc_timerevent); + ers_free(npc->timer_event_ers, (void*)td->data); + iTimer->delete_timer(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; } } @@ -1867,8 +1841,8 @@ int npc_unload(struct npc_data* nd, bool single) { const struct TimerData *td; td = iTimer->get_timer(nd->u.scr.timerid); if (td && td->data) - ers_free(timer_event_ers, (void*)td->data); - iTimer->delete_timer(nd->u.scr.timerid, npc_timerevent); + ers_free(npc->timer_event_ers, (void*)td->data); + iTimer->delete_timer(nd->u.scr.timerid, npc->timerevent); } if (nd->u.scr.timer_event) aFree(nd->u.scr.timer_event); @@ -1888,7 +1862,7 @@ int npc_unload(struct npc_data* nd, bool single) { guild->flag_remove(nd); } - if( nd->ud != &npc_base_ud ) { + if( nd->ud != &npc->base_ud ) { aFree(nd->ud); nd->ud = NULL; } @@ -1903,9 +1877,9 @@ int npc_unload(struct npc_data* nd, bool single) { // /// Clears the npc source file list -static void npc_clearsrcfile(void) +void npc_clearsrcfile(void) { - struct npc_src_list* file = npc_src_files; + struct npc_src_list* file = npc->src_files; struct npc_src_list* file_tofree; while( file != NULL ) @@ -1914,7 +1888,7 @@ static void npc_clearsrcfile(void) file = file->next; aFree(file_tofree); } - npc_src_files = NULL; + npc->src_files = NULL; } /// Adds a npc source file (or removes all) @@ -1925,12 +1899,12 @@ void npc_addsrcfile(const char* name) if( strcmpi(name, "clear") == 0 ) { - npc_clearsrcfile(); + npc->clearsrcfile(); return; } // prevent multiple insert of source files - file = npc_src_files; + file = npc->src_files; while( file != NULL ) { if( strcmp(name, file->name) == 0 ) @@ -1943,7 +1917,7 @@ void npc_addsrcfile(const char* name) file->next = NULL; safestrncpy(file->name, name, strlen(name) + 1); if( file_prev == NULL ) - npc_src_files = file; + npc->src_files = file; else file_prev->next = file; } @@ -1951,12 +1925,12 @@ void npc_addsrcfile(const char* name) /// Removes a npc source file (or all) void npc_delsrcfile(const char* name) { - struct npc_src_list* file = npc_src_files; + struct npc_src_list* file = npc->src_files; struct npc_src_list* file_prev = NULL; if( strcmpi(name, "all") == 0 ) { - npc_clearsrcfile(); + npc->clearsrcfile(); return; } @@ -1964,8 +1938,8 @@ void npc_delsrcfile(const char* name) { if( strcmp(file->name, name) == 0 ) { - if( npc_src_files == file ) - npc_src_files = file->next; + if( npc->src_files == file ) + npc->src_files = file->next; else file_prev->next = file->next; aFree(file); @@ -1978,7 +1952,7 @@ void npc_delsrcfile(const char* name) /// Parses and sets the name and exname of a npc. /// Assumes that m, x and y are already set in nd. -static void npc_parsename(struct npc_data* nd, const char* name, const char* start, const char* buffer, const char* filepath) +void npc_parsename(struct npc_data* nd, const char* name, const char* start, const char* buffer, const char* filepath) { const char* p; struct npc_data* dnd;// duplicate npc @@ -2013,7 +1987,7 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta safestrncpy(nd->exname, newname, sizeof(nd->exname)); } - if( (dnd=npc_name2id(nd->exname)) != NULL ) {// duplicate unique name, generate new one + if( (dnd=npc->name2id(nd->exname)) != NULL ) {// duplicate unique name, generate new one char this_mapname[32]; char other_mapname[32]; int i = 0; @@ -2021,7 +1995,7 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta do { ++i; snprintf(newname, ARRAYLENGTH(newname), "%d_%d_%d_%d", i, nd->bl.m, nd->bl.x, nd->bl.y); - } while( npc_name2id(newname) != NULL ); + } while( npc->name2id(newname) != NULL ); strcpy(this_mapname, (nd->bl.m==-1?"(not on a map)":mapindex_id2name(map[nd->bl.m].index))); strcpy(other_mapname, (dnd->bl.m==-1?"(not on a map)":mapindex_id2name(map[dnd->bl.m].index))); @@ -2035,9 +2009,9 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta if( npc_last_path != filepath ) { struct npc_path_data * npd = NULL; - if( !(npd = strdb_get(npc_path_db,filepath) ) ) { + if( !(npd = strdb_get(npc->path_db,filepath) ) ) { CREATE(npd, struct npc_path_data, 1); - strdb_put(npc_path_db, filepath, npd); + strdb_put(npc->path_db, filepath, npd); CREATE(npd->path, char, strlen(filepath)+1); safestrncpy(npd->path, filepath, strlen(filepath)+1); @@ -2064,7 +2038,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short struct npc_data *nd; CREATE(nd, struct npc_data, 1); - nd->bl.id = npc_get_new_npc_id(); + nd->bl.id = npc->get_new_npc_id(); iMap->addnpc(from_mapid, nd); nd->bl.prev = nd->bl.next = NULL; nd->bl.m = from_mapid; @@ -2072,13 +2046,13 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short nd->bl.y = from_y; safestrncpy(nd->exname, name, ARRAYLENGTH(nd->exname)); - if (npc_name2id(nd->exname) != NULL) + if (npc->name2id(nd->exname) != NULL) flag = 1; if (flag == 1) snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp_%d_%d_%d", from_mapid, from_x, from_y); - for( i = 0; npc_name2id(nd->exname) != NULL; ++i ) + for( i = 0; npc->name2id(nd->exname) != NULL; ++i ) snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp%d_%d_%d_%d", i, from_mapid, from_x, from_y); safestrncpy(nd->name, nd->exname, ARRAYLENGTH(nd->name)); @@ -2095,19 +2069,19 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short nd->u.warp.ys = xs; nd->bl.type = BL_NPC; nd->subtype = WARP; - npc_setcells(nd); + npc->setcells(nd); iMap->addblock(&nd->bl); iStatus->set_viewdata(&nd->bl, nd->class_); - nd->ud = &npc_base_ud; + nd->ud = &npc->base_ud; if( map[nd->bl.m].users ) clif->spawn(&nd->bl); - strdb_put(npcname_db, nd->exname, nd); + strdb_put(npc->name_db, nd->exname, nd); return nd; } /// Parses a warp npc. -static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) +const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { int x, y, xs, ys, to_x, to_y, m; unsigned short i; @@ -2138,13 +2112,13 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const CREATE(nd, struct npc_data, 1); - nd->bl.id = npc_get_new_npc_id(); + nd->bl.id = npc->get_new_npc_id(); iMap->addnpc(m, nd); nd->bl.prev = nd->bl.next = NULL; nd->bl.m = m; nd->bl.x = x; nd->bl.y = y; - npc_parsename(nd, w3, start, buffer, filepath); + npc->parsename(nd, w3, start, buffer, filepath); if (!battle_config.warp_point_debug) nd->class_ = WARP_CLASS; @@ -2160,19 +2134,19 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const npc_warp++; nd->bl.type = BL_NPC; nd->subtype = WARP; - npc_setcells(nd); + npc->setcells(nd); iMap->addblock(&nd->bl); iStatus->set_viewdata(&nd->bl, nd->class_); - nd->ud = &npc_base_ud; + nd->ud = &npc->base_ud; if( map[nd->bl.m].users ) clif->spawn(&nd->bl); - strdb_put(npcname_db, nd->exname, nd); + strdb_put(npc->name_db, nd->exname, nd); return strchr(start,'\n');// continue } /// Parses a shop/cashshop npc. -static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) +const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { //TODO: could be rewritten to NOT need this temp array [ultramage] #define MAX_SHOPITEM 100 @@ -2263,8 +2237,8 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const nd->bl.m = m; nd->bl.x = x; nd->bl.y = y; - nd->bl.id = npc_get_new_npc_id(); - npc_parsename(nd, w3, start, buffer, filepath); + nd->bl.id = npc->get_new_npc_id(); + npc->parsename(nd, w3, start, buffer, filepath); nd->class_ = m==-1?-1:atoi(w4); nd->speed = 200; @@ -2275,14 +2249,14 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const iMap->addnpc(m,nd); iMap->addblock(&nd->bl); iStatus->set_viewdata(&nd->bl, nd->class_); - nd->ud = &npc_base_ud; + nd->ud = &npc->base_ud; nd->dir = dir; if( map[nd->bl.m].users ) clif->spawn(&nd->bl); } else {// 'floating' shop? iMap->addiddb(&nd->bl); } - strdb_put(npcname_db, nd->exname, nd); + strdb_put(npc->name_db, nd->exname, nd); return strchr(start,'\n');// continue } @@ -2318,7 +2292,7 @@ void npc_convertlabel_db(struct npc_label_list* label_list, const char *filepath } // Skip the contents of a script. -static const char* npc_skip_script(const char* start, const char* buffer, const char* filepath) +const char* npc_skip_script(const char* start, const char* buffer, const char* filepath) { const char* p; int curly_count; @@ -2379,7 +2353,7 @@ static const char* npc_skip_script(const char* start, const char* buffer, const /// -%TAB%script%TAB%%TAB%-1,{} /// ,,,%TAB%script%TAB%%TAB%,{} /// ,,,%TAB%script%TAB%%TAB%,,,{} -static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, bool runOnInit) { +const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, bool runOnInit) { int x, y, dir = 0, m, xs = 0, ys = 0, class_ = 0; // [Valaris] thanks to fov char mapname[32]; struct script_code *scriptroot; @@ -2416,7 +2390,7 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons } ++script_start; - end = npc_skip_script(script_start, buffer, filepath); + end = npc->skip_script(script_start, buffer, filepath); if( end == NULL ) return NULL;// (simple) parse error, don't continue @@ -2426,7 +2400,7 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons if( script->label_count ) { CREATE(label_list,struct npc_label_list,script->label_count); label_list_num = script->label_count; - npc_convertlabel_db(label_list,filepath); + npc->convertlabel_db(label_list,filepath); } CREATE(nd, struct npc_data, 1); @@ -2447,8 +2421,8 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons nd->bl.m = m; nd->bl.x = x; nd->bl.y = y; - npc_parsename(nd, w3, start, buffer, filepath); - nd->bl.id = npc_get_new_npc_id(); + npc->parsename(nd, w3, start, buffer, filepath); + nd->bl.id = npc->get_new_npc_id(); nd->class_ = class_; nd->speed = 200; nd->u.scr.script = scriptroot; @@ -2461,9 +2435,9 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons if( m >= 0 ) { iMap->addnpc(m, nd); - nd->ud = &npc_base_ud; + nd->ud = &npc->base_ud; nd->dir = dir; - npc_setcells(nd); + npc->setcells(nd); iMap->addblock(&nd->bl); if( class_ >= 0 ) { iStatus->set_viewdata(&nd->bl, nd->class_); @@ -2474,16 +2448,16 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons // we skip iMap->addnpc, but still add it to the list of ID's iMap->addiddb(&nd->bl); } - strdb_put(npcname_db, nd->exname, nd); + strdb_put(npc->name_db, nd->exname, nd); //----------------------------------------- // Loop through labels to export them as necessary for (i = 0; i < nd->u.scr.label_list_num; i++) { - if (npc_event_export(nd, i)) { + if (npc->event_export(nd, i)) { ShowWarning("npc_parse_script : duplicate event %s::%s (%s)\n", nd->exname, nd->u.scr.label_list[i].name, filepath); } - npc_timerevent_export(nd, i); + npc->timerevent_export(nd, i); } nd->u.scr.timerid = INVALID_TIMER; @@ -2494,7 +2468,7 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons snprintf(evname, ARRAYLENGTH(evname), "%s::OnInit", nd->exname); - if( ( ev = (struct event_data*)strdb_get(ev_db, evname) ) ) { + if( ( ev = (struct event_data*)strdb_get(npc->ev_db, evname) ) ) { //Execute OnInit script->run(nd->u.scr.script,ev->pos,0,nd->bl.id); @@ -2536,7 +2510,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch } safestrncpy(srcname, w2+10, length-10); - dnd = npc_name2id(srcname); + dnd = npc->name2id(srcname); if( dnd == NULL) { ShowError("npc_parse_script: original npc not found for duplicate in file '%s', line '%d' : %s\n", filepath, strline(buffer,start-buffer), srcname); return end;// next line, try to continue @@ -2576,8 +2550,8 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch nd->bl.m = m; nd->bl.x = x; nd->bl.y = y; - npc_parsename(nd, w3, start, buffer, filepath); - nd->bl.id = npc_get_new_npc_id(); + npc->parsename(nd, w3, start, buffer, filepath); + nd->bl.id = npc->get_new_npc_id(); nd->class_ = class_; nd->speed = 200; nd->src_id = src_id; @@ -2617,9 +2591,9 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch //Add the npc to its location if( m >= 0 ) { iMap->addnpc(m, nd); - nd->ud = &npc_base_ud; + nd->ud = &npc->base_ud; nd->dir = dir; - npc_setcells(nd); + npc->setcells(nd); iMap->addblock(&nd->bl); if( class_ >= 0 ) { iStatus->set_viewdata(&nd->bl, nd->class_); @@ -2630,7 +2604,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch // we skip iMap->addnpc, but still add it to the list of ID's iMap->addiddb(&nd->bl); } - strdb_put(npcname_db, nd->exname, nd); + strdb_put(npc->name_db, nd->exname, nd); if( type != SCRIPT ) return end; @@ -2638,11 +2612,11 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch //----------------------------------------- // Loop through labels to export them as necessary for (i = 0; i < nd->u.scr.label_list_num; i++) { - if (npc_event_export(nd, i)) { + if (npc->event_export(nd, i)) { ShowWarning("npc_parse_duplicate : duplicate event %s::%s (%s)\n", nd->exname, nd->u.scr.label_list[i].name, filepath); } - npc_timerevent_export(nd, i); + npc->timerevent_export(nd, i); } nd->u.scr.timerid = INVALID_TIMER; @@ -2657,7 +2631,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { return 1; snprintf(newname, ARRAYLENGTH(newname), "dup_%d_%d", map[m].instance_id, snd->bl.id); - if( npc_name2id(newname) != NULL ) { // Name already in use + if( npc->name2id(newname) != NULL ) { // Name already in use ShowError("npc_duplicate4instance: the npcname (%s) is already in use while trying to duplicate npc %s in instance %d.\n", newname, snd->exname, map[m].instance_id); return 1; } @@ -2673,7 +2647,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { } CREATE(wnd, struct npc_data, 1); - wnd->bl.id = npc_get_new_npc_id(); + wnd->bl.id = npc->get_new_npc_id(); iMap->addnpc(m, wnd); wnd->bl.prev = wnd->bl.next = NULL; wnd->bl.m = m; @@ -2690,13 +2664,13 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { wnd->u.warp.ys = snd->u.warp.ys; wnd->bl.type = BL_NPC; wnd->subtype = WARP; - npc_setcells(wnd); + npc->setcells(wnd); iMap->addblock(&wnd->bl); iStatus->set_viewdata(&wnd->bl, wnd->class_); - wnd->ud = &npc_base_ud; + wnd->ud = &npc->base_ud; if( map[wnd->bl.m].users ) clif->spawn(&wnd->bl); - strdb_put(npcname_db, wnd->exname, wnd); + strdb_put(npc->name_db, wnd->exname, wnd); } else { static char w1[50], w2[50], w3[50], w4[50]; const char* stat_buf = "- call from instancing subsystem -\n"; @@ -2710,7 +2684,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { else snprintf(w4, sizeof(w4), "%d", snd->class_); - npc_parse_duplicate(w1, w2, w3, w4, stat_buf, stat_buf, "INSTANCING"); + npc->parse_duplicate(w1, w2, w3, w4, stat_buf, stat_buf, "INSTANCING"); } return 0; @@ -2750,7 +2724,7 @@ int npc_unsetcells_sub(struct block_list* bl, va_list ap) { struct npc_data *nd = (struct npc_data*)bl; int id = va_arg(ap,int); if (nd->bl.id == id) return 0; - npc_setcells(nd); + npc->setcells(nd); return 1; } @@ -2782,7 +2756,7 @@ void npc_unsetcells(struct npc_data* nd) { map[m].setcell(m, j, i, CELL_NPC, false); //Re-deploy NPC cells for other nearby npcs. - iMap->foreachinarea( npc_unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id ); + iMap->foreachinarea( npc->unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id ); } void npc_movenpc(struct npc_data* nd, int16 x, int16 y) @@ -2833,7 +2807,7 @@ void npc_setclass(struct npc_data* nd, short class_) // @commands (script based) int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname) { - struct event_data* ev = (struct event_data*)strdb_get(ev_db, eventname); + struct event_data* ev = (struct event_data*)strdb_get(npc->ev_db, eventname); struct npc_data *nd; struct script_state *st; int i = 0, j = 0, k = 0; @@ -2859,7 +2833,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c } if( ev->nd->option&OPTION_INVISIBLE ) { // Disabled npc, shouldn't trigger event. - npc_event_dequeue(sd); + npc->event_dequeue(sd); return 2; } @@ -2894,7 +2868,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c /// Parses a function. /// function%TAB%script%TAB%%TAB%{} -static const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) +const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { DBMap* func_db; DBData old_data; @@ -2911,7 +2885,7 @@ static const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, co } ++script_start; - end = npc_skip_script(script_start,buffer,filepath); + end = npc->skip_script(script_start,buffer,filepath); if( end == NULL ) return NULL;// (simple) parse error, don't continue @@ -2950,7 +2924,7 @@ void npc_parse_mob2(struct spawn_data* mobspawn) } } -static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) +const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { int num, class_, m,x,y,xs,ys, i,j; int mob_lv = -1, ai = -1, size = -1; @@ -3105,11 +3079,11 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c // (usually shouldn't occur when map server is just starting, // but not the case when we do @reloadscript if( map[data->m].users > 0 ) { - npc_parse_mob2(data); + npc->parse_mob2(data); } } else { data->state.dynamic = false; - npc_parse_mob2(data); + npc->parse_mob2(data); npc_delay_mob += data->num; } @@ -3600,7 +3574,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) ShowError("npc_parsesrcfile: Unknown map '%s' in file '%s', line '%d'. Skipping line...\n", mapname, filepath, strline(buffer,p-buffer)); if( strcasecmp(w2,"script") == 0 && count > 3 ) { - if((p = npc_skip_script(p,buffer,filepath)) == NULL) + if((p = npc->skip_script(p,buffer,filepath)) == NULL) { break; } @@ -3613,7 +3587,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) {// "mapname" is not assigned to this server, we must skip the script info... if( strcasecmp(w2,"script") == 0 && count > 3 ) { - if((p = npc_skip_script(p,buffer,filepath)) == NULL) + if((p = npc->skip_script(p,buffer,filepath)) == NULL) { break; } @@ -3625,7 +3599,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) ShowError("npc_parsesrcfile: Unknown coordinates ('%d', '%d') for map '%s' in file '%s', line '%d'. Skipping line...\n", x, y, mapname, filepath, strline(buffer,p-buffer)); if( strcasecmp(w2,"script") == 0 && count > 3 ) { - if((p = npc_skip_script(p,buffer,filepath)) == NULL) + if((p = npc->skip_script(p,buffer,filepath)) == NULL) { break; } @@ -3637,30 +3611,30 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit) if( strcasecmp(w2,"warp") == 0 && count > 3 ) { - p = npc_parse_warp(w1,w2,w3,w4, p, buffer, filepath); + p = npc->parse_warp(w1,w2,w3,w4, p, buffer, filepath); } else if( (!strcasecmp(w2,"shop") || !strcasecmp(w2,"cashshop")) && count > 3 ) { - p = npc_parse_shop(w1,w2,w3,w4, p, buffer, filepath); + p = npc->parse_shop(w1,w2,w3,w4, p, buffer, filepath); } else if( strcasecmp(w2,"script") == 0 && count > 3 ) { if( strcasecmp(w1,"function") == 0 ) - p = npc_parse_function(w1, w2, w3, w4, p, buffer, filepath); + p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath); else - p = npc_parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit); + p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit); } else if( (i=0, sscanf(w2,"duplicate%n",&i), (i > 0 && w2[i] == '(')) && count > 3 ) { - p = npc_parse_duplicate(w1,w2,w3,w4, p, buffer, filepath); + p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath); } else if( (strcmpi(w2,"monster") == 0 || strcmpi(w2,"boss_monster") == 0) && count > 3 ) { - p = npc_parse_mob(w1, w2, w3, w4, p, buffer, filepath); + p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath); } else if( strcmpi(w2,"mapflag") == 0 && count >= 3 ) { - p = npc_parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath); + p = npc->parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath); } else { @@ -3683,7 +3657,7 @@ int npc_script_event(struct map_session_data* sd, enum npce_event type) return 0; } for (i = 0; ievent_sub(sd,script_event[type].event[i],script_event[type].event_name[i]); return i; } @@ -3714,7 +3688,7 @@ void npc_read_event_script(void) safestrncpy(name+2,config[i].event_name,62); script_event[i].event_count = 0; - iter = db_iterator(ev_db); + iter = db_iterator(npc->ev_db); for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) { const char* p = key.str; @@ -3747,7 +3721,7 @@ void npc_read_event_script(void) /** * @see DBApply */ -static int npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) +int npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) { struct npc_path_data *npd = DB->data2ptr(data); if (npd->path) @@ -3758,7 +3732,7 @@ static int npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) /** * @see DBApply */ -static int ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) +int npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) { struct linkdb_node **label_linkdb = DB->data2ptr(data); linkdb_final(label_linkdb); // linked data (struct event_data*) is freed when clearing ev_db @@ -3776,11 +3750,11 @@ int npc_reload(void) { /* clear guild flag cache */ guild->flags_clear(); - npc_path_db->clear(npc_path_db, npc_path_db_clear_sub); + npc->path_db->clear(npc->path_db, npc->path_db_clear_sub); - db_clear(npcname_db); - db_clear(ev_db); - ev_label_db->clear(ev_label_db, ev_label_db_clear_sub); + db_clear(npc->name_db); + db_clear(npc->ev_db); + npc->ev_label_db->clear(npc->ev_label_db, npc->ev_label_db_clear_sub); npc_last_npd = NULL; npc_last_path = NULL; @@ -3792,8 +3766,8 @@ int npc_reload(void) { for( bl = (struct block_list*)mapit->first(iter); mapit->exists(iter); bl = (struct block_list*)mapit->next(iter) ) { switch(bl->type) { case BL_NPC: - if( bl->id != fake_nd->bl.id )// don't remove fake_nd - npc_unload((struct npc_data *)bl, false); + if( bl->id != npc->fake_nd->bl.id )// don't remove fake_nd + npc->unload((struct npc_data *)bl, false); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); @@ -3831,9 +3805,9 @@ int npc_reload(void) { //TODO: the following code is copy-pasted from do_init_npc(); clean it up // Reloading npcs now - for (nsl = npc_src_files; nsl; nsl = nsl->next) { + for (nsl = npc->src_files; nsl; nsl = nsl->next) { ShowStatus("Loading NPC file: %s"CL_CLL"\r", nsl->name); - npc_parsesrcfile(nsl->name,false); + npc->parsesrcfile(nsl->name,false); } ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n" "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" @@ -3852,69 +3826,69 @@ int npc_reload(void) { iMap->zone_init(); - npc->motd = npc_name2id("HerculesMOTD"); /* [Ind/Hercules] */ + npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ //Re-read the NPC Script Events cache. - npc_read_event_script(); + npc->read_event_script(); /* refresh guild castle flags on both woe setups */ - npc_event_doall("OnAgitInit"); - npc_event_doall("OnAgitInit2"); + npc->event_doall("OnAgitInit"); + npc->event_doall("OnAgitInit2"); //Execute the OnInit event for freshly loaded npcs. [Skotlex] - ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit")); + ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n",npc->event_doall("OnInit")); // Execute rest of the startup events if connected to char-server. [Lance] if(!intif->CheckForCharServer()){ - ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit")); - ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); + ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInit")); + ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInitOnce")); } return 0; } //Unload all npc in the given file bool npc_unloadfile( const char* path ) { - DBIterator * iter = db_iterator(npcname_db); + DBIterator * iter = db_iterator(npc->name_db); struct npc_data* nd = NULL; bool found = false; for( nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter) ) { if( nd->path && strcasecmp(nd->path,path) == 0 ) { found = true; - npc_unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */ - npc_unload(nd, true); + npc->unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */ + npc->unload(nd, true); } } dbi_destroy(iter); if( found ) /* refresh event cache */ - npc_read_event_script(); + npc->read_event_script(); return found; } void do_clear_npc(void) { - db_clear(npcname_db); - db_clear(ev_db); - ev_label_db->clear(ev_label_db, ev_label_db_clear_sub); + db_clear(npc->name_db); + db_clear(npc->ev_db); + npc->ev_label_db->clear(npc->ev_label_db, npc->ev_label_db_clear_sub); } /*========================================== * Destructor *------------------------------------------*/ int do_final_npc(void) { - db_destroy(ev_db); - ev_label_db->destroy(ev_label_db, ev_label_db_clear_sub); - db_destroy(npcname_db); - npc_path_db->destroy(npc_path_db, npc_path_db_clear_sub); - ers_destroy(timer_event_ers); - npc_clearsrcfile(); + db_destroy(npc->ev_db); + npc->ev_label_db->destroy(npc->ev_label_db, npc->ev_label_db_clear_sub); + db_destroy(npc->name_db); + npc->path_db->destroy(npc->path_db, npc->path_db_clear_sub); + ers_destroy(npc->timer_event_ers); + npc->clearsrcfile(); return 0; } -static void npc_debug_warps_sub(struct npc_data* nd) +void npc_debug_warps_sub(struct npc_data* nd) { int16 m; if (nd->bl.type != BL_NPC || nd->subtype != WARP || nd->bl.m < 0) @@ -3945,7 +3919,7 @@ static void npc_debug_warps(void) int16 m, i; for (m = 0; m < iMap->map_num; m++) for (i = 0; i < map[m].npc_num; i++) - npc_debug_warps_sub(map[m].npc[i]); + npc->debug_warps_sub(map[m].npc[i]); } /*========================================== @@ -3956,14 +3930,14 @@ int do_init_npc(void) struct npc_src_list *file; int i; - memset(&npc_base_ud, 0, sizeof( struct unit_data) ); - npc_base_ud.bl = NULL; - npc_base_ud.walktimer = INVALID_TIMER; - npc_base_ud.skilltimer = INVALID_TIMER; - npc_base_ud.attacktimer = INVALID_TIMER; - npc_base_ud.attackabletime = - npc_base_ud.canact_tick = - npc_base_ud.canmove_tick = iTimer->gettick(); + memset(&npc->base_ud, 0, sizeof( struct unit_data) ); + npc->base_ud.bl = NULL; + npc->base_ud.walktimer = INVALID_TIMER; + npc->base_ud.skilltimer = INVALID_TIMER; + npc->base_ud.attacktimer = INVALID_TIMER; + npc->base_ud.attackabletime = + npc->base_ud.canact_tick = + npc->base_ud.canmove_tick = iTimer->gettick(); //Stock view data for normal npcs. memset(&npc_viewdb, 0, sizeof(npc_viewdb)); @@ -3974,12 +3948,12 @@ int do_init_npc(void) for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ ) npc_viewdb2[i - MAX_NPC_CLASS2_START].class_ = i; - ev_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); - ev_label_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH); - npcname_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); - npc_path_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, 0); + npc->ev_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); + npc->ev_label_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH); + npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); + npc->path_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, 0); - timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE); + npc->timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE); npc_last_npd = NULL; npc_last_path = NULL; @@ -3987,9 +3961,9 @@ int do_init_npc(void) // process all npc files ShowStatus("Loading NPCs...\r"); - for( file = npc_src_files; file != NULL; file = file->next ) { + for( file = npc->src_files; file != NULL; file = file->next ) { ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name); - npc_parsesrcfile(file->name,false); + npc->parsesrcfile(file->name,false); } ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n" "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n" @@ -4004,35 +3978,35 @@ int do_init_npc(void) iMap->zone_init(); - npc->motd = npc_name2id("HerculesMOTD"); /* [Ind/Hercules] */ + npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ // set up the events cache memset(script_event, 0, sizeof(script_event)); - npc_read_event_script(); + npc->read_event_script(); //Debug function to locate all endless loop warps. if (battle_config.warp_point_debug) - npc_debug_warps(); + npc->debug_warps(); - iTimer->add_timer_func_list(npc_event_do_clock,"npc_event_do_clock"); - iTimer->add_timer_func_list(npc_timerevent,"npc_timerevent"); + iTimer->add_timer_func_list(npc->event_do_clock,"npc_event_do_clock"); + iTimer->add_timer_func_list(npc->timerevent,"npc_timerevent"); // Init dummy NPC - fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data)); - fake_nd->bl.m = -1; - fake_nd->bl.id = npc_get_new_npc_id(); - fake_nd->class_ = -1; - fake_nd->speed = 200; - strcpy(fake_nd->name,"FAKE_NPC"); - memcpy(fake_nd->exname, fake_nd->name, 9); + npc->fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data)); + npc->fake_nd->bl.m = -1; + npc->fake_nd->bl.id = npc->get_new_npc_id(); + npc->fake_nd->class_ = -1; + npc->fake_nd->speed = 200; + strcpy(npc->fake_nd->name,"FAKE_NPC"); + memcpy(npc->fake_nd->exname, npc->fake_nd->name, 9); npc_script++; - fake_nd->bl.type = BL_NPC; - fake_nd->subtype = SCRIPT; + npc->fake_nd->bl.type = BL_NPC; + npc->fake_nd->subtype = SCRIPT; - strdb_put(npcname_db, fake_nd->exname, fake_nd); - fake_nd->u.scr.timerid = INVALID_TIMER; - iMap->addiddb(&fake_nd->bl); + strdb_put(npc->name_db, npc->fake_nd->exname, npc->fake_nd); + npc->fake_nd->u.scr.timerid = INVALID_TIMER; + iMap->addiddb(&npc->fake_nd->bl); // End of initialization return 0; @@ -4041,4 +4015,101 @@ void npc_defaults(void) { npc = &npc_s; npc->motd = NULL; + npc->ev_db = NULL; + npc->ev_label_db = NULL; + npc->name_db = NULL; + npc->path_db = NULL; + npc->timer_event_ers = NULL; + npc->fake_nd = NULL; + npc->src_files = NULL; + /* */ + npc->init = do_init_npc; + npc->final = do_final_npc; + /* */ + npc->get_new_npc_id = npc_get_new_npc_id; + npc->get_viewdata = npc_get_viewdata; + npc->isnear_sub = npc_isnear_sub; + npc->isnear = npc_isnear; + npc->ontouch_event = npc_ontouch_event; + npc->ontouch2_event = npc_ontouch2_event; + npc->enable_sub = npc_enable_sub; + npc->enable = npc_enable; + npc->name2id = npc_name2id; + npc->event_dequeue = npc_event_dequeue; + npc->event_export_create = npc_event_export_create; + npc->event_export = npc_event_export; + npc->event_sub = npc_event_sub; + npc->event_doall_sub = npc_event_doall_sub; + npc->event_do = npc_event_do; + npc->event_doall_id = npc_event_doall_id; + npc->event_doall = npc_event_doall; + npc->event_do_clock = npc_event_do_clock; + npc->event_do_oninit = npc_event_do_oninit; + npc->timerevent_export = npc_timerevent_export; + npc->timerevent = npc_timerevent; + npc->timerevent_start = npc_timerevent_start; + npc->timerevent_stop = npc_timerevent_stop; + npc->timerevent_quit = npc_timerevent_quit; + npc->gettimerevent_tick = npc_gettimerevent_tick; + npc->settimerevent_tick = npc_settimerevent_tick; + npc->event = npc_event; + npc->touch_areanpc_sub = npc_touch_areanpc_sub; + npc->touchnext_areanpc = npc_touchnext_areanpc; + npc->touch_areanpc = npc_touch_areanpc; + npc->touch_areanpc2 = npc_touch_areanpc2; + npc->check_areanpc = npc_check_areanpc; + npc->checknear = npc_checknear; + npc->globalmessage = npc_globalmessage; + npc->run_tomb = run_tomb; + npc->click = npc_click; + npc->scriptcont = npc_scriptcont; + npc->buysellsel = npc_buysellsel; + npc->cashshop_buylist = npc_cashshop_buylist; + npc->buylist_sub = npc_buylist_sub; + npc->cashshop_buy = npc_cashshop_buy; + npc->buylist = npc_buylist; + npc->selllist_sub = npc_selllist_sub; + npc->selllist = npc_selllist; + npc->remove_map = npc_remove_map; + npc->unload_ev = npc_unload_ev; + npc->unload_ev_label = npc_unload_ev_label; + npc->unload_dup_sub = npc_unload_dup_sub; + npc->unload_duplicates = npc_unload_duplicates; + npc->unload = npc_unload; + npc->clearsrcfile = npc_clearsrcfile; + npc->addsrcfile = npc_addsrcfile; + npc->delsrcfile = npc_delsrcfile; + npc->parsename = npc_parsename; + npc->add_warp = npc_add_warp; + npc->parse_warp = npc_parse_warp; + npc->parse_shop = npc_parse_shop; + npc->convertlabel_db = npc_convertlabel_db; + npc->skip_script = npc_skip_script; + npc->parse_script = npc_parse_script; + npc->parse_duplicate = npc_parse_duplicate; + npc->duplicate4instance = npc_duplicate4instance; + npc->setcells = npc_setcells; + npc->unsetcells_sub = npc_unsetcells_sub; + npc->unsetcells = npc_unsetcells; + npc->movenpc = npc_movenpc; + npc->setdisplayname = npc_setdisplayname; + npc->setclass = npc_setclass; + npc->do_atcmd_event = npc_do_atcmd_event; + npc->parse_function = npc_parse_function; + npc->parse_mob2 = npc_parse_mob2; + npc->parse_mob = npc_parse_mob; + npc->parse_mapflag = npc_parse_mapflag; + npc->parsesrcfile = npc_parsesrcfile; + npc->script_event = npc_script_event; + npc->read_event_script = npc_read_event_script; + npc->path_db_clear_sub = npc_path_db_clear_sub; + npc->ev_label_db_clear_sub = npc_ev_label_db_clear_sub; + npc->reload = npc_reload; + npc->unloadfile = npc_unloadfile; + npc->do_clear_npc = do_clear_npc; + npc->debug_warps_sub = npc_debug_warps_sub; + npc->debug_warps = npc_debug_warps; +#ifdef SECURE_NPCTIMEOUT + npc->secure_timeout_timer = npc_rr_secure_timeout_timer; +#endif } diff --git a/src/map/npc.h b/src/map/npc.h index 48c27b297..0fc773dfc 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -12,8 +12,6 @@ struct block_list; struct npc_data; struct view_data; -struct unit_data npc_base_ud; - struct npc_timerevent_list { int timer,pos; }; @@ -82,8 +80,7 @@ struct npc_data { #define START_NPC_NUM 110000000 -enum actor_classes -{ +enum actor_classes { WARP_CLASS = 45, HIDDEN_WARP_CLASS = 139, WARP_DEBUG_CLASS = 722, @@ -117,86 +114,133 @@ enum npce_event { NPCE_KILLNPC, NPCE_MAX }; -struct view_data* npc_get_viewdata(int class_); -int npc_chat_sub(struct block_list* bl, va_list ap); -int npc_event_dequeue(struct map_session_data* sd); -int npc_event(struct map_session_data* sd, const char* eventname, int ontouch); -int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y); -int npc_touch_areanpc2(struct mob_data *md); // [Skotlex] -int npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range); -int npc_touchnext_areanpc(struct map_session_data* sd,bool leavemap); -int npc_click(struct map_session_data* sd, struct npc_data* nd); -int npc_scriptcont(struct map_session_data* sd, int id, bool closing); -struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* bl); -int npc_buysellsel(struct map_session_data* sd, int id, int type); -int npc_buylist(struct map_session_data* sd,int n, unsigned short* item_list); -int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list); -void npc_parse_mob2(struct spawn_data* mob); -const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath); -struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); -int npc_globalmessage(const char* name,const char* mes); - -void npc_setcells(struct npc_data* nd); -void npc_unsetcells(struct npc_data* nd); -void npc_movenpc(struct npc_data* nd, int16 x, int16 y); -int npc_enable(const char* name, int flag); -void npc_setdisplayname(struct npc_data* nd, const char* newname); -void npc_setclass(struct npc_data* nd, short class_); -struct npc_data* npc_name2id(const char* name); -bool npc_isnear(struct block_list * bl); - -int npc_get_new_npc_id(void); - -void npc_addsrcfile(const char* name); -void npc_delsrcfile(const char* name); -void npc_parsesrcfile(const char* filepath, bool runOnInit); -void do_clear_npc(void); -int do_final_npc(void); -int do_init_npc(void); -void npc_event_do_oninit(void); -int npc_do_ontimer(int npc_id, int option); - -int npc_event_do(const char* name); -int npc_event_doall(const char* name); -int npc_event_doall_id(const char* name, int rid); - -int npc_timerevent_start(struct npc_data* nd, int rid); -int npc_timerevent_stop(struct npc_data* nd); -void npc_timerevent_quit(struct map_session_data* sd); -int npc_gettimerevent_tick(struct npc_data* nd); -int npc_settimerevent_tick(struct npc_data* nd, int newtimer); -int npc_remove_map(struct npc_data* nd); -void npc_unload_duplicates (struct npc_data* nd); -int npc_unload(struct npc_data* nd, bool single); -int npc_reload(void); -void npc_read_event_script(void); -int npc_script_event(struct map_session_data* sd, enum npce_event type); - -int npc_duplicate4instance(struct npc_data *snd, int16 m); -int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points); - -extern struct npc_data* fake_nd; - -int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short* item_list); - -/** - * For the Secure NPC Timeout option (check config/Secure.h) [RR] - **/ -#ifdef SECURE_NPCTIMEOUT - int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data); -#endif -// @commands (script-based) -int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname); +// linked list of npc source files +struct npc_src_list { + struct npc_src_list* next; + char name[4]; // dynamic array, the structure is allocated with extra bytes (string length) +}; + +struct event_data { + struct npc_data *nd; + int pos; +}; + +struct npc_path_data { + char* path; + unsigned short references; +}; + +/* comes from npc_chat.c */ +int npc_chat_sub (struct block_list* bl, va_list ap); -bool npc_unloadfile( const char* path ); -/* npc.c interface (barely started/WIP) */ +/* npc.c interface */ struct npc_interface { /* */ struct npc_data *motd; + DBMap *ev_db; // const char* event_name -> struct event_data* + DBMap *ev_label_db; // const char* label_name (without leading "::") -> struct linkdb_node** (key: struct npc_data*; data: struct event_data*) + DBMap *name_db; // const char* npc_name -> struct npc_data* + DBMap *path_db; + struct eri *timer_event_ers; //For the npc timer data. [Skotlex] + struct npc_data *fake_nd; + struct npc_src_list *src_files; + struct unit_data base_ud; + /* */ + int (*init) (void); + int (*final) (void); /* */ -} npc_s; + int (*get_new_npc_id) (void); + struct view_data* (*get_viewdata) (int class_); + int (*isnear_sub) (struct block_list *bl, va_list args); + bool (*isnear) (struct block_list *bl); + int (*ontouch_event) (struct map_session_data *sd, struct npc_data *nd); + int (*ontouch2_event) (struct map_session_data *sd, struct npc_data *nd); + int (*enable_sub) (struct block_list *bl, va_list ap); + int (*enable) (const char *name, int flag); + struct npc_data* (*name2id) (const char *name); + int (*event_dequeue) (struct map_session_data *sd); + DBData (*event_export_create) (DBKey key, va_list args); + int (*event_export) (struct npc_data *nd, int i); + int (*event_sub) (struct map_session_data *sd, struct event_data *ev, const char *eventname); + void (*event_doall_sub) (void *key, void *data, va_list ap); + 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); + 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_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); + 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); + int (*touchnext_areanpc) (struct map_session_data *sd, bool leavemap); + int (*touch_areanpc) (struct map_session_data *sd, int16 m, int16 x, int16 y); + int (*touch_areanpc2) (struct mob_data *md); + int (*check_areanpc) (int flag, int16 m, int16 x, int16 y, int16 range); + struct npc_data* (*checknear) (struct map_session_data *sd, struct block_list *bl); + int (*globalmessage) (const char *name, const char *mes); + void (*run_tomb) (struct map_session_data *sd, struct npc_data *nd); + int (*click) (struct map_session_data *sd, struct npc_data *nd); + int (*scriptcont) (struct map_session_data *sd, int id, bool closing); + int (*buysellsel) (struct map_session_data *sd, int id, int type); + int (*cashshop_buylist) (struct map_session_data *sd, int points, int count, unsigned short *item_list); + int (*buylist_sub) (struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd); + int (*cashshop_buy) (struct map_session_data *sd, int nameid, int amount, int points); + int (*buylist) (struct map_session_data *sd, int n, unsigned short *item_list); + int (*selllist_sub) (struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd); + int (*selllist) (struct map_session_data *sd, int n, unsigned short *item_list); + int (*remove_map) (struct npc_data *nd); + int (*unload_ev) (DBKey key, DBData *data, va_list ap); + int (*unload_ev_label) (DBKey key, DBData *data, va_list ap); + int (*unload_dup_sub) (struct npc_data *nd, va_list args); + void (*unload_duplicates) (struct npc_data *nd); + int (*unload) (struct npc_data *nd, bool single); + void (*clearsrcfile) (void); + void (*addsrcfile) (const char *name); + void (*delsrcfile) (const char *name); + void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); + struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); + const char* (*parse_warp) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + const char* (*parse_shop) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + void (*convertlabel_db) (struct npc_label_list *label_list, const char *filepath); + const char* (*skip_script) (const char *start, const char *buffer, const char *filepath); + const char* (*parse_script) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool runOnInit); + const char* (*parse_duplicate) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + int (*duplicate4instance) (struct npc_data *snd, int16 m); + void (*setcells) (struct npc_data *nd); + int (*unsetcells_sub) (struct block_list *bl, va_list ap); + void (*unsetcells) (struct npc_data *nd); + void (*movenpc) (struct npc_data *nd, int16 x, int16 y); + void (*setdisplayname) (struct npc_data *nd, const char *newname); + void (*setclass) (struct npc_data *nd, short class_); + int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); + const char* (*parse_function) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + void (*parse_mob2) (struct spawn_data *mob); + const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + void (*parsesrcfile) (const char *filepath, bool runOnInit); + int (*script_event) (struct map_session_data *sd, enum npce_event type); + void (*read_event_script) (void); + int (*path_db_clear_sub) (DBKey key, DBData *data, va_list args); + int (*ev_label_db_clear_sub) (DBKey key, DBData *data, va_list args); + int (*reload) (void); + bool (*unloadfile) (const char *path); + void (*do_clear_npc) (void); + void (*debug_warps_sub) (struct npc_data *nd); + void (*debug_warps) (void); + /** + * For the Secure NPC Timeout option (check config/Secure.h) [RR] + **/ +#ifdef SECURE_NPCTIMEOUT + int (*secure_timeout_timer) (int tid, unsigned int tick, int id, intptr_t data); +#endif +}; struct npc_interface *npc; diff --git a/src/map/pc.c b/src/map/pc.c index d502d9a3a..b591cd483 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1334,7 +1334,7 @@ int pc_reg_received(struct map_session_data *sd) } if( npc->motd ) /* [Ind/Hercules] */ - script->run(npc->motd->u.scr.script, 0, sd->bl.id, fake_nd->bl.id); + script->run(npc->motd->u.scr.script, 0, sd->bl.id, npc->fake_nd->bl.id); return 1; } @@ -4476,7 +4476,7 @@ int pc_useitem(struct map_session_data *sd,int n) { script->current_item_id = nameid; - script->run(item_script,0,sd->bl.id,fake_nd->bl.id); + script->run(item_script,0,sd->bl.id,npc->fake_nd->bl.id); script->current_item_id = 0; script->potion_flag = 0; @@ -4874,7 +4874,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y struct hQueue *queue; if( (queue = script->queue(sd->queues[i])) && queue->onMapChange[0] != '\0' ) { pc->setregstr(sd, script->add_str("QMapChangeTo"), map[m].name); - npc_event(sd, queue->onMapChange, 0); + npc->event(sd, queue->onMapChange, 0); } } @@ -4930,8 +4930,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y return 2; if (sd->npc_id) - npc_event_dequeue(sd); - npc_script_event(sd, NPCE_LOGOUT); + npc->event_dequeue(sd); + npc->script_event(sd, NPCE_LOGOUT); //remove from map, THEN change x/y coordinates unit->remove_map_pc(sd,clrtype); sd->mapindex = mapindex; @@ -5813,7 +5813,7 @@ int pc_checkbaselevelup(struct map_session_data *sd) { sc_start(&sd->bl,iStatus->skill2sc(AL_BLESSING),100,10,600000); } clif->misceffect(&sd->bl,0); - npc_script_event(sd, NPCE_BASELVUP); //LORDALFA - LVLUPEVENT + npc->script_event(sd, NPCE_BASELVUP); //LORDALFA - LVLUPEVENT if(sd->status.party_id) party->send_levelup(sd); @@ -5862,7 +5862,7 @@ int pc_checkjoblevelup(struct map_session_data *sd) if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd)) clif->status_change(&sd->bl,SI_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL. - npc_script_event(sd, NPCE_JOBLVUP); + npc->script_event(sd, NPCE_JOBLVUP); return 1; } @@ -6755,7 +6755,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { } if (sd->npc_id && sd->st && sd->st->state != RUN) - npc_event_dequeue(sd); + npc->event_dequeue(sd); pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1); pc->setparam(sd, SP_KILLERRID, src?src->id:0); @@ -6763,16 +6763,16 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { if( sd->bg_id ) {/* TODO: purge when bgqueue is deemed ok */ struct battleground_data *bg; if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] ) - npc_event(sd, bg->die_event, 0); + npc->event(sd, bg->die_event, 0); } for( i = 0; i < sd->queues_count; i++ ) { struct hQueue *queue; if( (queue = script->queue(sd->queues[i])) && queue->onDeath[0] != '\0' ) - npc_event(sd, queue->onDeath, 0); + npc->event(sd, queue->onDeath, 0); } - npc_script_event(sd,NPCE_DIE); + npc->script_event(sd,NPCE_DIE); // Clear anything NPC-related when you die and was interacting with one. if (sd->npc_id || sd->npc_shopid) { @@ -6850,7 +6850,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { if (src && src->type == BL_PC) { struct map_session_data *ssd = (struct map_session_data *)src; pc->setparam(ssd, SP_KILLEDRID, sd->bl.id); - npc_script_event(ssd, NPCE_KILLPC); + npc->script_event(ssd, NPCE_KILLPC); if (battle_config.pk_mode&2) { ssd->status.manner -= 5; @@ -8331,7 +8331,7 @@ static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) { sd->eventtimer[i] = INVALID_TIMER; sd->eventcount--; - npc_event(sd,p,0); + npc->event(sd,p,0); } else ShowError("pc_eventtimer: no such event timer\n"); @@ -8774,7 +8774,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) //OnEquip script [Skotlex] if (id) { if (id->equip_script) - script->run(id->equip_script,0,sd->bl.id,fake_nd->bl.id); + script->run(id->equip_script,0,sd->bl.id,npc->fake_nd->bl.id); if(itemdb_isspecial(sd->status.inventory[n].card[0])) ; //No cards else { @@ -8784,7 +8784,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) continue; if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->equip_script ) - script->run(data->equip_script,0,sd->bl.id,fake_nd->bl.id); + script->run(data->equip_script,0,sd->bl.id,npc->fake_nd->bl.id); } } } @@ -8941,7 +8941,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { //OnUnEquip script [Skotlex] if (sd->inventory_data[n]) { if (sd->inventory_data[n]->unequip_script) - script->run(sd->inventory_data[n]->unequip_script,0,sd->bl.id,fake_nd->bl.id); + script->run(sd->inventory_data[n]->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id); if(itemdb_isspecial(sd->status.inventory[n].card[0])) ; //No cards else { @@ -8952,7 +8952,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { if( data->unequip_script ) - script->run(data->unequip_script,0,sd->bl.id,fake_nd->bl.id); + script->run(data->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id); } } diff --git a/src/map/pet.c b/src/map/pet.c index d7f7c29c8..c1bce0b5b 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -349,7 +349,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *pet) } sd->pd = pd = (struct pet_data *)aCalloc(1,sizeof(struct pet_data)); pd->bl.type = BL_PET; - pd->bl.id = npc_get_new_npc_id(); + pd->bl.id = npc->get_new_npc_id(); pd->msd = sd; pd->petDB = &pet_db[i]; diff --git a/src/map/script.c b/src/map/script.c index 70c9bd9f1..391109fa9 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3381,11 +3381,11 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) * We're done with this NPC session, so we cancel the timer (if existent) and move on **/ if( sd->npc_idle_timer != INVALID_TIMER ) { - iTimer->delete_timer(sd->npc_idle_timer,npc_rr_secure_timeout_timer); + iTimer->delete_timer(sd->npc_idle_timer,npc->secure_timeout_timer); sd->npc_idle_timer = INVALID_TIMER; } #endif - npc_event_dequeue(sd); + npc->event_dequeue(sd); } } else if(st->bk_st) { // rid was set to 0, before detaching the script state ShowError("script_detach_state: Found previous script state without attached player (rid=%d, oid=%d, state=%d, bk_npcid=%d)\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid); @@ -3421,7 +3421,7 @@ void script_attach_state(struct script_state* st) { **/ #ifdef SECURE_NPCTIMEOUT if( sd->npc_idle_timer == INVALID_TIMER ) - sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); sd->npc_idle_tick = iTimer->gettick(); #endif } @@ -6665,7 +6665,7 @@ BUILDIN(getnpcid) if( script_hasdata(st,3) ) {// unique npc name - if( ( nd = npc_name2id(script_getstr(st,3)) ) == NULL ) + if( ( nd = npc->name2id(script_getstr(st,3)) ) == NULL ) { ShowError("buildin_getnpcid: No such NPC '%s'.\n", script_getstr(st,3)); script_pushint(st,0); @@ -8781,7 +8781,7 @@ BUILDIN(doevent) } check_event(st, event); - npc_event(sd, event, 0); + npc->event(sd, event, 0); return true; } /*========================================== @@ -8790,7 +8790,7 @@ BUILDIN(donpcevent) { const char* event = script_getstr(st,2); check_event(st, event); - if( !npc_event_do(event) ) { + if( !npc->event_do(event) ) { struct npc_data * nd = iMap->id2nd(st->oid); ShowDebug("NPCEvent '%s' not found! (source: %s)\n",event,nd?nd->name:"Unknown"); script_pushint(st, 0); @@ -8803,12 +8803,12 @@ BUILDIN(donpcevent) /// basically a specialized 'donpcevent', with the event specified as two arguments instead of one BUILDIN(cmdothernpc) // Added by RoVeRT { - const char* npc = script_getstr(st,2); + const char* npc_name = script_getstr(st,2); const char* command = script_getstr(st,3); char event[EVENT_NAME_LENGTH]; - snprintf(event, sizeof(event), "%s::OnCommand%s", npc, command); + snprintf(event, sizeof(event), "%s::OnCommand%s", npc_name, command); check_event(st, event); - npc_event_do(event); + npc->event_do(event); return true; } @@ -8872,7 +8872,7 @@ BUILDIN(initnpctimer) if( script_hasdata(st,3) ) { //Two arguments: NPC name and attach flag. - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); flag = script_getnum(st,3); } else if( script_hasdata(st,2) ) @@ -8881,7 +8881,7 @@ BUILDIN(initnpctimer) data = script_getdata(st,2); script->get_val(st,data); if( data_isstring(data) ) //NPC name - nd = npc_name2id(script->conv_str(st, data)); + nd = npc->name2id(script->conv_str(st, data)); else if( data_isint(data) ) //Flag { nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -8907,8 +8907,8 @@ BUILDIN(initnpctimer) } nd->u.scr.timertick = 0; - npc_settimerevent_tick(nd,0); - npc_timerevent_start(nd, st->rid); + npc->settimerevent_tick(nd,0); + npc->timerevent_start(nd, st->rid); return true; } /*========================================== @@ -8920,7 +8920,7 @@ BUILDIN(startnpctimer) if( script_hasdata(st,3) ) { //Two arguments: NPC name and attach flag. - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); flag = script_getnum(st,3); } else if( script_hasdata(st,2) ) @@ -8929,7 +8929,7 @@ BUILDIN(startnpctimer) data = script_getdata(st,2); script->get_val(st,data); if( data_isstring(data) ) //NPC name - nd = npc_name2id(script->conv_str(st, data)); + nd = npc->name2id(script->conv_str(st, data)); else if( data_isint(data) ) //Flag { nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -8954,7 +8954,7 @@ BUILDIN(startnpctimer) nd->u.scr.rid = sd->bl.id; } - npc_timerevent_start(nd, st->rid); + npc->timerevent_start(nd, st->rid); return true; } /*========================================== @@ -8966,7 +8966,7 @@ BUILDIN(stopnpctimer) if( script_hasdata(st,3) ) { //Two arguments: NPC name and attach flag. - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); flag = script_getnum(st,3); } else if( script_hasdata(st,2) ) @@ -8975,7 +8975,7 @@ BUILDIN(stopnpctimer) data = script_getdata(st,2); script->get_val(st,data); if( data_isstring(data) ) //NPC name - nd = npc_name2id(script->conv_str(st, data)); + nd = npc->name2id(script->conv_str(st, data)); else if( data_isint(data) ) //Flag { nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -8995,7 +8995,7 @@ BUILDIN(stopnpctimer) if( flag ) //Detach nd->u.scr.rid = 0; - npc_timerevent_stop(nd); + npc->timerevent_stop(nd); return true; } /*========================================== @@ -9008,7 +9008,7 @@ BUILDIN(getnpctimer) int val = 0; if( script_hasdata(st,3) ) - nd = npc_name2id(script_getstr(st,3)); + nd = npc->name2id(script_getstr(st,3)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -9021,7 +9021,7 @@ BUILDIN(getnpctimer) switch( type ) { - case 0: val = npc_gettimerevent_tick(nd); break; + case 0: val = npc->gettimerevent_tick(nd); break; case 1: if( nd->u.scr.rid ) { @@ -9051,7 +9051,7 @@ BUILDIN(setnpctimer) tick = script_getnum(st,2); if( script_hasdata(st,3) ) - nd = npc_name2id(script_getstr(st,3)); + nd = npc->name2id(script_getstr(st,3)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -9062,7 +9062,7 @@ BUILDIN(setnpctimer) return false; } - npc_settimerevent_tick(nd,tick); + npc->settimerevent_tick(nd,tick); script_pushint(st,0); return true; } @@ -9107,7 +9107,7 @@ BUILDIN(detachnpctimer) struct npc_data *nd; if( script_hasdata(st,2) ) - nd = npc_name2id(script_getstr(st,2)); + nd = npc->name2id(script_getstr(st,2)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -9466,7 +9466,7 @@ BUILDIN(enablenpc) { const char *str; str=script_getstr(st,2); - npc_enable(str,1); + npc->enable(str,1); return true; } /*========================================== @@ -9475,7 +9475,7 @@ BUILDIN(disablenpc) { const char *str; str=script_getstr(st,2); - npc_enable(str,0); + npc->enable(str,0); return true; } @@ -9485,7 +9485,7 @@ BUILDIN(hideoffnpc) { const char *str; str=script_getstr(st,2); - npc_enable(str,2); + npc->enable(str,2); return true; } /*========================================== @@ -9494,7 +9494,7 @@ BUILDIN(hideonnpc) { const char *str; str=script_getstr(st,2); - npc_enable(str,4); + npc->enable(str,4); return true; } @@ -10035,7 +10035,7 @@ BUILDIN(globalmes) name=nd->name; //use current npc name } - npc_globalmessage(name,mes); // broadcast to all players connected + npc->globalmessage(name,mes); // broadcast to all players connected return true; } @@ -10074,7 +10074,7 @@ BUILDIN(delwaitingroom) { struct npc_data* nd; if( script_hasdata(st,2) ) - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); else nd = (struct npc_data *)iMap->id2bl(st->oid); if( nd != NULL ) @@ -10092,7 +10092,7 @@ BUILDIN(waitingroomkickall) struct chat_data* cd; if( script_hasdata(st,2) ) - nd = npc_name2id(script_getstr(st,2)); + nd = npc->name2id(script_getstr(st,2)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -10111,7 +10111,7 @@ BUILDIN(enablewaitingroomevent) struct chat_data* cd; if( script_hasdata(st,2) ) - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -10130,7 +10130,7 @@ BUILDIN(disablewaitingroomevent) struct chat_data *cd; if( script_hasdata(st,2) ) - nd = npc_name2id(script_getstr(st, 2)); + nd = npc->name2id(script_getstr(st, 2)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -10161,7 +10161,7 @@ BUILDIN(getwaitingroomstate) type = script_getnum(st,2); if( script_hasdata(st,3) ) - nd = npc_name2id(script_getstr(st, 3)); + nd = npc->name2id(script_getstr(st, 3)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -10490,7 +10490,7 @@ BUILDIN(setmapflag) char empty[1] = "\0"; char params[MAP_ZONE_MAPFLAG_LENGTH]; memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH); - npc_parse_mapflag(map[m].name, empty, zone, params, empty, empty, empty); + npc->parse_mapflag(map[m].name, empty, zone, params, empty, empty, empty); } break; case MF_NOCOMMAND: map[m].nocommand = (val <= 0) ? 100 : val; break; @@ -10746,7 +10746,7 @@ BUILDIN(emotion) } else if( script_hasdata(st,4) ) { - TBL_NPC *nd = npc_name2id(script_getstr(st,4)); + TBL_NPC *nd = npc->name2id(script_getstr(st,4)); if(nd) clif->emotion(&nd->bl,type); } @@ -11879,7 +11879,7 @@ BUILDIN(misceffect) int type; type=script_getnum(st,2); - if(st->oid && st->oid != fake_nd->bl.id) { + if(st->oid && st->oid != npc->fake_nd->bl.id) { struct block_list *bl = iMap->id2bl(st->oid); if (bl) clif->specialeffect(bl,type,AREA); @@ -12261,7 +12261,7 @@ BUILDIN(specialeffect) if( script_hasdata(st,4) ) { - TBL_NPC *nd = npc_name2id(script_getstr(st,4)); + TBL_NPC *nd = npc->name2id(script_getstr(st,4)); if(nd) clif->specialeffect(&nd->bl, type, target); } @@ -12570,19 +12570,19 @@ BUILDIN(jump_zero) *------------------------------------------*/ BUILDIN(movenpc) { TBL_NPC *nd = NULL; - const char *npc; + const char *npc_name; int x,y; - npc = script_getstr(st,2); + npc_name = script_getstr(st,2); x = script_getnum(st,3); y = script_getnum(st,4); - if ((nd = npc_name2id(npc)) == NULL) + if ((nd = npc->name2id(npc_name)) == NULL) return -1; if (script_hasdata(st,5)) nd->dir = script_getnum(st,5) % 8; - npc_movenpc(nd, x, y); + npc->movenpc(nd, x, y); return true; } @@ -12797,7 +12797,7 @@ BUILDIN(getmapxy) if( script_hasdata(st,6) ) { struct npc_data *nd; - nd=npc_name2id(script_getstr(st,6)); + nd=npc->name2id(script_getstr(st,6)); if (nd) bl = &nd->bl; } else //In case the origin is not an npc? @@ -14083,7 +14083,7 @@ BUILDIN(setnpcdisplay) return false; } - nd = npc_name2id(name); + nd = npc->name2id(name); if( nd == NULL ) {// not found script_pushint(st,1); @@ -14092,7 +14092,7 @@ BUILDIN(setnpcdisplay) // update npc if( newname ) - npc_setdisplayname(nd, newname); + npc->setdisplayname(nd, newname); if( size != -1 && size != (int)nd->size ) nd->size = size; @@ -14100,7 +14100,7 @@ BUILDIN(setnpcdisplay) size = -1; if( class_ != -1 && nd->class_ != class_ ) - npc_setclass(nd, class_); + npc->setclass(nd, class_); else if( size != -1 ) { // Required to update the visual size clif->clearunit_area(&nd->bl, CLR_OUTSIGHT); @@ -14384,7 +14384,7 @@ BUILDIN(callshop) shopname = script_getstr(st, 2); if( script_hasdata(st,3) ) flag = script_getnum(st,3); - nd = npc_name2id(shopname); + nd = npc->name2id(shopname); if( !nd || nd->bl.type != BL_NPC || (nd->subtype != SHOP && nd->subtype != CASHSHOP) ) { ShowError("buildin_callshop: Shop [%s] not found (or NPC is not shop type)\n", shopname); @@ -14399,8 +14399,8 @@ BUILDIN(callshop) switch( flag ) { - case 1: npc_buysellsel(sd,nd->bl.id,0); break; //Buy window - case 2: npc_buysellsel(sd,nd->bl.id,1); break; //Sell window + case 1: npc->buysellsel(sd,nd->bl.id,0); break; //Buy window + case 2: npc->buysellsel(sd,nd->bl.id,1); break; //Sell window default: clif->npcbuysell(sd,nd->bl.id); break; //Show menu } } @@ -14415,7 +14415,7 @@ BUILDIN(callshop) BUILDIN(npcshopitem) { const char* npcname = script_getstr(st, 2); - struct npc_data* nd = npc_name2id(npcname); + struct npc_data* nd = npc->name2id(npcname); int n, i; int amount; @@ -14444,7 +14444,7 @@ BUILDIN(npcshopitem) BUILDIN(npcshopadditem) { const char* npcname = script_getstr(st,2); - struct npc_data* nd = npc_name2id(npcname); + struct npc_data* nd = npc->name2id(npcname); int n, i; int amount; @@ -14473,7 +14473,7 @@ BUILDIN(npcshopadditem) BUILDIN(npcshopdelitem) { const char* npcname = script_getstr(st,2); - struct npc_data* nd = npc_name2id(npcname); + struct npc_data* nd = npc->name2id(npcname); unsigned int nameid; int n, i; int amount; @@ -14512,7 +14512,7 @@ BUILDIN(npcshopdelitem) BUILDIN(npcshopattach) { const char* npcname = script_getstr(st,2); - struct npc_data* nd = npc_name2id(npcname); + struct npc_data* nd = npc->name2id(npcname); int flag = 1; if( script_hasdata(st,3) ) @@ -15246,7 +15246,7 @@ BUILDIN(awake) { struct script_state *tst; struct npc_data* nd; - if( ( nd = npc_name2id(script_getstr(st, 2)) ) == NULL ) { + if( ( nd = npc->name2id(script_getstr(st, 2)) ) == NULL ) { ShowError("awake: NPC \"%s\" not found\n", script_getstr(st, 2)); return false; } @@ -15309,7 +15309,7 @@ BUILDIN(getvariableofnpc) return false; } - nd = npc_name2id(script_getstr(st,3)); + nd = npc->name2id(script_getstr(st,3)); if( nd == NULL || nd->subtype != SCRIPT || nd->u.scr.script == NULL ) {// NPC not found or has no script ShowError("script:getvariableofnpc: can't find npc %s\n", script_getstr(st,3)); @@ -15721,7 +15721,7 @@ BUILDIN(waitingroom2bg) struct map_session_data *sd; if( script_hasdata(st,7) ) - nd = npc_name2id(script_getstr(st,7)); + nd = npc->name2id(script_getstr(st,7)); else nd = (struct npc_data *)iMap->id2bl(st->oid); @@ -15782,7 +15782,7 @@ BUILDIN(waitingroom2bg_single) x = script_getnum(st,4); y = script_getnum(st,5); - nd = npc_name2id(script_getstr(st,6)); + nd = npc->name2id(script_getstr(st,6)); if( nd == NULL || (cd = (struct chat_data *)iMap->id2bl(nd->chat_id)) == NULL || cd->users <= 0 ) return true; @@ -16155,7 +16155,7 @@ BUILDIN(instance_npcname) { else if( st->instance_id >= 0 ) instance_id = st->instance_id; - if( instance_id >= 0 && (nd = npc_name2id(str)) != NULL ) { + if( instance_id >= 0 && (nd = npc->name2id(str)) != NULL ) { static char npcname[NAME_LENGTH]; snprintf(npcname, sizeof(npcname), "dup_%d_%d", instance_id, nd->bl.id); script_pushconststr(st,npcname); diff --git a/src/map/skill.c b/src/map/skill.c index 08da07137..0f448d5cb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -543,7 +543,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) break; case MC_VENDING: case ALL_BUYING_STORE: - if( npc_isnear(&sd->bl) ) { + if( npc->isnear(&sd->bl) ) { // uncomment for more verbose message. //char output[150]; //sprintf(output, msg_txt(662), battle_config.min_npc_vendchat_distance); @@ -9041,7 +9041,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( !script ) break; if( dstsd ) - script->run(scriptroot,0,dstsd->bl.id,fake_nd->bl.id); + script->run(scriptroot,0,dstsd->bl.id,npc->fake_nd->bl.id); else script->run(scriptroot,0,src->id,0); } @@ -12633,7 +12633,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case CG_HERMODE: - if(!npc_check_areanpc(1,sd->bl.m,sd->bl.x,sd->bl.y,skill->get_splash(skill_id, skill_lv))) + if(!npc->check_areanpc(1,sd->bl.m,sd->bl.x,sd->bl.y,skill->get_splash(skill_id, skill_lv))) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; diff --git a/src/map/status.c b/src/map/status.c index 6efc0b6ca..409d4493d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6074,7 +6074,7 @@ void status_set_viewdata(struct block_list *bl, int class_) if (mob->db_checkid(class_) || mob->is_clone(class_)) vd = mob->get_viewdata(class_); else if (npcdb_checkid(class_) || (bl->type == BL_NPC && class_ == WARP_CLASS)) - vd = npc_get_viewdata(class_); + vd = npc->get_viewdata(class_); else if (homdb_checkid(class_)) vd = homun->get_viewdata(class_); else if (mercenary->class(class_)) @@ -9214,7 +9214,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val } if( opt_flag&2 && sd && sd->touching_id ) - npc_touchnext_areanpc(sd,false); // run OnTouch_ on next char in range + npc->touchnext_areanpc(sd,false); // run OnTouch_ on next char in range return 1; } @@ -9982,7 +9982,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const skill->unit_move(bl,iTimer->gettick(),1); if(opt_flag&2 && sd && iMap->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) - npc_touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event. + npc->touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event. ers_free(sc_data_ers, sce); return 1; diff --git a/src/map/unit.c b/src/map/unit.c index 65eea39c9..da6f26c9d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -73,7 +73,7 @@ struct unit_data* unit_bl2ud(struct block_list *bl) { * @return a pointer to the given object's unit_data */ struct unit_data* unit_bl2ud2(struct block_list *bl) { - if( bl && bl->type == BL_NPC && ((struct npc_data*)bl)->ud == &npc_base_ud ) { + if( bl && bl->type == BL_NPC && ((struct npc_data*)bl)->ud == &npc->base_ud ) { struct npc_data *nd = (struct npc_data *)bl; nd->ud = NULL; CREATE(nd->ud, struct unit_data, 1); @@ -200,9 +200,9 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) if(sd) { if( sd->touching_id ) - npc_touchnext_areanpc(sd,false); + npc->touchnext_areanpc(sd,false); if(iMap->getcell(bl->m,x,y,CELL_CHKNPC)) { - npc_touch_areanpc(sd,bl->m,x,y); + npc->touch_areanpc(sd,bl->m,x,y); if (bl->prev == NULL) //Script could have warped char, abort remaining of the function. return 0; } else @@ -228,7 +228,7 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) } } else if (md) { if( iMap->getcell(bl->m,x,y,CELL_CHKNPC) ) { - if( npc_touch_areanpc2(md) ) return 0; // Warped + if( npc->touch_areanpc2(md) ) return 0; // Warped } else md->areanpc_id = 0; if (md->min_chase > md->db->range3) md->min_chase--; @@ -667,9 +667,9 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool if(sd) { if( sd->touching_id ) - npc_touchnext_areanpc(sd,false); + npc->touchnext_areanpc(sd,false); if(iMap->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) { - npc_touch_areanpc(sd,bl->m,bl->x,bl->y); + npc->touch_areanpc(sd,bl->m,bl->x,bl->y); if (bl->prev == NULL) //Script could have warped char, abort remaining of the function. return 0; } else @@ -765,10 +765,10 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) if(sd) { if(sd->touching_id) { - npc_touchnext_areanpc(sd, false); + npc->touchnext_areanpc(sd, false); } if(iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKNPC)) { - npc_touch_areanpc(sd, bl->m, bl->x, bl->y); + npc->touch_areanpc(sd, bl->m, bl->x, bl->y); } else { sd->areanpc_id = 0; } @@ -1637,7 +1637,7 @@ int unit_attack(struct block_list *src,int target_id,int continuous) if( src->type == BL_PC ) { TBL_PC* sd = (TBL_PC*)src; if( target->type == BL_NPC ) { // monster npcs [Valaris] - npc_click(sd,(TBL_NPC*)target); // submitted by leinsirk10 [Celest] + npc->click(sd,(TBL_NPC*)target); // submitted by leinsirk10 [Celest] return 0; } if( pc_is90overweight(sd) || pc_isridingwug(sd) ) { // overweight or mounted on warg - stop attacking @@ -2160,7 +2160,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i if(sd->menuskill_id) sd->menuskill_id = sd->menuskill_val = 0; if( sd->touching_id ) - npc_touchnext_areanpc(sd,true); + npc->touchnext_areanpc(sd,true); // Check if warping and not changing the map. if ( sd->state.warping && !sd->state.changemap ) { -- cgit v1.2.3-70-g09d2 From 78c7c6bf04a6c96d92524ae37ad165e65f599eb8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 17 Sep 2013 16:56:04 -0300 Subject: HPM: npc_chat.c Interfaced Fully Integrated, closes #117 Also updated buildin_ functions to match latest script.c/.h macros. Signed-off-by: shennetsind --- src/map/clif.c | 2 +- src/map/map.c | 7 +++- src/map/npc.c | 2 +- src/map/npc.h | 60 +++++++++++++++++++++++---- src/map/npc_chat.c | 117 ++++++++++++++++++++++------------------------------- 5 files changed, 108 insertions(+), 80 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/map/clif.c b/src/map/clif.c index f55dcdf08..c61630bb5 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10000,7 +10000,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) WFIFOSET(fd, WFIFOW(fd,2)); #ifdef PCRE_SUPPORT // trigger listening npcs - iMap->foreachinrange(npc_chat_sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl); + iMap->foreachinrange(npc_chat->sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl); #endif // Chat logging type 'O' / Global Chat diff --git a/src/map/map.c b/src/map/map.c index a1c78f35b..d4568766a 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5175,7 +5175,9 @@ void map_hp_symbols(void) { HPM->share(pet,"pet"); HPM->share(path,"path"); HPM->share(quest,"quest"); - +#ifdef PCRE_SUPPORT + HPM->share(npc_chat,"npc_chat"); +#endif /* partial */ HPM->share(mapit,"mapit"); /* sql link */ @@ -5226,6 +5228,9 @@ void map_load_defaults(void) { pet_defaults(); path_defaults(); quest_defaults(); +#ifdef PCRE_SUPPORT + npc_chat_defaults(); +#endif } int do_init(int argc, char *argv[]) { diff --git a/src/map/npc.c b/src/map/npc.c index 13a625f07..51d01d711 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1794,7 +1794,7 @@ int npc_unload(struct npc_data* nd, bool single) { chat->deletenpcchat(nd); #ifdef PCRE_SUPPORT - npc_chat_finalize(nd); // deallocate npc PCRE data structures + npc_chat->finalize(nd); // deallocate npc PCRE data structures #endif if( single && nd->path ) { diff --git a/src/map/npc.h b/src/map/npc.h index 0fc773dfc..6c1ca0972 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -98,10 +98,6 @@ enum actor_classes { //Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001) #define npcdb_checkid(id) ( ( (id) >= 46 && (id) <= 125) || (id) == HIDDEN_WARP_CLASS || ( (id) > 400 && (id) < MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS || ( (id) > MAX_NPC_CLASS2_START && (id) < MAX_NPC_CLASS2_END ) ) -#ifdef PCRE_SUPPORT -void npc_chat_finalize(struct npc_data* nd); -#endif - //Script NPC events. enum npce_event { NPCE_LOGIN, @@ -131,10 +127,6 @@ struct npc_path_data { unsigned short references; }; -/* comes from npc_chat.c */ -int npc_chat_sub (struct block_list* bl, va_list ap); - - /* npc.c interface */ struct npc_interface { /* */ @@ -246,4 +238,56 @@ struct npc_interface *npc; void npc_defaults(void); + +/* comes from npc_chat.c */ +#ifdef PCRE_SUPPORT +#include "../../3rdparty/pcre/include/pcre.h" +/* Structure containing all info associated with a single pattern block */ +struct pcrematch_entry { + struct pcrematch_entry* next; + char* pattern; + pcre* pcre_; + pcre_extra* pcre_extra_; + char* label; +}; + +/* A set of patterns that can be activated and deactived with a single command */ +struct pcrematch_set { + struct pcrematch_set* prev; + struct pcrematch_set* next; + struct pcrematch_entry* head; + int setid; +}; + +/* + * Entire data structure hung off a NPC + * + * The reason I have done it this way (a void * in npc_data and then + * this) was to reduce the number of patches that needed to be applied + * to a ragnarok distribution to bring this code online. I + * also wanted people to be able to grab this one file to get updates + * without having to do a large number of changes. + */ +struct npc_parse { + struct pcrematch_set* active; + struct pcrematch_set* inactive; +}; + +struct npc_chat_interface { + int (*sub) (struct block_list* bl, va_list ap); + void (*finalize) (struct npc_data* nd); + void (*def_pattern) (struct npc_data* nd, int setid, const char* pattern, const char* label); + struct pcrematch_entry* (*create_pcrematch_entry) (struct pcrematch_set* set); + void (*delete_pcreset) (struct npc_data* nd, int setid); + void (*deactivate_pcreset) (struct npc_data* nd, int setid); + void (*activate_pcreset) (struct npc_data* nd, int setid); + struct pcrematch_set* (*lookup_pcreset) (struct npc_data* nd, int setid); + void (*finalize_pcrematch_entry) (struct pcrematch_entry* e); +}; + +struct npc_chat_interface *npc_chat; + +void npc_chat_defaults(void); +#endif + #endif /* _NPC_H_ */ diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index f6459e1ae..848347888 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -22,6 +22,7 @@ #include #include +struct npc_chat_interface npc_chat_s; /** * Written by MouseJstr in a vision... (2/21/2005) @@ -70,37 +71,6 @@ * deletes a pset */ -/* Structure containing all info associated with a single pattern block */ -struct pcrematch_entry { - struct pcrematch_entry* next; - char* pattern; - pcre* pcre_; - pcre_extra* pcre_extra_; - char* label; -}; - -/* A set of patterns that can be activated and deactived with a single command */ -struct pcrematch_set { - struct pcrematch_set* prev; - struct pcrematch_set* next; - struct pcrematch_entry* head; - int setid; -}; - -/* - * Entire data structure hung off a NPC - * - * The reason I have done it this way (a void * in npc_data and then - * this) was to reduce the number of patches that needed to be applied - * to a ragnarok distribution to bring this code online. I - * also wanted people to be able to grab this one file to get updates - * without having to do a large number of changes. - */ -struct npc_parse { - struct pcrematch_set* active; - struct pcrematch_set* inactive; -}; - /** * delete everythign associated with a entry @@ -118,7 +88,7 @@ void finalize_pcrematch_entry(struct pcrematch_entry* e) /** * Lookup (and possibly create) a new set of patterns by the set id */ -static struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) +struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb; @@ -159,7 +129,7 @@ static struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) * * if the setid does not exist, this will silently return */ -static void activate_pcreset(struct npc_data* nd, int setid) +void activate_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb; @@ -192,7 +162,7 @@ static void activate_pcreset(struct npc_data* nd, int setid) * * if the setid does not exist, this will silently return */ -static void deactivate_pcreset(struct npc_data* nd, int setid) +void deactivate_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb; @@ -200,7 +170,7 @@ static void deactivate_pcreset(struct npc_data* nd, int setid) return; // Nothing to deactivate... if (setid == -1) { while(npcParse->active != NULL) - deactivate_pcreset(nd, npcParse->active->setid); + npc_chat->deactivate_pcreset(nd, npcParse->active->setid); return; } pcreset = npcParse->active; @@ -228,7 +198,7 @@ static void deactivate_pcreset(struct npc_data* nd, int setid) /** * delete a set of patterns. */ -static void delete_pcreset(struct npc_data* nd, int setid) +void delete_pcreset(struct npc_data* nd, int setid) { int active = 1; struct pcrematch_set *pcreset; @@ -268,7 +238,7 @@ static void delete_pcreset(struct npc_data* nd, int setid) while (pcreset->head) { struct pcrematch_entry* n = pcreset->head->next; - finalize_pcrematch_entry(pcreset->head); + npc_chat->finalize_pcrematch_entry(pcreset->head); aFree(pcreset->head); // Cleanin' the last ones.. [Lance] pcreset->head = n; } @@ -279,7 +249,7 @@ static void delete_pcreset(struct npc_data* nd, int setid) /** * create a new pattern entry */ -static struct pcrematch_entry* create_pcrematch_entry(struct pcrematch_set* set) +struct pcrematch_entry* create_pcrematch_entry(struct pcrematch_set* set) { struct pcrematch_entry * e = (struct pcrematch_entry *) aCalloc(sizeof(struct pcrematch_entry), 1); struct pcrematch_entry * last = set->head; @@ -313,8 +283,8 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c const char *err; int erroff; - struct pcrematch_set * s = lookup_pcreset(nd, setid); - struct pcrematch_entry *e = create_pcrematch_entry(s); + struct pcrematch_set * s = npc_chat->lookup_pcreset(nd, setid); + struct pcrematch_entry *e = npc_chat->create_pcrematch_entry(s); e->pattern = aStrdup(pattern); e->label = aStrdup(label); e->pcre_ = pcre_compile(pattern, PCRE_CASELESS, &err, &erroff, NULL); @@ -334,10 +304,10 @@ void npc_chat_finalize(struct npc_data* nd) return; while(npcParse->active) - delete_pcreset(nd, npcParse->active->setid); + npc_chat->delete_pcreset(nd, npcParse->active->setid); while(npcParse->inactive) - delete_pcreset(nd, npcParse->inactive->setid); + npc_chat->delete_pcreset(nd, npcParse->inactive->setid); // Additional cleaning up [Lance] aFree(npcParse); @@ -390,7 +360,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap) lst = nd->u.scr.label_list; ARR_FIND(0, nd->u.scr.label_list_num, i, strncmp(lst[i].name, e->label, sizeof(lst[i].name)) == 0); if (i == nd->u.scr.label_list_num) { - ShowWarning("Unable to find label: %s\n", e->label); + ShowWarning("npc_chat_sub: Unable to find label: %s\n", e->label); return 0; } @@ -405,47 +375,56 @@ int npc_chat_sub(struct block_list* bl, va_list ap) } // Various script builtins used to support these functions - -int buildin_defpattern(struct script_state* st) -{ - int setid = script->conv_num(st,& (st->stack->stack_data[st->start+2])); - const char* pattern = script->conv_str(st,& (st->stack->stack_data[st->start+3])); - const char* label = script->conv_str(st,& (st->stack->stack_data[st->start+4])); +BUILDIN(defpattern) { + int setid = script_getnum(st,2); + const char* pattern = script_getstr(st,3); + const char* label = script_getstr(st,4); struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); - npc_chat_def_pattern(nd, setid, pattern, label); - - return 1; + npc_chat->def_pattern(nd, setid, pattern, label); + + return true; } -int buildin_activatepset(struct script_state* st) -{ - int setid = script->conv_num(st,& (st->stack->stack_data[st->start+2])); +BUILDIN(activatepset) { + int setid = script_getnum(st,2); struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); - activate_pcreset(nd, setid); - - return 1; + npc_chat->activate_pcreset(nd, setid); + + return true; } -int buildin_deactivatepset(struct script_state* st) -{ - int setid = script->conv_num(st,& (st->stack->stack_data[st->start+2])); +BUILDIN(deactivatepset) { + int setid = script_getnum(st,2); struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); - deactivate_pcreset(nd, setid); + npc_chat->deactivate_pcreset(nd, setid); - return 1; + return true; } -int buildin_deletepset(struct script_state* st) -{ - int setid = script->conv_num(st,& (st->stack->stack_data[st->start+2])); +BUILDIN(deletepset) { + int setid = script_getnum(st,2); struct npc_data* nd = (struct npc_data *)iMap->id2bl(st->oid); - delete_pcreset(nd, setid); - - return 1; + npc_chat->delete_pcreset(nd, setid); + + return true; +} + +void npc_chat_defaults(void) { + npc_chat = &npc_chat_s; + + npc_chat->sub = npc_chat_sub; + npc_chat->finalize = npc_chat_finalize; + npc_chat->def_pattern = npc_chat_def_pattern; + npc_chat->create_pcrematch_entry = create_pcrematch_entry; + npc_chat->delete_pcreset = delete_pcreset; + npc_chat->deactivate_pcreset = deactivate_pcreset; + npc_chat->activate_pcreset = activate_pcreset; + npc_chat->lookup_pcreset = lookup_pcreset; + npc_chat->finalize_pcrematch_entry = finalize_pcrematch_entry; } #endif //PCRE_SUPPORT -- cgit v1.2.3-70-g09d2 From 44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 25 Sep 2013 00:29:15 +0200 Subject: Renamed more forgotten variables during interface conversions (related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru --- src/char/inter.c | 8 +- src/common/HPMi.h | 2 +- src/common/console.c | 4 +- src/common/console.h | 2 +- src/common/strlib.c | 54 +++--- src/common/strlib.h | 4 +- src/config/const.h | 51 +++--- src/map/atcommand.c | 2 +- src/map/battle.c | 130 +++++++------- src/map/battle.h | 2 +- src/map/chat.c | 8 +- src/map/clif.c | 164 +++++++++--------- src/map/clif.h | 16 +- src/map/homunculus.c | 6 +- src/map/itemdb.c | 68 ++++---- src/map/map.c | 113 ++++++------ src/map/map.h | 12 +- src/map/mob.c | 54 +++--- src/map/npc.c | 4 +- src/map/npc.h | 4 +- src/map/pc.c | 76 ++++----- src/map/pc.h | 4 +- src/map/pet.h | 4 +- src/map/quest.c | 17 +- src/map/quest.h | 2 +- src/map/script.c | 51 +++--- src/map/script.h | 2 +- src/map/skill.c | 471 +++++++++++++++++++++++++-------------------------- src/map/skill.h | 6 +- src/map/status.c | 232 ++++++++++++------------- src/map/status.h | 2 +- src/map/vending.h | 2 +- 32 files changed, 754 insertions(+), 823 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/char/inter.c b/src/char/inter.c index 4eb4f0c0a..a6d2485cb 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -490,7 +490,7 @@ void mapif_parse_accinfo(int fd) { /* it will only get here if we have a single match */ if( account_id ) { - char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pincode[5], birthdate[11]; + char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pin_code[5], birthdate[11]; short level = -1; int logincount = 0,state = 0; // FIXME: No, this doesn't really look right. We can't, and shouldn't, access the login table from the char server. @@ -512,7 +512,7 @@ void mapif_parse_accinfo(int fd) { SQL->GetData(sql_handle, 5, &data, NULL); safestrncpy(lastlogin, data, sizeof(lastlogin)); SQL->GetData(sql_handle, 6, &data, NULL); logincount = atoi(data); SQL->GetData(sql_handle, 7, &data, NULL); state = atoi(data); - SQL->GetData(sql_handle, 8, &data, NULL); safestrncpy(pincode, data, sizeof(pincode)); + SQL->GetData(sql_handle, 8, &data, NULL); safestrncpy(pin_code, data, sizeof(pin_code)); SQL->GetData(sql_handle, 9, &data, NULL); safestrncpy(birthdate, data, sizeof(birthdate)); } @@ -525,8 +525,8 @@ void mapif_parse_accinfo(int fd) { inter_to_fd(fd, u_fd, aid, "User: %s | GM Group: %d | State: %d", userid, level, state ); if (level < castergroup) { /* only show pass if your gm level is greater than the one you're searching for */ - if( strlen(pincode) ) - inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pincode ); + if( strlen(pin_code) ) + inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pin_code ); else inter_to_fd(fd, u_fd, aid, "Password: %s", user_pass ); } diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 5e44b80c7..c8bce8ee8 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -91,7 +91,7 @@ HPExport struct HPMi_interface { bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID); } HPMi_s; #ifndef _HPM_H_ - HPExport struct HPMi_interface *HPMi; +HPExport struct HPMi_interface *HPMi; #endif #endif /* _HPMi_H_ */ diff --git a/src/common/console.c b/src/common/console.c index c9772ecfd..6f25bd2fd 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -386,8 +386,8 @@ void console_parse_init(void) { iTimer->add_timer_interval(iTimer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } -void console_setSQL(Sql *SQL) { - console->SQL = SQL; +void console_setSQL(Sql *SQL_handle) { + console->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ diff --git a/src/common/console.h b/src/common/console.h index 214a41175..cef898f17 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -64,7 +64,7 @@ struct console_interface { void (*load_defaults) (void); void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); - void (*setSQL) (Sql *SQL); + void (*setSQL) (Sql *SQL_handle); #endif }; diff --git a/src/common/strlib.c b/src/common/strlib.c index 686b2e47d..e45cb0789 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -444,9 +444,9 @@ bool bin2hex(char* output, unsigned char* input, size_t count) /// Parses a single field in a delim-separated string. /// The delimiter after the field is skipped. /// -/// @param sv Parse state +/// @param svstate Parse state /// @return 1 if a field was parsed, 0 if already done, -1 on error. -int sv_parse_next(struct s_svstate* sv) +int sv_parse_next(struct s_svstate* svstate) { enum { START_OF_FIELD, @@ -462,13 +462,13 @@ int sv_parse_next(struct s_svstate* sv) char delim; int i; - if( sv == NULL ) + if( svstate == NULL ) return -1;// error - str = sv->str; - len = sv->len; - opt = sv->opt; - delim = sv->delim; + str = svstate->str; + len = svstate->len; + opt = svstate->opt; + delim = svstate->delim; // check opt if( delim == '\n' && (opt&(SV_TERMINATE_CRLF|SV_TERMINATE_LF)) ) @@ -482,9 +482,9 @@ int sv_parse_next(struct s_svstate* sv) return -1;// error } - if( sv->done || str == NULL ) + if( svstate->done || str == NULL ) { - sv->done = true; + svstate->done = true; return 0;// nothing to parse } @@ -495,10 +495,10 @@ int sv_parse_next(struct s_svstate* sv) ((opt&SV_TERMINATE_CR) && str[i] == '\r') || \ ((opt&SV_TERMINATE_CRLF) && i+1 < len && str[i] == '\r' && str[i+1] == '\n') ) #define IS_C_ESCAPE() ( (opt&SV_ESCAPE_C) && str[i] == '\\' ) -#define SET_FIELD_START() sv->start = i -#define SET_FIELD_END() sv->end = i +#define SET_FIELD_START() svstate->start = i +#define SET_FIELD_END() svstate->end = i - i = sv->off; + i = svstate->off; state = START_OF_FIELD; while( state != END ) { @@ -578,14 +578,14 @@ int sv_parse_next(struct s_svstate* sv) else ++i;// CR or LF #endif - sv->done = true; + svstate->done = true; state = END; break; } } if( IS_END() ) - sv->done = true; - sv->off = i; + svstate->done = true; + svstate->off = i; #undef IS_END #undef IS_DELIM @@ -619,31 +619,31 @@ int sv_parse_next(struct s_svstate* sv) /// @param opt Options that determine the parsing behaviour /// @return Number of fields found in the string or -1 if an error occured int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, int npos, enum e_svopt opt) { - struct s_svstate sv; + struct s_svstate svstate; int count; // initialize if( out_pos == NULL ) npos = 0; for( count = 0; count < npos; ++count ) out_pos[count] = -1; - sv.str = str; - sv.len = len; - sv.off = startoff; - sv.opt = opt; - sv.delim = delim; - sv.done = false; + svstate.str = str; + svstate.len = len; + svstate.off = startoff; + svstate.opt = opt; + svstate.delim = delim; + svstate.done = false; // parse count = 0; if( npos > 0 ) out_pos[0] = startoff; - while( !sv.done ) { + while( !svstate.done ) { ++count; - if( sv_parse_next(&sv) <= 0 ) + if( sv_parse_next(&svstate) <= 0 ) return -1;// error - if( npos > count*2 ) out_pos[count*2] = sv.start; - if( npos > count*2+1 ) out_pos[count*2+1] = sv.end; + if( npos > count*2 ) out_pos[count*2] = svstate.start; + if( npos > count*2+1 ) out_pos[count*2+1] = svstate.end; } - if( npos > 1 ) out_pos[1] = sv.off; + if( npos > 1 ) out_pos[1] = svstate.off; return count; } diff --git a/src/common/strlib.h b/src/common/strlib.h index 9b1875d45..5ef455a0e 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -124,9 +124,9 @@ struct sv_interface { /// Parses a single field in a delim-separated string. /// The delimiter after the field is skipped. /// - /// @param sv Parse state + /// @param svstate Parse state /// @return 1 if a field was parsed, 0 if done, -1 on error. - int (*parse_next) (struct s_svstate* sv); + int (*parse_next) (struct s_svstate* svstate); /// Parses a delim-separated string. /// Starts parsing at startoff and fills the pos array with position pairs. diff --git a/src/config/const.h b/src/config/const.h index f0902759d..7badb1071 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -53,39 +53,42 @@ /* pointer size fix which fixes several gcc warnings */ #ifdef __64BIT__ - #define __64BPTRSIZE(y) (intptr)y + #define __64BPTRSIZE(y) ((intptr)(y)) #else - #define __64BPTRSIZE(y) y + #define __64BPTRSIZE(y) (y) #endif /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL - #define MOB_FLEE(mob) ( mob->lv + mob->status.agi + 100 ) - #define MOB_HIT(mob) ( mob->lv + mob->status.dex + 150 ) - #define RE_SKILL_REDUCTION(){ \ - wd.damage = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 0, wd.flag), nk, n_ele, s_ele, s_ele_, false, flag.arrow); \ - if( flag.lh ) \ - wd.damage2 = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 1, wd.flag), nk, n_ele, s_ele, s_ele_, true, flag.arrow); \ - } + #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) + #define MOB_HIT(mobdata) ( (mobdata)->lv + (mobdata)->status.dex + 150 ) + #define RE_SKILL_REDUCTION() do { \ + wd.damage = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 0, wd.flag), nk, n_ele, s_ele, s_ele_, false, flag.arrow); \ + if( flag.lh ) \ + wd.damage2 = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 1, wd.flag), nk, n_ele, s_ele, s_ele_, true, flag.arrow); \ + } while(0) #else - #define MOB_FLEE(mob) ( mob->lv + mob->status.agi ) - #define MOB_HIT(mob) ( mob->lv + mob->status.dex ) + #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi ) + #define MOB_HIT(mobdata) ( (mobdata)->lv + (mobdata)->status.dex ) #endif /* Renewal's dmg level modifier, used as a macro for a easy way to turn off. */ #ifdef RENEWAL_LVDMG - #define RE_LVL_DMOD(val) \ - if( iStatus->get_lv(src) > 100 && val > 0 ) \ - skillratio = skillratio * iStatus->get_lv(src) / val; - #define RE_LVL_MDMOD(val) \ - if( iStatus->get_lv(src) > 100 && val > 0) \ - md.damage = md.damage * iStatus->get_lv(src) / val; + #define RE_LVL_DMOD(val) do { \ + if( iStatus->get_lv(src) > 100 && (val) > 0 ) \ + skillratio = skillratio * iStatus->get_lv(src) / (val); \ + } while(0) + #define RE_LVL_MDMOD(val) do { \ + if( iStatus->get_lv(src) > 100 && (val) > 0) \ + md.damage = md.damage * iStatus->get_lv(src) / (val); \ + } while(0) /* ranger traps special */ - #define RE_LVL_TMDMOD() \ + #define RE_LVL_TMDMOD() do { \ if( iStatus->get_lv(src) > 100 ) \ - md.damage = md.damage * 150 / 100 + md.damage * iStatus->get_lv(src) / 100; + md.damage = md.damage * 150 / 100 + md.damage * iStatus->get_lv(src) / 100; \ + } while(0) #else - #define RE_LVL_DMOD(val) + #define RE_LVL_DMOD(val) #define RE_LVL_MDMOD(val) #define RE_LVL_TMDMOD() #endif @@ -100,10 +103,10 @@ // Renewal variable cast time reduction #ifdef RENEWAL_CAST - #define VARCAST_REDUCTION(val){ \ - if( (varcast_r += val) != 0 && varcast_r >= 0 ) \ - time = time * (1 - (float)min(val, 100) / 100); \ - } + #define VARCAST_REDUCTION(val) do { \ + if( (varcast_r += (val)) != 0 && varcast_r >= 0 ) \ + time = time * (1 - (float)min((val), 100) / 100); \ + } while(0) #endif /* console_input doesn't go well with minicore */ diff --git a/src/map/atcommand.c b/src/map/atcommand.c index fa3108df8..948ce786f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -60,7 +60,7 @@ static char atcmd_player_name[NAME_LENGTH]; static AtCommandInfo* get_atcommandinfo_byname(const char *name); // @help static const char* atcommand_checkalias(const char *aliasname); // @help -static void atcommand_get_suggestions(struct map_session_data* sd, const char *name, bool atcommand); // @help +static void atcommand_get_suggestions(struct map_session_data* sd, const char *name, bool is_atcmd_cmd); // @help // @commands (script-based) struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { diff --git a/src/map/battle.c b/src/map/battle.c index 85fa2cb98..9f2ec9189 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -604,32 +604,31 @@ int64 battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type, i /*========================================== * Passive skill damages increases *------------------------------------------*/ -int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,int64 dmg,int type) -{ - int64 damage,skill; +int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,int64 dmg,int type) { + int64 damage; struct status_data *status = iStatus->get_status_data(target); - int weapon; + int weapon, skill_lv; damage = dmg; nullpo_ret(sd); - if((skill = pc->checkskill(sd,AL_DEMONBANE)) > 0 && + if((skill_lv = pc->checkskill(sd,AL_DEMONBANE)) > 0 && target->type == BL_MOB && //This bonus doesnt work against players. (battle->check_undead(status->race,status->def_ele) || status->race==RC_DEMON) ) - damage += (int)(skill*(3+sd->status.base_level/20.0)); - //damage += (skill * 3); - if( (skill = pc->checkskill(sd, RA_RANGERMAIN)) > 0 && (status->race == RC_BRUTE || status->race == RC_PLANT || status->race == RC_FISH) ) - damage += (skill * 5); - if( (skill = pc->checkskill(sd,NC_RESEARCHFE)) > 0 && (status->def_ele == ELE_FIRE || status->def_ele == ELE_EARTH) ) - damage += (skill * 10); + damage += (int)(skill_lv*(3+sd->status.base_level/20.0)); + //damage += (skill_lv * 3); + if( (skill_lv = pc->checkskill(sd, RA_RANGERMAIN)) > 0 && (status->race == RC_BRUTE || status->race == RC_PLANT || status->race == RC_FISH) ) + damage += (skill_lv * 5); + if( (skill_lv = pc->checkskill(sd,NC_RESEARCHFE)) > 0 && (status->def_ele == ELE_FIRE || status->def_ele == ELE_EARTH) ) + damage += (skill_lv * 10); if( pc_ismadogear(sd) ) damage += 20 + 20 * pc->checkskill(sd, NC_MADOLICENCE); #ifdef RENEWAL - if( (skill = pc->checkskill(sd,BS_WEAPONRESEARCH)) > 0 ) - damage += (skill * 2); + if( (skill_lv = pc->checkskill(sd,BS_WEAPONRESEARCH)) > 0 ) + damage += (skill_lv * 2); #endif - if((skill = pc->checkskill(sd,HT_BEASTBANE)) > 0 && (status->race==RC_BRUTE || status->race==RC_INSECT) ) { - damage += (skill * 4); + if((skill_lv = pc->checkskill(sd,HT_BEASTBANE)) > 0 && (status->race==RC_BRUTE || status->race==RC_INSECT) ) { + damage += (skill_lv * 4); if (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER) damage += sd->status.str; } @@ -638,75 +637,74 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in weapon = sd->weapontype1; else weapon = sd->weapontype2; - switch(weapon) - { + switch(weapon) { case W_1HSWORD: #ifdef RENEWAL - if((skill = pc->checkskill(sd,AM_AXEMASTERY)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,AM_AXEMASTERY)) > 0) + damage += (skill_lv * 3); #endif case W_DAGGER: - if((skill = pc->checkskill(sd,SM_SWORD)) > 0) - damage += (skill * 4); - if((skill = pc->checkskill(sd,GN_TRAINING_SWORD)) > 0) - damage += skill * 10; + if((skill_lv = pc->checkskill(sd,SM_SWORD)) > 0) + damage += (skill_lv * 4); + if((skill_lv = pc->checkskill(sd,GN_TRAINING_SWORD)) > 0) + damage += skill_lv * 10; break; case W_2HSWORD: #ifdef RENEWAL - if((skill = pc->checkskill(sd,AM_AXEMASTERY)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,AM_AXEMASTERY)) > 0) + damage += (skill_lv * 3); #endif - if((skill = pc->checkskill(sd,SM_TWOHAND)) > 0) - damage += (skill * 4); + if((skill_lv = pc->checkskill(sd,SM_TWOHAND)) > 0) + damage += (skill_lv * 4); break; case W_1HSPEAR: case W_2HSPEAR: - if((skill = pc->checkskill(sd,KN_SPEARMASTERY)) > 0) { + if((skill_lv = pc->checkskill(sd,KN_SPEARMASTERY)) > 0) { if(pc_isridingdragon(sd)) - damage += (skill * 10); + damage += (skill_lv * 10); else if(pc_isriding(sd)) - damage += (skill * 5); + damage += (skill_lv * 5); else - damage += (skill * 4); + damage += (skill_lv * 4); } break; case W_1HAXE: case W_2HAXE: - if((skill = pc->checkskill(sd,AM_AXEMASTERY)) > 0) - damage += (skill * 3); - if((skill = pc->checkskill(sd,NC_TRAININGAXE)) > 0) - damage += (skill * 5); + if((skill_lv = pc->checkskill(sd,AM_AXEMASTERY)) > 0) + damage += (skill_lv * 3); + if((skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0) + damage += (skill_lv * 5); break; case W_MACE: case W_2HMACE: - if((skill = pc->checkskill(sd,PR_MACEMASTERY)) > 0) - damage += (skill * 3); - if((skill = pc->checkskill(sd,NC_TRAININGAXE)) > 0) - damage += (skill * 5); + if((skill_lv = pc->checkskill(sd,PR_MACEMASTERY)) > 0) + damage += (skill_lv * 3); + if((skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0) + damage += (skill_lv * 5); break; case W_FIST: - if((skill = pc->checkskill(sd,TK_RUN)) > 0) - damage += (skill * 10); + if((skill_lv = pc->checkskill(sd,TK_RUN)) > 0) + damage += (skill_lv * 10); // No break, fallthrough to Knuckles case W_KNUCKLE: - if((skill = pc->checkskill(sd,MO_IRONHAND)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,MO_IRONHAND)) > 0) + damage += (skill_lv * 3); break; case W_MUSICAL: - if((skill = pc->checkskill(sd,BA_MUSICALLESSON)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,BA_MUSICALLESSON)) > 0) + damage += (skill_lv * 3); break; case W_WHIP: - if((skill = pc->checkskill(sd,DC_DANCINGLESSON)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,DC_DANCINGLESSON)) > 0) + damage += (skill_lv * 3); break; case W_BOOK: - if((skill = pc->checkskill(sd,SA_ADVANCEDBOOK)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,SA_ADVANCEDBOOK)) > 0) + damage += (skill_lv * 3); break; case W_KATAR: - if((skill = pc->checkskill(sd,AS_KATAR)) > 0) - damage += (skill * 3); + if((skill_lv = pc->checkskill(sd,AS_KATAR)) > 0) + damage += (skill_lv * 3); break; } @@ -716,8 +714,8 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in /*========================================== * Calculates ATK masteries. *------------------------------------------*/ -int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon){ - int skill, i; +int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon) { + int skill2_lv, i; struct status_change *sc; struct map_session_data *sd; struct status_data *tstatus; @@ -742,12 +740,12 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, case CR_ACIDDEMONSTRATION: return damage; case NJ_SYURIKEN: - if( (skill = pc->checkskill(sd,NJ_TOBIDOUGU)) > 0 + if( (skill2_lv = pc->checkskill(sd,NJ_TOBIDOUGU)) > 0 #ifndef RENEWAL && weapon #endif ) - damage += 3 * skill; + damage += 3 * skill2_lv; break; #ifndef RENEWAL case NJ_KUNAI: @@ -807,17 +805,17 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, damage += div * sd->spiritball * 3; if( skill_id != CR_SHIELDBOOMERANG ) // Only Shield boomerang doesn't takes the Star Crumbs bonus. damage += div * (left ? sd->left_weapon.star : sd->right_weapon.star); - if( skill_id != MC_CARTREVOLUTION && (skill=pc->checkskill(sd,BS_HILTBINDING)) > 0 ) + if( skill_id != MC_CARTREVOLUTION && (skill2_lv=pc->checkskill(sd,BS_HILTBINDING)) > 0 ) damage += 4; - if(sd->status.party_id && (skill=pc->checkskill(sd,TK_POWER)) > 0){ + if(sd->status.party_id && (skill2_lv=pc->checkskill(sd,TK_POWER)) > 0) { if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) - damage += 2 * skill * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/; + damage += 2 * skill2_lv * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/; } #else if( skill_id != ASC_BREAKER && weapon ) // Adv Katar Mastery is does not applies to ASC_BREAKER, but other masteries DO apply >_> - if( sd->status.weapon == W_KATAR && (skill=pc->checkskill(sd,ASC_KATAR)) > 0 ) - damage += damage * (10 + 2 * skill) / 100; + if( sd->status.weapon == W_KATAR && (skill2_lv=pc->checkskill(sd,ASC_KATAR)) > 0 ) + damage += damage * (10 + 2 * skill2_lv) / 100; #endif // percentage factor masteries @@ -825,18 +823,18 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, i = 2; //Star anger else ARR_FIND(0, MAX_PC_FEELHATE, i, iStatus->get_class(target) == sd->hate_mob[i]); - if ( i < MAX_PC_FEELHATE && (skill=pc->checkskill(sd,sg_info[i].anger_id)) && weapon ){ + if ( i < MAX_PC_FEELHATE && (skill2_lv=pc->checkskill(sd,sg_info[i].anger_id)) && weapon ) { int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src); if ( i == 2 ) ratio += status_get_str(src); //Star Anger - if (skill < 4 ) - ratio /= (12 - 3 * skill); + if (skill2_lv < 4 ) + ratio /= (12 - 3 * skill2_lv); damage += damage * ratio / 100; } if( sd->status.class_ == JOB_ARCH_BISHOP_T || sd->status.class_ == JOB_ARCH_BISHOP ){ - if((skill = pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && + if((skill2_lv = pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) - damage += damage * skill / 100; + damage += damage * skill2_lv / 100; } return damage; @@ -3176,7 +3174,7 @@ void battle_consume_ammo(TBL_PC*sd, int skill_id, int lv) { if (!battle_config.arrow_decrement) return; - if (skill) { + if (skill_id) { qty = skill->get_ammo_qty(skill_id, lv); if (!qty) qty = 1; } diff --git a/src/map/battle.h b/src/map/battle.h index bbba415f5..f56bff3be 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -534,7 +534,7 @@ struct battle_interface { /* is src and bl within range? */ bool (*check_range) (struct block_list *src,struct block_list *bl,int range); /* consume amo for this skill and lv */ - void (*consume_ammo) (struct map_session_data* sd, int skill, int lv); + void (*consume_ammo) (struct map_session_data* sd, int skill_id, int lv); 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); diff --git a/src/map/chat.c b/src/map/chat.c index 28de86fe1..b7e561116 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -202,7 +202,7 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) if( cd->users == 0 && cd->owner->type == BL_PC ) { // Delete empty chatroom - struct skill_unit* unit; + struct skill_unit* su; struct skill_unit_group* group; clif->clearchat(cd, 0); @@ -211,10 +211,10 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) iMap->delblock(&cd->bl); iMap->freeblock(&cd->bl); - unit = iMap->find_skill_unit_oncell(&sd->bl, sd->bl.x, sd->bl.y, AL_WARP, NULL, 0); - group = (unit != NULL) ? unit->group : NULL; + su = iMap->find_skill_unit_oncell(&sd->bl, sd->bl.x, sd->bl.y, AL_WARP, NULL, 0); + group = (su != NULL) ? su->group : NULL; if (group != NULL) - skill->unit_onplace(unit, &sd->bl, group->tick); + skill->unit_onplace(su, &sd->bl, group->tick); return 1; } diff --git a/src/map/clif.c b/src/map/clif.c index bb012c24d..513ec0d7c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4631,31 +4631,32 @@ void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fi /// 01c9 .L .L .W .W .B .B .B .80B (ZC_SKILL_ENTRY2) /// 08c7 .W L .L .W .W .B .W .B (ZC_SKILL_ENTRY3) /// 099f .W L .L .W .W .L .W .B (ZC_SKILL_ENTRY4) -void clif_getareachar_skillunit(struct map_session_data *sd, struct skill_unit *unit) { +void clif_getareachar_skillunit(struct map_session_data *sd, struct skill_unit *su) { int fd = sd->fd, header = 0x11f, pos=0; - if( unit->group->state.guildaura ) + if( su->group->state.guildaura ) return; #if PACKETVER >= 20130320 - if(unit->group->unit_id > UCHAR_MAX){ + if(su->group->unit_id > UCHAR_MAX) { header = 0x99f; pos = 2; } #endif #if PACKETVER >= 3 - if(unit->group->unit_id==UNT_GRAFFITI) { // Graffiti [Valaris] + if(su->group->unit_id==UNT_GRAFFITI) { + // Graffiti [Valaris] WFIFOHEAD(fd,packet_len(0x1c9)); WFIFOW(fd, 0)=0x1c9; - WFIFOL(fd, 2)=unit->bl.id; - WFIFOL(fd, 6)=unit->group->src_id; - WFIFOW(fd,10)=unit->bl.x; - WFIFOW(fd,12)=unit->bl.y; - WFIFOB(fd,14)=unit->group->unit_id; + WFIFOL(fd, 2)=su->bl.id; + WFIFOL(fd, 6)=su->group->src_id; + WFIFOW(fd,10)=su->bl.x; + WFIFOW(fd,12)=su->bl.y; + WFIFOB(fd,14)=su->group->unit_id; WFIFOB(fd,15)=1; WFIFOB(fd,16)=1; - safestrncpy((char*)WFIFOP(fd,17),unit->group->valstr,MESSAGE_SIZE); + safestrncpy((char*)WFIFOP(fd,17),su->group->valstr,MESSAGE_SIZE); WFIFOSET(fd,packet_len(0x1c9)); return; } @@ -4664,55 +4665,54 @@ void clif_getareachar_skillunit(struct map_session_data *sd, struct skill_unit * WFIFOW(fd, 0)=header; if(pos > 0) WFIFOL(fd, pos)=packet_len(header); - WFIFOL(fd, 2 + pos)=unit->bl.id; - WFIFOL(fd, 6 + pos)=unit->group->src_id; - WFIFOW(fd,10 + pos)=unit->bl.x; - WFIFOW(fd,12 + pos)=unit->bl.y; - if (battle_config.traps_setting&1 && skill->get_inf2(unit->group->skill_id)&INF2_TRAP) + WFIFOL(fd, 2 + pos)=su->bl.id; + WFIFOL(fd, 6 + pos)=su->group->src_id; + WFIFOW(fd,10 + pos)=su->bl.x; + WFIFOW(fd,12 + pos)=su->bl.y; + if (battle_config.traps_setting&1 && skill->get_inf2(su->group->skill_id)&INF2_TRAP) WFIFOB(fd,14)=UNT_DUMMYSKILL; //Use invisible unit id for traps. - else if (skill->get_unit_flag(unit->group->skill_id) & UF_RANGEDSINGLEUNIT && !(unit->val2 & UF_RANGEDSINGLEUNIT)) + else if (skill->get_unit_flag(su->group->skill_id) & UF_RANGEDSINGLEUNIT && !(su->val2 & UF_RANGEDSINGLEUNIT)) WFIFOB(fd,14)=UNT_DUMMYSKILL; //Use invisible unit id for traps. else if(pos > 0){ - WFIFOL(fd,16)=unit->group->unit_id; - WFIFOW(fd,20)=unit->range; + WFIFOL(fd,16)=su->group->unit_id; + WFIFOW(fd,20)=su->range; pos += 5; }else - WFIFOB(fd,14)=unit->group->unit_id; + WFIFOB(fd,14)=su->group->unit_id; WFIFOB(fd,15 + pos)=1; // ignored by client (always gets set to 1) WFIFOSET(fd,packet_len(header)); - if(unit->group->skill_id == WZ_ICEWALL) - clif->changemapcell(fd,unit->bl.m,unit->bl.x,unit->bl.y,5,SELF); + if(su->group->skill_id == WZ_ICEWALL) + clif->changemapcell(fd,su->bl.m,su->bl.x,su->bl.y,5,SELF); } /*========================================== * Server tells client to remove unit of id 'unit->bl.id' *------------------------------------------*/ -void clif_clearchar_skillunit(struct skill_unit *unit, int fd) { - nullpo_retv(unit); +void clif_clearchar_skillunit(struct skill_unit *su, int fd) { + nullpo_retv(su); WFIFOHEAD(fd,packet_len(0x120)); WFIFOW(fd, 0)=0x120; - WFIFOL(fd, 2)=unit->bl.id; + WFIFOL(fd, 2)=su->bl.id; WFIFOSET(fd,packet_len(0x120)); - if(unit->group && unit->group->skill_id == WZ_ICEWALL) - clif->changemapcell(fd,unit->bl.m,unit->bl.x,unit->bl.y,unit->val2,SELF); + if(su->group && su->group->skill_id == WZ_ICEWALL) + clif->changemapcell(fd,su->bl.m,su->bl.x,su->bl.y,su->val2,SELF); } /// Removes a skill unit (ZC_SKILL_DISAPPEAR). /// 0120 .L -void clif_skill_delunit(struct skill_unit *unit) -{ +void clif_skill_delunit(struct skill_unit *su) { unsigned char buf[16]; - nullpo_retv(unit); + nullpo_retv(su); WBUFW(buf, 0)=0x120; - WBUFL(buf, 2)=unit->bl.id; - clif->send(buf,packet_len(0x120),&unit->bl,AREA); + WBUFL(buf, 2)=su->bl.id; + clif->send(buf,packet_len(0x120),&su->bl,AREA); } @@ -5330,57 +5330,57 @@ void clif_skill_poseffect(struct block_list *src,uint16 skill_id,int val,int x,i * Tells all client's nearby 'unit' sight range that it spawned *------------------------------------------*/ //FIXME: this is just an AREA version of clif_getareachar_skillunit() -void clif_skill_setunit(struct skill_unit *unit) -{ +void clif_skill_setunit(struct skill_unit *su) { unsigned char buf[128]; int header = 0x11f, pos = 0; - nullpo_retv(unit); + nullpo_retv(su); - if( unit->group->state.guildaura ) + if( su->group->state.guildaura ) return; #if PACKETVER >= 20130320 - if(unit->group->unit_id > UCHAR_MAX){ + if(su->group->unit_id > UCHAR_MAX) { header = 0x99f; pos = 2; } #endif #if PACKETVER >= 3 - if(unit->group->unit_id==UNT_GRAFFITI) { // Graffiti [Valaris] + if(su->group->unit_id==UNT_GRAFFITI) { + // Graffiti [Valaris] WBUFW(buf, 0)=0x1c9; - WBUFL(buf, 2)=unit->bl.id; - WBUFL(buf, 6)=unit->group->src_id; - WBUFW(buf,10)=unit->bl.x; - WBUFW(buf,12)=unit->bl.y; - WBUFB(buf,14)=unit->group->unit_id; + WBUFL(buf, 2)=su->bl.id; + WBUFL(buf, 6)=su->group->src_id; + WBUFW(buf,10)=su->bl.x; + WBUFW(buf,12)=su->bl.y; + WBUFB(buf,14)=su->group->unit_id; WBUFB(buf,15)=1; WBUFB(buf,16)=1; - safestrncpy((char*)WBUFP(buf,17),unit->group->valstr,MESSAGE_SIZE); - clif->send(buf,packet_len(0x1c9),&unit->bl,AREA); + safestrncpy((char*)WBUFP(buf,17),su->group->valstr,MESSAGE_SIZE); + clif->send(buf,packet_len(0x1c9),&su->bl,AREA); return; } #endif WBUFW(buf, 0)=header; if(pos > 0) WBUFW(buf, pos)=packet_len(header); - WBUFL(buf, 2 + pos)=unit->bl.id; - WBUFL(buf, 6 + pos)=unit->group->src_id; - WBUFW(buf,10 + pos)=unit->bl.x; - WBUFW(buf,12 + pos)=unit->bl.y; - if (unit->group->state.song_dance&0x1 && unit->val2&UF_ENSEMBLE) - WBUFB(buf,14)=unit->val2&UF_SONG?UNT_DISSONANCE:UNT_UGLYDANCE; - else if (skill->get_unit_flag(unit->group->skill_id) & UF_RANGEDSINGLEUNIT && !(unit->val2 & UF_RANGEDSINGLEUNIT)) - WBUFB(buf, 14) = UNT_DUMMYSKILL; // Only display the unit at center. - else if(pos > 0){ - WBUFL(buf,16)=unit->group->unit_id; - WBUFW(buf,20)=unit->range; + WBUFL(buf, 2 + pos)=su->bl.id; + WBUFL(buf, 6 + pos)=su->group->src_id; + WBUFW(buf,10 + pos)=su->bl.x; + WBUFW(buf,12 + pos)=su->bl.y; + if (su->group->state.song_dance&0x1 && su->val2&UF_ENSEMBLE) + WBUFB(buf,14)=su->val2&UF_SONG?UNT_DISSONANCE:UNT_UGLYDANCE; + else if (skill->get_unit_flag(su->group->skill_id) & UF_RANGEDSINGLEUNIT && !(su->val2 & UF_RANGEDSINGLEUNIT)) + WBUFB(buf, 14) = UNT_DUMMYSKILL; // Only display the unit at center. + else if(pos > 0) { + WBUFL(buf,16)=su->group->unit_id; + WBUFW(buf,20)=su->range; pos += 5; }else - WBUFB(buf,14)=unit->group->unit_id; + WBUFB(buf,14)=su->group->unit_id; WBUFB(buf,15 + pos)=1; // ignored by client (always gets set to 1) - clif->send(buf,packet_len(header),&unit->bl,AREA); + clif->send(buf,packet_len(header),&su->bl,AREA); } @@ -6370,8 +6370,7 @@ void clif_closevendingboard(struct block_list* bl, int fd) /// Sends a list of items in a shop. /// R 0133 .W .L { .L .W .W .B .W .B .B .B .W .W .W .W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC) /// R 0800 .W .L .L { .L .W .W .B .W .B .B .B .W .W .W .W }* (ZC_PC_PURCHASE_ITEMLIST_FROMMC2) -void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_vending* vending) -{ +void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_vending* vending_items) { int i,fd; int count; struct map_session_data* vsd; @@ -6384,7 +6383,7 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven #endif nullpo_retv(sd); - nullpo_retv(vending); + nullpo_retv(vending_items); nullpo_retv(vsd=iMap->id2sd(id)); fd = sd->fd; @@ -6398,13 +6397,12 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven WFIFOL(fd,8) = vsd->vender_id; #endif - for( i = 0; i < count; i++ ) - { - int index = vending[i].index; + for( i = 0; i < count; i++ ) { + int index = vending_items[i].index; struct item_data* data = itemdb->search(vsd->status.cart[index].nameid); - WFIFOL(fd,offset+ 0+i*22) = vending[i].value; - WFIFOW(fd,offset+ 4+i*22) = vending[i].amount; - WFIFOW(fd,offset+ 6+i*22) = vending[i].index + 2; + WFIFOL(fd,offset+ 0+i*22) = vending_items[i].value; + WFIFOW(fd,offset+ 4+i*22) = vending_items[i].amount; + WFIFOW(fd,offset+ 6+i*22) = vending_items[i].index + 2; WFIFOB(fd,offset+ 8+i*22) = itemtype(data->type); WFIFOW(fd,offset+ 9+i*22) = ( data->view_id > 0 ) ? data->view_id : vsd->status.cart[index].nameid; WFIFOB(fd,offset+11+i*22) = vsd->status.cart[index].identify; @@ -6444,8 +6442,7 @@ void clif_buyvending(struct map_session_data* sd, int index, int amount, int fai /// Shop creation success (ZC_PC_PURCHASE_MYITEMLIST). /// 0136 .W .L { .L .W .W .B .W .B .B .B .W .W .W .W }* -void clif_openvending(struct map_session_data* sd, int id, struct s_vending* vending) -{ +void clif_openvending(struct map_session_data* sd, int id, struct s_vending* vending_items) { int i,fd; int count; @@ -6459,11 +6456,11 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven WFIFOW(fd,2) = 8+count*22; WFIFOL(fd,4) = id; for( i = 0; i < count; i++ ) { - int index = vending[i].index; + int index = vending_items[i].index; struct item_data* data = itemdb->search(sd->status.cart[index].nameid); - WFIFOL(fd, 8+i*22) = vending[i].value; - WFIFOW(fd,12+i*22) = vending[i].index + 2; - WFIFOW(fd,14+i*22) = vending[i].amount; + WFIFOL(fd, 8+i*22) = vending_items[i].value; + WFIFOW(fd,12+i*22) = vending_items[i].index + 2; + WFIFOW(fd,14+i*22) = vending_items[i].amount; WFIFOB(fd,16+i*22) = itemtype(data->type); WFIFOW(fd,17+i*22) = ( data->view_id > 0 ) ? data->view_id : sd->status.cart[index].nameid; WFIFOB(fd,19+i*22) = sd->status.cart[index].identify; @@ -7022,23 +7019,23 @@ void clif_send_petdata(struct map_session_data* sd, struct pet_data* pd, int typ void clif_send_petstatus(struct map_session_data *sd) { int fd; - struct s_pet *pet; + struct s_pet *p; nullpo_retv(sd); nullpo_retv(sd->pd); fd=sd->fd; - pet = &sd->pd->pet; + p = &sd->pd->pet; WFIFOHEAD(fd,packet_len(0x1a2)); WFIFOW(fd,0)=0x1a2; - memcpy(WFIFOP(fd,2),pet->name,NAME_LENGTH); - WFIFOB(fd,26)=battle_config.pet_rename?0:pet->rename_flag; - WFIFOW(fd,27)=pet->level; - WFIFOW(fd,29)=pet->hungry; - WFIFOW(fd,31)=pet->intimate; - WFIFOW(fd,33)=pet->equip; + memcpy(WFIFOP(fd,2),p->name,NAME_LENGTH); + WFIFOB(fd,26)=battle_config.pet_rename?0:p->rename_flag; + WFIFOW(fd,27)=p->level; + WFIFOW(fd,29)=p->hungry; + WFIFOW(fd,31)=p->intimate; + WFIFOW(fd,33)=p->equip; #if PACKETVER >= 20081126 - WFIFOW(fd,35)=pet->class_; + WFIFOW(fd,35)=p->class_; #endif WFIFOSET(fd,packet_len(0x1a2)); } @@ -16201,8 +16198,7 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat /// exp type: /// 0 = normal exp gain/loss /// 1 = quest exp gain/loss -void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool quest) -{ +void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { int fd; nullpo_retv(sd); @@ -16214,7 +16210,7 @@ void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, b WFIFOL(fd,2) = sd->bl.id; WFIFOL(fd,6) = exp; WFIFOW(fd,10) = type; - WFIFOW(fd,12) = quest?1:0;// Normal exp is shown in yellow, quest exp is shown in purple. + WFIFOW(fd,12) = is_quest?1:0;// Normal exp is shown in yellow, quest exp is shown in purple. WFIFOSET(fd,packet_len(0x7f6)); } diff --git a/src/map/clif.h b/src/map/clif.h index 4559e4209..e9bef2629 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -540,8 +540,8 @@ struct clif_interface { void (*changetraplook) (struct block_list *bl,int val); void (*refreshlook) (struct block_list *bl,int id,int type,int val,enum send_target target); void (*class_change) (struct block_list *bl,int class_,int type); - void (*skill_setunit) (struct skill_unit *unit); - void (*skill_delunit) (struct skill_unit *unit); + 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); void (*set_unit_idle) (struct block_list* bl, struct map_session_data *tsd,enum send_target target); @@ -552,9 +552,9 @@ struct clif_interface { #endif void (*set_unit_walking) (struct block_list* bl, struct map_session_data *tsd,struct unit_data* ud, enum send_target target); int (*calc_walkdelay) (struct block_list *bl,int delay, int type, int damage, int div_); - void (*getareachar_skillunit) (struct map_session_data *sd, struct skill_unit *unit); + void (*getareachar_skillunit) (struct map_session_data *sd, struct skill_unit *su); void (*getareachar_unit) (struct map_session_data* sd,struct block_list *bl); - void (*clearchar_skillunit) (struct skill_unit *unit, int fd); + void (*clearchar_skillunit) (struct skill_unit *su, int fd); int (*getareachar) (struct block_list* bl,va_list ap); /* main unit spawn */ int (*spawn) (struct block_list *bl); @@ -649,7 +649,7 @@ struct clif_interface { void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd); void (*viewequip_fail) (struct map_session_data* sd); void (*equpcheckbox) (struct map_session_data* sd); - void (*displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool quest); + void (*displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); void (*font) (struct map_session_data *sd); void (*progressbar) (struct map_session_data * sd, unsigned long color, unsigned int second); void (*progressbar_abort) (struct map_session_data * sd); @@ -761,9 +761,9 @@ struct clif_interface { void (*openvendingreq) (struct map_session_data* sd, int num); void (*showvendingboard) (struct block_list* bl, const char* message, int fd); void (*closevendingboard) (struct block_list* bl, int fd); - void (*vendinglist) (struct map_session_data* sd, unsigned int id, struct s_vending* vending); + void (*vendinglist) (struct map_session_data* sd, unsigned int id, struct s_vending* vending_list); void (*buyvending) (struct map_session_data* sd, int index, int amount, int fail); - void (*openvending) (struct map_session_data* sd, int id, struct s_vending* vending); + void (*openvending) (struct map_session_data* sd, int id, struct s_vending* vending_list); void (*vendingreport) (struct map_session_data* sd, int index, int amount); /* storage handling */ void (*storagelist) (struct map_session_data* sd, struct item* items, int items_length); @@ -774,7 +774,7 @@ struct clif_interface { /* skill-list handling */ void (*skillinfoblock) (struct map_session_data *sd); void (*skillup) (struct map_session_data *sd,uint16 skill_id); - void (*skillinfo) (struct map_session_data *sd,int skill, int inf); + void (*skillinfo) (struct map_session_data *sd,int skill_id, int inf); void (*addskill) (struct map_session_data *sd, int id); void (*deleteskill) (struct map_session_data *sd, int id); /* party-specific */ diff --git a/src/map/homunculus.c b/src/map/homunculus.c index c14df7e0b..1754b161c 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1127,11 +1127,11 @@ void homunculus_read_db(void) { memset(homun->db,0,sizeof(homun->db)); for(i = 0; i 0 ) { - char path[256]; + char filepath[256]; - sprintf(path, "%s/%s", iMap->db_path, filename[i]); + sprintf(filepath, "%s/%s", iMap->db_path, filename[i]); - if( !exists(path) ) { + if( !exists(filepath) ) { continue; } } diff --git a/src/map/itemdb.c b/src/map/itemdb.c index c2a25c2d4..2398ba04c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1379,13 +1379,13 @@ void itemdb_read_combos() { uint32 lines = 0, count = 0; char line[1024]; - char path[256]; + char filepath[256]; FILE* fp; - sprintf(path, "%s/%s", iMap->db_path, DBPATH"item_combo_db.txt"); + sprintf(filepath, "%s/%s", iMap->db_path, DBPATH"item_combo_db.txt"); - if ((fp = fopen(path, "r")) == NULL) { - ShowError("itemdb_read_combos: File not found \"%s\".\n", path); + if ((fp = fopen(filepath, "r")) == NULL) { + ShowError("itemdb_read_combos: File not found \"%s\".\n", filepath); return; } @@ -1407,10 +1407,9 @@ void itemdb_read_combos() { if (*p == '\0') continue;// empty line - if (!strchr(p,',')) - { + if (!strchr(p,',')) { /* is there even a single column? */ - ShowError("itemdb_read_combos: Insufficient columns in line %d of \"%s\", skipping.\n", lines, path); + ShowError("itemdb_read_combos: Insufficient columns in line %d of \"%s\", skipping.\n", lines, filepath); continue; } @@ -1424,13 +1423,13 @@ void itemdb_read_combos() { p++; if (str[1][0] != '{') { - ShowError("itemdb_read_combos(#1): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, path); + ShowError("itemdb_read_combos(#1): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, filepath); continue; } /* no ending key anywhere (missing \}\) */ if ( str[1][strlen(str[1])-1] != '}' ) { - ShowError("itemdb_read_combos(#2): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, path); + ShowError("itemdb_read_combos(#2): Invalid format (Script column) in line %d of \"%s\", skipping.\n", lines, filepath); continue; } else { int items[MAX_ITEMS_PER_COMBO]; @@ -1439,14 +1438,14 @@ void itemdb_read_combos() { int idx = 0; if((retcount = itemdb->combo_split_atoi(str[0], items)) < 2) { - ShowError("itemdb_read_combos: line %d of \"%s\" doesn't have enough items to make for a combo (min:2), skipping.\n", lines, path); + ShowError("itemdb_read_combos: line %d of \"%s\" doesn't have enough items to make for a combo (min:2), skipping.\n", lines, filepath); continue; } /* validate */ for(v = 0; v < retcount; v++) { if( !itemdb->exists(items[v]) ) { - ShowError("itemdb_read_combos: line %d of \"%s\" contains unknown item ID %d, skipping.\n", lines, path,items[v]); + ShowError("itemdb_read_combos: line %d of \"%s\" contains unknown item ID %d, skipping.\n", lines, filepath,items[v]); break; } } @@ -1470,7 +1469,7 @@ void itemdb_read_combos() { id->combos[idx]->nameid = aMalloc( retcount * sizeof(unsigned short) ); id->combos[idx]->count = retcount; - id->combos[idx]->script = script->parse(str[1], path, lines, 0); + id->combos[idx]->script = script->parse(str[1], filepath, lines, 0); id->combos[idx]->id = count; id->combos[idx]->isRef = false; /* populate ->nameid field */ @@ -1712,13 +1711,13 @@ int itemdb_readdb(void) uint32 lines = 0, count = 0; char line[1024]; - char path[256]; + char filepath[256]; FILE* fp; - sprintf(path, "%s/%s", iMap->db_path, filename[fi]); - fp = fopen(path, "r"); + sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + fp = fopen(filepath, "r"); if( fp == NULL ) { - ShowWarning("itemdb_readdb: File not found \"%s\", skipping.\n", path); + ShowWarning("itemdb_readdb: File not found \"%s\", skipping.\n", filepath); continue; } @@ -1737,8 +1736,7 @@ int itemdb_readdb(void) ++p; if( *p == '\0' ) continue;// empty line - for( i = 0; i < 19; ++i ) - { + for( i = 0; i < 19; ++i ) { str[i] = p; p = strchr(p,','); if( p == NULL ) @@ -1747,48 +1745,42 @@ int itemdb_readdb(void) ++p; } - if( p == NULL ) - { - ShowError("itemdb_readdb: Insufficient columns in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( p == NULL ) { + ShowError("itemdb_readdb: Insufficient columns in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } // Script - if( *p != '{' ) - { - ShowError("itemdb_readdb: Invalid format (Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( *p != '{' ) { + ShowError("itemdb_readdb: Invalid format (Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } str[19] = p; p = strstr(p+1,"},"); - if( p == NULL ) - { - ShowError("itemdb_readdb: Invalid format (Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( p == NULL ) { + ShowError("itemdb_readdb: Invalid format (Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } p[1] = '\0'; p += 2; // OnEquip_Script - if( *p != '{' ) - { - ShowError("itemdb_readdb: Invalid format (OnEquip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( *p != '{' ) { + ShowError("itemdb_readdb: Invalid format (OnEquip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } str[20] = p; p = strstr(p+1,"},"); - if( p == NULL ) - { - ShowError("itemdb_readdb: Invalid format (OnEquip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( p == NULL ) { + ShowError("itemdb_readdb: Invalid format (OnEquip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } p[1] = '\0'; p += 2; // OnUnequip_Script (last column) - if( *p != '{' ) - { - ShowError("itemdb_readdb: Invalid format (OnUnequip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + if( *p != '{' ) { + ShowError("itemdb_readdb: Invalid format (OnUnequip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } str[21] = p; @@ -1805,12 +1797,12 @@ int itemdb_readdb(void) } if( lcurly != rcurly ) { - ShowError("itemdb_readdb: Mismatching curly braces in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + ShowError("itemdb_readdb: Mismatching curly braces in line %d of \"%s\" (item with id %d), skipping.\n", lines, filepath, atoi(str[0])); continue; } } - if (!itemdb->parse_dbrow(str, path, lines, 0)) + if (!itemdb->parse_dbrow(str, filepath, lines, 0)) continue; count++; diff --git a/src/map/map.c b/src/map/map.c index 865682afc..eff45f472 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -483,7 +483,7 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type) struct skill_unit* map_find_skill_unit_oncell(struct block_list* target,int16 x,int16 y,uint16 skill_id,struct skill_unit* out_unit, int flag) { int16 m,bx,by; struct block_list *bl; - struct skill_unit *unit; + struct skill_unit *su; m = target->m; if (x < 0 || y < 0 || (x >= map[m].xs) || (y >= map[m].ys)) @@ -497,11 +497,11 @@ struct skill_unit* map_find_skill_unit_oncell(struct block_list* target,int16 x, if (bl->x != x || bl->y != y || bl->type != BL_SKILL) continue; - unit = (struct skill_unit *) bl; - if( unit == out_unit || !unit->alive || !unit->group || unit->group->skill_id != skill_id ) + su = (struct skill_unit *) bl; + if( su == out_unit || !su->alive || !su->group || su->group->skill_id != skill_id ) continue; - if( !(flag&1) || battle->check_target(&unit->bl,target,unit->group->target_flag) > 0 ) - return unit; + if( !(flag&1) || battle->check_target(&su->bl,target,su->group->target_flag) > 0 ) + return su; } return NULL; } @@ -1935,44 +1935,40 @@ struct s_mapiterator /// @param flags Flags of the iterator /// @param type Target types /// @return Iterator -struct s_mapiterator* mapit_alloc(enum e_mapitflags flags, enum bl_type types) -{ - struct s_mapiterator* mapit; +struct s_mapiterator* mapit_alloc(enum e_mapitflags flags, enum bl_type types) { + struct s_mapiterator* iter; - mapit = ers_alloc(map_iterator_ers, struct s_mapiterator); - mapit->flags = flags; - mapit->types = types; - if( types == BL_PC ) mapit->dbi = db_iterator(pc_db); - else if( types == BL_MOB ) mapit->dbi = db_iterator(mobid_db); - else mapit->dbi = db_iterator(id_db); - return mapit; + iter = ers_alloc(map_iterator_ers, struct s_mapiterator); + iter->flags = flags; + iter->types = types; + if( types == BL_PC ) iter->dbi = db_iterator(pc_db); + else if( types == BL_MOB ) iter->dbi = db_iterator(mobid_db); + else iter->dbi = db_iterator(id_db); + return iter; } /// Frees the iterator. /// -/// @param mapit Iterator -void mapit_free(struct s_mapiterator* mapit) -{ - nullpo_retv(mapit); +/// @param iter Iterator +void mapit_free(struct s_mapiterator* iter) { + nullpo_retv(iter); - dbi_destroy(mapit->dbi); - ers_free(map_iterator_ers, mapit); + dbi_destroy(iter->dbi); + ers_free(map_iterator_ers, iter); } /// Returns the first block_list that matches the description. /// Returns NULL if not found. /// -/// @param mapit Iterator +/// @param iter Iterator /// @return first block_list or NULL -struct block_list* mapit_first(struct s_mapiterator* mapit) -{ +struct block_list* mapit_first(struct s_mapiterator* iter) { struct block_list* bl; - nullpo_retr(NULL,mapit); + nullpo_retr(NULL,iter); - for( bl = (struct block_list*)dbi_first(mapit->dbi); bl != NULL; bl = (struct block_list*)dbi_next(mapit->dbi) ) - { - if( MAPIT_MATCHES(mapit,bl) ) + for( bl = (struct block_list*)dbi_first(iter->dbi); bl != NULL; bl = (struct block_list*)dbi_next(iter->dbi) ) { + if( MAPIT_MATCHES(iter,bl) ) break;// found match } return bl; @@ -1981,17 +1977,15 @@ struct block_list* mapit_first(struct s_mapiterator* mapit) /// Returns the last block_list that matches the description. /// Returns NULL if not found. /// -/// @param mapit Iterator +/// @param iter Iterator /// @return last block_list or NULL -struct block_list* mapit_last(struct s_mapiterator* mapit) -{ +struct block_list* mapit_last(struct s_mapiterator* iter) { struct block_list* bl; - nullpo_retr(NULL,mapit); + nullpo_retr(NULL,iter); - for( bl = (struct block_list*)dbi_last(mapit->dbi); bl != NULL; bl = (struct block_list*)dbi_prev(mapit->dbi) ) - { - if( MAPIT_MATCHES(mapit,bl) ) + for( bl = (struct block_list*)dbi_last(iter->dbi); bl != NULL; bl = (struct block_list*)dbi_prev(iter->dbi) ) { + if( MAPIT_MATCHES(iter,bl) ) break;// found match } return bl; @@ -2000,20 +1994,18 @@ struct block_list* mapit_last(struct s_mapiterator* mapit) /// Returns the next block_list that matches the description. /// Returns NULL if not found. /// -/// @param mapit Iterator +/// @param iter Iterator /// @return next block_list or NULL -struct block_list* mapit_next(struct s_mapiterator* mapit) -{ +struct block_list* mapit_next(struct s_mapiterator* iter) { struct block_list* bl; - nullpo_retr(NULL,mapit); + nullpo_retr(NULL,iter); - for( ; ; ) - { - bl = (struct block_list*)dbi_next(mapit->dbi); + for( ; ; ) { + bl = (struct block_list*)dbi_next(iter->dbi); if( bl == NULL ) break;// end - if( MAPIT_MATCHES(mapit,bl) ) + if( MAPIT_MATCHES(iter,bl) ) break;// found a match // try next } @@ -2023,20 +2015,18 @@ struct block_list* mapit_next(struct s_mapiterator* mapit) /// Returns the previous block_list that matches the description. /// Returns NULL if not found. /// -/// @param mapit Iterator +/// @param iter Iterator /// @return previous block_list or NULL -struct block_list* mapit_prev(struct s_mapiterator* mapit) -{ +struct block_list* mapit_prev(struct s_mapiterator* iter) { struct block_list* bl; - nullpo_retr(NULL,mapit); + nullpo_retr(NULL,iter); - for( ; ; ) - { - bl = (struct block_list*)dbi_prev(mapit->dbi); + for( ; ; ) { + bl = (struct block_list*)dbi_prev(iter->dbi); if( bl == NULL ) break;// end - if( MAPIT_MATCHES(mapit,bl) ) + if( MAPIT_MATCHES(iter,bl) ) break;// found a match // try prev } @@ -2045,13 +2035,12 @@ struct block_list* mapit_prev(struct s_mapiterator* mapit) /// Returns true if the current block_list exists in the database. /// -/// @param mapit Iterator +/// @param iter Iterator /// @return true if it exists -bool mapit_exists(struct s_mapiterator* mapit) -{ - nullpo_retr(false,mapit); +bool mapit_exists(struct s_mapiterator* iter) { + nullpo_retr(false,iter); - return dbi_exists(mapit->dbi); + return dbi_exists(iter->dbi); } /*========================================== @@ -4491,8 +4480,8 @@ void read_map_zone_db(void) { disabled_skills_count = config_setting_length(skills); /* validate */ for(h = 0; h < config_setting_length(skills); h++) { - config_setting_t *skill = config_setting_get_elem(skills, h); - name = config_setting_name(skill); + config_setting_t *skillinfo = config_setting_get_elem(skills, h); + name = config_setting_name(skillinfo); if( !map_zone_str2skillid(name) ) { ShowError("map_zone_db: unknown skill (%s) in disabled_skills for zone '%s', skipping skill...\n",name,zone->name); config_setting_remove_elem(skills,h); @@ -4506,10 +4495,10 @@ void read_map_zone_db(void) { /* all ok, process */ CREATE( zone->disabled_skills, struct map_zone_disabled_skill_entry *, disabled_skills_count ); for(h = 0, v = 0; h < config_setting_length(skills); h++) { - config_setting_t *skill = config_setting_get_elem(skills, h); + config_setting_t *skillinfo = config_setting_get_elem(skills, h); struct map_zone_disabled_skill_entry * entry; enum bl_type type; - name = config_setting_name(skill); + name = config_setting_name(skillinfo); if( (type = map_zone_bl_type(config_setting_get_string_elem(skills,h),&subtype)) ) { /* only add if enabled */ CREATE( entry, struct map_zone_disabled_skill_entry, 1 ); @@ -4710,8 +4699,8 @@ void read_map_zone_db(void) { for(j = 0; j < disabled_skills_count_i; j++) { int k; for(k = 0; k < disabled_skills_count; k++) { - config_setting_t *skill = config_setting_get_elem(skills, k); - if( map_zone_str2skillid(config_setting_name(skill)) == izone->disabled_skills[j]->nameid ) { + config_setting_t *skillinfo = config_setting_get_elem(skills, k); + if( map_zone_str2skillid(config_setting_name(skillinfo)) == izone->disabled_skills[j]->nameid ) { break; } } diff --git a/src/map/map.h b/src/map/map.h index 266d0ccde..e2d5261b0 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -711,12 +711,12 @@ struct s_mapiterator; /* temporary until the map.c "Hercules Renewal Phase One" design is complete. */ struct mapit_interface { struct s_mapiterator* (*alloc) (enum e_mapitflags flags, enum bl_type types); - void (*free) (struct s_mapiterator* mapit); - struct block_list* (*first) (struct s_mapiterator* mapit); - struct block_list* (*last) (struct s_mapiterator* mapit); - struct block_list* (*next) (struct s_mapiterator* mapit); - struct block_list* (*prev) (struct s_mapiterator* mapit); - bool (*exists) (struct s_mapiterator* mapit); + void (*free) (struct s_mapiterator* iter); + struct block_list* (*first) (struct s_mapiterator* iter); + struct block_list* (*last) (struct s_mapiterator* iter); + struct block_list* (*next) (struct s_mapiterator* iter); + struct block_list* (*prev) (struct s_mapiterator* iter); + bool (*exists) (struct s_mapiterator* iter); } mapit_s; struct mapit_interface *mapit; diff --git a/src/map/mob.c b/src/map/mob.c index 0c1ad0d5d..42e127b5f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3887,26 +3887,21 @@ bool mob_parse_dbrow(char** str) /*========================================== * mob_db.txt reading *------------------------------------------*/ -bool mob_readdb_sub(char* fields[], int columns, int current) -{ +bool mob_readdb_sub(char* fields[], int columns, int current) { return mob->parse_dbrow(fields); } -void mob_readdb(void) -{ +void mob_readdb(void) { const char* filename[] = { DBPATH"mob_db.txt", "mob_db2.txt" }; int fi; - for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) - { - if(fi > 0) - { - char path[256]; - sprintf(path, "%s/%s", iMap->db_path, filename[fi]); - if(!exists(path)) - { + for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { + if(fi > 0) { + char filepath[256]; + sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + if(!exists(filepath)) { continue; } } @@ -4135,23 +4130,20 @@ bool mob_parse_row_chatdb(char** str, const char* source, int line, int* last_ms /*========================================== * mob_chat_db.txt reading [SnakeDrak] *-------------------------------------------------------------------------*/ -void mob_readchatdb(void) -{ +void mob_readchatdb(void) { char arc[]="mob_chat_db.txt"; uint32 lines=0, count=0; - char line[1024], path[256]; + char line[1024], filepath[256]; int i, tmp=0; FILE *fp; - sprintf(path, "%s/%s", iMap->db_path, arc); - fp=fopen(path, "r"); - if(fp == NULL) - { - ShowWarning("mob_readchatdb: File not found \"%s\", skipping.\n", path); + sprintf(filepath, "%s/%s", iMap->db_path, arc); + fp=fopen(filepath, "r"); + if(fp == NULL) { + ShowWarning("mob_readchatdb: File not found \"%s\", skipping.\n", filepath); return; } - while(fgets(line, sizeof(line), fp)) - { + while(fgets(line, sizeof(line), fp)) { char *str[3], *p, *np; int j=0; @@ -4179,7 +4171,7 @@ void mob_readchatdb(void) continue; } - if( !mob->parse_row_chatdb(str, path, lines, &tmp) ) + if( !mob->parse_row_chatdb(str, filepath, lines, &tmp) ) continue; count++; @@ -4457,20 +4449,16 @@ void mob_readskilldb(void) { "mob_skill_db2.txt" }; int fi; - if( battle_config.mob_skill_rate == 0 ) - { + if( battle_config.mob_skill_rate == 0 ) { ShowStatus("Mob skill use disabled. Not reading mob skills.\n"); return; } - for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) - { - if(fi > 0) - { - char path[256]; - sprintf(path, "%s/%s", iMap->db_path, filename[fi]); - if(!exists(path)) - { + for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { + if(fi > 0) { + char filepath[256]; + sprintf(filepath, "%s/%s", iMap->db_path, filename[fi]); + if(!exists(filepath)) { continue; } } diff --git a/src/map/npc.c b/src/map/npc.c index 20caf2b67..6ab8df2fa 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3835,13 +3835,13 @@ int npc_reload(void) { } //Unload all npc in the given file -bool npc_unloadfile( const char* path ) { +bool npc_unloadfile( const char* filepath ) { DBIterator * iter = db_iterator(npc->name_db); struct npc_data* nd = NULL; bool found = false; for( nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter) ) { - if( nd->path && strcasecmp(nd->path,path) == 0 ) { + if( nd->path && strcasecmp(nd->path,filepath) == 0 ) { found = true; npc->unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */ npc->unload(nd, true); diff --git a/src/map/npc.h b/src/map/npc.h index 6c1ca0972..3c273fffb 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -213,7 +213,7 @@ struct npc_interface { void (*setclass) (struct npc_data *nd, short class_); int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); const char* (*parse_function) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); - void (*parse_mob2) (struct spawn_data *mob); + void (*parse_mob2) (struct spawn_data *mobspawn); const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); void (*parsesrcfile) (const char *filepath, bool runOnInit); @@ -222,7 +222,7 @@ struct npc_interface { int (*path_db_clear_sub) (DBKey key, DBData *data, va_list args); int (*ev_label_db_clear_sub) (DBKey key, DBData *data, va_list args); int (*reload) (void); - bool (*unloadfile) (const char *path); + bool (*unloadfile) (const char *filepath); void (*do_clear_npc) (void); void (*debug_warps_sub) (struct npc_data *nd); void (*debug_warps) (void); diff --git a/src/map/pc.c b/src/map/pc.c index 4738d816a..b5bceb2c7 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1858,13 +1858,10 @@ static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id, return 1; } -static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill, unsigned char target) -{ +static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) { int i; - for( i = 0; i < max && effect[i].skill; i++ ) - { - if( effect[i].id == id && effect[i].skill == skill && effect[i].target == target ) - { + for( i = 0; i < max && effect[i].skill; i++ ) { + if( effect[i].id == id && effect[i].skill == skill_id && effect[i].target == target ) { effect[i].rate += rate; return 1; } @@ -1875,7 +1872,7 @@ static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, e } effect[i].id = id; effect[i].rate = rate; - effect[i].skill = skill; + effect[i].skill = skill_id; effect[i].target = target; return 1; } @@ -1929,8 +1926,7 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id return 1; } -int pc_addautobonus(struct s_autobonus *bonus,char max,const char *script,short rate,unsigned int dur,short flag,const char *other_script,unsigned short pos,bool onskill) -{ +int pc_addautobonus(struct s_autobonus *bonus,char max,const char *bonus_script,short rate,unsigned int dur,short flag,const char *other_script,unsigned short pos,bool onskill) { int i; ARR_FIND(0, max, i, bonus[i].rate == 0); @@ -1960,7 +1956,7 @@ int pc_addautobonus(struct s_autobonus *bonus,char max,const char *script,short bonus[i].active = INVALID_TIMER; bonus[i].atk_type = flag; bonus[i].pos = pos; - bonus[i].bonus_script = aStrdup(script); + bonus[i].bonus_script = aStrdup(bonus_script); bonus[i].other_script = other_script?aStrdup(other_script):NULL; return 1; } @@ -3647,13 +3643,12 @@ int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip) /*========================================== * Update buying value by skills *------------------------------------------*/ -int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) -{ - int skill,val = orig_value,rate1 = 0,rate2 = 0; - if((skill=pc->checkskill(sd,MC_DISCOUNT))>0) // merchant discount - rate1 = 5+skill*2-((skill==10)? 1:0); - if((skill=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount - rate2 = 5+skill*4; +int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) { + int skill_lv,val = orig_value,rate1 = 0,rate2 = 0; + if((skill_lv=pc->checkskill(sd,MC_DISCOUNT))>0) // merchant discount + rate1 = 5+skill_lv*2-((skill_lv==10)? 1:0); + if((skill_lv=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount + rate2 = 5+skill_lv*4; if(rate1 < rate2) rate1 = rate2; if(rate1) val = (int)((double)orig_value*(double)(100-rate1)/100.); @@ -3666,11 +3661,10 @@ int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) /*========================================== * Update selling value by skills *------------------------------------------*/ -int pc_modifysellvalue(struct map_session_data *sd,int orig_value) -{ - int skill,val = orig_value,rate = 0; - if((skill=pc->checkskill(sd,MC_OVERCHARGE))>0) //OverCharge - rate = 5+skill*2-((skill==10)? 1:0); +int pc_modifysellvalue(struct map_session_data *sd,int orig_value) { + int skill_lv,val = orig_value,rate = 0; + if((skill_lv=pc->checkskill(sd,MC_OVERCHARGE))>0) //OverCharge + rate = 5+skill_lv*2-((skill_lv==10)? 1:0); if(rate) val = (int)((double)orig_value*(double)(100+rate)/100.); if(val < 0) val = 0; @@ -4760,9 +4754,8 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil * 0 = fail * 1 = success *------------------------------------------*/ -int pc_steal_coin(struct map_session_data *sd,struct block_list *target) -{ - int rate,skill; +int pc_steal_coin(struct map_session_data *sd,struct block_list *target) { + int rate,skill_lv; struct mob_data *md; if(!sd || !target || target->type != BL_MOB) return 0; @@ -4775,10 +4768,9 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target) return 0; // FIXME: This formula is either custom or outdated. - skill = pc->checkskill(sd,RG_STEALCOIN)*10; - rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2; - if(rnd()%1000 < rate) - { + skill_lv = pc->checkskill(sd,RG_STEALCOIN)*10; + rate = skill_lv + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2; + if(rnd()%1000 < rate) { int amount = md->level*10 + rnd()%100; pc->getzeny(sd, amount, LOG_TYPE_STEAL, NULL); @@ -5035,9 +5027,8 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type) { * Records a memo point at sd's current position * pos - entry to replace, (-1: shift oldest entry out) *------------------------------------------*/ -int pc_memo(struct map_session_data* sd, int pos) -{ - int skill; +int pc_memo(struct map_session_data* sd, int pos) { + int skill_lv; nullpo_ret(sd); @@ -5052,12 +5043,12 @@ int pc_memo(struct map_session_data* sd, int pos) return 0; // invalid input // check required skill level - skill = pc->checkskill(sd, AL_WARP); - if( skill < 1 ) { + skill_lv = pc->checkskill(sd, AL_WARP); + if( skill_lv < 1 ) { clif->skill_memomessage(sd,2); // "You haven't learned Warp." return 0; } - if( skill < 2 || skill - 2 < pos ) { + if( skill_lv < 2 || skill_lv - 2 < pos ) { clif->skill_memomessage(sd,1); // "Skill Level is not high enough." return 0; } @@ -5892,8 +5883,7 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi /*========================================== * Give x exp at sd player and calculate remaining exp for next lvl *------------------------------------------*/ -int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool quest) -{ +int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool is_quest) { float nextbp=0, nextjp=0; unsigned int nextb=0, nextj=0; nullpo_ret(sd); @@ -5957,9 +5947,9 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int #if PACKETVER >= 20091027 if(base_exp) - clif->displayexp(sd, base_exp, SP_BASEEXP, quest); + clif->displayexp(sd, base_exp, SP_BASEEXP, is_quest); if(job_exp) - clif->displayexp(sd, job_exp, SP_JOBEXP, quest); + clif->displayexp(sd, job_exp, SP_JOBEXP, is_quest); #endif if(sd->state.showexp) { @@ -9388,7 +9378,7 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) return 0; } -void pc_setstand(struct map_session_data *sd){ +void pc_setstand(struct map_session_data *sd) { nullpo_retv(sd); status_change_end(&sd->bl, SC_TENSIONRELAX, INVALID_TIMER); @@ -9402,20 +9392,20 @@ void pc_setstand(struct map_session_data *sd){ * Mechanic (MADO GEAR) **/ void pc_overheat(struct map_session_data *sd, int val) { - int heat = val, skill, + int heat = val, skill_lv, limit[] = { 10, 20, 28, 46, 66 }; if( !pc_ismadogear(sd) || sd->sc.data[SC_OVERHEAT] ) return; // already burning - skill = cap_value(pc->checkskill(sd,NC_MAINFRAME),0,4); + skill_lv = cap_value(pc->checkskill(sd,NC_MAINFRAME),0,4); if( sd->sc.data[SC_OVERHEAT_LIMITPOINT] ) { heat += sd->sc.data[SC_OVERHEAT_LIMITPOINT]->val1; status_change_end(&sd->bl,SC_OVERHEAT_LIMITPOINT,INVALID_TIMER); } heat = max(0,heat); // Avoid negative HEAT - if( heat >= limit[skill] ) + if( heat >= limit[skill_lv] ) sc_start(&sd->bl,SC_OVERHEAT,100,0,1000); else sc_start(&sd->bl,SC_OVERHEAT_LIMITPOINT,100,heat,30000); diff --git a/src/map/pc.h b/src/map/pc.h index c8e7e17d5..4b90e7fc3 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -823,7 +823,7 @@ struct pc_interface { int (*updateweightstatus) (struct map_session_data *sd); - int (*addautobonus) (struct s_autobonus *bonus,char max,const char *script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned short pos,bool onskill); + int (*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 (*delautobonus) (struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore); @@ -850,7 +850,7 @@ struct pc_interface { unsigned int (*maxjoblv) (struct map_session_data *sd); int (*checkbaselevelup) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); - int (*gainexp) (struct map_session_data*,struct block_list*,unsigned int,unsigned int, bool); + int (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); unsigned int (*nextbaseexp) (struct map_session_data *); unsigned int (*thisbaseexp) (struct map_session_data *); unsigned int (*nextjobexp) (struct map_session_data *); diff --git a/src/map/pet.h b/src/map/pet.h index b0e7cec6d..2f8e0b7c2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -121,8 +121,8 @@ struct pet_interface { int (*hungry_timer_delete) (struct pet_data *pd); int (*performance) (struct map_session_data *sd, struct pet_data *pd); int (*return_egg) (struct map_session_data *sd, struct pet_data *pd); - int (*data_init) (struct map_session_data *sd, struct s_pet *pet); - int (*birth_process) (struct map_session_data *sd, struct s_pet *pet); + int (*data_init) (struct map_session_data *sd, struct s_pet *petinfo); + int (*birth_process) (struct map_session_data *sd, struct s_pet *petinfo); int (*recv_petdata) (int account_id, struct s_pet *p, int flag); int (*select_egg) (struct map_session_data *sd, short egg_index); int (*catch_process1) (struct map_session_data *sd, int target_class); diff --git a/src/map/quest.c b/src/map/quest.c index 9055b61fe..881037081 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -189,29 +189,28 @@ int quest_delete(TBL_PC * sd, int quest_id) return 0; } -int quest_update_objective_sub(struct block_list *bl, va_list ap) -{ +int quest_update_objective_sub(struct block_list *bl, va_list ap) { struct map_session_data * sd; - int mob, party; + int mob_id, party_id; nullpo_ret(bl); nullpo_ret(sd = (struct map_session_data *)bl); - party = va_arg(ap,int); - mob = va_arg(ap,int); + party_id = va_arg(ap,int); + mob_id = va_arg(ap,int); if( !sd->avail_quests ) return 0; - if( sd->status.party_id != party ) + if( sd->status.party_id != party_id ) return 0; - quest->update_objective(sd, mob); + quest->update_objective(sd, mob_id); return 1; } -void quest_update_objective(TBL_PC * sd, int mob) { +void quest_update_objective(TBL_PC * sd, int mob_id) { int i,j; for( i = 0; i < sd->avail_quests; i++ ) { @@ -219,7 +218,7 @@ void quest_update_objective(TBL_PC * sd, int mob) { continue; for( j = 0; j < MAX_QUEST_OBJECTIVES; j++ ) - if( quest->db[sd->quest_index[i]].mob[j] == mob && sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j] ) { + if( quest->db[sd->quest_index[i]].mob[j] == mob_id && sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j] ) { sd->quest_log[i].count[j]++; sd->save_quest = true; clif->quest_update_objective(sd,&sd->quest_log[i],sd->quest_index[i]); diff --git a/src/map/quest.h b/src/map/quest.h index 85c987f54..c127dd402 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -28,7 +28,7 @@ struct quest_interface { int (*change) (TBL_PC *sd, int qid1, int qid2); int (*delete) (TBL_PC *sd, int quest_id); int (*update_objective_sub) (struct block_list *bl, va_list ap); - void (*update_objective) (TBL_PC *sd, int mob); + void (*update_objective) (TBL_PC *sd, int mob_id); int (*update_status) (TBL_PC *sd, int quest_id, quest_state status); int (*check) (TBL_PC *sd, int quest_id, quest_check_type type); int (*read_db) (void); diff --git a/src/map/script.c b/src/map/script.c index 87d2b475c..86d69658c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2761,11 +2761,10 @@ void pop_stack(struct script_state* st, int start, int end) /*========================================== * Release script dependent variable, dependent variable of function *------------------------------------------*/ -void script_free_vars(struct DBMap* storage) -{ - if( storage ) - {// destroy the storage construct containing the variables - db_destroy(storage); +void script_free_vars(struct DBMap* var_storage) { + if( var_storage ) { + // destroy the storage construct containing the variables + db_destroy(var_storage); } } @@ -15496,17 +15495,15 @@ BUILDIN(mercenary_sc_start) return true; } -BUILDIN(mercenary_get_calls) -{ +BUILDIN(mercenary_get_calls) { struct map_session_data *sd = script_rid2sd(st); - int guild; + int guild_id; if( sd == NULL ) return true; - guild = script_getnum(st,2); - switch( guild ) - { + guild_id = script_getnum(st,2); + switch( guild_id ) { case ARCH_MERC_GUILD: script_pushint(st,sd->status.arch_calls); break; @@ -15524,19 +15521,17 @@ BUILDIN(mercenary_get_calls) return true; } -BUILDIN(mercenary_set_calls) -{ +BUILDIN(mercenary_set_calls) { struct map_session_data *sd = script_rid2sd(st); - int guild, value, *calls; + int guild_id, value, *calls; if( sd == NULL ) return true; - guild = script_getnum(st,2); + guild_id = script_getnum(st,2); value = script_getnum(st,3); - switch( guild ) - { + switch( guild_id ) { case ARCH_MERC_GUILD: calls = &sd->status.arch_calls; break; @@ -15556,17 +15551,15 @@ BUILDIN(mercenary_set_calls) return true; } -BUILDIN(mercenary_get_faith) -{ +BUILDIN(mercenary_get_faith) { struct map_session_data *sd = script_rid2sd(st); - int guild; + int guild_id; if( sd == NULL ) return true; - guild = script_getnum(st,2); - switch( guild ) - { + guild_id = script_getnum(st,2); + switch( guild_id ) { case ARCH_MERC_GUILD: script_pushint(st,sd->status.arch_faith); break; @@ -15584,19 +15577,17 @@ BUILDIN(mercenary_get_faith) return true; } -BUILDIN(mercenary_set_faith) -{ +BUILDIN(mercenary_set_faith) { struct map_session_data *sd = script_rid2sd(st); - int guild, value, *calls; + int guild_id, value, *calls; if( sd == NULL ) return true; - guild = script_getnum(st,2); + guild_id = script_getnum(st,2); value = script_getnum(st,3); - switch( guild ) - { + switch( guild_id ) { case ARCH_MERC_GUILD: calls = &sd->status.arch_faith; break; @@ -15612,7 +15603,7 @@ BUILDIN(mercenary_set_faith) *calls += value; *calls = cap_value(*calls, 0, INT_MAX); - if( mercenary->get_guild(sd->md) == guild ) + if( mercenary->get_guild(sd->md) == guild_id ) clif->mercenary_updatestatus(sd,SP_MERCFAITH); return true; diff --git a/src/map/script.h b/src/map/script.h index bcdd1fdaf..97f9bdb8c 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -386,7 +386,7 @@ struct script_interface { 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); - void (*free_vars) (struct DBMap *storage); + void (*free_vars) (struct DBMap *var_storage); struct script_state* (*alloc_state) (struct script_code* rootscript, int pos, int rid, int oid); void (*free_state) (struct script_state* st); void (*run_autobonus) (const char *autobonus,int id, int pos); diff --git a/src/map/skill.c b/src/map/skill.c index 6ec9d2fec..75df03b1b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -366,7 +366,7 @@ int skill_get_range2 (struct block_list *bl, uint16 skill_id, uint16 skill_lv) { } int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) { - int skill, hp; + int skill2_lv, hp; struct map_session_data *sd = BL_CAST(BL_PC, src); struct map_session_data *tsd = BL_CAST(BL_PC, target); struct status_change* sc; @@ -399,21 +399,21 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk #else hp = ( iStatus->get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc->checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8); #endif - if( sd && ((skill = pc->checkskill(sd, HP_MEDITATIO)) > 0) ) - hp += hp * skill * 2 / 100; - else if( src->type == BL_HOM && (skill = homun->checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 ) - hp += hp * skill * 2 / 100; + if( sd && ((skill2_lv = pc->checkskill(sd, HP_MEDITATIO)) > 0) ) + hp += hp * skill2_lv * 2 / 100; + else if( src->type == BL_HOM && (skill2_lv = homun->checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 ) + hp += hp * skill2_lv * 2 / 100; break; } if( ( (target && target->type == BL_MER) || !heal ) && skill_id != NPC_EVILLAND ) hp >>= 1; - if( sd && (skill = pc->skillheal_bonus(sd, skill_id)) ) - hp += hp*skill/100; + if( sd && (skill2_lv = pc->skillheal_bonus(sd, skill_id)) ) + hp += hp*skill2_lv/100; - if( tsd && (skill = pc->skillheal2_bonus(tsd, skill_id)) ) - hp += hp*skill/100; + if( tsd && (skill2_lv = pc->skillheal2_bonus(tsd, skill_id)) ) + hp += hp*skill2_lv/100; sc = iStatus->get_sc(target); if( sc && sc->count ) { @@ -2837,19 +2837,19 @@ int skill_area_sub (struct block_list *bl, va_list ap) { } int skill_check_unit_range_sub (struct block_list *bl, va_list ap) { - struct skill_unit *unit; + struct skill_unit *su; uint16 skill_id,g_skill_id; - unit = (struct skill_unit *)bl; + su = (struct skill_unit *)bl; if(bl->prev == NULL || bl->type != BL_SKILL) return 0; - if(!unit->alive) + if(!su->alive) return 0; skill_id = va_arg(ap,int); - g_skill_id = unit->group->skill_id; + g_skill_id = su->group->skill_id; switch (skill_id) { case MH_STEINWAND: @@ -3945,10 +3945,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint int maxlv = skill->get_max(skill_id); // learnable level int count = 0; int x, y; - struct skill_unit* unit; + struct skill_unit *su; - if( skill_lv > maxlv ) - { + if( skill_lv > maxlv ) { if( src->type == BL_MOB && skill_lv == 10 ) range = 4; else @@ -3956,16 +3955,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint } for( y = src->y - range; y <= src->y + range; ++y ) - for( x = src->x - range; x <= src->x + range; ++x ) - { - if( !iMap->find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL,1) ) - { + for( x = src->x - range; x <= src->x + range; ++x ) { + if( !iMap->find_skill_unit_oncell(src,x,y,SA_LANDPROTECTOR,NULL,1) ) { if( src->type != BL_PC || iMap->getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement count++; // natural water cell - else if( (unit = iMap->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL || (unit = iMap->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) - { + else if( (su = iMap->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL + || (su = iMap->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) { count++; // skill-induced water cell - skill->delunit(unit); // consume cell + skill->delunit(su); // consume cell } } } @@ -9036,9 +9033,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui skill->attack(BF_WEAPON,src,src,bl,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag); } else //Otherwise, it fails, shows animation and removes items. clif->skill_fail(sd,GN_SLINGITEM_RANGEMELEEATK,0xa,0); - } else if( itemdb_is_GNthrowable(ammo_id) ){ + } else if( itemdb_is_GNthrowable(ammo_id) ) { struct script_code *scriptroot = sd->inventory_data[i]->script; - if( !script ) + if( !scriptroot ) break; if( dstsd ) script->run(scriptroot,0,dstsd->bl.id,npc->fake_nd->bl.id); @@ -10410,30 +10407,30 @@ int skill_dance_overlap_sub(struct block_list* bl, va_list ap) { //Does the song/dance overlapping -> dissonance check. [Skotlex] //When flag is 0, this unit is about to be removed, cancel the dissonance effect //When 1, this unit has been positioned, so start the cancel effect. -int skill_dance_overlap(struct skill_unit* unit, int flag) { - if (!unit || !unit->group || !(unit->group->state.song_dance&0x1)) +int skill_dance_overlap(struct skill_unit* su, int flag) { + if (!su || !su->group || !(su->group->state.song_dance&0x1)) return 0; - if (unit->val1 != unit->group->skill_id) { + if (su->val1 != su->group->skill_id) { //Reset state - unit->val1 = unit->group->skill_id; - unit->val2 &= ~UF_ENSEMBLE; + su->val1 = su->group->skill_id; + su->val2 &= ~UF_ENSEMBLE; } - return iMap->foreachincell(skill->dance_overlap_sub, unit->bl.m,unit->bl.x,unit->bl.y,BL_SKILL, unit,flag); + return iMap->foreachincell(skill->dance_overlap_sub, su->bl.m,su->bl.x,su->bl.y,BL_SKILL, su,flag); } /*========================================== * Converts this group information so that it is handled as a Dissonance or Ugly Dance cell. * Flag: 0 - Convert, 1 - Revert. *------------------------------------------*/ -bool skill_dance_switch(struct skill_unit* unit, int flag) { +bool skill_dance_switch(struct skill_unit* su, int flag) { static int prevflag = 1; // by default the backup is empty static struct skill_unit_group backup; - struct skill_unit_group* group = unit->group; + struct skill_unit_group* group = su->group; // val2&UF_ENSEMBLE is a hack to indicate dissonance - if ( !(group->state.song_dance&0x1 && unit->val2&UF_ENSEMBLE) ) + if ( !(group->state.song_dance&0x1 && su->val2&UF_ENSEMBLE) ) return false; if( flag == prevflag ) { @@ -10446,7 +10443,7 @@ bool skill_dance_switch(struct skill_unit* unit, int flag) { prevflag = flag; if( !flag ) { //Transform - uint16 skill_id = unit->val2&UF_SONG ? BA_DISSONANCE : DC_UGLYDANCE; + uint16 skill_id = su->val2&UF_SONG ? BA_DISSONANCE : DC_UGLYDANCE; // backup backup.skill_id = group->skill_id; @@ -10885,7 +10882,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill limit = group->limit; for( i = 0; i < layout->count; i++ ) { - struct skill_unit *unit; + struct skill_unit *su; int ux = x + layout->dx[i]; int uy = y + layout->dy[i]; int val1 = skill_lv; @@ -10964,19 +10961,19 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill if( !alive ) continue; - nullpo_retr(NULL, unit=skill->initunit(group,i,ux,uy,val1,val2)); - unit->limit=limit; - unit->range=range; + nullpo_retr(NULL, su=skill->initunit(group,i,ux,uy,val1,val2)); + su->limit=limit; + su->range=range; if (skill_id == PF_FOGWALL && alive == 2) { //Double duration of cells on top of Deluge/Suiton - unit->limit *= 2; - group->limit = unit->limit; + su->limit *= 2; + group->limit = su->limit; } // execute on all targets standing on this cell if (range==0 && active_flag) - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),1); + iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,iTimer->gettick(),1); } if (!group->alive_count) { //No cells? Something that was blocked completely by Land Protector? @@ -12085,37 +12082,37 @@ static int skill_unit_onleft (uint16 skill_id, struct block_list *bl, unsigned i * flag&4: Invoke a onleft call (the unit might be scheduled for deletion) *------------------------------------------*/ int skill_unit_effect (struct block_list* bl, va_list ap) { - struct skill_unit* unit = va_arg(ap,struct skill_unit*); - struct skill_unit_group* group = unit->group; + 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); unsigned int flag = va_arg(ap,unsigned int); uint16 skill_id; bool dissonance; - if( (!unit->alive && !(flag&4)) || bl->prev == NULL ) + if( (!su->alive && !(flag&4)) || bl->prev == NULL ) return 0; nullpo_ret(group); - dissonance = skill->dance_switch(unit, 0); + dissonance = skill->dance_switch(su, 0); //Necessary in case the group is deleted after calling on_place/on_out [Skotlex] skill_id = group->skill_id; //Target-type check. - if( !(group->bl_flag&bl->type && battle->check_target(&unit->bl,bl,group->target_flag)>0) ) { + if( !(group->bl_flag&bl->type && battle->check_target(&su->bl,bl,group->target_flag)>0) ) { if( (flag&4) && ( group->state.song_dance&0x1 || (group->src_id == bl->id && group->state.song_dance&0x2) ) ) skill->unit_onleft(skill_id, bl, tick);//Ensemble check to terminate it. } else { if( flag&1 ) - skill->unit_onplace(unit,bl,tick); + skill->unit_onplace(su,bl,tick); else - skill->unit_onout(unit,bl,tick); + skill->unit_onout(su,bl,tick); if( flag&4 ) skill->unit_onleft(skill_id, bl, tick); } - if( dissonance ) skill->dance_switch(unit, 1); + if( dissonance ) skill->dance_switch(su, 1); return 0; } @@ -12304,15 +12301,15 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16 * *------------------------------------------*/ int skill_check_condition_mob_master_sub (struct block_list *bl, va_list ap) { - int *c,src_id,mob_class,skill; + int *c,src_id,mob_class,skill_id; struct mob_data *md; md=(struct mob_data*)bl; src_id=va_arg(ap,int); mob_class=va_arg(ap,int); - skill=va_arg(ap,int); + skill_id=va_arg(ap,int); c=va_arg(ap,int *); - if( md->master_id != src_id || md->special_state.ai != (unsigned)(skill == AM_SPHEREMINE?2:skill == KO_ZANZOU?4:skill == MH_SUMMON_LEGION?1:3) ) + if( md->master_id != src_id || md->special_state.ai != (unsigned)(skill_id == AM_SPHEREMINE?2:skill_id == KO_ZANZOU?4:skill_id == MH_SUMMON_LEGION?1:3) ) return 0; //Non alchemist summoned mobs have nothing to do here. if(md->class_==mob_class) (*c)++; @@ -14674,16 +14671,16 @@ struct skill_unit_group *skill_locate_element_field(struct block_list *bl) { // for graffiti cleaner [Valaris] int skill_graffitiremover (struct block_list *bl, va_list ap) { - struct skill_unit *unit=NULL; + struct skill_unit *su=NULL; nullpo_ret(bl); nullpo_ret(ap); - if(bl->type!=BL_SKILL || (unit=(struct skill_unit *)bl) == NULL) + if(bl->type!=BL_SKILL || (su=(struct skill_unit *)bl) == NULL) return 0; - if((unit->group) && (unit->group->unit_id == UNT_GRAFFITI)) - skill->delunit(unit); + if((su->group) && (su->group->unit_id == UNT_GRAFFITI)) + skill->delunit(su); return 0; } @@ -14702,9 +14699,8 @@ int skill_greed (struct block_list *bl, va_list ap) { return 0; } //For Ranger's Detonator [Jobbie/3CeAM] -int skill_detonator(struct block_list *bl, va_list ap) -{ - struct skill_unit *unit=NULL; +int skill_detonator(struct block_list *bl, va_list ap) { + struct skill_unit *su=NULL; struct block_list *src; int unit_id; @@ -14712,14 +14708,14 @@ int skill_detonator(struct block_list *bl, va_list ap) nullpo_ret(ap); src = va_arg(ap,struct block_list *); - if( bl->type != BL_SKILL || (unit = (struct skill_unit *)bl) == NULL || !unit->group ) + if( bl->type != BL_SKILL || (su = (struct skill_unit *)bl) == NULL || !su->group ) return 0; - if( unit->group->src_id != src->id ) + if( su->group->src_id != src->id ) return 0; - unit_id = unit->group->unit_id; - switch( unit_id ) - { //List of Hunter and Ranger Traps that can be detonate. + unit_id = su->group->unit_id; + switch( unit_id ) { + //List of Hunter and Ranger Traps that can be detonate. case UNT_BLASTMINE: case UNT_SANDMAN: case UNT_CLAYMORETRAP: @@ -14727,23 +14723,23 @@ int skill_detonator(struct block_list *bl, va_list ap) case UNT_CLUSTERBOMB: case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: - switch(unit_id){ + switch(unit_id) { case UNT_TALKIEBOX: - clif->talkiebox(bl,unit->group->valstr); - unit->group->val2 = -1; + clif->talkiebox(bl,su->group->valstr); + su->group->val2 = -1; break; case UNT_CLAYMORETRAP: case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: - iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag|BL_SKILL|~BCT_SELF,bl,unit->group->tick); + iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(su->group->skill_id,su->group->skill_lv),su->group->bl_flag|BL_SKILL|~BCT_SELF,bl,su->group->tick); break; default: - iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag,bl,unit->group->tick); + iMap->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); - unit->group->limit = DIFF_TICK(iTimer->gettick(),unit->group->tick) + + su->group->limit = DIFF_TICK(iTimer->gettick(),su->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : (unit_id == UNT_FIRINGTRAP ? 0 : 1500)) ); - unit->group->unit_id = UNT_USED_TRAPS; + su->group->unit_id = UNT_USED_TRAPS; break; } return 0; @@ -14755,31 +14751,31 @@ int skill_detonator(struct block_list *bl, va_list ap) int skill_cell_overlap(struct block_list *bl, va_list ap) { uint16 skill_id; int *alive; - struct skill_unit *unit; + struct skill_unit *su; skill_id = va_arg(ap,int); alive = va_arg(ap,int *); - unit = (struct skill_unit *)bl; + su = (struct skill_unit *)bl; - if( unit == NULL || unit->group == NULL || (*alive) == 0 ) + if( su == NULL || su->group == NULL || (*alive) == 0 ) return 0; switch (skill_id) { case SA_LANDPROTECTOR: - if( unit->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] + if( su->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] (*alive) = 0; - skill->delunit(unit); + skill->delunit(su); return 1; } - if( !(skill->get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) || unit->group->skill_id == WZ_FIREPILLAR ) { //It deletes everything except songs/dances and traps - skill->delunit(unit); + if( !(skill->get_inf2(su->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) || su->group->skill_id == WZ_FIREPILLAR ) { //It deletes everything except songs/dances and traps + skill->delunit(su); return 1; } break; case HW_GANBANTEIN: case LG_EARTHDRIVE: - if( !(unit->group->state.song_dance&0x1) ) {// Don't touch song/dance. - skill->delunit(unit); + if( !(su->group->state.song_dance&0x1) ) {// Don't touch song/dance. + skill->delunit(su); return 1; } break; @@ -14789,14 +14785,13 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { // The official implementation makes them fail to appear when casted on top of ANYTHING // but I wonder if they didn't actually meant to fail when casted on top of each other? // hence, I leave the alternate implementation here, commented. [Skotlex] - if (unit->range <= 0) - { + if (su->range <= 0) { (*alive) = 0; return 1; } /* - switch (unit->group->skill_id) - { //These cannot override each other. + switch (su->group->skill_id) { + //These cannot override each other. case SA_VOLCANO: case SA_DELUGE: case SA_VIOLENTGALE: @@ -14806,7 +14801,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { */ break; case PF_FOGWALL: - switch(unit->group->skill_id) { + switch(su->group->skill_id) { case SA_VOLCANO: //Can't be placed on top of these case SA_VIOLENTGALE: (*alive) = 0; @@ -14819,14 +14814,15 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { } break; case HP_BASILICA: - if (unit->group->skill_id == HP_BASILICA) - { //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] + if (su->group->skill_id == HP_BASILICA) { + //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] (*alive) = 0; return 1; } break; case GN_CRAZYWEED_ATK: - switch(unit->group->unit_id){ //TODO: look for other ground skills that are affected. + switch(su->group->unit_id) { + //TODO: look for other ground skills that are affected. case UNT_WALLOFTHORN: case UNT_THORNS_TRAP: case UNT_BLOODYLUST: @@ -14839,13 +14835,14 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { case UNT_VIOLENTGALE: case UNT_SAFETYWALL: case UNT_PNEUMA: - skill->delunit(unit); + skill->delunit(su); return 1; } break; } - if (unit->group->skill_id == SA_LANDPROTECTOR && !(skill->get_inf2(skill_id)&(INF2_SONG_DANCE|INF2_TRAP))) { //It deletes everything except songs/dances/traps + if (su->group->skill_id == SA_LANDPROTECTOR && !(skill->get_inf2(skill_id)&(INF2_SONG_DANCE|INF2_TRAP))) { + //It deletes everything except songs/dances/traps (*alive) = 0; return 1; } @@ -14880,17 +14877,17 @@ int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap) int skill_trap_splash (struct block_list *bl, va_list ap) { struct block_list *src; int tick; - struct skill_unit *unit; + struct skill_unit *su; struct skill_unit_group *sg; struct block_list *ss; src = va_arg(ap,struct block_list *); - unit = (struct skill_unit *)src; + su = (struct skill_unit *)src; tick = va_arg(ap,int); - if( !unit->alive || bl->prev == NULL ) + if( !su->alive || bl->prev == NULL ) return 0; - nullpo_ret(sg = unit->group); + nullpo_ret(sg = su->group); nullpo_ret(ss = iMap->id2bl(sg->src_id)); if(battle->check_target(src,bl,sg->target_flag) <= 0) @@ -14977,22 +14974,22 @@ int skill_trap_splash (struct block_list *bl, va_list ap) { int skill_maelstrom_suction(struct block_list *bl, va_list ap) { uint16 skill_id, skill_lv; - struct skill_unit *unit; + struct skill_unit *su; skill_id = va_arg(ap,int); skill_lv = va_arg(ap,int); - unit = (struct skill_unit *)bl; + su = (struct skill_unit *)bl; - if( unit == NULL || unit->group == NULL ) + if( su == NULL || su->group == NULL ) return 0; if( skill->get_inf2(skill_id)&INF2_TRAP ) return 0; - if( unit->group->skill_id == SC_MAELSTROM ){ + if( su->group->skill_id == SC_MAELSTROM ) { struct block_list *src; - if( (src = iMap->id2bl(unit->group->src_id)) ){ - int sp = unit->group->skill_lv * skill_lv; + if( (src = iMap->id2bl(su->group->src_id)) ) { + int sp = su->group->skill_lv * skill_lv; if( src->type == BL_PC ) sp += ((TBL_PC*)src)->status.job_level / 5; iStatus->heal(src, 0, sp/2, 1); @@ -15085,81 +15082,80 @@ bool skill_check_camouflage(struct block_list *bl, struct status_change_entry *s /*========================================== * *------------------------------------------*/ -struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) -{ - struct skill_unit *unit; +struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) { + struct skill_unit *su; nullpo_retr(NULL, group); nullpo_retr(NULL, group->unit); // crash-protection against poor coding - nullpo_retr(NULL, unit=&group->unit[idx]); + nullpo_retr(NULL, su=&group->unit[idx]); if( iMap->getcell(iMap->id2bl(group->src_id)->m, x, y, CELL_CHKMAELSTROM) ) - return unit; + return su; - if(!unit->alive) + if(!su->alive) group->alive_count++; - unit->bl.id=iMap->get_new_object_id(); - unit->bl.type=BL_SKILL; - unit->bl.m=group->map; - unit->bl.x=x; - unit->bl.y=y; - unit->group=group; - unit->alive=1; - unit->val1=val1; - unit->val2=val2; + su->bl.id=iMap->get_new_object_id(); + su->bl.type=BL_SKILL; + su->bl.m=group->map; + su->bl.x=x; + su->bl.y=y; + su->group=group; + su->alive=1; + su->val1=val1; + su->val2=val2; - idb_put(skillunit_db, unit->bl.id, unit); - iMap->addiddb(&unit->bl); - iMap->addblock(&unit->bl); + idb_put(skillunit_db, su->bl.id, su); + iMap->addiddb(&su->bl); + iMap->addblock(&su->bl); // perform oninit actions switch (group->skill_id) { case WZ_ICEWALL: - iMap->setgatcell(unit->bl.m,unit->bl.x,unit->bl.y,5); - clif->changemapcell(0,unit->bl.m,unit->bl.x,unit->bl.y,5,AREA); - skill->unitsetmapcell(unit,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true); - map[unit->bl.m].icewall_num++; + iMap->setgatcell(su->bl.m,su->bl.x,su->bl.y,5); + clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,5,AREA); + skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true); + map[su->bl.m].icewall_num++; break; case SA_LANDPROTECTOR: - skill->unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,true); + skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,true); break; case HP_BASILICA: - skill->unitsetmapcell(unit,HP_BASILICA,group->skill_lv,CELL_BASILICA,true); + skill->unitsetmapcell(su,HP_BASILICA,group->skill_lv,CELL_BASILICA,true); break; case SC_MAELSTROM: - skill->unitsetmapcell(unit,SC_MAELSTROM,group->skill_lv,CELL_MAELSTROM,true); + skill->unitsetmapcell(su,SC_MAELSTROM,group->skill_lv,CELL_MAELSTROM,true); break; default: if (group->state.song_dance&0x1) //Check for dissonance. - skill->dance_overlap(unit, 1); + skill->dance_overlap(su, 1); break; } - clif->skill_setunit(unit); + clif->skill_setunit(su); - return unit; + return su; } /*========================================== * *------------------------------------------*/ -int skill_delunit (struct skill_unit* unit) { +int skill_delunit (struct skill_unit* su) { struct skill_unit_group *group; - nullpo_ret(unit); - if( !unit->alive ) + nullpo_ret(su); + if( !su->alive ) return 0; - unit->alive=0; + su->alive=0; - nullpo_ret(group=unit->group); + nullpo_ret(group=su->group); if( group->state.song_dance&0x1 ) //Cancel dissonance effect. - skill->dance_overlap(unit, 0); + skill->dance_overlap(su, 0); // invoke onout event - if( !unit->range ) - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),4); + if( !su->range ) + iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,iTimer->gettick(),4); // perform ondelete actions switch (group->skill_id) { @@ -15170,16 +15166,16 @@ int skill_delunit (struct skill_unit* unit) { } break; case WZ_ICEWALL: - iMap->setgatcell(unit->bl.m,unit->bl.x,unit->bl.y,unit->val2); - clif->changemapcell(0,unit->bl.m,unit->bl.x,unit->bl.y,unit->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug - skill->unitsetmapcell(unit,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false); - map[unit->bl.m].icewall_num--; + iMap->setgatcell(su->bl.m,su->bl.x,su->bl.y,su->val2); + clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug + skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false); + map[su->bl.m].icewall_num--; break; case SA_LANDPROTECTOR: - skill->unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,false); + skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,false); break; case HP_BASILICA: - skill->unitsetmapcell(unit,HP_BASILICA,group->skill_lv,CELL_BASILICA,false); + skill->unitsetmapcell(su,HP_BASILICA,group->skill_lv,CELL_BASILICA,false); break; case RA_ELECTRICSHOCKER: { struct block_list* target = iMap->id2bl(group->val2); @@ -15188,7 +15184,7 @@ int skill_delunit (struct skill_unit* unit) { } break; case SC_MAELSTROM: - skill->unitsetmapcell(unit,SC_MAELSTROM,group->skill_lv,CELL_MAELSTROM,false); + skill->unitsetmapcell(su,SC_MAELSTROM,group->skill_lv,CELL_MAELSTROM,false); break; case SC_MANHOLE: // Note : Removing the unit don't remove the status (official info) if( group->val2 ) { // Someone Traped @@ -15199,12 +15195,12 @@ int skill_delunit (struct skill_unit* unit) { break; } - clif->skill_delunit(unit); + clif->skill_delunit(su); - unit->group=NULL; - iMap->delblock(&unit->bl); // don't free yet - iMap->deliddb(&unit->bl); - idb_remove(skillunit_db, unit->bl.id); + su->group=NULL; + iMap->delblock(&su->bl); // don't free yet + iMap->deliddb(&su->bl); + idb_remove(skillunit_db, su->bl.id); if(--group->alive_count==0) skill->del_unitgroup(group,ALC_MARK); @@ -15496,11 +15492,11 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search (struct block_lis * *------------------------------------------*/ int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) { - struct skill_unit* unit = va_arg(ap,struct skill_unit *); - struct skill_unit_group* group = unit->group; + 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); - if( !unit->alive || bl->prev == NULL ) + if( !su->alive || bl->prev == NULL ) return 0; nullpo_ret(group); @@ -15508,10 +15504,10 @@ int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) { if( !(skill->get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP)) && iMap->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] - if( battle->check_target(&unit->bl,bl,group->target_flag) <= 0 ) + if( battle->check_target(&su->bl,bl,group->target_flag) <= 0 ) return 0; - skill->unit_onplace_timer(unit,bl,tick); + skill->unit_onplace_timer(su,bl,tick); return 1; } @@ -15520,22 +15516,21 @@ int skill_unit_timer_sub_onplace (struct block_list* bl, va_list ap) { * @see DBApply */ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { - struct skill_unit* unit = DB->data2ptr(data); - struct skill_unit_group* group = unit->group; + struct skill_unit* su = DB->data2ptr(data); + struct skill_unit_group* group = su->group; unsigned int tick = va_arg(ap,unsigned int); bool dissonance; - struct block_list* bl = &unit->bl; + struct block_list* bl = &su->bl; - if( !unit->alive ) + if( !su->alive ) return 0; nullpo_ret(group); // check for expiration - if( !group->state.guildaura && (DIFF_TICK(tick,group->tick) >= group->limit || DIFF_TICK(tick,group->tick) >= unit->limit) ) - {// skill unit expired (inlined from skill_unit_onlimit()) - switch( group->unit_id ) - { + if( !group->state.guildaura && (DIFF_TICK(tick,group->tick) >= group->limit || DIFF_TICK(tick,group->tick) >= su->limit) ) { + // skill unit expired (inlined from skill_unit_onlimit()) + switch( group->unit_id ) { case UNT_BLASTMINE: #ifdef RENEWAL case UNT_CLAYMORETRAP: @@ -15548,14 +15543,14 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { group->unit_id = UNT_USED_TRAPS; //clif->changetraplook(bl, UNT_FIREPILLAR_ACTIVE); group->limit=DIFF_TICK(tick+1500,group->tick); - unit->limit=DIFF_TICK(tick+1500,group->tick); + su->limit=DIFF_TICK(tick+1500,group->tick); break; case UNT_ANKLESNARE: case UNT_ELECTRICSHOCKER: if( group->val2 > 0 || group->val3 == SC_ESCAPE ) { // Used Trap don't returns back to item - skill->delunit(unit); + skill->delunit(su); break; } case UNT_SKIDTRAP: @@ -15578,27 +15573,27 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { { struct block_list* src; - if( unit->val1 > 0 && (src = iMap->id2bl(group->src_id)) != NULL && src->type == BL_PC ) - { // revert unit back into a trap + if( su->val1 > 0 && (src = iMap->id2bl(group->src_id)) != NULL && src->type == BL_PC ) { + // revert unit back into a trap struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = group->item_id?group->item_id:ITEMID_TRAP; item_tmp.identify = 1; iMap->addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); } - skill->delunit(unit); + skill->delunit(su); } break; case UNT_WARP_ACTIVE: // warp portal opens (morph to a UNT_WARP_WAITING cell) group->unit_id = skill->get_unit_id(group->skill_id, 1); // UNT_WARP_WAITING - clif->changelook(&unit->bl, LOOK_BASE, group->unit_id); + clif->changelook(&su->bl, LOOK_BASE, group->unit_id); // restart timers group->limit = skill->get_time(group->skill_id,group->skill_lv); - unit->limit = skill->get_time(group->skill_id,group->skill_lv); + su->limit = skill->get_time(group->skill_id,group->skill_lv); // apply effect to all units standing on it - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),1); + iMap->foreachincell(skill->unit_effect,su->bl.m,su->bl.x,su->bl.y,group->bl_flag,&su->bl,iTimer->gettick(),1); break; case UNT_CALLFAMILY: @@ -15608,35 +15603,35 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { sd = iMap->charid2sd(group->val1); group->val1 = 0; if (sd && !map[sd->bl.m].flag.nowarp) - pc->setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,CLR_TELEPORT); + pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT); } if(group->val2) { sd = iMap->charid2sd(group->val2); group->val2 = 0; if (sd && !map[sd->bl.m].flag.nowarp) - pc->setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,CLR_TELEPORT); + pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT); } - skill->delunit(unit); + skill->delunit(su); } break; case UNT_REVERBERATION: - if( unit->val1 <= 0 ) { // If it was deactivated. - skill->delunit(unit); + if( su->val1 <= 0 ) { // If it was deactivated. + skill->delunit(su); break; } clif->changetraplook(bl,UNT_USED_TRAPS); iMap->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; - unit->limit = DIFF_TICK(tick,group->tick)+1000; + su->limit = DIFF_TICK(tick,group->tick)+1000; group->unit_id = UNT_USED_TRAPS; break; case UNT_FEINTBOMB: { struct block_list *src = iMap->id2bl(group->src_id); if( src ) - iMap->foreachinrange(skill->area_sub, &group->unit->bl, unit->range, splash_target(src), src, SC_FEINTBOMB, group->skill_lv, tick, BCT_ENEMY|SD_ANIMATION|1, skill->castend_damage_id); - skill->delunit(unit); + iMap->foreachinrange(skill->area_sub, &group->unit->bl, su->range, splash_target(src), src, SC_FEINTBOMB, group->skill_lv, tick, BCT_ENEMY|SD_ANIMATION|1, skill->castend_damage_id); + skill->delunit(su); break; } @@ -15644,27 +15639,26 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { { struct block_list *src = iMap->id2bl(group->src_id); struct status_change *sc; - if( !src || (sc = iStatus->get_sc(src)) == NULL || !sc->data[SC_BANDING] ) - { - skill->delunit(unit); + if( !src || (sc = iStatus->get_sc(src)) == NULL || !sc->data[SC_BANDING] ) { + skill->delunit(su); break; } // This unit isn't removed while SC_BANDING is active. group->limit = DIFF_TICK(tick+group->interval,group->tick); - unit->limit = DIFF_TICK(tick+group->interval,group->tick); + su->limit = DIFF_TICK(tick+group->interval,group->tick); } break; default: - skill->delunit(unit); + skill->delunit(su); } } else {// skill unit is still active switch( group->unit_id ) { case UNT_ICEWALL: // icewall loses 50 hp every second - unit->val1 -= SKILLUNITTIMER_INTERVAL/20; // trap's hp - if( unit->val1 <= 0 && unit->limit + group->tick > tick + 700 ) - unit->limit = DIFF_TICK(tick+700,group->tick); + 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); break; case UNT_BLASTMINE: case UNT_SKIDTRAP: @@ -15676,9 +15670,9 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { case UNT_FREEZINGTRAP: case UNT_TALKIEBOX: case UNT_ANKLESNARE: - if( unit->val1 <= 0 ) { + if( su->val1 <= 0 ) { if( group->unit_id == UNT_ANKLESNARE && group->val2 > 0 ) - skill->delunit(unit); + 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; @@ -15687,16 +15681,16 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { } break; case UNT_REVERBERATION: - if( unit->val1 <= 0 ){ + if( su->val1 <= 0 ) { clif->changetraplook(bl,UNT_USED_TRAPS); iMap->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; - unit->limit = DIFF_TICK(tick,group->tick)+1000; + su->limit = DIFF_TICK(tick,group->tick)+1000; group->unit_id = UNT_USED_TRAPS; } break; case UNT_WALLOFTHORN: - if( unit->val1 <= 0 ) { + if( su->val1 <= 0 ) { group->unit_id = UNT_USED_TRAPS; group->limit = DIFF_TICK(tick, group->tick) + 1500; } @@ -15705,22 +15699,21 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { } //Don't continue if unit or even group is expired and has been deleted. - if( !group || !unit->alive ) + if( !group || !su->alive ) return 0; - dissonance = skill->dance_switch(unit, 0); + dissonance = skill->dance_switch(su, 0); - if( unit->range >= 0 && group->interval != -1 ) - { + if( su->range >= 0 && group->interval != -1 ) { if( battle_config.skill_wall_check ) - iMap->foreachinshootrange(skill->unit_timer_sub_onplace, bl, unit->range, group->bl_flag, bl,tick); + iMap->foreachinshootrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); else - iMap->foreachinrange(skill->unit_timer_sub_onplace, bl, unit->range, group->bl_flag, bl,tick); + iMap->foreachinrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick); - if(unit->range == -1) //Unit disabled, but it should not be deleted yet. + if(su->range == -1) //Unit disabled, but it should not be deleted yet. group->unit_id = UNT_USED_TRAPS; else if( group->unit_id == UNT_TATAMIGAESHI ) { - unit->range = -1; //Disable processed cell. + su->range = -1; //Disable processed cell. if (--group->val1 <= 0) { // number of live cells //All tiles were processed, disable skill. group->target_flag=BCT_NOONE; @@ -15729,7 +15722,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { } } - if( dissonance ) skill->dance_switch(unit, 1); + if( dissonance ) skill->dance_switch(su, 1); return 0; } @@ -15751,8 +15744,8 @@ static int skill_unit_temp[20]; // temporary storage for tracking skill unit sk * *------------------------------------------*/ int skill_unit_move_sub (struct block_list* bl, va_list ap) { - struct skill_unit* unit = (struct skill_unit *)bl; - struct skill_unit_group* group = unit->group; + 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); @@ -15764,25 +15757,25 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap) { nullpo_ret(group); - if( !unit->alive || target->prev == NULL ) + if( !su->alive || target->prev == NULL ) return 0; - if( flag&1 && ( unit->group->skill_id == PF_SPIDERWEB || unit->group->skill_id == GN_THORNS_TRAP ) ) + if( flag&1 && ( su->group->skill_id == PF_SPIDERWEB || su->group->skill_id == GN_THORNS_TRAP ) ) return 0; // Fiberlock is never supposed to trigger on skill->unit_move. [Inkfish] - dissonance = skill->dance_switch(unit, 0); + dissonance = skill->dance_switch(su, 0); //Necessary in case the group is deleted after calling on_place/on_out [Skotlex] - skill_id = unit->group->skill_id; + skill_id = su->group->skill_id; - if( unit->group->interval != -1 && !(skill->get_unit_flag(skill_id)&UF_DUALMODE) && skill_id != BD_LULLABY ) //Lullaby is the exception, bugreport:411 + if( su->group->interval != -1 && !(skill->get_unit_flag(skill_id)&UF_DUALMODE) && skill_id != BD_LULLABY ) //Lullaby is the exception, bugreport:411 { //Non-dualmode unit skills with a timer don't trigger when walking, so just return - if( dissonance ) skill->dance_switch(unit, 1); + if( dissonance ) skill->dance_switch(su, 1); return 0; } //Target-type check. - if( !(group->bl_flag&target->type && battle->check_target(&unit->bl,target,group->target_flag) > 0) ) { + if( !(group->bl_flag&target->type && battle->check_target(&su->bl,target,group->target_flag) > 0) ) { if( group->src_id == target->id && group->state.song_dance&0x2 ) { //Ensemble check to see if they went out/in of the area [Skotlex] if( flag&1 ) { if( flag&2 ) { //Clear this skill id. @@ -15805,19 +15798,19 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap) { skill->unit_onleft(skill_id,target,tick); } - if( dissonance ) skill->dance_switch(unit, 1); + if( dissonance ) skill->dance_switch(su, 1); return 0; } else { if( flag&1 ) { - int result = skill->unit_onplace(unit,target,tick); + int result = skill->unit_onplace(su,target,tick); if( flag&2 && result ) { //Clear skill ids we have stored in onout. ARR_FIND( 0, ARRAYLENGTH(skill_unit_temp), i, skill_unit_temp[i] == result ); if( i < ARRAYLENGTH(skill_unit_temp) ) skill_unit_temp[i] = 0; } } else { - int result = skill->unit_onout(unit,target,tick); + int result = skill->unit_onout(su,target,tick); if( flag&2 && result ) { //Store this unit id. ARR_FIND( 0, ARRAYLENGTH(skill_unit_temp), i, skill_unit_temp[i] == 0 ); if( i < ARRAYLENGTH(skill_unit_temp) ) @@ -15830,7 +15823,7 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap) { //TODO: Normally, this is dangerous since the unit and group could be freed //inside the onout/onplace functions. Currently it is safe because we know song/dance //cells do not get deleted within them. [Skotlex] - if( dissonance ) skill->dance_switch(unit, 1); + if( dissonance ) skill->dance_switch(su, 1); if( flag&4 ) skill->unit_onleft(skill_id,target,tick); @@ -15877,8 +15870,8 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d int i,j; unsigned int tick = iTimer->gettick(); int *m_flag; - struct skill_unit *unit1; - struct skill_unit *unit2; + struct skill_unit *su1; + struct skill_unit *su2; if (group == NULL) return 0; @@ -15899,49 +15892,47 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d // 1: Unit will move to a slot that had another unit of the same group (skill_unit_onplace not needed) // 2: Another unit from same group will end up positioned on this unit (skill_unit_onout not needed) // 3: Both 1+2. - for(i=0;iunit_count;i++){ - unit1=&group->unit[i]; - if (!unit1->alive || unit1->bl.m!=m) + for(i=0;iunit_count;i++) { + su1=&group->unit[i]; + if (!su1->alive || su1->bl.m!=m) continue; - for(j=0;junit_count;j++){ - unit2=&group->unit[j]; - if (!unit2->alive) + for(j=0;junit_count;j++) { + su2=&group->unit[j]; + if (!su2->alive) continue; - if (unit1->bl.x+dx==unit2->bl.x && unit1->bl.y+dy==unit2->bl.y){ + if (su1->bl.x+dx==su2->bl.x && su1->bl.y+dy==su2->bl.y) { m_flag[i] |= 0x1; } - if (unit1->bl.x-dx==unit2->bl.x && unit1->bl.y-dy==unit2->bl.y){ + if (su1->bl.x-dx==su2->bl.x && su1->bl.y-dy==su2->bl.y) { m_flag[i] |= 0x2; } } } j = 0; for (i=0;iunit_count;i++) { - unit1=&group->unit[i]; - if (!unit1->alive) + su1=&group->unit[i]; + if (!su1->alive) continue; if (!(m_flag[i]&0x2)) { if (group->state.song_dance&0x1) //Cancel dissonance effect. - skill->dance_overlap(unit1, 0); - iMap->foreachincell(skill->unit_effect,unit1->bl.m,unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,4); + skill->dance_overlap(su1, 0); + iMap->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,4); } //Move Cell using "smart" criteria (avoid useless moving around) - switch(m_flag[i]) - { + switch(m_flag[i]) { case 0: //Cell moves independently, safely move it. - iMap->moveblock(&unit1->bl, unit1->bl.x+dx, unit1->bl.y+dy, tick); + iMap->moveblock(&su1->bl, su1->bl.x+dx, su1->bl.y+dy, tick); break; case 1: //Cell moves unto another cell, look for a replacement cell that won't collide //and has no cell moving into it (flag == 2) - for(;junit_count;j++) - { + for(;junit_count;j++) { if(m_flag[j]!=2 || !group->unit[j].alive) continue; //Move to where this cell would had moved. - unit2 = &group->unit[j]; - iMap->moveblock(&unit1->bl, unit2->bl.x+dx, unit2->bl.y+dy, tick); + su2 = &group->unit[j]; + iMap->moveblock(&su1->bl, su2->bl.x+dx, su2->bl.y+dy, tick); j++; //Skip this cell as we have used it. break; } @@ -15952,9 +15943,9 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 d } if (!(m_flag[i]&0x2)) { //We only moved the cell in 0-1 if (group->state.song_dance&0x1) //Check for dissonance effect. - skill->dance_overlap(unit1, 1); - clif->skill_setunit(unit1); - iMap->foreachincell(skill->unit_effect,unit1->bl.m,unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,1); + skill->dance_overlap(su1, 1); + clif->skill_setunit(su1); + iMap->foreachincell(skill->unit_effect,su1->bl.m,su1->bl.x,su1->bl.y,group->bl_flag,&su1->bl,tick,1); } } aFree(m_flag); @@ -16168,9 +16159,9 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid, + pc->checkskill(sd,AM_PHARMACY)*300 + sd->status.job_level*20 + (status->int_/2)*10 + status->dex*10+status->luk*10; if(homun_alive(sd->hd)) {//Player got a homun - int skill; - if((skill=homun->checkskill(sd->hd,HVAN_INSTRUCT)) > 0) //His homun is a vanil with instruction change - make_per += skill*100; //+1% bonus per level + int skill2_lv; + if((skill2_lv=homun->checkskill(sd->hd,HVAN_INSTRUCT)) > 0) //His homun is a vanil with instruction change + make_per += skill2_lv*100; //+1% bonus per level } switch(nameid){ case 501: // Red Potion diff --git a/src/map/skill.h b/src/map/skill.h index 995874de4..21544b730 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1820,7 +1820,7 @@ struct skill_interface { struct skill_unit_group* (*id2group) (int group_id); struct skill_unit_group *(*unitsetting) (struct block_list* src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag); struct skill_unit *(*initunit) (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2); - int (*delunit) (struct skill_unit *unit); + int (*delunit) (struct skill_unit *su); struct skill_unit_group *(*init_unitgroup) (struct block_list* src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval); int (*del_unitgroup) (struct skill_unit_group *group, const char* file, int line, const char* func); int (*clear_unitgroup) (struct block_list *src); @@ -1883,14 +1883,14 @@ struct skill_interface { int (*graffitiremover) (struct block_list *bl, va_list ap); int (*activate_reverberation) ( struct block_list *bl, va_list ap); int (*dance_overlap_sub) (struct block_list* bl, va_list ap); - int (*dance_overlap) (struct skill_unit* unit, int flag); + int (*dance_overlap) (struct skill_unit* su, int flag); struct s_skill_unit_layout *(*get_unit_layout) (uint16 skill_id, uint16 skill_lv, struct block_list* src, int x, int y); int (*frostjoke_scream) (struct block_list *bl, va_list ap); 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); - bool (*dance_switch) (struct skill_unit* unit, int flag); + 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); diff --git a/src/map/status.c b/src/map/status.c index ee5d4bfd5..4f4edf31f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -82,7 +82,7 @@ static struct status_data dummy_status; sc_type status_skill2sc(int skill_id) { int idx; if( (idx = skill->get_index(skill_id)) == 0 ) { - ShowError("status_skill2sc: Unsupported skill id %d\n", skill); + ShowError("status_skill2sc: Unsupported skill id %d\n", skill_id); return SC_NONE; } return SkillStatusChangeTable[idx]; @@ -2334,7 +2334,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) const struct status_change *sc = &sd->sc; struct s_skill b_skill[MAX_SKILL]; // previous skill tree int b_weight, b_max_weight, b_cart_weight_max, // previous weight - i, k, index, skill,refinedef=0; + i, k, index, skill_lv,refinedef=0; int64 i64; if (++calculating > 10) //Too many recursive calls! @@ -2742,12 +2742,12 @@ int status_calc_pc_(struct map_session_data* sd, bool first) // Absolute modifiers from passive skills if(pc->checkskill(sd,BS_HILTBINDING)>0) status->str++; - if((skill=pc->checkskill(sd,SA_DRAGONOLOGY))>0) - status->int_ += (skill+1)/2; // +1 INT / 2 lv - if((skill=pc->checkskill(sd,AC_OWL))>0) - status->dex += skill; - if((skill = pc->checkskill(sd,RA_RESEARCHTRAP))>0) - status->int_ += skill; + if((skill_lv=pc->checkskill(sd,SA_DRAGONOLOGY))>0) + status->int_ += (skill_lv+1)/2; // +1 INT / 2 lv + if((skill_lv=pc->checkskill(sd,AC_OWL))>0) + status->dex += skill_lv; + if((skill_lv = pc->checkskill(sd,RA_RESEARCHTRAP))>0) + status->int_ += skill_lv; // Bonuses from cards and equipment as well as base stat, remember to avoid overflows. i = status->str + sd->status.str + sd->param_bonus[0] + sd->param_equip[0]; @@ -2771,7 +2771,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) status->batk += sd->weapon_atk[sd->status.weapon]; // Absolute modifiers from passive skills #ifndef RENEWAL - if((skill=pc->checkskill(sd,BS_HILTBINDING))>0) // it doesn't work in RE. + if((skill_lv=pc->checkskill(sd,BS_HILTBINDING))>0) // it doesn't work in RE. status->batk += 4; #endif @@ -2785,8 +2785,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first) status->max_hp = (unsigned int)cap_value(i64, 0, INT_MAX); // Absolute modifiers from passive skills - if((skill=pc->checkskill(sd,CR_TRUST))>0) - status->max_hp += skill*200; + if((skill_lv=pc->checkskill(sd,CR_TRUST))>0) + status->max_hp += skill_lv*200; // Apply relative modifiers from equipment if(sd->hprate < 0) @@ -2810,16 +2810,16 @@ int status_calc_pc_(struct map_session_data* sd, bool first) status->max_sp = (unsigned int)cap_value(i64, 0, INT_MAX); // Absolute modifiers from passive skills - if((skill=pc->checkskill(sd,SL_KAINA))>0) - status->max_sp += 30*skill; - if((skill=pc->checkskill(sd,HP_MEDITATIO))>0) - status->max_sp += (int64)status->max_sp * skill/100; - if((skill=pc->checkskill(sd,HW_SOULDRAIN))>0) - status->max_sp += (int64)status->max_sp * 2*skill/100; - if( (skill = pc->checkskill(sd,RA_RESEARCHTRAP)) > 0 ) - status->max_sp += 200 + 20 * skill; - if( (skill = pc->checkskill(sd,WM_LESSON)) > 0 ) - status->max_sp += 30 * skill; + if((skill_lv=pc->checkskill(sd,SL_KAINA))>0) + status->max_sp += 30*skill_lv; + if((skill_lv=pc->checkskill(sd,HP_MEDITATIO))>0) + status->max_sp += (int64)status->max_sp * skill_lv/100; + if((skill_lv=pc->checkskill(sd,HW_SOULDRAIN))>0) + status->max_sp += (int64)status->max_sp * 2*skill_lv/100; + if( (skill_lv = pc->checkskill(sd,RA_RESEARCHTRAP)) > 0 ) + status->max_sp += 200 + 20 * skill_lv; + if( (skill_lv = pc->checkskill(sd,WM_LESSON)) > 0 ) + status->max_sp += 30 * skill_lv; // Apply relative modifiers from equipment @@ -2903,33 +2903,32 @@ int status_calc_pc_(struct map_session_data* sd, bool first) // Absolute modifiers from passive skills #ifndef RENEWAL - if((skill=pc->checkskill(sd,BS_WEAPONRESEARCH))>0) // is this correct in pre? there is already hitrate bonus in battle.c - status->hit += skill*2; + if((skill_lv=pc->checkskill(sd,BS_WEAPONRESEARCH))>0) // is this correct in pre? there is already hitrate bonus in battle.c + status->hit += skill_lv*2; #endif - if((skill=pc->checkskill(sd,AC_VULTURE))>0){ + if((skill_lv=pc->checkskill(sd,AC_VULTURE))>0) { #ifndef RENEWAL - status->hit += skill; + status->hit += skill_lv; #endif if(sd->status.weapon == W_BOW) - status->rhw.range += skill; + status->rhw.range += skill_lv; } - if(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE) - { - if((skill=pc->checkskill(sd,GS_SINGLEACTION))>0) - status->hit += 2*skill; - if((skill=pc->checkskill(sd,GS_SNAKEEYE))>0) { - status->hit += skill; - status->rhw.range += skill; + if(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE) { + if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0) + status->hit += 2*skill_lv; + if((skill_lv=pc->checkskill(sd,GS_SNAKEEYE))>0) { + status->hit += skill_lv; + status->rhw.range += skill_lv; } } // ----- FLEE CALCULATION ----- // Absolute modifiers from passive skills - if((skill=pc->checkskill(sd,TF_MISS))>0) - status->flee += skill*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3); - if((skill=pc->checkskill(sd,MO_DODGE))>0) - status->flee += (skill*3)>>1; + if((skill_lv=pc->checkskill(sd,TF_MISS))>0) + status->flee += skill_lv*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3); + if((skill_lv=pc->checkskill(sd,MO_DODGE))>0) + status->flee += (skill_lv*3)>>1; // ----- EQUIPMENT-DEF CALCULATION ----- // Apply relative modifiers from equipment @@ -2975,25 +2974,25 @@ int status_calc_pc_(struct map_session_data* sd, bool first) // Relative modifiers from passive skills #ifndef RENEWAL_ASPD - if((skill=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) - status->aspd_rate -= 5*skill; - if((skill = pc->checkskill(sd,SG_DEVIL)) > 0 && !pc->nextjobexp(sd)) - status->aspd_rate -= 30*skill; - if((skill=pc->checkskill(sd,GS_SINGLEACTION))>0 && + if((skill_lv=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) + status->aspd_rate -= 5*skill_lv; + if((skill_lv = pc->checkskill(sd,SG_DEVIL)) > 0 && !pc->nextjobexp(sd)) + status->aspd_rate -= 30*skill_lv; + if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0 && (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) - status->aspd_rate -= ((skill+1)/2) * 10; + status->aspd_rate -= ((skill_lv+1)/2) * 10; if(pc_isriding(sd)) status->aspd_rate += 500-100*pc->checkskill(sd,KN_CAVALIERMASTERY); else if(pc_isridingdragon(sd)) status->aspd_rate += 250-50*pc->checkskill(sd,RK_DRAGONTRAINING); #else // needs more info - if((skill=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) - status->aspd_rate += 5*skill; - if((skill = pc->checkskill(sd,SG_DEVIL)) > 0 && !pc->nextjobexp(sd)) - status->aspd_rate += 30*skill; - if((skill=pc->checkskill(sd,GS_SINGLEACTION))>0 && + if((skill_lv=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) + status->aspd_rate += 5*skill_lv; + if((skill_lv = pc->checkskill(sd,SG_DEVIL)) > 0 && !pc->nextjobexp(sd)) + status->aspd_rate += 30*skill_lv; + if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0 && (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) - status->aspd_rate += ((skill+1)/2) * 10; + status->aspd_rate += ((skill_lv+1)/2) * 10; if(pc_isriding(sd)) status->aspd_rate -= 500-100*pc->checkskill(sd,KN_CAVALIERMASTERY); else if(pc_isridingdragon(sd)) @@ -3012,16 +3011,16 @@ int status_calc_pc_(struct map_session_data* sd, bool first) // ----- MISC CALCULATIONS ----- // Weight - if((skill=pc->checkskill(sd,MC_INCCARRY))>0) - sd->max_weight += 2000*skill; + if((skill_lv=pc->checkskill(sd,MC_INCCARRY))>0) + sd->max_weight += 2000*skill_lv; if(pc_isriding(sd) && pc->checkskill(sd,KN_RIDING)>0) sd->max_weight += 10000; else if(pc_isridingdragon(sd)) sd->max_weight += 5000+2000*pc->checkskill(sd,RK_DRAGONTRAINING); if(sc->data[SC_KNOWLEDGE]) sd->max_weight += sd->max_weight*sc->data[SC_KNOWLEDGE]->val1/10; - if((skill=pc->checkskill(sd,ALL_INCCARRY))>0) - sd->max_weight += 2000*skill; + if((skill_lv=pc->checkskill(sd,ALL_INCCARRY))>0) + sd->max_weight += 2000*skill_lv; sd->cart_weight_max = battle_config.max_cart_weight + (pc->checkskill(sd, GN_REMODELING_CART)*5000); @@ -3031,8 +3030,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first) sd->regen.state.walk = 0; // Skill SP cost - if((skill=pc->checkskill(sd,HP_MANARECHARGE))>0 ) - sd->dsprate -= 4*skill; + if((skill_lv=pc->checkskill(sd,HP_MANARECHARGE))>0 ) + sd->dsprate -= 4*skill_lv; if(sc->data[SC_SERVICEFORYOU]) sd->dsprate -= sc->data[SC_SERVICEFORYOU]->val3; @@ -3053,29 +3052,29 @@ int status_calc_pc_(struct map_session_data* sd, bool first) sd->sprecov_rate = 0; // Anti-element and anti-race - if((skill=pc->checkskill(sd,CR_TRUST))>0) - sd->subele[ELE_HOLY] += skill*5; - if((skill=pc->checkskill(sd,BS_SKINTEMPER))>0) { - sd->subele[ELE_NEUTRAL] += skill; - sd->subele[ELE_FIRE] += skill*4; + if((skill_lv=pc->checkskill(sd,CR_TRUST))>0) + sd->subele[ELE_HOLY] += skill_lv*5; + if((skill_lv=pc->checkskill(sd,BS_SKINTEMPER))>0) { + sd->subele[ELE_NEUTRAL] += skill_lv; + sd->subele[ELE_FIRE] += skill_lv*4; } - if((skill=pc->checkskill(sd,NC_RESEARCHFE))>0) { - sd->subele[ELE_EARTH] += skill*10; - sd->subele[ELE_FIRE] += skill*10; + if((skill_lv=pc->checkskill(sd,NC_RESEARCHFE))>0) { + sd->subele[ELE_EARTH] += skill_lv*10; + sd->subele[ELE_FIRE] += skill_lv*10; } - if((skill=pc->checkskill(sd,SA_DRAGONOLOGY))>0 ){ + if((skill_lv=pc->checkskill(sd,SA_DRAGONOLOGY))>0 ) { #ifdef RENEWAL - skill = skill*2; + skill_lv = skill_lv*2; #else - skill = skill*4; + skill_lv = skill_lv*4; #endif - sd->right_weapon.addrace[RC_DRAGON]+=skill; - sd->left_weapon.addrace[RC_DRAGON]+=skill; - sd->magic_addrace[RC_DRAGON]+=skill; - sd->subrace[RC_DRAGON]+=skill; + sd->right_weapon.addrace[RC_DRAGON]+=skill_lv; + sd->left_weapon.addrace[RC_DRAGON]+=skill_lv; + sd->magic_addrace[RC_DRAGON]+=skill_lv; + sd->subrace[RC_DRAGON]+=skill_lv; } - if(sc->count){ + if(sc->count) { if(sc->data[SC_CONCENTRATION]) { //Update the card-bonus data sc->data[SC_CONCENTRATION]->val3 = sd->param_bonus[1]; //Agi sc->data[SC_CONCENTRATION]->val4 = sd->param_bonus[4]; //Dex @@ -3183,11 +3182,10 @@ int status_calc_mercenary_(struct mercenary_data *md, bool first) return 0; } -int status_calc_homunculus_(struct homun_data *hd, bool first) -{ +int status_calc_homunculus_(struct homun_data *hd, bool first) { struct status_data *status = &hd->base_status; struct s_homunculus *hom = &hd->homunculus; - int skill; + int skill_lv; int amotion; status->str = hom->str / 10; @@ -3197,7 +3195,7 @@ int status_calc_homunculus_(struct homun_data *hd, bool first) status->int_ = hom->int_ / 10; status->luk = hom->luk / 10; - if (first) { //[orn] + if (first) { //[orn] const struct s_homunculus_db *db = hd->homunculusDB; status->def_ele = db->element; status->ele_lv = 1; @@ -3212,30 +3210,30 @@ int status_calc_homunculus_(struct homun_data *hd, bool first) status->hp = 1; status->sp = 1; } - skill = hom->level/10 + status->vit/5; - status->def = cap_value(skill, 0, 99); + skill_lv = hom->level/10 + status->vit/5; + status->def = cap_value(skill_lv, 0, 99); - skill = hom->level/10 + status->int_/5; - status->mdef = cap_value(skill, 0, 99); + skill_lv = hom->level/10 + status->int_/5; + status->mdef = cap_value(skill_lv, 0, 99); status->max_hp = hom->max_hp ; status->max_sp = hom->max_sp ; homun->calc_skilltree(hd, 0); - if((skill=homun->checkskill(hd,HAMI_SKIN)) > 0) - status->def += skill * 4; + if((skill_lv=homun->checkskill(hd,HAMI_SKIN)) > 0) + status->def += skill_lv * 4; - if((skill = homun->checkskill(hd,HVAN_INSTRUCT)) > 0) { - status->int_ += 1 +skill/2 +skill/4 +skill/5; - status->str += 1 +skill/3 +skill/3 +skill/4; + if((skill_lv = homun->checkskill(hd,HVAN_INSTRUCT)) > 0) { + status->int_ += 1 +skill_lv/2 +skill_lv/4 +skill_lv/5; + status->str += 1 +skill_lv/3 +skill_lv/3 +skill_lv/4; } - if((skill=homun->checkskill(hd,HAMI_SKIN)) > 0) - status->max_hp += skill * 2 * status->max_hp / 100; + if((skill_lv=homun->checkskill(hd,HAMI_SKIN)) > 0) + status->max_hp += skill_lv * 2 * status->max_hp / 100; - if((skill = homun->checkskill(hd,HLIF_BRAIN)) > 0) - status->max_sp += (1 +skill/2 -skill/4 +skill/5) * status->max_sp / 100 ; + if((skill_lv = homun->checkskill(hd,HLIF_BRAIN)) > 0) + status->max_sp += (1 +skill_lv/2 -skill_lv/4 +skill_lv/5) * status->max_sp / 100 ; if (first) { hd->battle_status.hp = hom->hp ; @@ -3365,10 +3363,9 @@ static unsigned short status_calc_batk(struct block_list *,struct status_change #endif //Calculates base regen values. -void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen_data *regen) -{ +void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen_data *regen) { struct map_session_data *sd; - int val, skill, reg_flag; + int val, skill_lv, reg_flag; if( !(bl->type&BL_REGEN) || !regen ) return; @@ -3392,29 +3389,27 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen->sp = cap_value(val, reg_flag, SHRT_MAX); - if( sd ) - { + if( sd ) { struct regen_data_sub *sregen; - if( (skill=pc->checkskill(sd,HP_MEDITATIO)) > 0 ) - { - val = regen->sp*(100+3*skill)/100; + if( (skill_lv=pc->checkskill(sd,HP_MEDITATIO)) > 0 ) { + val = regen->sp*(100+3*skill_lv)/100; regen->sp = cap_value(val, 1, SHRT_MAX); } //Only players have skill/sitting skill regen for now. sregen = regen->sregen; val = 0; - if( (skill=pc->checkskill(sd,SM_RECOVERY)) > 0 ) - val += skill*5 + skill*status->max_hp/500; + if( (skill_lv=pc->checkskill(sd,SM_RECOVERY)) > 0 ) + val += skill_lv*5 + skill_lv*status->max_hp/500; sregen->hp = cap_value(val, 0, SHRT_MAX); val = 0; - if( (skill=pc->checkskill(sd,MG_SRECOVERY)) > 0 ) - val += skill*3 + skill*status->max_sp/500; - if( (skill=pc->checkskill(sd,NJ_NINPOU)) > 0 ) - val += skill*3 + skill*status->max_sp/500; - if( (skill=pc->checkskill(sd,WM_LESSON)) > 0 ) - val += 3 + 3 * skill; + if( (skill_lv=pc->checkskill(sd,MG_SRECOVERY)) > 0 ) + val += skill_lv*3 + skill_lv*status->max_sp/500; + if( (skill_lv=pc->checkskill(sd,NJ_NINPOU)) > 0 ) + val += skill_lv*3 + skill_lv*status->max_sp/500; + if( (skill_lv=pc->checkskill(sd,WM_LESSON)) > 0 ) + val += 3 + 3 * skill_lv; sregen->sp = cap_value(val, 0, SHRT_MAX); @@ -3422,33 +3417,32 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct sregen = regen->ssregen; val = 0; - if( (skill=pc->checkskill(sd,MO_SPIRITSRECOVERY)) > 0 ) - val += skill*4 + skill*status->max_hp/500; + if( (skill_lv=pc->checkskill(sd,MO_SPIRITSRECOVERY)) > 0 ) + val += skill_lv*4 + skill_lv*status->max_hp/500; - if( (skill=pc->checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest ) - val += skill*30 + skill*status->max_hp/500; + if( (skill_lv=pc->checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest ) + val += skill_lv*30 + skill_lv*status->max_hp/500; sregen->hp = cap_value(val, 0, SHRT_MAX); val = 0; - if( (skill=pc->checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest ) - { - val += skill*3 + skill*status->max_sp/500; - if ((skill=pc->checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest - val += (30+10*skill)*val/100; + if( (skill_lv=pc->checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest ) { + val += skill_lv*3 + skill_lv*status->max_sp/500; + if ((skill_lv=pc->checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest + val += (30+10*skill_lv)*val/100; } - if( (skill=pc->checkskill(sd,MO_SPIRITSRECOVERY)) > 0 ) - val += skill*2 + skill*status->max_sp/500; + if( (skill_lv=pc->checkskill(sd,MO_SPIRITSRECOVERY)) > 0 ) + val += skill_lv*2 + skill_lv*status->max_sp/500; sregen->sp = cap_value(val, 0, SHRT_MAX); } if( bl->type == BL_HOM ) { struct homun_data *hd = (TBL_HOM*)bl; - if( (skill = homun->checkskill(hd,HAMI_SKIN)) > 0 ) { - val = regen->hp*(100+5*skill)/100; + if( (skill_lv = homun->checkskill(hd,HAMI_SKIN)) > 0 ) { + val = regen->hp*(100+5*skill_lv)/100; regen->hp = cap_value(val, 1, SHRT_MAX); } - if( (skill = homun->checkskill(hd,HLIF_BRAIN)) > 0 ) { - val = regen->sp*(100+3*skill)/100; + if( (skill_lv = homun->checkskill(hd,HLIF_BRAIN)) > 0 ) { + val = regen->sp*(100+3*skill_lv)/100; regen->sp = cap_value(val, 1, SHRT_MAX); } } else if( bl->type == BL_MER ) { diff --git a/src/map/status.h b/src/map/status.h index d5a40e356..9d49ff3af 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1796,7 +1796,7 @@ struct status_interface { int (*get_refine_chance) (enum refine_type wlv, int refine); // for looking up associated data - sc_type (*skill2sc) (int skill); + sc_type (*skill2sc) (int skill_id); int (*sc2skill) (sc_type sc); unsigned int (*sc2scb_flag) (sc_type sc); int (*type2relevant_bl_types) (int type); diff --git a/src/map/vending.h b/src/map/vending.h index 1b4381ccd..968811ecd 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -31,7 +31,7 @@ struct vending_interface { bool (*searchall) (struct map_session_data* sd, const struct s_search_store_search* s); }; -struct vending_interface * vending; +struct vending_interface *vending; void vending_defaults(void); -- cgit v1.2.3-70-g09d2 From c56e3eb701658079f1de09db759f3b09327ec046 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 7 Oct 2013 13:40:34 -0300 Subject: Fixed Bug #7744 Adjusted missing #ifdef behavior to be friendly to the hooking. http://hercules.ws/board/tracker/issue-7744-compiler-error-on-hpm-hooking-after-undefined-packetver-re/ Signed-off-by: shennetsind --- src/map/clif.c | 24 +- src/map/clif.h | 6 - src/map/map.c | 12 +- src/map/map.h | 2 - src/map/npc.c | 6 +- src/map/npc.h | 2 - src/map/party.c | 145 +- src/map/party.h | 13 +- src/map/status.c | 35 +- src/map/status.h | 6 - src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 48 + .../HPMHooking/HPMHooking.HookingPoints.inc | 4322 ++++++++++---------- src/plugins/HPMHooking/HPMHooking.Hooks.inc | 344 +- 13 files changed, 2688 insertions(+), 2277 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/map/clif.c b/src/map/clif.c index f6c2ef4d0..e730823be 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -860,9 +860,9 @@ static int clif_setlevel(struct block_list* bl) { } return lv; } -#if PACKETVER < 20091103 /* for 'packetver < 20091103' 0x78 non-pc-looking unit handling */ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, enum send_target target) { +#if PACKETVER < 20091103 struct map_session_data* sd; struct status_change* sc = status->get_sc(bl); struct view_data* vd = status->get_viewdata(bl); @@ -907,8 +907,10 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en p.clevel = clif_setlevel(bl); clif->send(&p,sizeof(p),tsd?&tsd->bl:bl,target); -} +#else + return; #endif +} /*========================================== * Prepares 'unit standing' packet *------------------------------------------*/ @@ -996,9 +998,9 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu } } -#if PACKETVER < 20091103 /* for 'packetver < 20091103' 0x7c non-pc-looking unit handling */ void clif_spawn_unit2(struct block_list* bl, enum send_target target) { +#if PACKETVER < 20091103 struct map_session_data* sd; struct status_change* sc = status->get_sc(bl); struct view_data* vd = status->get_viewdata(bl); @@ -1037,8 +1039,10 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) { p.xSize = p.ySize = (sd) ? 5 : 0; clif->send(&p,sizeof(p),bl,target); -} +#else + return; #endif +} void clif_spawn_unit(struct block_list* bl, enum send_target target) { struct map_session_data* sd; struct status_change* sc = status->get_sc(bl); @@ -12369,7 +12373,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) short level = RFIFOW(fd,2); const char *notice = (const char*)RFIFOP(fd, 4); - party->booking_register(sd, level, notice); + party->recruit_register(sd, level, notice); } /// Party booking search results (ZC_PARTY_RECRUIT_ACK_SEARCH). @@ -12426,7 +12430,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) unsigned long lastindex = RFIFOL(fd, 6); short resultcount = RFIFOW(fd, 10); - party->booking_search(sd, level, mapid, lastindex, resultcount); + party->recruit_search(sd, level, mapid, lastindex, resultcount); } /// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE). @@ -12462,7 +12466,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd) notice = (const char*)RFIFOP(fd, 2); - party->booking_update(sd, notice); + party->recruit_update(sd, notice); } /// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT). @@ -17984,10 +17988,8 @@ void clif_defaults(void) { clif->clearunit_delayed_sub = clif_clearunit_delayed_sub; clif->set_unit_idle = clif_set_unit_idle; clif->spawn_unit = clif_spawn_unit; -#if PACKETVER < 20091103 clif->spawn_unit2 = clif_spawn_unit2; clif->set_unit_idle2 = clif_set_unit_idle2; -#endif clif->set_unit_walking = clif_set_unit_walking; clif->calc_walkdelay = clif_calc_walkdelay; clif->getareachar_skillunit = clif_getareachar_skillunit; @@ -18343,13 +18345,11 @@ void clif_defaults(void) { clif->PartyBookingDeleteNotify = clif_PartyBookingDeleteNotify; clif->PartyBookingInsertNotify = clif_PartyBookingInsertNotify; /* Group Search System Update */ -#ifdef PARTY_RECRUIT clif->PartyBookingVolunteerInfo = clif_PartyBookingVolunteerInfo; clif->PartyBookingRefuseVolunteer = clif_PartyBookingRefuseVolunteer; clif->PartyBookingCancelVolunteer = clif_PartyBookingCancelVolunteer; clif->PartyBookingAddFilteringList = clif_PartyBookingAddFilteringList; clif->PartyBookingSubFilteringList = clif_PartyBookingSubFilteringList; -#endif /* buying store-related */ clif->buyingstore_open = clif_buyingstore_open; clif->buyingstore_open_failed = clif_buyingstore_open_failed; @@ -18613,11 +18613,9 @@ void clif_defaults(void) { clif->pPartyTick = clif_parse_PartyTick; clif->pGuildInvite2 = clif_parse_GuildInvite2; /* Group Search System Update */ -#ifdef PARTY_RECRUIT clif->pPartyBookingAddFilter = clif_parse_PartyBookingAddFilteringList; clif->pPartyBookingSubFilter = clif_parse_PartyBookingSubFilteringList; clif->pPartyBookingReqVolunteer = clif_parse_PartyBookingReqVolunteer; clif->pPartyBookingRefuseVolunteer = clif_parse_PartyBookingRefuseVolunteer; clif->pPartyBookingCancelVolunteer = clif_parse_PartyBookingCancelVolunteer; -#endif } diff --git a/src/map/clif.h b/src/map/clif.h index 1e054db1d..31808ddcc 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -546,10 +546,8 @@ struct clif_interface { int (*clearunit_delayed_sub) (int tid, unsigned int 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); -#if PACKETVER < 20091103 void (*spawn_unit2) (struct block_list* bl, enum send_target target); void (*set_unit_idle2) (struct block_list* bl, struct map_session_data *tsd, enum send_target target); -#endif void (*set_unit_walking) (struct block_list* bl, struct map_session_data *tsd,struct unit_data* ud, enum send_target target); int (*calc_walkdelay) (struct block_list *bl,int delay, int type, int damage, int div_); void (*getareachar_skillunit) (struct map_session_data *sd, struct skill_unit *su); @@ -905,13 +903,11 @@ struct clif_interface { void (*PartyBookingDeleteNotify) (struct map_session_data* sd, int index); void (*PartyBookingInsertNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad); /* Group Search System Update */ -#ifdef PARTY_RECRUIT void (*PartyBookingVolunteerInfo) (int index, struct map_session_data *sd); void (*PartyBookingRefuseVolunteer) (unsigned long aid, struct map_session_data *sd); void (*PartyBookingCancelVolunteer) (int index, struct map_session_data *sd); void (*PartyBookingAddFilteringList) (int index, struct map_session_data *sd); void (*PartyBookingSubFilteringList) (int gid, struct map_session_data *sd); -#endif /* buying store-related */ void (*buyingstore_open) (struct map_session_data* sd); void (*buyingstore_open_failed) (struct map_session_data* sd, unsigned short result, unsigned int weight); @@ -1173,13 +1169,11 @@ struct clif_interface { void (*pPartyTick) (int fd, struct map_session_data *sd); void (*pGuildInvite2) (int fd, struct map_session_data *sd); /* Group Search System Update */ -#ifdef PARTY_RECRUIT void (*pPartyBookingAddFilter) (int fd, struct map_session_data *sd); void (*pPartyBookingSubFilter) (int fd, struct map_session_data *sd); void (*pPartyBookingReqVolunteer) (int fd, struct map_session_data *sd); void (*pPartyBookingRefuseVolunteer) (int fd, struct map_session_data *sd); void (*pPartyBookingCancelVolunteer) (int fd, struct map_session_data *sd); -#endif }; struct clif_interface *clif; diff --git a/src/map/map.c b/src/map/map.c index 0c684542d..d920875ee 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -137,26 +137,32 @@ int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) { return 0; } -#ifdef CELL_NOSTACK /*========================================== * These pair of functions update the counter of how many objects * lie on a tile. *------------------------------------------*/ void map_addblcell(struct block_list *bl) { +#ifdef CELL_NOSTACK if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs || bl->y < 0 || bl->y >= map->list[bl->m].ys || !(bl->type&BL_CHAR) ) return; map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl++; +#else + return; +#endif } void map_delblcell(struct block_list *bl) { +#ifdef CELL_NOSTACK if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs || bl->y < 0 || bl->y >= map->list[bl->m].ys || !(bl->type&BL_CHAR) ) map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl--; -} +#else + return; #endif +} /*========================================== * Adds a block to the map. @@ -5792,10 +5798,8 @@ void map_defaults(void) { map->versionscreen = map_versionscreen; map->arg_next_value = map_arg_next_value; -#ifdef CELL_NOSTACK map->addblcell = map_addblcell; map->delblcell = map_delblcell; -#endif /** * mapit interface diff --git a/src/map/map.h b/src/map/map.h index 67fdfcf96..29c1dfecc 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1018,10 +1018,8 @@ struct map_interface { void (*helpscreen) (bool do_exit); void (*versionscreen) (bool do_exit); bool (*arg_next_value) (const char *option, int i, int argc); -#ifdef CELL_NOSTACK void (*addblcell) (struct block_list *bl); void (*delblcell) (struct block_list *bl); -#endif }; struct map_interface *map; diff --git a/src/map/npc.c b/src/map/npc.c index a28724238..c52dce325 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -212,11 +212,11 @@ struct npc_data* npc_name2id(const char* name) /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ -#ifdef SECURE_NPCTIMEOUT /** * 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) { +#ifdef SECURE_NPCTIMEOUT struct map_session_data* sd = NULL; unsigned int timeout = NPC_SECURE_TIMEOUT_NEXT; if( (sd = map->id2sd(id)) == NULL || !sd->npc_id ) { @@ -251,9 +251,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat sd->npc_idle_timer = INVALID_TIMER; } else //Create a new instance of ourselves to continue sd->npc_idle_timer = timer->add(timer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); +#endif return 0; } -#endif /*========================================== * Dequeue event and add timer for execution (100ms) @@ -4072,7 +4072,5 @@ void npc_defaults(void) { npc->do_clear_npc = do_clear_npc; npc->debug_warps_sub = npc_debug_warps_sub; npc->debug_warps = npc_debug_warps; -#ifdef SECURE_NPCTIMEOUT npc->secure_timeout_timer = npc_rr_secure_timeout_timer; -#endif } diff --git a/src/map/npc.h b/src/map/npc.h index 3c273fffb..f809cb19c 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -229,9 +229,7 @@ struct npc_interface { /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ -#ifdef SECURE_NPCTIMEOUT int (*secure_timeout_timer) (int tid, unsigned int tick, int id, intptr_t data); -#endif }; struct npc_interface *npc; diff --git a/src/map/party.c b/src/map/party.c index 1694adf2c..7db6b8e10 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -1108,16 +1108,9 @@ struct party_booking_ad_info* create_party_booking_data(void) { return pb_ad; } -#ifndef PARTY_RECRUIT -void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job) -#else -void party_booking_register(struct map_session_data *sd, short level, const char *notice) -#endif -{ +void party_recruit_register(struct map_session_data *sd, short level, const char *notice) { +#ifdef PARTY_RECRUIT struct party_booking_ad_info *pb_ad; -#ifndef PARTY_RECRUIT - int i; -#endif pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id); @@ -1135,30 +1128,52 @@ void party_booking_register(struct map_session_data *sd, short level, const char memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH); pb_ad->expiretime = (int)time(NULL); pb_ad->p_detail.level = level; + safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH); + + clif->PartyBookingRegisterAck(sd, 0); + clif->PartyBookingInsertNotify(sd, pb_ad); // Notice +#else + return; +#endif +} + +void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job) { #ifndef PARTY_RECRUIT + struct party_booking_ad_info *pb_ad; + int i; + + pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id); + + if( pb_ad == NULL ) + { + pb_ad = party->create_booking_data(); + idb_put(party->booking_db, sd->status.char_id, pb_ad); + } + else + {// already registered + clif->PartyBookingRegisterAck(sd, 2); + return; + } + + memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH); + pb_ad->expiretime = (int)time(NULL); + pb_ad->p_detail.level = level; pb_ad->p_detail.mapid = mapid; - + for(i=0;ip_detail.job[i] = job[i]; else pb_ad->p_detail.job[i] = -1; -#else - safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH); -#endif - + clif->PartyBookingRegisterAck(sd, 0); clif->PartyBookingInsertNotify(sd, pb_ad); // Notice -} - -#ifndef PARTY_RECRUIT -void party_booking_update(struct map_session_data *sd, short* job) #else -void party_booking_update(struct map_session_data *sd, const char *notice) -#endif -{ -#ifndef PARTY_RECRUIT - int i; + return; #endif +} + +void party_recruit_update(struct map_session_data *sd, const char *notice) { +#ifdef PARTY_RECRUIT struct party_booking_ad_info *pb_ad; pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id); @@ -1168,30 +1183,42 @@ void party_booking_update(struct map_session_data *sd, const char *notice) pb_ad->expiretime = (int)time(NULL);// Update time. -#ifndef PARTY_RECRUIT - for(i=0;ip_detail.job[i] = job[i]; - else pb_ad->p_detail.job[i] = -1; -#else if (notice != NULL) { safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH); } -#endif clif->PartyBookingUpdateNotify(sd, pb_ad); -} - -#ifndef PARTY_RECRUIT -void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) #else -void party_booking_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) + return; #endif -{ - struct party_booking_ad_info *pb_ad; +} +void party_booking_update(struct map_session_data *sd, short* job) { #ifndef PARTY_RECRUIT int i; + struct party_booking_ad_info *pb_ad; + + pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id); + + if( pb_ad == NULL ) + return; + + pb_ad->expiretime = (int)time(NULL);// Update time. + + for(i=0;ip_detail.job[i] = job[i]; + else pb_ad->p_detail.job[i] = -1; + + clif->PartyBookingUpdateNotify(sd, pb_ad); +#else + return; #endif +} + + +void party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { +#ifdef PARTY_RECRUIT + struct party_booking_ad_info *pb_ad; int count = 0; struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS]; bool more_result = false; @@ -1201,18 +1228,42 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid, for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) ) { -#ifndef PARTY_RECRUIT - if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level))) - continue; -#else if ((level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level))) continue; -#endif if (count >= PARTY_BOOKING_RESULTS){ more_result = true; break; } + result_list[count] = pb_ad; + if( result_list[count] ) + { + count++; + } + } + dbi_destroy(iter); + clif->PartyBookingSearchAck(sd->fd, result_list, count, more_result); +#else + return; +#endif +} +void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) { #ifndef PARTY_RECRUIT + struct party_booking_ad_info *pb_ad; + int i; + int count = 0; + struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS]; + bool more_result = false; + DBIterator* iter = db_iterator(party->booking_db); + + memset(result_list, 0, sizeof(result_list)); + + for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) ) { + if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level))) + continue; + if (count >= PARTY_BOOKING_RESULTS){ + more_result = true; + break; + } if (mapid == 0 && job == -1) result_list[count] = pb_ad; else if (mapid == 0) { @@ -1223,9 +1274,6 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid, if (pb_ad->p_detail.mapid == mapid) result_list[count] = pb_ad; } -#else - result_list[count] = pb_ad; -#endif if( result_list[count] ) { count++; @@ -1233,8 +1281,12 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid, } dbi_destroy(iter); clif->PartyBookingSearchAck(sd->fd, result_list, count, more_result); +#else + return; +#endif } + bool party_booking_delete(struct map_session_data *sd) { struct party_booking_ad_info* pb_ad; @@ -1309,6 +1361,9 @@ void party_defaults(void) { party->booking_register = party_booking_register; party->booking_update = party_booking_update; party->booking_search = party_booking_search; + party->recruit_register = party_recruit_register; + party->recruit_update = party_recruit_update; + party->recruit_search = party_recruit_search; party->booking_delete = party_booking_delete; party->vforeachsamemap = party_vforeachsamemap; party->foreachsamemap = party_foreachsamemap; diff --git a/src/map/party.h b/src/map/party.h index 570c7bd11..208edb846 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -34,6 +34,8 @@ struct party_data { } state; }; +#define PB_NOTICE_LENGTH (36 + 1) + #ifndef PARTY_RECRUIT struct party_booking_detail { short level; @@ -48,7 +50,6 @@ struct party_booking_ad_info { struct party_booking_detail p_detail; }; #else /* PARTY_RECRUIT */ -#define PB_NOTICE_LENGTH (36 + 1) struct party_booking_detail { short level; char notice[PB_NOTICE_LENGTH]; @@ -111,15 +112,13 @@ struct party_interface { /*========================================== * Party Booking in KRO [Spiria] *------------------------------------------*/ -#ifndef PARTY_RECRUIT void (*booking_register) (struct map_session_data *sd, short level, short mapid, short* job); void (*booking_update) (struct map_session_data *sd, short* job); void (*booking_search) (struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount); -#else /* PARTY_RECRUIT */ - void (*booking_register) (struct map_session_data *sd, short level, const char *notice); - void (*booking_update) (struct map_session_data *sd, const char *notice); - void (*booking_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount); -#endif + /* PARTY_RECRUIT */ + void (*recruit_register) (struct map_session_data *sd, short level, const char *notice); + void (*recruit_update) (struct map_session_data *sd, const char *notice); + void (*recruit_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount); bool (*booking_delete) (struct map_session_data *sd); /* */ int (*vforeachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range, va_list ap); diff --git a/src/map/status.c b/src/map/status.c index 6953312f8..6b2edc9ac 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1911,9 +1911,14 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_ static inline unsigned short status_base_matk_min(const struct status_data *st){ return st->int_+(st->int_/7)*(st->int_/7); } static inline unsigned short status_base_matk_max(const struct status_data *st){ return st->int_+(st->int_/5)*(st->int_/5); } + +unsigned short status_base_matk(const struct status_data *st, int level) { #ifdef RENEWAL -unsigned short status_base_matk(const struct status_data *st, int level){ return st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4); } + return st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4); +#else + return 0; #endif +} //Fills in the misc data that can be calculated from the other status info (except for level) void status_calc_misc(struct block_list *bl, struct status_data *st, int level) { @@ -4514,9 +4519,8 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, return (unsigned short)cap_value(watk,0,USHRT_MAX); } +unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { #ifdef RENEWAL -unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) -{ if (!sc || !sc->count) return cap_value(matk,0,USHRT_MAX); @@ -4539,8 +4543,10 @@ unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc if(sc->data[SC_IZAYOI]) matk += 25 * sc->data[SC_IZAYOI]->val1; return (unsigned short)cap_value(matk,0,USHRT_MAX); -} +#else + return 0; #endif +} unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { if(!sc || !sc->count) @@ -5202,11 +5208,10 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc return (short)cap_value(speed,10,USHRT_MAX); } -#ifdef RENEWAL_ASPD // flag&1 - fixed value [malufett] // flag&2 - percentage value -short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) -{ +short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { +#ifdef RENEWAL_ASPD int i, pots = 0, skills1 = 0, skills2 = 0; if(!sc || !sc->count) @@ -5318,8 +5323,10 @@ short status_calc_aspd(struct block_list *bl, struct status_change *sc, short fl } } return ( flag&1? (skills1 + pots) : skills2 ); -} +#else + return 0; #endif +} short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { if (!sc || !sc->count) @@ -10768,8 +10775,8 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) { int status_get_total_def(struct block_list *src) { return status->get_status_data(src)->def2 + (short)status->get_def(src); } int status_get_total_mdef(struct block_list *src) { return status->get_status_data(src)->mdef2 + (short)status_get_mdef(src); } -#ifdef RENEWAL int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int flag) { +#ifdef RENEWAL int min = 0, max = 0, dstr; float strdex_bonus, variance; struct status_change *sc = status->get_sc(bl); @@ -10803,8 +10810,10 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl max = status->calc_watk(bl, sc, max, false); return max; -} +#else + return 0; #endif +} #define GETRANDMATK(st) do {\ if( (st)->matk_max > (st)->matk_min ) \ @@ -11552,10 +11561,8 @@ void status_defaults(void) { status->calc_mdef = status_calc_mdef; status->calc_mdef2 = status_calc_mdef2; status->calc_batk = status_calc_batk; -#ifdef RENEWAL status->base_matk = status_base_matk; status->get_weapon_atk = status_get_weapon_atk; -#endif status->get_total_mdef = status_get_total_mdef; status->get_total_def = status_get_total_def; @@ -11588,18 +11595,14 @@ void status_defaults(void) { status->calc_speed = status_calc_speed; status->calc_aspd_rate = status_calc_aspd_rate; status->calc_dmotion = status_calc_dmotion; -#ifdef RENEWAL_ASPD status->calc_aspd = status_calc_aspd; -#endif status->calc_fix_aspd = status_calc_fix_aspd; status->calc_maxhp = status_calc_maxhp; status->calc_maxsp = status_calc_maxsp; status->calc_element = status_calc_element; status->calc_element_lv = status_calc_element_lv; status->calc_mode = status_calc_mode; -#ifdef RENEWAL status->calc_ematk = status_calc_ematk; -#endif status->calc_bl_main = status_calc_bl_main; status->display_add = status_display_add; status->display_remove = status_display_remove; diff --git a/src/map/status.h b/src/map/status.h index d1e78b0b7..c7518a213 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1893,10 +1893,8 @@ struct status_interface { defType (*calc_mdef) (struct block_list *bl, struct status_change *sc, int mdef, bool viewable); short (*calc_mdef2) (struct block_list *bl, struct status_change *sc, int mdef2, bool viewable); unsigned short (*calc_batk)(struct block_list *bl, struct status_change *sc, int batk, bool viewable); -#ifdef RENEWAL unsigned short (*base_matk) (const struct status_data *st, int level); int (*get_weapon_atk) (struct block_list *src, struct weapon_atk *watk, int flag); -#endif int (*get_total_mdef) (struct block_list *src); int (*get_total_def) (struct block_list *src); int (*get_matk) (struct block_list *src, int flag); @@ -1925,18 +1923,14 @@ struct status_interface { unsigned short (*calc_speed) (struct block_list *bl, struct status_change *sc, int speed); short (*calc_aspd_rate) (struct block_list *bl, struct status_change *sc, int aspd_rate); unsigned short (*calc_dmotion) (struct block_list *bl, struct status_change *sc, int dmotion); -#ifdef RENEWAL_ASPD short (*calc_aspd) (struct block_list *bl, struct status_change *sc, short flag); -#endif short (*calc_fix_aspd) (struct block_list *bl, struct status_change *sc, int aspd); unsigned int (*calc_maxhp) (struct block_list *bl, struct status_change *sc, uint64 maxhp); unsigned int (*calc_maxsp) (struct block_list *bl, struct status_change *sc, unsigned int maxsp); unsigned char (*calc_element) (struct block_list *bl, struct status_change *sc, int element); unsigned char (*calc_element_lv) (struct block_list *bl, struct status_change *sc, int lv); unsigned short (*calc_mode) (struct block_list *bl, struct status_change *sc, int mode); -#ifdef RENEWAL unsigned short (*calc_ematk) (struct block_list *bl, struct status_change *sc, int matk); -#endif void (*calc_bl_main) (struct block_list *bl, int flag); 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); diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index c73747a10..caf5dd324 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -499,6 +499,10 @@ struct HPMHookPoint *HP_clif_set_unit_idle_pre; struct HPMHookPoint *HP_clif_set_unit_idle_post; struct HPMHookPoint *HP_clif_spawn_unit_pre; struct HPMHookPoint *HP_clif_spawn_unit_post; +struct HPMHookPoint *HP_clif_spawn_unit2_pre; +struct HPMHookPoint *HP_clif_spawn_unit2_post; +struct HPMHookPoint *HP_clif_set_unit_idle2_pre; +struct HPMHookPoint *HP_clif_set_unit_idle2_post; struct HPMHookPoint *HP_clif_set_unit_walking_pre; struct HPMHookPoint *HP_clif_set_unit_walking_post; struct HPMHookPoint *HP_clif_calc_walkdelay_pre; @@ -2797,6 +2801,10 @@ struct HPMHookPoint *HP_map_versionscreen_pre; struct HPMHookPoint *HP_map_versionscreen_post; struct HPMHookPoint *HP_map_arg_next_value_pre; struct HPMHookPoint *HP_map_arg_next_value_post; +struct HPMHookPoint *HP_map_addblcell_pre; +struct HPMHookPoint *HP_map_addblcell_post; +struct HPMHookPoint *HP_map_delblcell_pre; +struct HPMHookPoint *HP_map_delblcell_post; struct HPMHookPoint *HP_mapit_alloc_pre; struct HPMHookPoint *HP_mapit_alloc_post; struct HPMHookPoint *HP_mapit_free_pre; @@ -3243,6 +3251,8 @@ struct HPMHookPoint *HP_npc_debug_warps_sub_pre; struct HPMHookPoint *HP_npc_debug_warps_sub_post; struct HPMHookPoint *HP_npc_debug_warps_pre; struct HPMHookPoint *HP_npc_debug_warps_post; +struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; +struct HPMHookPoint *HP_npc_secure_timeout_timer_post; struct HPMHookPoint *HP_party_init_pre; struct HPMHookPoint *HP_party_init_post; struct HPMHookPoint *HP_party_final_pre; @@ -3317,6 +3327,12 @@ struct HPMHookPoint *HP_party_booking_update_pre; struct HPMHookPoint *HP_party_booking_update_post; struct HPMHookPoint *HP_party_booking_search_pre; struct HPMHookPoint *HP_party_booking_search_post; +struct HPMHookPoint *HP_party_recruit_register_pre; +struct HPMHookPoint *HP_party_recruit_register_post; +struct HPMHookPoint *HP_party_recruit_update_pre; +struct HPMHookPoint *HP_party_recruit_update_post; +struct HPMHookPoint *HP_party_recruit_search_pre; +struct HPMHookPoint *HP_party_recruit_search_post; struct HPMHookPoint *HP_party_booking_delete_pre; struct HPMHookPoint *HP_party_booking_delete_post; struct HPMHookPoint *HP_party_vforeachsamemap_pre; @@ -4571,6 +4587,10 @@ struct HPMHookPoint *HP_status_calc_mdef2_pre; struct HPMHookPoint *HP_status_calc_mdef2_post; struct HPMHookPoint *HP_status_calc_batk_pre; struct HPMHookPoint *HP_status_calc_batk_post; +struct HPMHookPoint *HP_status_base_matk_pre; +struct HPMHookPoint *HP_status_base_matk_post; +struct HPMHookPoint *HP_status_get_weapon_atk_pre; +struct HPMHookPoint *HP_status_get_weapon_atk_post; struct HPMHookPoint *HP_status_get_total_mdef_pre; struct HPMHookPoint *HP_status_get_total_mdef_post; struct HPMHookPoint *HP_status_get_total_def_pre; @@ -4625,6 +4645,8 @@ struct HPMHookPoint *HP_status_calc_aspd_rate_pre; struct HPMHookPoint *HP_status_calc_aspd_rate_post; struct HPMHookPoint *HP_status_calc_dmotion_pre; struct HPMHookPoint *HP_status_calc_dmotion_post; +struct HPMHookPoint *HP_status_calc_aspd_pre; +struct HPMHookPoint *HP_status_calc_aspd_post; struct HPMHookPoint *HP_status_calc_fix_aspd_pre; struct HPMHookPoint *HP_status_calc_fix_aspd_post; struct HPMHookPoint *HP_status_calc_maxhp_pre; @@ -4637,6 +4659,8 @@ struct HPMHookPoint *HP_status_calc_element_lv_pre; struct HPMHookPoint *HP_status_calc_element_lv_post; struct HPMHookPoint *HP_status_calc_mode_pre; struct HPMHookPoint *HP_status_calc_mode_post; +struct HPMHookPoint *HP_status_calc_ematk_pre; +struct HPMHookPoint *HP_status_calc_ematk_post; struct HPMHookPoint *HP_status_calc_bl_main_pre; struct HPMHookPoint *HP_status_calc_bl_main_post; struct HPMHookPoint *HP_status_display_add_pre; @@ -5311,6 +5335,10 @@ int HP_clif_set_unit_idle_pre; int HP_clif_set_unit_idle_post; int HP_clif_spawn_unit_pre; int HP_clif_spawn_unit_post; +int HP_clif_spawn_unit2_pre; +int HP_clif_spawn_unit2_post; +int HP_clif_set_unit_idle2_pre; +int HP_clif_set_unit_idle2_post; int HP_clif_set_unit_walking_pre; int HP_clif_set_unit_walking_post; int HP_clif_calc_walkdelay_pre; @@ -7609,6 +7637,10 @@ int HP_map_versionscreen_pre; int HP_map_versionscreen_post; int HP_map_arg_next_value_pre; int HP_map_arg_next_value_post; +int HP_map_addblcell_pre; +int HP_map_addblcell_post; +int HP_map_delblcell_pre; +int HP_map_delblcell_post; int HP_mapit_alloc_pre; int HP_mapit_alloc_post; int HP_mapit_free_pre; @@ -8055,6 +8087,8 @@ int HP_npc_debug_warps_sub_pre; int HP_npc_debug_warps_sub_post; int HP_npc_debug_warps_pre; int HP_npc_debug_warps_post; +int HP_npc_secure_timeout_timer_pre; +int HP_npc_secure_timeout_timer_post; int HP_party_init_pre; int HP_party_init_post; int HP_party_final_pre; @@ -8129,6 +8163,12 @@ int HP_party_booking_update_pre; int HP_party_booking_update_post; int HP_party_booking_search_pre; int HP_party_booking_search_post; +int HP_party_recruit_register_pre; +int HP_party_recruit_register_post; +int HP_party_recruit_update_pre; +int HP_party_recruit_update_post; +int HP_party_recruit_search_pre; +int HP_party_recruit_search_post; int HP_party_booking_delete_pre; int HP_party_booking_delete_post; int HP_party_vforeachsamemap_pre; @@ -9383,6 +9423,10 @@ int HP_status_calc_mdef2_pre; int HP_status_calc_mdef2_post; int HP_status_calc_batk_pre; int HP_status_calc_batk_post; +int HP_status_base_matk_pre; +int HP_status_base_matk_post; +int HP_status_get_weapon_atk_pre; +int HP_status_get_weapon_atk_post; int HP_status_get_total_mdef_pre; int HP_status_get_total_mdef_post; int HP_status_get_total_def_pre; @@ -9437,6 +9481,8 @@ int HP_status_calc_aspd_rate_pre; int HP_status_calc_aspd_rate_post; int HP_status_calc_dmotion_pre; int HP_status_calc_dmotion_post; +int HP_status_calc_aspd_pre; +int HP_status_calc_aspd_post; int HP_status_calc_fix_aspd_pre; int HP_status_calc_fix_aspd_post; int HP_status_calc_maxhp_pre; @@ -9449,6 +9495,8 @@ int HP_status_calc_element_lv_pre; int HP_status_calc_element_lv_post; int HP_status_calc_mode_pre; int HP_status_calc_mode_post; +int HP_status_calc_ematk_pre; +int HP_status_calc_ematk_post; int HP_status_calc_bl_main_pre; int HP_status_calc_bl_main_post; int HP_status_display_add_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 69f6e287a..e356f2b18 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -256,2190 +256,2202 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->clearunit_delayed_sub), HP_POP2(HP_clif_clearunit_delayed_sub), 494 }, { HP_POP(clif->set_unit_idle), HP_POP2(HP_clif_set_unit_idle), 496 }, { HP_POP(clif->spawn_unit), HP_POP2(HP_clif_spawn_unit), 498 }, -{ HP_POP(clif->set_unit_walking), HP_POP2(HP_clif_set_unit_walking), 500 }, -{ HP_POP(clif->calc_walkdelay), HP_POP2(HP_clif_calc_walkdelay), 502 }, -{ HP_POP(clif->getareachar_skillunit), HP_POP2(HP_clif_getareachar_skillunit), 504 }, -{ HP_POP(clif->getareachar_unit), HP_POP2(HP_clif_getareachar_unit), 506 }, -{ HP_POP(clif->clearchar_skillunit), HP_POP2(HP_clif_clearchar_skillunit), 508 }, -{ HP_POP(clif->getareachar), HP_POP2(HP_clif_getareachar), 510 }, -{ HP_POP(clif->spawn), HP_POP2(HP_clif_spawn), 512 }, -{ HP_POP(clif->changemap), HP_POP2(HP_clif_changemap), 514 }, -{ HP_POP(clif->changemapcell), HP_POP2(HP_clif_changemapcell), 516 }, -{ HP_POP(clif->map_property), HP_POP2(HP_clif_map_property), 518 }, -{ HP_POP(clif->pvpset), HP_POP2(HP_clif_pvpset), 520 }, -{ HP_POP(clif->map_property_mapall), HP_POP2(HP_clif_map_property_mapall), 522 }, -{ HP_POP(clif->bossmapinfo), HP_POP2(HP_clif_bossmapinfo), 524 }, -{ HP_POP(clif->map_type), HP_POP2(HP_clif_map_type), 526 }, -{ HP_POP(clif->maptypeproperty2), HP_POP2(HP_clif_maptypeproperty2), 528 }, -{ HP_POP(clif->changemapserver), HP_POP2(HP_clif_changemapserver), 530 }, -{ HP_POP(clif->npcbuysell), HP_POP2(HP_clif_npcbuysell), 532 }, -{ HP_POP(clif->buylist), HP_POP2(HP_clif_buylist), 534 }, -{ HP_POP(clif->selllist), HP_POP2(HP_clif_selllist), 536 }, -{ HP_POP(clif->cashshop_show), HP_POP2(HP_clif_cashshop_show), 538 }, -{ HP_POP(clif->npc_buy_result), HP_POP2(HP_clif_npc_buy_result), 540 }, -{ HP_POP(clif->npc_sell_result), HP_POP2(HP_clif_npc_sell_result), 542 }, -{ HP_POP(clif->cashshop_ack), HP_POP2(HP_clif_cashshop_ack), 544 }, -{ HP_POP(clif->scriptmes), HP_POP2(HP_clif_scriptmes), 546 }, -{ HP_POP(clif->scriptnext), HP_POP2(HP_clif_scriptnext), 548 }, -{ HP_POP(clif->scriptclose), HP_POP2(HP_clif_scriptclose), 550 }, -{ HP_POP(clif->scriptmenu), HP_POP2(HP_clif_scriptmenu), 552 }, -{ HP_POP(clif->scriptinput), HP_POP2(HP_clif_scriptinput), 554 }, -{ HP_POP(clif->scriptinputstr), HP_POP2(HP_clif_scriptinputstr), 556 }, -{ HP_POP(clif->cutin), HP_POP2(HP_clif_cutin), 558 }, -{ HP_POP(clif->sendfakenpc), HP_POP2(HP_clif_sendfakenpc), 560 }, -{ HP_POP(clif->scriptclear), HP_POP2(HP_clif_scriptclear), 562 }, -{ HP_POP(clif->viewpoint), HP_POP2(HP_clif_viewpoint), 564 }, -{ HP_POP(clif->damage), HP_POP2(HP_clif_damage), 566 }, -{ HP_POP(clif->sitting), HP_POP2(HP_clif_sitting), 568 }, -{ HP_POP(clif->standing), HP_POP2(HP_clif_standing), 570 }, -{ HP_POP(clif->arrow_create_list), HP_POP2(HP_clif_arrow_create_list), 572 }, -{ HP_POP(clif->refresh), HP_POP2(HP_clif_refresh), 574 }, -{ HP_POP(clif->fame_blacksmith), HP_POP2(HP_clif_fame_blacksmith), 576 }, -{ HP_POP(clif->fame_alchemist), HP_POP2(HP_clif_fame_alchemist), 578 }, -{ HP_POP(clif->fame_taekwon), HP_POP2(HP_clif_fame_taekwon), 580 }, -{ HP_POP(clif->ranklist), HP_POP2(HP_clif_ranklist), 582 }, -{ HP_POP(clif->update_rankingpoint), HP_POP2(HP_clif_update_rankingpoint), 584 }, -{ HP_POP(clif->pRanklist), HP_POP2(HP_clif_pRanklist), 586 }, -{ HP_POP(clif->hotkeys), HP_POP2(HP_clif_hotkeys), 588 }, -{ HP_POP(clif->insight), HP_POP2(HP_clif_insight), 590 }, -{ HP_POP(clif->outsight), HP_POP2(HP_clif_outsight), 592 }, -{ HP_POP(clif->skillcastcancel), HP_POP2(HP_clif_skillcastcancel), 594 }, -{ HP_POP(clif->skill_fail), HP_POP2(HP_clif_skill_fail), 596 }, -{ HP_POP(clif->skill_cooldown), HP_POP2(HP_clif_skill_cooldown), 598 }, -{ HP_POP(clif->skill_memomessage), HP_POP2(HP_clif_skill_memomessage), 600 }, -{ HP_POP(clif->skill_mapinfomessage), HP_POP2(HP_clif_skill_mapinfomessage), 602 }, -{ HP_POP(clif->skill_produce_mix_list), HP_POP2(HP_clif_skill_produce_mix_list), 604 }, -{ HP_POP(clif->cooking_list), HP_POP2(HP_clif_cooking_list), 606 }, -{ HP_POP(clif->autospell), HP_POP2(HP_clif_autospell), 608 }, -{ HP_POP(clif->combo_delay), HP_POP2(HP_clif_combo_delay), 610 }, -{ HP_POP(clif->status_change), HP_POP2(HP_clif_status_change), 612 }, -{ HP_POP(clif->insert_card), HP_POP2(HP_clif_insert_card), 614 }, -{ HP_POP(clif->inventorylist), HP_POP2(HP_clif_inventorylist), 616 }, -{ HP_POP(clif->equiplist), HP_POP2(HP_clif_equiplist), 618 }, -{ HP_POP(clif->cartlist), HP_POP2(HP_clif_cartlist), 620 }, -{ HP_POP(clif->favorite_item), HP_POP2(HP_clif_favorite_item), 622 }, -{ HP_POP(clif->clearcart), HP_POP2(HP_clif_clearcart), 624 }, -{ HP_POP(clif->item_identify_list), HP_POP2(HP_clif_item_identify_list), 626 }, -{ HP_POP(clif->item_identified), HP_POP2(HP_clif_item_identified), 628 }, -{ HP_POP(clif->item_repair_list), HP_POP2(HP_clif_item_repair_list), 630 }, -{ HP_POP(clif->item_repaireffect), HP_POP2(HP_clif_item_repaireffect), 632 }, -{ HP_POP(clif->item_damaged), HP_POP2(HP_clif_item_damaged), 634 }, -{ HP_POP(clif->item_refine_list), HP_POP2(HP_clif_item_refine_list), 636 }, -{ HP_POP(clif->item_skill), HP_POP2(HP_clif_item_skill), 638 }, -{ HP_POP(clif->mvp_item), HP_POP2(HP_clif_mvp_item), 640 }, -{ HP_POP(clif->mvp_exp), HP_POP2(HP_clif_mvp_exp), 642 }, -{ HP_POP(clif->mvp_noitem), HP_POP2(HP_clif_mvp_noitem), 644 }, -{ HP_POP(clif->changed_dir), HP_POP2(HP_clif_changed_dir), 646 }, -{ HP_POP(clif->charnameack), HP_POP2(HP_clif_charnameack), 648 }, -{ HP_POP(clif->monster_hp_bar), HP_POP2(HP_clif_monster_hp_bar), 650 }, -{ HP_POP(clif->hpmeter), HP_POP2(HP_clif_hpmeter), 652 }, -{ HP_POP(clif->hpmeter_single), HP_POP2(HP_clif_hpmeter_single), 654 }, -{ HP_POP(clif->hpmeter_sub), HP_POP2(HP_clif_hpmeter_sub), 656 }, -{ HP_POP(clif->upgrademessage), HP_POP2(HP_clif_upgrademessage), 658 }, -{ HP_POP(clif->get_weapon_view), HP_POP2(HP_clif_get_weapon_view), 660 }, -{ HP_POP(clif->gospel_info), HP_POP2(HP_clif_gospel_info), 662 }, -{ HP_POP(clif->feel_req), HP_POP2(HP_clif_feel_req), 664 }, -{ HP_POP(clif->starskill), HP_POP2(HP_clif_starskill), 666 }, -{ HP_POP(clif->feel_info), HP_POP2(HP_clif_feel_info), 668 }, -{ HP_POP(clif->hate_info), HP_POP2(HP_clif_hate_info), 670 }, -{ HP_POP(clif->mission_info), HP_POP2(HP_clif_mission_info), 672 }, -{ HP_POP(clif->feel_hate_reset), HP_POP2(HP_clif_feel_hate_reset), 674 }, -{ HP_POP(clif->partytickack), HP_POP2(HP_clif_partytickack), 676 }, -{ HP_POP(clif->equiptickack), HP_POP2(HP_clif_equiptickack), 678 }, -{ HP_POP(clif->viewequip_ack), HP_POP2(HP_clif_viewequip_ack), 680 }, -{ HP_POP(clif->viewequip_fail), HP_POP2(HP_clif_viewequip_fail), 682 }, -{ HP_POP(clif->equpcheckbox), HP_POP2(HP_clif_equpcheckbox), 684 }, -{ HP_POP(clif->displayexp), HP_POP2(HP_clif_displayexp), 686 }, -{ HP_POP(clif->font), HP_POP2(HP_clif_font), 688 }, -{ HP_POP(clif->progressbar), HP_POP2(HP_clif_progressbar), 690 }, -{ HP_POP(clif->progressbar_abort), HP_POP2(HP_clif_progressbar_abort), 692 }, -{ HP_POP(clif->showdigit), HP_POP2(HP_clif_showdigit), 694 }, -{ HP_POP(clif->elementalconverter_list), HP_POP2(HP_clif_elementalconverter_list), 696 }, -{ HP_POP(clif->spellbook_list), HP_POP2(HP_clif_spellbook_list), 698 }, -{ HP_POP(clif->magicdecoy_list), HP_POP2(HP_clif_magicdecoy_list), 700 }, -{ HP_POP(clif->poison_list), HP_POP2(HP_clif_poison_list), 702 }, -{ HP_POP(clif->autoshadowspell_list), HP_POP2(HP_clif_autoshadowspell_list), 704 }, -{ HP_POP(clif->skill_itemlistwindow), HP_POP2(HP_clif_skill_itemlistwindow), 706 }, -{ HP_POP(clif->sc_load), HP_POP2(HP_clif_sc_load), 708 }, -{ HP_POP(clif->sc_end), HP_POP2(HP_clif_sc_end), 710 }, -{ HP_POP(clif->initialstatus), HP_POP2(HP_clif_initialstatus), 712 }, -{ HP_POP(clif->cooldown_list), HP_POP2(HP_clif_cooldown_list), 714 }, -{ HP_POP(clif->updatestatus), HP_POP2(HP_clif_updatestatus), 716 }, -{ HP_POP(clif->changestatus), HP_POP2(HP_clif_changestatus), 718 }, -{ HP_POP(clif->statusupack), HP_POP2(HP_clif_statusupack), 720 }, -{ HP_POP(clif->movetoattack), HP_POP2(HP_clif_movetoattack), 722 }, -{ HP_POP(clif->solved_charname), HP_POP2(HP_clif_solved_charname), 724 }, -{ HP_POP(clif->charnameupdate), HP_POP2(HP_clif_charnameupdate), 726 }, -{ HP_POP(clif->delayquit), HP_POP2(HP_clif_delayquit), 728 }, -{ HP_POP(clif->getareachar_pc), HP_POP2(HP_clif_getareachar_pc), 730 }, -{ HP_POP(clif->disconnect_ack), HP_POP2(HP_clif_disconnect_ack), 732 }, -{ HP_POP(clif->PVPInfo), HP_POP2(HP_clif_PVPInfo), 734 }, -{ HP_POP(clif->blacksmith), HP_POP2(HP_clif_blacksmith), 736 }, -{ HP_POP(clif->alchemist), HP_POP2(HP_clif_alchemist), 738 }, -{ HP_POP(clif->taekwon), HP_POP2(HP_clif_taekwon), 740 }, -{ HP_POP(clif->ranking_pk), HP_POP2(HP_clif_ranking_pk), 742 }, -{ HP_POP(clif->quitsave), HP_POP2(HP_clif_quitsave), 744 }, -{ HP_POP(clif->misceffect), HP_POP2(HP_clif_misceffect), 746 }, -{ HP_POP(clif->changeoption), HP_POP2(HP_clif_changeoption), 748 }, -{ HP_POP(clif->changeoption2), HP_POP2(HP_clif_changeoption2), 750 }, -{ HP_POP(clif->emotion), HP_POP2(HP_clif_emotion), 752 }, -{ HP_POP(clif->talkiebox), HP_POP2(HP_clif_talkiebox), 754 }, -{ HP_POP(clif->wedding_effect), HP_POP2(HP_clif_wedding_effect), 756 }, -{ HP_POP(clif->divorced), HP_POP2(HP_clif_divorced), 758 }, -{ HP_POP(clif->callpartner), HP_POP2(HP_clif_callpartner), 760 }, -{ HP_POP(clif->skill_damage), HP_POP2(HP_clif_skill_damage), 762 }, -{ HP_POP(clif->skill_nodamage), HP_POP2(HP_clif_skill_nodamage), 764 }, -{ HP_POP(clif->skill_poseffect), HP_POP2(HP_clif_skill_poseffect), 766 }, -{ HP_POP(clif->skill_estimation), HP_POP2(HP_clif_skill_estimation), 768 }, -{ HP_POP(clif->skill_warppoint), HP_POP2(HP_clif_skill_warppoint), 770 }, -{ HP_POP(clif->skillcasting), HP_POP2(HP_clif_skillcasting), 772 }, -{ HP_POP(clif->produce_effect), HP_POP2(HP_clif_produce_effect), 774 }, -{ HP_POP(clif->devotion), HP_POP2(HP_clif_devotion), 776 }, -{ HP_POP(clif->spiritball), HP_POP2(HP_clif_spiritball), 778 }, -{ HP_POP(clif->spiritball_single), HP_POP2(HP_clif_spiritball_single), 780 }, -{ HP_POP(clif->bladestop), HP_POP2(HP_clif_bladestop), 782 }, -{ HP_POP(clif->mvp_effect), HP_POP2(HP_clif_mvp_effect), 784 }, -{ HP_POP(clif->heal), HP_POP2(HP_clif_heal), 786 }, -{ HP_POP(clif->resurrection), HP_POP2(HP_clif_resurrection), 788 }, -{ HP_POP(clif->refine), HP_POP2(HP_clif_refine), 790 }, -{ HP_POP(clif->weather), HP_POP2(HP_clif_weather), 792 }, -{ HP_POP(clif->specialeffect), HP_POP2(HP_clif_specialeffect), 794 }, -{ HP_POP(clif->specialeffect_single), HP_POP2(HP_clif_specialeffect_single), 796 }, -{ HP_POP(clif->specialeffect_value), HP_POP2(HP_clif_specialeffect_value), 798 }, -{ HP_POP(clif->millenniumshield), HP_POP2(HP_clif_millenniumshield), 800 }, -{ HP_POP(clif->charm), HP_POP2(HP_clif_charm), 802 }, -{ HP_POP(clif->charm_single), HP_POP2(HP_clif_charm_single), 804 }, -{ HP_POP(clif->snap), HP_POP2(HP_clif_snap), 806 }, -{ HP_POP(clif->weather_check), HP_POP2(HP_clif_weather_check), 808 }, -{ HP_POP(clif->playBGM), HP_POP2(HP_clif_playBGM), 810 }, -{ HP_POP(clif->soundeffect), HP_POP2(HP_clif_soundeffect), 812 }, -{ HP_POP(clif->soundeffectall), HP_POP2(HP_clif_soundeffectall), 814 }, -{ HP_POP(clif->GlobalMessage), HP_POP2(HP_clif_GlobalMessage), 816 }, -{ HP_POP(clif->createchat), HP_POP2(HP_clif_createchat), 818 }, -{ HP_POP(clif->dispchat), HP_POP2(HP_clif_dispchat), 820 }, -{ HP_POP(clif->joinchatfail), HP_POP2(HP_clif_joinchatfail), 822 }, -{ HP_POP(clif->joinchatok), HP_POP2(HP_clif_joinchatok), 824 }, -{ HP_POP(clif->addchat), HP_POP2(HP_clif_addchat), 826 }, -{ HP_POP(clif->changechatowner), HP_POP2(HP_clif_changechatowner), 828 }, -{ HP_POP(clif->clearchat), HP_POP2(HP_clif_clearchat), 830 }, -{ HP_POP(clif->leavechat), HP_POP2(HP_clif_leavechat), 832 }, -{ HP_POP(clif->changechatstatus), HP_POP2(HP_clif_changechatstatus), 834 }, -{ HP_POP(clif->wis_message), HP_POP2(HP_clif_wis_message), 836 }, -{ HP_POP(clif->wis_end), HP_POP2(HP_clif_wis_end), 838 }, -{ HP_POP(clif->disp_onlyself), HP_POP2(HP_clif_disp_onlyself), 840 }, -{ HP_POP(clif->disp_message), HP_POP2(HP_clif_disp_message), 842 }, -{ HP_POP(clif->broadcast), HP_POP2(HP_clif_broadcast), 844 }, -{ HP_POP(clif->broadcast2), HP_POP2(HP_clif_broadcast2), 846 }, -{ HP_POP(clif->messagecolor), HP_POP2(HP_clif_messagecolor), 848 }, -{ HP_POP(clif->disp_overhead), HP_POP2(HP_clif_disp_overhead), 850 }, -{ HP_POP(clif->msg), HP_POP2(HP_clif_msg), 852 }, -{ HP_POP(clif->msg_value), HP_POP2(HP_clif_msg_value), 854 }, -{ HP_POP(clif->msg_skill), HP_POP2(HP_clif_msg_skill), 856 }, -{ HP_POP(clif->msgtable), HP_POP2(HP_clif_msgtable), 858 }, -{ HP_POP(clif->msgtable_num), HP_POP2(HP_clif_msgtable_num), 860 }, -{ HP_POP(clif->message), HP_POP2(HP_clif_message), 862 }, -{ HP_POP(clif->messageln), HP_POP2(HP_clif_messageln), 864 }, -{ HP_POP(clif->colormes), HP_POP2(HP_clif_colormes), 866 }, -{ HP_POP(clif->process_message), HP_POP2(HP_clif_process_message), 868 }, -{ HP_POP(clif->wisexin), HP_POP2(HP_clif_wisexin), 870 }, -{ HP_POP(clif->wisall), HP_POP2(HP_clif_wisall), 872 }, -{ HP_POP(clif->PMIgnoreList), HP_POP2(HP_clif_PMIgnoreList), 874 }, -{ HP_POP(clif->traderequest), HP_POP2(HP_clif_traderequest), 876 }, -{ HP_POP(clif->tradestart), HP_POP2(HP_clif_tradestart), 878 }, -{ HP_POP(clif->tradeadditem), HP_POP2(HP_clif_tradeadditem), 880 }, -{ HP_POP(clif->tradeitemok), HP_POP2(HP_clif_tradeitemok), 882 }, -{ HP_POP(clif->tradedeal_lock), HP_POP2(HP_clif_tradedeal_lock), 884 }, -{ HP_POP(clif->tradecancelled), HP_POP2(HP_clif_tradecancelled), 886 }, -{ HP_POP(clif->tradecompleted), HP_POP2(HP_clif_tradecompleted), 888 }, -{ HP_POP(clif->tradeundo), HP_POP2(HP_clif_tradeundo), 890 }, -{ HP_POP(clif->openvendingreq), HP_POP2(HP_clif_openvendingreq), 892 }, -{ HP_POP(clif->showvendingboard), HP_POP2(HP_clif_showvendingboard), 894 }, -{ HP_POP(clif->closevendingboard), HP_POP2(HP_clif_closevendingboard), 896 }, -{ HP_POP(clif->vendinglist), HP_POP2(HP_clif_vendinglist), 898 }, -{ HP_POP(clif->buyvending), HP_POP2(HP_clif_buyvending), 900 }, -{ HP_POP(clif->openvending), HP_POP2(HP_clif_openvending), 902 }, -{ HP_POP(clif->vendingreport), HP_POP2(HP_clif_vendingreport), 904 }, -{ HP_POP(clif->storagelist), HP_POP2(HP_clif_storagelist), 906 }, -{ HP_POP(clif->updatestorageamount), HP_POP2(HP_clif_updatestorageamount), 908 }, -{ HP_POP(clif->storageitemadded), HP_POP2(HP_clif_storageitemadded), 910 }, -{ HP_POP(clif->storageitemremoved), HP_POP2(HP_clif_storageitemremoved), 912 }, -{ HP_POP(clif->storageclose), HP_POP2(HP_clif_storageclose), 914 }, -{ HP_POP(clif->skillinfoblock), HP_POP2(HP_clif_skillinfoblock), 916 }, -{ HP_POP(clif->skillup), HP_POP2(HP_clif_skillup), 918 }, -{ HP_POP(clif->skillinfo), HP_POP2(HP_clif_skillinfo), 920 }, -{ HP_POP(clif->addskill), HP_POP2(HP_clif_addskill), 922 }, -{ HP_POP(clif->deleteskill), HP_POP2(HP_clif_deleteskill), 924 }, -{ HP_POP(clif->party_created), HP_POP2(HP_clif_party_created), 926 }, -{ HP_POP(clif->party_member_info), HP_POP2(HP_clif_party_member_info), 928 }, -{ HP_POP(clif->party_info), HP_POP2(HP_clif_party_info), 930 }, -{ HP_POP(clif->party_invite), HP_POP2(HP_clif_party_invite), 932 }, -{ HP_POP(clif->party_inviteack), HP_POP2(HP_clif_party_inviteack), 934 }, -{ HP_POP(clif->party_option), HP_POP2(HP_clif_party_option), 936 }, -{ HP_POP(clif->party_withdraw), HP_POP2(HP_clif_party_withdraw), 938 }, -{ HP_POP(clif->party_message), HP_POP2(HP_clif_party_message), 940 }, -{ HP_POP(clif->party_xy), HP_POP2(HP_clif_party_xy), 942 }, -{ HP_POP(clif->party_xy_single), HP_POP2(HP_clif_party_xy_single), 944 }, -{ HP_POP(clif->party_hp), HP_POP2(HP_clif_party_hp), 946 }, -{ HP_POP(clif->party_xy_remove), HP_POP2(HP_clif_party_xy_remove), 948 }, -{ HP_POP(clif->party_show_picker), HP_POP2(HP_clif_party_show_picker), 950 }, -{ HP_POP(clif->partyinvitationstate), HP_POP2(HP_clif_partyinvitationstate), 952 }, -{ HP_POP(clif->guild_created), HP_POP2(HP_clif_guild_created), 954 }, -{ HP_POP(clif->guild_belonginfo), HP_POP2(HP_clif_guild_belonginfo), 956 }, -{ HP_POP(clif->guild_masterormember), HP_POP2(HP_clif_guild_masterormember), 958 }, -{ HP_POP(clif->guild_basicinfo), HP_POP2(HP_clif_guild_basicinfo), 960 }, -{ HP_POP(clif->guild_allianceinfo), HP_POP2(HP_clif_guild_allianceinfo), 962 }, -{ HP_POP(clif->guild_memberlist), HP_POP2(HP_clif_guild_memberlist), 964 }, -{ HP_POP(clif->guild_skillinfo), HP_POP2(HP_clif_guild_skillinfo), 966 }, -{ HP_POP(clif->guild_send_onlineinfo), HP_POP2(HP_clif_guild_send_onlineinfo), 968 }, -{ HP_POP(clif->guild_memberlogin_notice), HP_POP2(HP_clif_guild_memberlogin_notice), 970 }, -{ HP_POP(clif->guild_invite), HP_POP2(HP_clif_guild_invite), 972 }, -{ HP_POP(clif->guild_inviteack), HP_POP2(HP_clif_guild_inviteack), 974 }, -{ HP_POP(clif->guild_leave), HP_POP2(HP_clif_guild_leave), 976 }, -{ HP_POP(clif->guild_expulsion), HP_POP2(HP_clif_guild_expulsion), 978 }, -{ HP_POP(clif->guild_positionchanged), HP_POP2(HP_clif_guild_positionchanged), 980 }, -{ HP_POP(clif->guild_memberpositionchanged), HP_POP2(HP_clif_guild_memberpositionchanged), 982 }, -{ HP_POP(clif->guild_emblem), HP_POP2(HP_clif_guild_emblem), 984 }, -{ HP_POP(clif->guild_emblem_area), HP_POP2(HP_clif_guild_emblem_area), 986 }, -{ HP_POP(clif->guild_notice), HP_POP2(HP_clif_guild_notice), 988 }, -{ HP_POP(clif->guild_message), HP_POP2(HP_clif_guild_message), 990 }, -{ HP_POP(clif->guild_skillup), HP_POP2(HP_clif_guild_skillup), 992 }, -{ HP_POP(clif->guild_reqalliance), HP_POP2(HP_clif_guild_reqalliance), 994 }, -{ HP_POP(clif->guild_allianceack), HP_POP2(HP_clif_guild_allianceack), 996 }, -{ HP_POP(clif->guild_delalliance), HP_POP2(HP_clif_guild_delalliance), 998 }, -{ HP_POP(clif->guild_oppositionack), HP_POP2(HP_clif_guild_oppositionack), 1000 }, -{ HP_POP(clif->guild_broken), HP_POP2(HP_clif_guild_broken), 1002 }, -{ HP_POP(clif->guild_xy), HP_POP2(HP_clif_guild_xy), 1004 }, -{ HP_POP(clif->guild_xy_single), HP_POP2(HP_clif_guild_xy_single), 1006 }, -{ HP_POP(clif->guild_xy_remove), HP_POP2(HP_clif_guild_xy_remove), 1008 }, -{ HP_POP(clif->guild_positionnamelist), HP_POP2(HP_clif_guild_positionnamelist), 1010 }, -{ HP_POP(clif->guild_positioninfolist), HP_POP2(HP_clif_guild_positioninfolist), 1012 }, -{ HP_POP(clif->guild_expulsionlist), HP_POP2(HP_clif_guild_expulsionlist), 1014 }, -{ HP_POP(clif->validate_emblem), HP_POP2(HP_clif_validate_emblem), 1016 }, -{ HP_POP(clif->bg_hp), HP_POP2(HP_clif_bg_hp), 1018 }, -{ HP_POP(clif->bg_xy), HP_POP2(HP_clif_bg_xy), 1020 }, -{ HP_POP(clif->bg_xy_remove), HP_POP2(HP_clif_bg_xy_remove), 1022 }, -{ HP_POP(clif->bg_message), HP_POP2(HP_clif_bg_message), 1024 }, -{ HP_POP(clif->bg_updatescore), HP_POP2(HP_clif_bg_updatescore), 1026 }, -{ HP_POP(clif->bg_updatescore_single), HP_POP2(HP_clif_bg_updatescore_single), 1028 }, -{ HP_POP(clif->sendbgemblem_area), HP_POP2(HP_clif_sendbgemblem_area), 1030 }, -{ HP_POP(clif->sendbgemblem_single), HP_POP2(HP_clif_sendbgemblem_single), 1032 }, -{ HP_POP(clif->instance), HP_POP2(HP_clif_instance), 1034 }, -{ HP_POP(clif->instance_join), HP_POP2(HP_clif_instance_join), 1036 }, -{ HP_POP(clif->instance_leave), HP_POP2(HP_clif_instance_leave), 1038 }, -{ HP_POP(clif->catch_process), HP_POP2(HP_clif_catch_process), 1040 }, -{ HP_POP(clif->pet_roulette), HP_POP2(HP_clif_pet_roulette), 1042 }, -{ HP_POP(clif->sendegg), HP_POP2(HP_clif_sendegg), 1044 }, -{ HP_POP(clif->send_petstatus), HP_POP2(HP_clif_send_petstatus), 1046 }, -{ HP_POP(clif->send_petdata), HP_POP2(HP_clif_send_petdata), 1048 }, -{ HP_POP(clif->pet_emotion), HP_POP2(HP_clif_pet_emotion), 1050 }, -{ HP_POP(clif->pet_food), HP_POP2(HP_clif_pet_food), 1052 }, -{ HP_POP(clif->friendslist_toggle_sub), HP_POP2(HP_clif_friendslist_toggle_sub), 1054 }, -{ HP_POP(clif->friendslist_send), HP_POP2(HP_clif_friendslist_send), 1056 }, -{ HP_POP(clif->friendslist_reqack), HP_POP2(HP_clif_friendslist_reqack), 1058 }, -{ HP_POP(clif->friendslist_toggle), HP_POP2(HP_clif_friendslist_toggle), 1060 }, -{ HP_POP(clif->friendlist_req), HP_POP2(HP_clif_friendlist_req), 1062 }, -{ HP_POP(clif->GM_kickack), HP_POP2(HP_clif_GM_kickack), 1064 }, -{ HP_POP(clif->GM_kick), HP_POP2(HP_clif_GM_kick), 1066 }, -{ HP_POP(clif->manner_message), HP_POP2(HP_clif_manner_message), 1068 }, -{ HP_POP(clif->GM_silence), HP_POP2(HP_clif_GM_silence), 1070 }, -{ HP_POP(clif->account_name), HP_POP2(HP_clif_account_name), 1072 }, -{ HP_POP(clif->check), HP_POP2(HP_clif_check), 1074 }, -{ HP_POP(clif->hominfo), HP_POP2(HP_clif_hominfo), 1076 }, -{ HP_POP(clif->homskillinfoblock), HP_POP2(HP_clif_homskillinfoblock), 1078 }, -{ HP_POP(clif->homskillup), HP_POP2(HP_clif_homskillup), 1080 }, -{ HP_POP(clif->hom_food), HP_POP2(HP_clif_hom_food), 1082 }, -{ HP_POP(clif->send_homdata), HP_POP2(HP_clif_send_homdata), 1084 }, -{ HP_POP(clif->quest_send_list), HP_POP2(HP_clif_quest_send_list), 1086 }, -{ HP_POP(clif->quest_send_mission), HP_POP2(HP_clif_quest_send_mission), 1088 }, -{ HP_POP(clif->quest_add), HP_POP2(HP_clif_quest_add), 1090 }, -{ HP_POP(clif->quest_delete), HP_POP2(HP_clif_quest_delete), 1092 }, -{ HP_POP(clif->quest_update_status), HP_POP2(HP_clif_quest_update_status), 1094 }, -{ HP_POP(clif->quest_update_objective), HP_POP2(HP_clif_quest_update_objective), 1096 }, -{ HP_POP(clif->quest_show_event), HP_POP2(HP_clif_quest_show_event), 1098 }, -{ HP_POP(clif->mail_window), HP_POP2(HP_clif_mail_window), 1100 }, -{ HP_POP(clif->mail_read), HP_POP2(HP_clif_mail_read), 1102 }, -{ HP_POP(clif->mail_delete), HP_POP2(HP_clif_mail_delete), 1104 }, -{ HP_POP(clif->mail_return), HP_POP2(HP_clif_mail_return), 1106 }, -{ HP_POP(clif->mail_send), HP_POP2(HP_clif_mail_send), 1108 }, -{ HP_POP(clif->mail_new), HP_POP2(HP_clif_mail_new), 1110 }, -{ HP_POP(clif->mail_refreshinbox), HP_POP2(HP_clif_mail_refreshinbox), 1112 }, -{ HP_POP(clif->mail_getattachment), HP_POP2(HP_clif_mail_getattachment), 1114 }, -{ HP_POP(clif->mail_setattachment), HP_POP2(HP_clif_mail_setattachment), 1116 }, -{ HP_POP(clif->auction_openwindow), HP_POP2(HP_clif_auction_openwindow), 1118 }, -{ HP_POP(clif->auction_results), HP_POP2(HP_clif_auction_results), 1120 }, -{ HP_POP(clif->auction_message), HP_POP2(HP_clif_auction_message), 1122 }, -{ HP_POP(clif->auction_close), HP_POP2(HP_clif_auction_close), 1124 }, -{ HP_POP(clif->auction_setitem), HP_POP2(HP_clif_auction_setitem), 1126 }, -{ HP_POP(clif->mercenary_info), HP_POP2(HP_clif_mercenary_info), 1128 }, -{ HP_POP(clif->mercenary_skillblock), HP_POP2(HP_clif_mercenary_skillblock), 1130 }, -{ HP_POP(clif->mercenary_message), HP_POP2(HP_clif_mercenary_message), 1132 }, -{ HP_POP(clif->mercenary_updatestatus), HP_POP2(HP_clif_mercenary_updatestatus), 1134 }, -{ HP_POP(clif->rental_time), HP_POP2(HP_clif_rental_time), 1136 }, -{ HP_POP(clif->rental_expired), HP_POP2(HP_clif_rental_expired), 1138 }, -{ HP_POP(clif->PartyBookingRegisterAck), HP_POP2(HP_clif_PartyBookingRegisterAck), 1140 }, -{ HP_POP(clif->PartyBookingDeleteAck), HP_POP2(HP_clif_PartyBookingDeleteAck), 1142 }, -{ HP_POP(clif->PartyBookingSearchAck), HP_POP2(HP_clif_PartyBookingSearchAck), 1144 }, -{ HP_POP(clif->PartyBookingUpdateNotify), HP_POP2(HP_clif_PartyBookingUpdateNotify), 1146 }, -{ HP_POP(clif->PartyBookingDeleteNotify), HP_POP2(HP_clif_PartyBookingDeleteNotify), 1148 }, -{ HP_POP(clif->PartyBookingInsertNotify), HP_POP2(HP_clif_PartyBookingInsertNotify), 1150 }, -{ HP_POP(clif->PartyBookingVolunteerInfo), HP_POP2(HP_clif_PartyBookingVolunteerInfo), 1152 }, -{ HP_POP(clif->PartyBookingRefuseVolunteer), HP_POP2(HP_clif_PartyBookingRefuseVolunteer), 1154 }, -{ HP_POP(clif->PartyBookingCancelVolunteer), HP_POP2(HP_clif_PartyBookingCancelVolunteer), 1156 }, -{ HP_POP(clif->PartyBookingAddFilteringList), HP_POP2(HP_clif_PartyBookingAddFilteringList), 1158 }, -{ HP_POP(clif->PartyBookingSubFilteringList), HP_POP2(HP_clif_PartyBookingSubFilteringList), 1160 }, -{ HP_POP(clif->buyingstore_open), HP_POP2(HP_clif_buyingstore_open), 1162 }, -{ HP_POP(clif->buyingstore_open_failed), HP_POP2(HP_clif_buyingstore_open_failed), 1164 }, -{ HP_POP(clif->buyingstore_myitemlist), HP_POP2(HP_clif_buyingstore_myitemlist), 1166 }, -{ HP_POP(clif->buyingstore_entry), HP_POP2(HP_clif_buyingstore_entry), 1168 }, -{ HP_POP(clif->buyingstore_entry_single), HP_POP2(HP_clif_buyingstore_entry_single), 1170 }, -{ HP_POP(clif->buyingstore_disappear_entry), HP_POP2(HP_clif_buyingstore_disappear_entry), 1172 }, -{ HP_POP(clif->buyingstore_disappear_entry_single), HP_POP2(HP_clif_buyingstore_disappear_entry_single), 1174 }, -{ HP_POP(clif->buyingstore_itemlist), HP_POP2(HP_clif_buyingstore_itemlist), 1176 }, -{ HP_POP(clif->buyingstore_trade_failed_buyer), HP_POP2(HP_clif_buyingstore_trade_failed_buyer), 1178 }, -{ HP_POP(clif->buyingstore_update_item), HP_POP2(HP_clif_buyingstore_update_item), 1180 }, -{ HP_POP(clif->buyingstore_delete_item), HP_POP2(HP_clif_buyingstore_delete_item), 1182 }, -{ HP_POP(clif->buyingstore_trade_failed_seller), HP_POP2(HP_clif_buyingstore_trade_failed_seller), 1184 }, -{ HP_POP(clif->search_store_info_ack), HP_POP2(HP_clif_search_store_info_ack), 1186 }, -{ HP_POP(clif->search_store_info_failed), HP_POP2(HP_clif_search_store_info_failed), 1188 }, -{ HP_POP(clif->open_search_store_info), HP_POP2(HP_clif_open_search_store_info), 1190 }, -{ HP_POP(clif->search_store_info_click_ack), HP_POP2(HP_clif_search_store_info_click_ack), 1192 }, -{ HP_POP(clif->elemental_info), HP_POP2(HP_clif_elemental_info), 1194 }, -{ HP_POP(clif->elemental_updatestatus), HP_POP2(HP_clif_elemental_updatestatus), 1196 }, -{ HP_POP(clif->bgqueue_ack), HP_POP2(HP_clif_bgqueue_ack), 1198 }, -{ HP_POP(clif->bgqueue_notice_delete), HP_POP2(HP_clif_bgqueue_notice_delete), 1200 }, -{ HP_POP(clif->bgqueue_update_info), HP_POP2(HP_clif_bgqueue_update_info), 1202 }, -{ HP_POP(clif->bgqueue_joined), HP_POP2(HP_clif_bgqueue_joined), 1204 }, -{ HP_POP(clif->bgqueue_pcleft), HP_POP2(HP_clif_bgqueue_pcleft), 1206 }, -{ HP_POP(clif->bgqueue_battlebegins), HP_POP2(HP_clif_bgqueue_battlebegins), 1208 }, -{ HP_POP(clif->adopt_reply), HP_POP2(HP_clif_adopt_reply), 1210 }, -{ HP_POP(clif->adopt_request), HP_POP2(HP_clif_adopt_request), 1212 }, -{ HP_POP(clif->readbook), HP_POP2(HP_clif_readbook), 1214 }, -{ HP_POP(clif->notify_time), HP_POP2(HP_clif_notify_time), 1216 }, -{ HP_POP(clif->user_count), HP_POP2(HP_clif_user_count), 1218 }, -{ HP_POP(clif->noask_sub), HP_POP2(HP_clif_noask_sub), 1220 }, -{ HP_POP(clif->bc_ready), HP_POP2(HP_clif_bc_ready), 1222 }, -{ HP_POP(clif->undisguise_timer), HP_POP2(HP_clif_undisguise_timer), 1224 }, -{ HP_POP(clif->chsys_create), HP_POP2(HP_clif_chsys_create), 1226 }, -{ HP_POP(clif->chsys_msg), HP_POP2(HP_clif_chsys_msg), 1228 }, -{ HP_POP(clif->chsys_msg2), HP_POP2(HP_clif_chsys_msg2), 1230 }, -{ HP_POP(clif->chsys_send), HP_POP2(HP_clif_chsys_send), 1232 }, -{ HP_POP(clif->chsys_join), HP_POP2(HP_clif_chsys_join), 1234 }, -{ HP_POP(clif->chsys_left), HP_POP2(HP_clif_chsys_left), 1236 }, -{ HP_POP(clif->chsys_delete), HP_POP2(HP_clif_chsys_delete), 1238 }, -{ HP_POP(clif->chsys_mjoin), HP_POP2(HP_clif_chsys_mjoin), 1240 }, -{ HP_POP(clif->chsys_quit), HP_POP2(HP_clif_chsys_quit), 1242 }, -{ HP_POP(clif->chsys_quitg), HP_POP2(HP_clif_chsys_quitg), 1244 }, -{ HP_POP(clif->chsys_gjoin), HP_POP2(HP_clif_chsys_gjoin), 1246 }, -{ HP_POP(clif->chsys_gleave), HP_POP2(HP_clif_chsys_gleave), 1248 }, -{ HP_POP(clif->pWantToConnection), HP_POP2(HP_clif_pWantToConnection), 1250 }, -{ HP_POP(clif->pLoadEndAck), HP_POP2(HP_clif_pLoadEndAck), 1252 }, -{ HP_POP(clif->pTickSend), HP_POP2(HP_clif_pTickSend), 1254 }, -{ HP_POP(clif->pHotkey), HP_POP2(HP_clif_pHotkey), 1256 }, -{ HP_POP(clif->pProgressbar), HP_POP2(HP_clif_pProgressbar), 1258 }, -{ HP_POP(clif->pWalkToXY), HP_POP2(HP_clif_pWalkToXY), 1260 }, -{ HP_POP(clif->pQuitGame), HP_POP2(HP_clif_pQuitGame), 1262 }, -{ HP_POP(clif->pGetCharNameRequest), HP_POP2(HP_clif_pGetCharNameRequest), 1264 }, -{ HP_POP(clif->pGlobalMessage), HP_POP2(HP_clif_pGlobalMessage), 1266 }, -{ HP_POP(clif->pMapMove), HP_POP2(HP_clif_pMapMove), 1268 }, -{ HP_POP(clif->pChangeDir), HP_POP2(HP_clif_pChangeDir), 1270 }, -{ HP_POP(clif->pEmotion), HP_POP2(HP_clif_pEmotion), 1272 }, -{ HP_POP(clif->pHowManyConnections), HP_POP2(HP_clif_pHowManyConnections), 1274 }, -{ HP_POP(clif->pActionRequest), HP_POP2(HP_clif_pActionRequest), 1276 }, -{ HP_POP(clif->pActionRequest_sub), HP_POP2(HP_clif_pActionRequest_sub), 1278 }, -{ HP_POP(clif->pRestart), HP_POP2(HP_clif_pRestart), 1280 }, -{ HP_POP(clif->pWisMessage), HP_POP2(HP_clif_pWisMessage), 1282 }, -{ HP_POP(clif->pBroadcast), HP_POP2(HP_clif_pBroadcast), 1284 }, -{ HP_POP(clif->pTakeItem), HP_POP2(HP_clif_pTakeItem), 1286 }, -{ HP_POP(clif->pDropItem), HP_POP2(HP_clif_pDropItem), 1288 }, -{ HP_POP(clif->pUseItem), HP_POP2(HP_clif_pUseItem), 1290 }, -{ HP_POP(clif->pEquipItem), HP_POP2(HP_clif_pEquipItem), 1292 }, -{ HP_POP(clif->pUnequipItem), HP_POP2(HP_clif_pUnequipItem), 1294 }, -{ HP_POP(clif->pNpcClicked), HP_POP2(HP_clif_pNpcClicked), 1296 }, -{ HP_POP(clif->pNpcBuySellSelected), HP_POP2(HP_clif_pNpcBuySellSelected), 1298 }, -{ HP_POP(clif->pNpcBuyListSend), HP_POP2(HP_clif_pNpcBuyListSend), 1300 }, -{ HP_POP(clif->pNpcSellListSend), HP_POP2(HP_clif_pNpcSellListSend), 1302 }, -{ HP_POP(clif->pCreateChatRoom), HP_POP2(HP_clif_pCreateChatRoom), 1304 }, -{ HP_POP(clif->pChatAddMember), HP_POP2(HP_clif_pChatAddMember), 1306 }, -{ HP_POP(clif->pChatRoomStatusChange), HP_POP2(HP_clif_pChatRoomStatusChange), 1308 }, -{ HP_POP(clif->pChangeChatOwner), HP_POP2(HP_clif_pChangeChatOwner), 1310 }, -{ HP_POP(clif->pKickFromChat), HP_POP2(HP_clif_pKickFromChat), 1312 }, -{ HP_POP(clif->pChatLeave), HP_POP2(HP_clif_pChatLeave), 1314 }, -{ HP_POP(clif->pTradeRequest), HP_POP2(HP_clif_pTradeRequest), 1316 }, -{ HP_POP(clif->chann_config_read), HP_POP2(HP_clif_chann_config_read), 1318 }, -{ HP_POP(clif->pTradeAck), HP_POP2(HP_clif_pTradeAck), 1320 }, -{ HP_POP(clif->pTradeAddItem), HP_POP2(HP_clif_pTradeAddItem), 1322 }, -{ HP_POP(clif->pTradeOk), HP_POP2(HP_clif_pTradeOk), 1324 }, -{ HP_POP(clif->pTradeCancel), HP_POP2(HP_clif_pTradeCancel), 1326 }, -{ HP_POP(clif->pTradeCommit), HP_POP2(HP_clif_pTradeCommit), 1328 }, -{ HP_POP(clif->pStopAttack), HP_POP2(HP_clif_pStopAttack), 1330 }, -{ HP_POP(clif->pPutItemToCart), HP_POP2(HP_clif_pPutItemToCart), 1332 }, -{ HP_POP(clif->pGetItemFromCart), HP_POP2(HP_clif_pGetItemFromCart), 1334 }, -{ HP_POP(clif->pRemoveOption), HP_POP2(HP_clif_pRemoveOption), 1336 }, -{ HP_POP(clif->pChangeCart), HP_POP2(HP_clif_pChangeCart), 1338 }, -{ HP_POP(clif->pStatusUp), HP_POP2(HP_clif_pStatusUp), 1340 }, -{ HP_POP(clif->pSkillUp), HP_POP2(HP_clif_pSkillUp), 1342 }, -{ HP_POP(clif->pUseSkillToId), HP_POP2(HP_clif_pUseSkillToId), 1344 }, -{ HP_POP(clif->pUseSkillToId_homun), HP_POP2(HP_clif_pUseSkillToId_homun), 1346 }, -{ HP_POP(clif->pUseSkillToId_mercenary), HP_POP2(HP_clif_pUseSkillToId_mercenary), 1348 }, -{ HP_POP(clif->pUseSkillToPos), HP_POP2(HP_clif_pUseSkillToPos), 1350 }, -{ HP_POP(clif->pUseSkillToPosSub), HP_POP2(HP_clif_pUseSkillToPosSub), 1352 }, -{ HP_POP(clif->pUseSkillToPos_homun), HP_POP2(HP_clif_pUseSkillToPos_homun), 1354 }, -{ HP_POP(clif->pUseSkillToPos_mercenary), HP_POP2(HP_clif_pUseSkillToPos_mercenary), 1356 }, -{ HP_POP(clif->pUseSkillToPosMoreInfo), HP_POP2(HP_clif_pUseSkillToPosMoreInfo), 1358 }, -{ HP_POP(clif->pUseSkillMap), HP_POP2(HP_clif_pUseSkillMap), 1360 }, -{ HP_POP(clif->pRequestMemo), HP_POP2(HP_clif_pRequestMemo), 1362 }, -{ HP_POP(clif->pProduceMix), HP_POP2(HP_clif_pProduceMix), 1364 }, -{ HP_POP(clif->pCooking), HP_POP2(HP_clif_pCooking), 1366 }, -{ HP_POP(clif->pRepairItem), HP_POP2(HP_clif_pRepairItem), 1368 }, -{ HP_POP(clif->pWeaponRefine), HP_POP2(HP_clif_pWeaponRefine), 1370 }, -{ HP_POP(clif->pNpcSelectMenu), HP_POP2(HP_clif_pNpcSelectMenu), 1372 }, -{ HP_POP(clif->pNpcNextClicked), HP_POP2(HP_clif_pNpcNextClicked), 1374 }, -{ HP_POP(clif->pNpcAmountInput), HP_POP2(HP_clif_pNpcAmountInput), 1376 }, -{ HP_POP(clif->pNpcStringInput), HP_POP2(HP_clif_pNpcStringInput), 1378 }, -{ HP_POP(clif->pNpcCloseClicked), HP_POP2(HP_clif_pNpcCloseClicked), 1380 }, -{ HP_POP(clif->pItemIdentify), HP_POP2(HP_clif_pItemIdentify), 1382 }, -{ HP_POP(clif->pSelectArrow), HP_POP2(HP_clif_pSelectArrow), 1384 }, -{ HP_POP(clif->pAutoSpell), HP_POP2(HP_clif_pAutoSpell), 1386 }, -{ HP_POP(clif->pUseCard), HP_POP2(HP_clif_pUseCard), 1388 }, -{ HP_POP(clif->pInsertCard), HP_POP2(HP_clif_pInsertCard), 1390 }, -{ HP_POP(clif->pSolveCharName), HP_POP2(HP_clif_pSolveCharName), 1392 }, -{ HP_POP(clif->pResetChar), HP_POP2(HP_clif_pResetChar), 1394 }, -{ HP_POP(clif->pLocalBroadcast), HP_POP2(HP_clif_pLocalBroadcast), 1396 }, -{ HP_POP(clif->pMoveToKafra), HP_POP2(HP_clif_pMoveToKafra), 1398 }, -{ HP_POP(clif->pMoveFromKafra), HP_POP2(HP_clif_pMoveFromKafra), 1400 }, -{ HP_POP(clif->pMoveToKafraFromCart), HP_POP2(HP_clif_pMoveToKafraFromCart), 1402 }, -{ HP_POP(clif->pMoveFromKafraToCart), HP_POP2(HP_clif_pMoveFromKafraToCart), 1404 }, -{ HP_POP(clif->pCloseKafra), HP_POP2(HP_clif_pCloseKafra), 1406 }, -{ HP_POP(clif->pStoragePassword), HP_POP2(HP_clif_pStoragePassword), 1408 }, -{ HP_POP(clif->pCreateParty), HP_POP2(HP_clif_pCreateParty), 1410 }, -{ HP_POP(clif->pCreateParty2), HP_POP2(HP_clif_pCreateParty2), 1412 }, -{ HP_POP(clif->pPartyInvite), HP_POP2(HP_clif_pPartyInvite), 1414 }, -{ HP_POP(clif->pPartyInvite2), HP_POP2(HP_clif_pPartyInvite2), 1416 }, -{ HP_POP(clif->pReplyPartyInvite), HP_POP2(HP_clif_pReplyPartyInvite), 1418 }, -{ HP_POP(clif->pReplyPartyInvite2), HP_POP2(HP_clif_pReplyPartyInvite2), 1420 }, -{ HP_POP(clif->pLeaveParty), HP_POP2(HP_clif_pLeaveParty), 1422 }, -{ HP_POP(clif->pRemovePartyMember), HP_POP2(HP_clif_pRemovePartyMember), 1424 }, -{ HP_POP(clif->pPartyChangeOption), HP_POP2(HP_clif_pPartyChangeOption), 1426 }, -{ HP_POP(clif->pPartyMessage), HP_POP2(HP_clif_pPartyMessage), 1428 }, -{ HP_POP(clif->pPartyChangeLeader), HP_POP2(HP_clif_pPartyChangeLeader), 1430 }, -{ HP_POP(clif->pPartyBookingRegisterReq), HP_POP2(HP_clif_pPartyBookingRegisterReq), 1432 }, -{ HP_POP(clif->pPartyBookingSearchReq), HP_POP2(HP_clif_pPartyBookingSearchReq), 1434 }, -{ HP_POP(clif->pPartyBookingDeleteReq), HP_POP2(HP_clif_pPartyBookingDeleteReq), 1436 }, -{ HP_POP(clif->pPartyBookingUpdateReq), HP_POP2(HP_clif_pPartyBookingUpdateReq), 1438 }, -{ HP_POP(clif->pCloseVending), HP_POP2(HP_clif_pCloseVending), 1440 }, -{ HP_POP(clif->pVendingListReq), HP_POP2(HP_clif_pVendingListReq), 1442 }, -{ HP_POP(clif->pPurchaseReq), HP_POP2(HP_clif_pPurchaseReq), 1444 }, -{ HP_POP(clif->pPurchaseReq2), HP_POP2(HP_clif_pPurchaseReq2), 1446 }, -{ HP_POP(clif->pOpenVending), HP_POP2(HP_clif_pOpenVending), 1448 }, -{ HP_POP(clif->pCreateGuild), HP_POP2(HP_clif_pCreateGuild), 1450 }, -{ HP_POP(clif->pGuildCheckMaster), HP_POP2(HP_clif_pGuildCheckMaster), 1452 }, -{ HP_POP(clif->pGuildRequestInfo), HP_POP2(HP_clif_pGuildRequestInfo), 1454 }, -{ HP_POP(clif->pGuildChangePositionInfo), HP_POP2(HP_clif_pGuildChangePositionInfo), 1456 }, -{ HP_POP(clif->pGuildChangeMemberPosition), HP_POP2(HP_clif_pGuildChangeMemberPosition), 1458 }, -{ HP_POP(clif->pGuildRequestEmblem), HP_POP2(HP_clif_pGuildRequestEmblem), 1460 }, -{ HP_POP(clif->pGuildChangeEmblem), HP_POP2(HP_clif_pGuildChangeEmblem), 1462 }, -{ HP_POP(clif->pGuildChangeNotice), HP_POP2(HP_clif_pGuildChangeNotice), 1464 }, -{ HP_POP(clif->pGuildInvite), HP_POP2(HP_clif_pGuildInvite), 1466 }, -{ HP_POP(clif->pGuildReplyInvite), HP_POP2(HP_clif_pGuildReplyInvite), 1468 }, -{ HP_POP(clif->pGuildLeave), HP_POP2(HP_clif_pGuildLeave), 1470 }, -{ HP_POP(clif->pGuildExpulsion), HP_POP2(HP_clif_pGuildExpulsion), 1472 }, -{ HP_POP(clif->pGuildMessage), HP_POP2(HP_clif_pGuildMessage), 1474 }, -{ HP_POP(clif->pGuildRequestAlliance), HP_POP2(HP_clif_pGuildRequestAlliance), 1476 }, -{ HP_POP(clif->pGuildReplyAlliance), HP_POP2(HP_clif_pGuildReplyAlliance), 1478 }, -{ HP_POP(clif->pGuildDelAlliance), HP_POP2(HP_clif_pGuildDelAlliance), 1480 }, -{ HP_POP(clif->pGuildOpposition), HP_POP2(HP_clif_pGuildOpposition), 1482 }, -{ HP_POP(clif->pGuildBreak), HP_POP2(HP_clif_pGuildBreak), 1484 }, -{ HP_POP(clif->pPetMenu), HP_POP2(HP_clif_pPetMenu), 1486 }, -{ HP_POP(clif->pCatchPet), HP_POP2(HP_clif_pCatchPet), 1488 }, -{ HP_POP(clif->pSelectEgg), HP_POP2(HP_clif_pSelectEgg), 1490 }, -{ HP_POP(clif->pSendEmotion), HP_POP2(HP_clif_pSendEmotion), 1492 }, -{ HP_POP(clif->pChangePetName), HP_POP2(HP_clif_pChangePetName), 1494 }, -{ HP_POP(clif->pGMKick), HP_POP2(HP_clif_pGMKick), 1496 }, -{ HP_POP(clif->pGMKickAll), HP_POP2(HP_clif_pGMKickAll), 1498 }, -{ HP_POP(clif->pGMShift), HP_POP2(HP_clif_pGMShift), 1500 }, -{ HP_POP(clif->pGMRemove2), HP_POP2(HP_clif_pGMRemove2), 1502 }, -{ HP_POP(clif->pGMRecall), HP_POP2(HP_clif_pGMRecall), 1504 }, -{ HP_POP(clif->pGMRecall2), HP_POP2(HP_clif_pGMRecall2), 1506 }, -{ HP_POP(clif->pGM_Monster_Item), HP_POP2(HP_clif_pGM_Monster_Item), 1508 }, -{ HP_POP(clif->pGMHide), HP_POP2(HP_clif_pGMHide), 1510 }, -{ HP_POP(clif->pGMReqNoChat), HP_POP2(HP_clif_pGMReqNoChat), 1512 }, -{ HP_POP(clif->pGMRc), HP_POP2(HP_clif_pGMRc), 1514 }, -{ HP_POP(clif->pGMReqAccountName), HP_POP2(HP_clif_pGMReqAccountName), 1516 }, -{ HP_POP(clif->pGMChangeMapType), HP_POP2(HP_clif_pGMChangeMapType), 1518 }, -{ HP_POP(clif->pPMIgnore), HP_POP2(HP_clif_pPMIgnore), 1520 }, -{ HP_POP(clif->pPMIgnoreAll), HP_POP2(HP_clif_pPMIgnoreAll), 1522 }, -{ HP_POP(clif->pPMIgnoreList), HP_POP2(HP_clif_pPMIgnoreList), 1524 }, -{ HP_POP(clif->pNoviceDoriDori), HP_POP2(HP_clif_pNoviceDoriDori), 1526 }, -{ HP_POP(clif->pNoviceExplosionSpirits), HP_POP2(HP_clif_pNoviceExplosionSpirits), 1528 }, -{ HP_POP(clif->pFriendsListAdd), HP_POP2(HP_clif_pFriendsListAdd), 1530 }, -{ HP_POP(clif->pFriendsListReply), HP_POP2(HP_clif_pFriendsListReply), 1532 }, -{ HP_POP(clif->pFriendsListRemove), HP_POP2(HP_clif_pFriendsListRemove), 1534 }, -{ HP_POP(clif->pPVPInfo), HP_POP2(HP_clif_pPVPInfo), 1536 }, -{ HP_POP(clif->pBlacksmith), HP_POP2(HP_clif_pBlacksmith), 1538 }, -{ HP_POP(clif->pAlchemist), HP_POP2(HP_clif_pAlchemist), 1540 }, -{ HP_POP(clif->pTaekwon), HP_POP2(HP_clif_pTaekwon), 1542 }, -{ HP_POP(clif->pRankingPk), HP_POP2(HP_clif_pRankingPk), 1544 }, -{ HP_POP(clif->pFeelSaveOk), HP_POP2(HP_clif_pFeelSaveOk), 1546 }, -{ HP_POP(clif->pChangeHomunculusName), HP_POP2(HP_clif_pChangeHomunculusName), 1548 }, -{ HP_POP(clif->pHomMoveToMaster), HP_POP2(HP_clif_pHomMoveToMaster), 1550 }, -{ HP_POP(clif->pHomMoveTo), HP_POP2(HP_clif_pHomMoveTo), 1552 }, -{ HP_POP(clif->pHomAttack), HP_POP2(HP_clif_pHomAttack), 1554 }, -{ HP_POP(clif->pHomMenu), HP_POP2(HP_clif_pHomMenu), 1556 }, -{ HP_POP(clif->pAutoRevive), HP_POP2(HP_clif_pAutoRevive), 1558 }, -{ HP_POP(clif->pCheck), HP_POP2(HP_clif_pCheck), 1560 }, -{ HP_POP(clif->pMail_refreshinbox), HP_POP2(HP_clif_pMail_refreshinbox), 1562 }, -{ HP_POP(clif->pMail_read), HP_POP2(HP_clif_pMail_read), 1564 }, -{ HP_POP(clif->pMail_getattach), HP_POP2(HP_clif_pMail_getattach), 1566 }, -{ HP_POP(clif->pMail_delete), HP_POP2(HP_clif_pMail_delete), 1568 }, -{ HP_POP(clif->pMail_return), HP_POP2(HP_clif_pMail_return), 1570 }, -{ HP_POP(clif->pMail_setattach), HP_POP2(HP_clif_pMail_setattach), 1572 }, -{ HP_POP(clif->pMail_winopen), HP_POP2(HP_clif_pMail_winopen), 1574 }, -{ HP_POP(clif->pMail_send), HP_POP2(HP_clif_pMail_send), 1576 }, -{ HP_POP(clif->pAuction_cancelreg), HP_POP2(HP_clif_pAuction_cancelreg), 1578 }, -{ HP_POP(clif->pAuction_setitem), HP_POP2(HP_clif_pAuction_setitem), 1580 }, -{ HP_POP(clif->pAuction_register), HP_POP2(HP_clif_pAuction_register), 1582 }, -{ HP_POP(clif->pAuction_cancel), HP_POP2(HP_clif_pAuction_cancel), 1584 }, -{ HP_POP(clif->pAuction_close), HP_POP2(HP_clif_pAuction_close), 1586 }, -{ HP_POP(clif->pAuction_bid), HP_POP2(HP_clif_pAuction_bid), 1588 }, -{ HP_POP(clif->pAuction_search), HP_POP2(HP_clif_pAuction_search), 1590 }, -{ HP_POP(clif->pAuction_buysell), HP_POP2(HP_clif_pAuction_buysell), 1592 }, -{ HP_POP(clif->pcashshop_buy), HP_POP2(HP_clif_pcashshop_buy), 1594 }, -{ HP_POP(clif->pAdopt_request), HP_POP2(HP_clif_pAdopt_request), 1596 }, -{ HP_POP(clif->pAdopt_reply), HP_POP2(HP_clif_pAdopt_reply), 1598 }, -{ HP_POP(clif->pViewPlayerEquip), HP_POP2(HP_clif_pViewPlayerEquip), 1600 }, -{ HP_POP(clif->pEquipTick), HP_POP2(HP_clif_pEquipTick), 1602 }, -{ HP_POP(clif->pquestStateAck), HP_POP2(HP_clif_pquestStateAck), 1604 }, -{ HP_POP(clif->pmercenary_action), HP_POP2(HP_clif_pmercenary_action), 1606 }, -{ HP_POP(clif->pBattleChat), HP_POP2(HP_clif_pBattleChat), 1608 }, -{ HP_POP(clif->pLessEffect), HP_POP2(HP_clif_pLessEffect), 1610 }, -{ HP_POP(clif->pItemListWindowSelected), HP_POP2(HP_clif_pItemListWindowSelected), 1612 }, -{ HP_POP(clif->pReqOpenBuyingStore), HP_POP2(HP_clif_pReqOpenBuyingStore), 1614 }, -{ HP_POP(clif->pReqCloseBuyingStore), HP_POP2(HP_clif_pReqCloseBuyingStore), 1616 }, -{ HP_POP(clif->pReqClickBuyingStore), HP_POP2(HP_clif_pReqClickBuyingStore), 1618 }, -{ HP_POP(clif->pReqTradeBuyingStore), HP_POP2(HP_clif_pReqTradeBuyingStore), 1620 }, -{ HP_POP(clif->pSearchStoreInfo), HP_POP2(HP_clif_pSearchStoreInfo), 1622 }, -{ HP_POP(clif->pSearchStoreInfoNextPage), HP_POP2(HP_clif_pSearchStoreInfoNextPage), 1624 }, -{ HP_POP(clif->pCloseSearchStoreInfo), HP_POP2(HP_clif_pCloseSearchStoreInfo), 1626 }, -{ HP_POP(clif->pSearchStoreInfoListItemClick), HP_POP2(HP_clif_pSearchStoreInfoListItemClick), 1628 }, -{ HP_POP(clif->pDebug), HP_POP2(HP_clif_pDebug), 1630 }, -{ HP_POP(clif->pSkillSelectMenu), HP_POP2(HP_clif_pSkillSelectMenu), 1632 }, -{ HP_POP(clif->pMoveItem), HP_POP2(HP_clif_pMoveItem), 1634 }, -{ HP_POP(clif->pDull), HP_POP2(HP_clif_pDull), 1636 }, -{ HP_POP(clif->pBGQueueRegister), HP_POP2(HP_clif_pBGQueueRegister), 1638 }, -{ HP_POP(clif->pBGQueueCheckState), HP_POP2(HP_clif_pBGQueueCheckState), 1640 }, -{ HP_POP(clif->pBGQueueRevokeReq), HP_POP2(HP_clif_pBGQueueRevokeReq), 1642 }, -{ HP_POP(clif->pBGQueueBattleBeginAck), HP_POP2(HP_clif_pBGQueueBattleBeginAck), 1644 }, -{ HP_POP(clif->pCashShopOpen), HP_POP2(HP_clif_pCashShopOpen), 1646 }, -{ HP_POP(clif->pCashShopClose), HP_POP2(HP_clif_pCashShopClose), 1648 }, -{ HP_POP(clif->pCashShopReqTab), HP_POP2(HP_clif_pCashShopReqTab), 1650 }, -{ HP_POP(clif->pCashShopSchedule), HP_POP2(HP_clif_pCashShopSchedule), 1652 }, -{ HP_POP(clif->pCashShopBuy), HP_POP2(HP_clif_pCashShopBuy), 1654 }, -{ HP_POP(clif->pPartyTick), HP_POP2(HP_clif_pPartyTick), 1656 }, -{ HP_POP(clif->pGuildInvite2), HP_POP2(HP_clif_pGuildInvite2), 1658 }, -{ HP_POP(clif->pPartyBookingAddFilter), HP_POP2(HP_clif_pPartyBookingAddFilter), 1660 }, -{ HP_POP(clif->pPartyBookingSubFilter), HP_POP2(HP_clif_pPartyBookingSubFilter), 1662 }, -{ HP_POP(clif->pPartyBookingReqVolunteer), HP_POP2(HP_clif_pPartyBookingReqVolunteer), 1664 }, -{ HP_POP(clif->pPartyBookingRefuseVolunteer), HP_POP2(HP_clif_pPartyBookingRefuseVolunteer), 1666 }, -{ HP_POP(clif->pPartyBookingCancelVolunteer), HP_POP2(HP_clif_pPartyBookingCancelVolunteer), 1668 }, +{ HP_POP(clif->spawn_unit2), HP_POP2(HP_clif_spawn_unit2), 500 }, +{ HP_POP(clif->set_unit_idle2), HP_POP2(HP_clif_set_unit_idle2), 502 }, +{ HP_POP(clif->set_unit_walking), HP_POP2(HP_clif_set_unit_walking), 504 }, +{ HP_POP(clif->calc_walkdelay), HP_POP2(HP_clif_calc_walkdelay), 506 }, +{ HP_POP(clif->getareachar_skillunit), HP_POP2(HP_clif_getareachar_skillunit), 508 }, +{ HP_POP(clif->getareachar_unit), HP_POP2(HP_clif_getareachar_unit), 510 }, +{ HP_POP(clif->clearchar_skillunit), HP_POP2(HP_clif_clearchar_skillunit), 512 }, +{ HP_POP(clif->getareachar), HP_POP2(HP_clif_getareachar), 514 }, +{ HP_POP(clif->spawn), HP_POP2(HP_clif_spawn), 516 }, +{ HP_POP(clif->changemap), HP_POP2(HP_clif_changemap), 518 }, +{ HP_POP(clif->changemapcell), HP_POP2(HP_clif_changemapcell), 520 }, +{ HP_POP(clif->map_property), HP_POP2(HP_clif_map_property), 522 }, +{ HP_POP(clif->pvpset), HP_POP2(HP_clif_pvpset), 524 }, +{ HP_POP(clif->map_property_mapall), HP_POP2(HP_clif_map_property_mapall), 526 }, +{ HP_POP(clif->bossmapinfo), HP_POP2(HP_clif_bossmapinfo), 528 }, +{ HP_POP(clif->map_type), HP_POP2(HP_clif_map_type), 530 }, +{ HP_POP(clif->maptypeproperty2), HP_POP2(HP_clif_maptypeproperty2), 532 }, +{ HP_POP(clif->changemapserver), HP_POP2(HP_clif_changemapserver), 534 }, +{ HP_POP(clif->npcbuysell), HP_POP2(HP_clif_npcbuysell), 536 }, +{ HP_POP(clif->buylist), HP_POP2(HP_clif_buylist), 538 }, +{ HP_POP(clif->selllist), HP_POP2(HP_clif_selllist), 540 }, +{ HP_POP(clif->cashshop_show), HP_POP2(HP_clif_cashshop_show), 542 }, +{ HP_POP(clif->npc_buy_result), HP_POP2(HP_clif_npc_buy_result), 544 }, +{ HP_POP(clif->npc_sell_result), HP_POP2(HP_clif_npc_sell_result), 546 }, +{ HP_POP(clif->cashshop_ack), HP_POP2(HP_clif_cashshop_ack), 548 }, +{ HP_POP(clif->scriptmes), HP_POP2(HP_clif_scriptmes), 550 }, +{ HP_POP(clif->scriptnext), HP_POP2(HP_clif_scriptnext), 552 }, +{ HP_POP(clif->scriptclose), HP_POP2(HP_clif_scriptclose), 554 }, +{ HP_POP(clif->scriptmenu), HP_POP2(HP_clif_scriptmenu), 556 }, +{ HP_POP(clif->scriptinput), HP_POP2(HP_clif_scriptinput), 558 }, +{ HP_POP(clif->scriptinputstr), HP_POP2(HP_clif_scriptinputstr), 560 }, +{ HP_POP(clif->cutin), HP_POP2(HP_clif_cutin), 562 }, +{ HP_POP(clif->sendfakenpc), HP_POP2(HP_clif_sendfakenpc), 564 }, +{ HP_POP(clif->scriptclear), HP_POP2(HP_clif_scriptclear), 566 }, +{ HP_POP(clif->viewpoint), HP_POP2(HP_clif_viewpoint), 568 }, +{ HP_POP(clif->damage), HP_POP2(HP_clif_damage), 570 }, +{ HP_POP(clif->sitting), HP_POP2(HP_clif_sitting), 572 }, +{ HP_POP(clif->standing), HP_POP2(HP_clif_standing), 574 }, +{ HP_POP(clif->arrow_create_list), HP_POP2(HP_clif_arrow_create_list), 576 }, +{ HP_POP(clif->refresh), HP_POP2(HP_clif_refresh), 578 }, +{ HP_POP(clif->fame_blacksmith), HP_POP2(HP_clif_fame_blacksmith), 580 }, +{ HP_POP(clif->fame_alchemist), HP_POP2(HP_clif_fame_alchemist), 582 }, +{ HP_POP(clif->fame_taekwon), HP_POP2(HP_clif_fame_taekwon), 584 }, +{ HP_POP(clif->ranklist), HP_POP2(HP_clif_ranklist), 586 }, +{ HP_POP(clif->update_rankingpoint), HP_POP2(HP_clif_update_rankingpoint), 588 }, +{ HP_POP(clif->pRanklist), HP_POP2(HP_clif_pRanklist), 590 }, +{ HP_POP(clif->hotkeys), HP_POP2(HP_clif_hotkeys), 592 }, +{ HP_POP(clif->insight), HP_POP2(HP_clif_insight), 594 }, +{ HP_POP(clif->outsight), HP_POP2(HP_clif_outsight), 596 }, +{ HP_POP(clif->skillcastcancel), HP_POP2(HP_clif_skillcastcancel), 598 }, +{ HP_POP(clif->skill_fail), HP_POP2(HP_clif_skill_fail), 600 }, +{ HP_POP(clif->skill_cooldown), HP_POP2(HP_clif_skill_cooldown), 602 }, +{ HP_POP(clif->skill_memomessage), HP_POP2(HP_clif_skill_memomessage), 604 }, +{ HP_POP(clif->skill_mapinfomessage), HP_POP2(HP_clif_skill_mapinfomessage), 606 }, +{ HP_POP(clif->skill_produce_mix_list), HP_POP2(HP_clif_skill_produce_mix_list), 608 }, +{ HP_POP(clif->cooking_list), HP_POP2(HP_clif_cooking_list), 610 }, +{ HP_POP(clif->autospell), HP_POP2(HP_clif_autospell), 612 }, +{ HP_POP(clif->combo_delay), HP_POP2(HP_clif_combo_delay), 614 }, +{ HP_POP(clif->status_change), HP_POP2(HP_clif_status_change), 616 }, +{ HP_POP(clif->insert_card), HP_POP2(HP_clif_insert_card), 618 }, +{ HP_POP(clif->inventorylist), HP_POP2(HP_clif_inventorylist), 620 }, +{ HP_POP(clif->equiplist), HP_POP2(HP_clif_equiplist), 622 }, +{ HP_POP(clif->cartlist), HP_POP2(HP_clif_cartlist), 624 }, +{ HP_POP(clif->favorite_item), HP_POP2(HP_clif_favorite_item), 626 }, +{ HP_POP(clif->clearcart), HP_POP2(HP_clif_clearcart), 628 }, +{ HP_POP(clif->item_identify_list), HP_POP2(HP_clif_item_identify_list), 630 }, +{ HP_POP(clif->item_identified), HP_POP2(HP_clif_item_identified), 632 }, +{ HP_POP(clif->item_repair_list), HP_POP2(HP_clif_item_repair_list), 634 }, +{ HP_POP(clif->item_repaireffect), HP_POP2(HP_clif_item_repaireffect), 636 }, +{ HP_POP(clif->item_damaged), HP_POP2(HP_clif_item_damaged), 638 }, +{ HP_POP(clif->item_refine_list), HP_POP2(HP_clif_item_refine_list), 640 }, +{ HP_POP(clif->item_skill), HP_POP2(HP_clif_item_skill), 642 }, +{ HP_POP(clif->mvp_item), HP_POP2(HP_clif_mvp_item), 644 }, +{ HP_POP(clif->mvp_exp), HP_POP2(HP_clif_mvp_exp), 646 }, +{ HP_POP(clif->mvp_noitem), HP_POP2(HP_clif_mvp_noitem), 648 }, +{ HP_POP(clif->changed_dir), HP_POP2(HP_clif_changed_dir), 650 }, +{ HP_POP(clif->charnameack), HP_POP2(HP_clif_charnameack), 652 }, +{ HP_POP(clif->monster_hp_bar), HP_POP2(HP_clif_monster_hp_bar), 654 }, +{ HP_POP(clif->hpmeter), HP_POP2(HP_clif_hpmeter), 656 }, +{ HP_POP(clif->hpmeter_single), HP_POP2(HP_clif_hpmeter_single), 658 }, +{ HP_POP(clif->hpmeter_sub), HP_POP2(HP_clif_hpmeter_sub), 660 }, +{ HP_POP(clif->upgrademessage), HP_POP2(HP_clif_upgrademessage), 662 }, +{ HP_POP(clif->get_weapon_view), HP_POP2(HP_clif_get_weapon_view), 664 }, +{ HP_POP(clif->gospel_info), HP_POP2(HP_clif_gospel_info), 666 }, +{ HP_POP(clif->feel_req), HP_POP2(HP_clif_feel_req), 668 }, +{ HP_POP(clif->starskill), HP_POP2(HP_clif_starskill), 670 }, +{ HP_POP(clif->feel_info), HP_POP2(HP_clif_feel_info), 672 }, +{ HP_POP(clif->hate_info), HP_POP2(HP_clif_hate_info), 674 }, +{ HP_POP(clif->mission_info), HP_POP2(HP_clif_mission_info), 676 }, +{ HP_POP(clif->feel_hate_reset), HP_POP2(HP_clif_feel_hate_reset), 678 }, +{ HP_POP(clif->partytickack), HP_POP2(HP_clif_partytickack), 680 }, +{ HP_POP(clif->equiptickack), HP_POP2(HP_clif_equiptickack), 682 }, +{ HP_POP(clif->viewequip_ack), HP_POP2(HP_clif_viewequip_ack), 684 }, +{ HP_POP(clif->viewequip_fail), HP_POP2(HP_clif_viewequip_fail), 686 }, +{ HP_POP(clif->equpcheckbox), HP_POP2(HP_clif_equpcheckbox), 688 }, +{ HP_POP(clif->displayexp), HP_POP2(HP_clif_displayexp), 690 }, +{ HP_POP(clif->font), HP_POP2(HP_clif_font), 692 }, +{ HP_POP(clif->progressbar), HP_POP2(HP_clif_progressbar), 694 }, +{ HP_POP(clif->progressbar_abort), HP_POP2(HP_clif_progressbar_abort), 696 }, +{ HP_POP(clif->showdigit), HP_POP2(HP_clif_showdigit), 698 }, +{ HP_POP(clif->elementalconverter_list), HP_POP2(HP_clif_elementalconverter_list), 700 }, +{ HP_POP(clif->spellbook_list), HP_POP2(HP_clif_spellbook_list), 702 }, +{ HP_POP(clif->magicdecoy_list), HP_POP2(HP_clif_magicdecoy_list), 704 }, +{ HP_POP(clif->poison_list), HP_POP2(HP_clif_poison_list), 706 }, +{ HP_POP(clif->autoshadowspell_list), HP_POP2(HP_clif_autoshadowspell_list), 708 }, +{ HP_POP(clif->skill_itemlistwindow), HP_POP2(HP_clif_skill_itemlistwindow), 710 }, +{ HP_POP(clif->sc_load), HP_POP2(HP_clif_sc_load), 712 }, +{ HP_POP(clif->sc_end), HP_POP2(HP_clif_sc_end), 714 }, +{ HP_POP(clif->initialstatus), HP_POP2(HP_clif_initialstatus), 716 }, +{ HP_POP(clif->cooldown_list), HP_POP2(HP_clif_cooldown_list), 718 }, +{ HP_POP(clif->updatestatus), HP_POP2(HP_clif_updatestatus), 720 }, +{ HP_POP(clif->changestatus), HP_POP2(HP_clif_changestatus), 722 }, +{ HP_POP(clif->statusupack), HP_POP2(HP_clif_statusupack), 724 }, +{ HP_POP(clif->movetoattack), HP_POP2(HP_clif_movetoattack), 726 }, +{ HP_POP(clif->solved_charname), HP_POP2(HP_clif_solved_charname), 728 }, +{ HP_POP(clif->charnameupdate), HP_POP2(HP_clif_charnameupdate), 730 }, +{ HP_POP(clif->delayquit), HP_POP2(HP_clif_delayquit), 732 }, +{ HP_POP(clif->getareachar_pc), HP_POP2(HP_clif_getareachar_pc), 734 }, +{ HP_POP(clif->disconnect_ack), HP_POP2(HP_clif_disconnect_ack), 736 }, +{ HP_POP(clif->PVPInfo), HP_POP2(HP_clif_PVPInfo), 738 }, +{ HP_POP(clif->blacksmith), HP_POP2(HP_clif_blacksmith), 740 }, +{ HP_POP(clif->alchemist), HP_POP2(HP_clif_alchemist), 742 }, +{ HP_POP(clif->taekwon), HP_POP2(HP_clif_taekwon), 744 }, +{ HP_POP(clif->ranking_pk), HP_POP2(HP_clif_ranking_pk), 746 }, +{ HP_POP(clif->quitsave), HP_POP2(HP_clif_quitsave), 748 }, +{ HP_POP(clif->misceffect), HP_POP2(HP_clif_misceffect), 750 }, +{ HP_POP(clif->changeoption), HP_POP2(HP_clif_changeoption), 752 }, +{ HP_POP(clif->changeoption2), HP_POP2(HP_clif_changeoption2), 754 }, +{ HP_POP(clif->emotion), HP_POP2(HP_clif_emotion), 756 }, +{ HP_POP(clif->talkiebox), HP_POP2(HP_clif_talkiebox), 758 }, +{ HP_POP(clif->wedding_effect), HP_POP2(HP_clif_wedding_effect), 760 }, +{ HP_POP(clif->divorced), HP_POP2(HP_clif_divorced), 762 }, +{ HP_POP(clif->callpartner), HP_POP2(HP_clif_callpartner), 764 }, +{ HP_POP(clif->skill_damage), HP_POP2(HP_clif_skill_damage), 766 }, +{ HP_POP(clif->skill_nodamage), HP_POP2(HP_clif_skill_nodamage), 768 }, +{ HP_POP(clif->skill_poseffect), HP_POP2(HP_clif_skill_poseffect), 770 }, +{ HP_POP(clif->skill_estimation), HP_POP2(HP_clif_skill_estimation), 772 }, +{ HP_POP(clif->skill_warppoint), HP_POP2(HP_clif_skill_warppoint), 774 }, +{ HP_POP(clif->skillcasting), HP_POP2(HP_clif_skillcasting), 776 }, +{ HP_POP(clif->produce_effect), HP_POP2(HP_clif_produce_effect), 778 }, +{ HP_POP(clif->devotion), HP_POP2(HP_clif_devotion), 780 }, +{ HP_POP(clif->spiritball), HP_POP2(HP_clif_spiritball), 782 }, +{ HP_POP(clif->spiritball_single), HP_POP2(HP_clif_spiritball_single), 784 }, +{ HP_POP(clif->bladestop), HP_POP2(HP_clif_bladestop), 786 }, +{ HP_POP(clif->mvp_effect), HP_POP2(HP_clif_mvp_effect), 788 }, +{ HP_POP(clif->heal), HP_POP2(HP_clif_heal), 790 }, +{ HP_POP(clif->resurrection), HP_POP2(HP_clif_resurrection), 792 }, +{ HP_POP(clif->refine), HP_POP2(HP_clif_refine), 794 }, +{ HP_POP(clif->weather), HP_POP2(HP_clif_weather), 796 }, +{ HP_POP(clif->specialeffect), HP_POP2(HP_clif_specialeffect), 798 }, +{ HP_POP(clif->specialeffect_single), HP_POP2(HP_clif_specialeffect_single), 800 }, +{ HP_POP(clif->specialeffect_value), HP_POP2(HP_clif_specialeffect_value), 802 }, +{ HP_POP(clif->millenniumshield), HP_POP2(HP_clif_millenniumshield), 804 }, +{ HP_POP(clif->charm), HP_POP2(HP_clif_charm), 806 }, +{ HP_POP(clif->charm_single), HP_POP2(HP_clif_charm_single), 808 }, +{ HP_POP(clif->snap), HP_POP2(HP_clif_snap), 810 }, +{ HP_POP(clif->weather_check), HP_POP2(HP_clif_weather_check), 812 }, +{ HP_POP(clif->playBGM), HP_POP2(HP_clif_playBGM), 814 }, +{ HP_POP(clif->soundeffect), HP_POP2(HP_clif_soundeffect), 816 }, +{ HP_POP(clif->soundeffectall), HP_POP2(HP_clif_soundeffectall), 818 }, +{ HP_POP(clif->GlobalMessage), HP_POP2(HP_clif_GlobalMessage), 820 }, +{ HP_POP(clif->createchat), HP_POP2(HP_clif_createchat), 822 }, +{ HP_POP(clif->dispchat), HP_POP2(HP_clif_dispchat), 824 }, +{ HP_POP(clif->joinchatfail), HP_POP2(HP_clif_joinchatfail), 826 }, +{ HP_POP(clif->joinchatok), HP_POP2(HP_clif_joinchatok), 828 }, +{ HP_POP(clif->addchat), HP_POP2(HP_clif_addchat), 830 }, +{ HP_POP(clif->changechatowner), HP_POP2(HP_clif_changechatowner), 832 }, +{ HP_POP(clif->clearchat), HP_POP2(HP_clif_clearchat), 834 }, +{ HP_POP(clif->leavechat), HP_POP2(HP_clif_leavechat), 836 }, +{ HP_POP(clif->changechatstatus), HP_POP2(HP_clif_changechatstatus), 838 }, +{ HP_POP(clif->wis_message), HP_POP2(HP_clif_wis_message), 840 }, +{ HP_POP(clif->wis_end), HP_POP2(HP_clif_wis_end), 842 }, +{ HP_POP(clif->disp_onlyself), HP_POP2(HP_clif_disp_onlyself), 844 }, +{ HP_POP(clif->disp_message), HP_POP2(HP_clif_disp_message), 846 }, +{ HP_POP(clif->broadcast), HP_POP2(HP_clif_broadcast), 848 }, +{ HP_POP(clif->broadcast2), HP_POP2(HP_clif_broadcast2), 850 }, +{ HP_POP(clif->messagecolor), HP_POP2(HP_clif_messagecolor), 852 }, +{ HP_POP(clif->disp_overhead), HP_POP2(HP_clif_disp_overhead), 854 }, +{ HP_POP(clif->msg), HP_POP2(HP_clif_msg), 856 }, +{ HP_POP(clif->msg_value), HP_POP2(HP_clif_msg_value), 858 }, +{ HP_POP(clif->msg_skill), HP_POP2(HP_clif_msg_skill), 860 }, +{ HP_POP(clif->msgtable), HP_POP2(HP_clif_msgtable), 862 }, +{ HP_POP(clif->msgtable_num), HP_POP2(HP_clif_msgtable_num), 864 }, +{ HP_POP(clif->message), HP_POP2(HP_clif_message), 866 }, +{ HP_POP(clif->messageln), HP_POP2(HP_clif_messageln), 868 }, +{ HP_POP(clif->colormes), HP_POP2(HP_clif_colormes), 870 }, +{ HP_POP(clif->process_message), HP_POP2(HP_clif_process_message), 872 }, +{ HP_POP(clif->wisexin), HP_POP2(HP_clif_wisexin), 874 }, +{ HP_POP(clif->wisall), HP_POP2(HP_clif_wisall), 876 }, +{ HP_POP(clif->PMIgnoreList), HP_POP2(HP_clif_PMIgnoreList), 878 }, +{ HP_POP(clif->traderequest), HP_POP2(HP_clif_traderequest), 880 }, +{ HP_POP(clif->tradestart), HP_POP2(HP_clif_tradestart), 882 }, +{ HP_POP(clif->tradeadditem), HP_POP2(HP_clif_tradeadditem), 884 }, +{ HP_POP(clif->tradeitemok), HP_POP2(HP_clif_tradeitemok), 886 }, +{ HP_POP(clif->tradedeal_lock), HP_POP2(HP_clif_tradedeal_lock), 888 }, +{ HP_POP(clif->tradecancelled), HP_POP2(HP_clif_tradecancelled), 890 }, +{ HP_POP(clif->tradecompleted), HP_POP2(HP_clif_tradecompleted), 892 }, +{ HP_POP(clif->tradeundo), HP_POP2(HP_clif_tradeundo), 894 }, +{ HP_POP(clif->openvendingreq), HP_POP2(HP_clif_openvendingreq), 896 }, +{ HP_POP(clif->showvendingboard), HP_POP2(HP_clif_showvendingboard), 898 }, +{ HP_POP(clif->closevendingboard), HP_POP2(HP_clif_closevendingboard), 900 }, +{ HP_POP(clif->vendinglist), HP_POP2(HP_clif_vendinglist), 902 }, +{ HP_POP(clif->buyvending), HP_POP2(HP_clif_buyvending), 904 }, +{ HP_POP(clif->openvending), HP_POP2(HP_clif_openvending), 906 }, +{ HP_POP(clif->vendingreport), HP_POP2(HP_clif_vendingreport), 908 }, +{ HP_POP(clif->storagelist), HP_POP2(HP_clif_storagelist), 910 }, +{ HP_POP(clif->updatestorageamount), HP_POP2(HP_clif_updatestorageamount), 912 }, +{ HP_POP(clif->storageitemadded), HP_POP2(HP_clif_storageitemadded), 914 }, +{ HP_POP(clif->storageitemremoved), HP_POP2(HP_clif_storageitemremoved), 916 }, +{ HP_POP(clif->storageclose), HP_POP2(HP_clif_storageclose), 918 }, +{ HP_POP(clif->skillinfoblock), HP_POP2(HP_clif_skillinfoblock), 920 }, +{ HP_POP(clif->skillup), HP_POP2(HP_clif_skillup), 922 }, +{ HP_POP(clif->skillinfo), HP_POP2(HP_clif_skillinfo), 924 }, +{ HP_POP(clif->addskill), HP_POP2(HP_clif_addskill), 926 }, +{ HP_POP(clif->deleteskill), HP_POP2(HP_clif_deleteskill), 928 }, +{ HP_POP(clif->party_created), HP_POP2(HP_clif_party_created), 930 }, +{ HP_POP(clif->party_member_info), HP_POP2(HP_clif_party_member_info), 932 }, +{ HP_POP(clif->party_info), HP_POP2(HP_clif_party_info), 934 }, +{ HP_POP(clif->party_invite), HP_POP2(HP_clif_party_invite), 936 }, +{ HP_POP(clif->party_inviteack), HP_POP2(HP_clif_party_inviteack), 938 }, +{ HP_POP(clif->party_option), HP_POP2(HP_clif_party_option), 940 }, +{ HP_POP(clif->party_withdraw), HP_POP2(HP_clif_party_withdraw), 942 }, +{ HP_POP(clif->party_message), HP_POP2(HP_clif_party_message), 944 }, +{ HP_POP(clif->party_xy), HP_POP2(HP_clif_party_xy), 946 }, +{ HP_POP(clif->party_xy_single), HP_POP2(HP_clif_party_xy_single), 948 }, +{ HP_POP(clif->party_hp), HP_POP2(HP_clif_party_hp), 950 }, +{ HP_POP(clif->party_xy_remove), HP_POP2(HP_clif_party_xy_remove), 952 }, +{ HP_POP(clif->party_show_picker), HP_POP2(HP_clif_party_show_picker), 954 }, +{ HP_POP(clif->partyinvitationstate), HP_POP2(HP_clif_partyinvitationstate), 956 }, +{ HP_POP(clif->guild_created), HP_POP2(HP_clif_guild_created), 958 }, +{ HP_POP(clif->guild_belonginfo), HP_POP2(HP_clif_guild_belonginfo), 960 }, +{ HP_POP(clif->guild_masterormember), HP_POP2(HP_clif_guild_masterormember), 962 }, +{ HP_POP(clif->guild_basicinfo), HP_POP2(HP_clif_guild_basicinfo), 964 }, +{ HP_POP(clif->guild_allianceinfo), HP_POP2(HP_clif_guild_allianceinfo), 966 }, +{ HP_POP(clif->guild_memberlist), HP_POP2(HP_clif_guild_memberlist), 968 }, +{ HP_POP(clif->guild_skillinfo), HP_POP2(HP_clif_guild_skillinfo), 970 }, +{ HP_POP(clif->guild_send_onlineinfo), HP_POP2(HP_clif_guild_send_onlineinfo), 972 }, +{ HP_POP(clif->guild_memberlogin_notice), HP_POP2(HP_clif_guild_memberlogin_notice), 974 }, +{ HP_POP(clif->guild_invite), HP_POP2(HP_clif_guild_invite), 976 }, +{ HP_POP(clif->guild_inviteack), HP_POP2(HP_clif_guild_inviteack), 978 }, +{ HP_POP(clif->guild_leave), HP_POP2(HP_clif_guild_leave), 980 }, +{ HP_POP(clif->guild_expulsion), HP_POP2(HP_clif_guild_expulsion), 982 }, +{ HP_POP(clif->guild_positionchanged), HP_POP2(HP_clif_guild_positionchanged), 984 }, +{ HP_POP(clif->guild_memberpositionchanged), HP_POP2(HP_clif_guild_memberpositionchanged), 986 }, +{ HP_POP(clif->guild_emblem), HP_POP2(HP_clif_guild_emblem), 988 }, +{ HP_POP(clif->guild_emblem_area), HP_POP2(HP_clif_guild_emblem_area), 990 }, +{ HP_POP(clif->guild_notice), HP_POP2(HP_clif_guild_notice), 992 }, +{ HP_POP(clif->guild_message), HP_POP2(HP_clif_guild_message), 994 }, +{ HP_POP(clif->guild_skillup), HP_POP2(HP_clif_guild_skillup), 996 }, +{ HP_POP(clif->guild_reqalliance), HP_POP2(HP_clif_guild_reqalliance), 998 }, +{ HP_POP(clif->guild_allianceack), HP_POP2(HP_clif_guild_allianceack), 1000 }, +{ HP_POP(clif->guild_delalliance), HP_POP2(HP_clif_guild_delalliance), 1002 }, +{ HP_POP(clif->guild_oppositionack), HP_POP2(HP_clif_guild_oppositionack), 1004 }, +{ HP_POP(clif->guild_broken), HP_POP2(HP_clif_guild_broken), 1006 }, +{ HP_POP(clif->guild_xy), HP_POP2(HP_clif_guild_xy), 1008 }, +{ HP_POP(clif->guild_xy_single), HP_POP2(HP_clif_guild_xy_single), 1010 }, +{ HP_POP(clif->guild_xy_remove), HP_POP2(HP_clif_guild_xy_remove), 1012 }, +{ HP_POP(clif->guild_positionnamelist), HP_POP2(HP_clif_guild_positionnamelist), 1014 }, +{ HP_POP(clif->guild_positioninfolist), HP_POP2(HP_clif_guild_positioninfolist), 1016 }, +{ HP_POP(clif->guild_expulsionlist), HP_POP2(HP_clif_guild_expulsionlist), 1018 }, +{ HP_POP(clif->validate_emblem), HP_POP2(HP_clif_validate_emblem), 1020 }, +{ HP_POP(clif->bg_hp), HP_POP2(HP_clif_bg_hp), 1022 }, +{ HP_POP(clif->bg_xy), HP_POP2(HP_clif_bg_xy), 1024 }, +{ HP_POP(clif->bg_xy_remove), HP_POP2(HP_clif_bg_xy_remove), 1026 }, +{ HP_POP(clif->bg_message), HP_POP2(HP_clif_bg_message), 1028 }, +{ HP_POP(clif->bg_updatescore), HP_POP2(HP_clif_bg_updatescore), 1030 }, +{ HP_POP(clif->bg_updatescore_single), HP_POP2(HP_clif_bg_updatescore_single), 1032 }, +{ HP_POP(clif->sendbgemblem_area), HP_POP2(HP_clif_sendbgemblem_area), 1034 }, +{ HP_POP(clif->sendbgemblem_single), HP_POP2(HP_clif_sendbgemblem_single), 1036 }, +{ HP_POP(clif->instance), HP_POP2(HP_clif_instance), 1038 }, +{ HP_POP(clif->instance_join), HP_POP2(HP_clif_instance_join), 1040 }, +{ HP_POP(clif->instance_leave), HP_POP2(HP_clif_instance_leave), 1042 }, +{ HP_POP(clif->catch_process), HP_POP2(HP_clif_catch_process), 1044 }, +{ HP_POP(clif->pet_roulette), HP_POP2(HP_clif_pet_roulette), 1046 }, +{ HP_POP(clif->sendegg), HP_POP2(HP_clif_sendegg), 1048 }, +{ HP_POP(clif->send_petstatus), HP_POP2(HP_clif_send_petstatus), 1050 }, +{ HP_POP(clif->send_petdata), HP_POP2(HP_clif_send_petdata), 1052 }, +{ HP_POP(clif->pet_emotion), HP_POP2(HP_clif_pet_emotion), 1054 }, +{ HP_POP(clif->pet_food), HP_POP2(HP_clif_pet_food), 1056 }, +{ HP_POP(clif->friendslist_toggle_sub), HP_POP2(HP_clif_friendslist_toggle_sub), 1058 }, +{ HP_POP(clif->friendslist_send), HP_POP2(HP_clif_friendslist_send), 1060 }, +{ HP_POP(clif->friendslist_reqack), HP_POP2(HP_clif_friendslist_reqack), 1062 }, +{ HP_POP(clif->friendslist_toggle), HP_POP2(HP_clif_friendslist_toggle), 1064 }, +{ HP_POP(clif->friendlist_req), HP_POP2(HP_clif_friendlist_req), 1066 }, +{ HP_POP(clif->GM_kickack), HP_POP2(HP_clif_GM_kickack), 1068 }, +{ HP_POP(clif->GM_kick), HP_POP2(HP_clif_GM_kick), 1070 }, +{ HP_POP(clif->manner_message), HP_POP2(HP_clif_manner_message), 1072 }, +{ HP_POP(clif->GM_silence), HP_POP2(HP_clif_GM_silence), 1074 }, +{ HP_POP(clif->account_name), HP_POP2(HP_clif_account_name), 1076 }, +{ HP_POP(clif->check), HP_POP2(HP_clif_check), 1078 }, +{ HP_POP(clif->hominfo), HP_POP2(HP_clif_hominfo), 1080 }, +{ HP_POP(clif->homskillinfoblock), HP_POP2(HP_clif_homskillinfoblock), 1082 }, +{ HP_POP(clif->homskillup), HP_POP2(HP_clif_homskillup), 1084 }, +{ HP_POP(clif->hom_food), HP_POP2(HP_clif_hom_food), 1086 }, +{ HP_POP(clif->send_homdata), HP_POP2(HP_clif_send_homdata), 1088 }, +{ HP_POP(clif->quest_send_list), HP_POP2(HP_clif_quest_send_list), 1090 }, +{ HP_POP(clif->quest_send_mission), HP_POP2(HP_clif_quest_send_mission), 1092 }, +{ HP_POP(clif->quest_add), HP_POP2(HP_clif_quest_add), 1094 }, +{ HP_POP(clif->quest_delete), HP_POP2(HP_clif_quest_delete), 1096 }, +{ HP_POP(clif->quest_update_status), HP_POP2(HP_clif_quest_update_status), 1098 }, +{ HP_POP(clif->quest_update_objective), HP_POP2(HP_clif_quest_update_objective), 1100 }, +{ HP_POP(clif->quest_show_event), HP_POP2(HP_clif_quest_show_event), 1102 }, +{ HP_POP(clif->mail_window), HP_POP2(HP_clif_mail_window), 1104 }, +{ HP_POP(clif->mail_read), HP_POP2(HP_clif_mail_read), 1106 }, +{ HP_POP(clif->mail_delete), HP_POP2(HP_clif_mail_delete), 1108 }, +{ HP_POP(clif->mail_return), HP_POP2(HP_clif_mail_return), 1110 }, +{ HP_POP(clif->mail_send), HP_POP2(HP_clif_mail_send), 1112 }, +{ HP_POP(clif->mail_new), HP_POP2(HP_clif_mail_new), 1114 }, +{ HP_POP(clif->mail_refreshinbox), HP_POP2(HP_clif_mail_refreshinbox), 1116 }, +{ HP_POP(clif->mail_getattachment), HP_POP2(HP_clif_mail_getattachment), 1118 }, +{ HP_POP(clif->mail_setattachment), HP_POP2(HP_clif_mail_setattachment), 1120 }, +{ HP_POP(clif->auction_openwindow), HP_POP2(HP_clif_auction_openwindow), 1122 }, +{ HP_POP(clif->auction_results), HP_POP2(HP_clif_auction_results), 1124 }, +{ HP_POP(clif->auction_message), HP_POP2(HP_clif_auction_message), 1126 }, +{ HP_POP(clif->auction_close), HP_POP2(HP_clif_auction_close), 1128 }, +{ HP_POP(clif->auction_setitem), HP_POP2(HP_clif_auction_setitem), 1130 }, +{ HP_POP(clif->mercenary_info), HP_POP2(HP_clif_mercenary_info), 1132 }, +{ HP_POP(clif->mercenary_skillblock), HP_POP2(HP_clif_mercenary_skillblock), 1134 }, +{ HP_POP(clif->mercenary_message), HP_POP2(HP_clif_mercenary_message), 1136 }, +{ HP_POP(clif->mercenary_updatestatus), HP_POP2(HP_clif_mercenary_updatestatus), 1138 }, +{ HP_POP(clif->rental_time), HP_POP2(HP_clif_rental_time), 1140 }, +{ HP_POP(clif->rental_expired), HP_POP2(HP_clif_rental_expired), 1142 }, +{ HP_POP(clif->PartyBookingRegisterAck), HP_POP2(HP_clif_PartyBookingRegisterAck), 1144 }, +{ HP_POP(clif->PartyBookingDeleteAck), HP_POP2(HP_clif_PartyBookingDeleteAck), 1146 }, +{ HP_POP(clif->PartyBookingSearchAck), HP_POP2(HP_clif_PartyBookingSearchAck), 1148 }, +{ HP_POP(clif->PartyBookingUpdateNotify), HP_POP2(HP_clif_PartyBookingUpdateNotify), 1150 }, +{ HP_POP(clif->PartyBookingDeleteNotify), HP_POP2(HP_clif_PartyBookingDeleteNotify), 1152 }, +{ HP_POP(clif->PartyBookingInsertNotify), HP_POP2(HP_clif_PartyBookingInsertNotify), 1154 }, +{ HP_POP(clif->PartyBookingVolunteerInfo), HP_POP2(HP_clif_PartyBookingVolunteerInfo), 1156 }, +{ HP_POP(clif->PartyBookingRefuseVolunteer), HP_POP2(HP_clif_PartyBookingRefuseVolunteer), 1158 }, +{ HP_POP(clif->PartyBookingCancelVolunteer), HP_POP2(HP_clif_PartyBookingCancelVolunteer), 1160 }, +{ HP_POP(clif->PartyBookingAddFilteringList), HP_POP2(HP_clif_PartyBookingAddFilteringList), 1162 }, +{ HP_POP(clif->PartyBookingSubFilteringList), HP_POP2(HP_clif_PartyBookingSubFilteringList), 1164 }, +{ HP_POP(clif->buyingstore_open), HP_POP2(HP_clif_buyingstore_open), 1166 }, +{ HP_POP(clif->buyingstore_open_failed), HP_POP2(HP_clif_buyingstore_open_failed), 1168 }, +{ HP_POP(clif->buyingstore_myitemlist), HP_POP2(HP_clif_buyingstore_myitemlist), 1170 }, +{ HP_POP(clif->buyingstore_entry), HP_POP2(HP_clif_buyingstore_entry), 1172 }, +{ HP_POP(clif->buyingstore_entry_single), HP_POP2(HP_clif_buyingstore_entry_single), 1174 }, +{ HP_POP(clif->buyingstore_disappear_entry), HP_POP2(HP_clif_buyingstore_disappear_entry), 1176 }, +{ HP_POP(clif->buyingstore_disappear_entry_single), HP_POP2(HP_clif_buyingstore_disappear_entry_single), 1178 }, +{ HP_POP(clif->buyingstore_itemlist), HP_POP2(HP_clif_buyingstore_itemlist), 1180 }, +{ HP_POP(clif->buyingstore_trade_failed_buyer), HP_POP2(HP_clif_buyingstore_trade_failed_buyer), 1182 }, +{ HP_POP(clif->buyingstore_update_item), HP_POP2(HP_clif_buyingstore_update_item), 1184 }, +{ HP_POP(clif->buyingstore_delete_item), HP_POP2(HP_clif_buyingstore_delete_item), 1186 }, +{ HP_POP(clif->buyingstore_trade_failed_seller), HP_POP2(HP_clif_buyingstore_trade_failed_seller), 1188 }, +{ HP_POP(clif->search_store_info_ack), HP_POP2(HP_clif_search_store_info_ack), 1190 }, +{ HP_POP(clif->search_store_info_failed), HP_POP2(HP_clif_search_store_info_failed), 1192 }, +{ HP_POP(clif->open_search_store_info), HP_POP2(HP_clif_open_search_store_info), 1194 }, +{ HP_POP(clif->search_store_info_click_ack), HP_POP2(HP_clif_search_store_info_click_ack), 1196 }, +{ HP_POP(clif->elemental_info), HP_POP2(HP_clif_elemental_info), 1198 }, +{ HP_POP(clif->elemental_updatestatus), HP_POP2(HP_clif_elemental_updatestatus), 1200 }, +{ HP_POP(clif->bgqueue_ack), HP_POP2(HP_clif_bgqueue_ack), 1202 }, +{ HP_POP(clif->bgqueue_notice_delete), HP_POP2(HP_clif_bgqueue_notice_delete), 1204 }, +{ HP_POP(clif->bgqueue_update_info), HP_POP2(HP_clif_bgqueue_update_info), 1206 }, +{ HP_POP(clif->bgqueue_joined), HP_POP2(HP_clif_bgqueue_joined), 1208 }, +{ HP_POP(clif->bgqueue_pcleft), HP_POP2(HP_clif_bgqueue_pcleft), 1210 }, +{ HP_POP(clif->bgqueue_battlebegins), HP_POP2(HP_clif_bgqueue_battlebegins), 1212 }, +{ HP_POP(clif->adopt_reply), HP_POP2(HP_clif_adopt_reply), 1214 }, +{ HP_POP(clif->adopt_request), HP_POP2(HP_clif_adopt_request), 1216 }, +{ HP_POP(clif->readbook), HP_POP2(HP_clif_readbook), 1218 }, +{ HP_POP(clif->notify_time), HP_POP2(HP_clif_notify_time), 1220 }, +{ HP_POP(clif->user_count), HP_POP2(HP_clif_user_count), 1222 }, +{ HP_POP(clif->noask_sub), HP_POP2(HP_clif_noask_sub), 1224 }, +{ HP_POP(clif->bc_ready), HP_POP2(HP_clif_bc_ready), 1226 }, +{ HP_POP(clif->undisguise_timer), HP_POP2(HP_clif_undisguise_timer), 1228 }, +{ HP_POP(clif->chsys_create), HP_POP2(HP_clif_chsys_create), 1230 }, +{ HP_POP(clif->chsys_msg), HP_POP2(HP_clif_chsys_msg), 1232 }, +{ HP_POP(clif->chsys_msg2), HP_POP2(HP_clif_chsys_msg2), 1234 }, +{ HP_POP(clif->chsys_send), HP_POP2(HP_clif_chsys_send), 1236 }, +{ HP_POP(clif->chsys_join), HP_POP2(HP_clif_chsys_join), 1238 }, +{ HP_POP(clif->chsys_left), HP_POP2(HP_clif_chsys_left), 1240 }, +{ HP_POP(clif->chsys_delete), HP_POP2(HP_clif_chsys_delete), 1242 }, +{ HP_POP(clif->chsys_mjoin), HP_POP2(HP_clif_chsys_mjoin), 1244 }, +{ HP_POP(clif->chsys_quit), HP_POP2(HP_clif_chsys_quit), 1246 }, +{ HP_POP(clif->chsys_quitg), HP_POP2(HP_clif_chsys_quitg), 1248 }, +{ HP_POP(clif->chsys_gjoin), HP_POP2(HP_clif_chsys_gjoin), 1250 }, +{ HP_POP(clif->chsys_gleave), HP_POP2(HP_clif_chsys_gleave), 1252 }, +{ HP_POP(clif->pWantToConnection), HP_POP2(HP_clif_pWantToConnection), 1254 }, +{ HP_POP(clif->pLoadEndAck), HP_POP2(HP_clif_pLoadEndAck), 1256 }, +{ HP_POP(clif->pTickSend), HP_POP2(HP_clif_pTickSend), 1258 }, +{ HP_POP(clif->pHotkey), HP_POP2(HP_clif_pHotkey), 1260 }, +{ HP_POP(clif->pProgressbar), HP_POP2(HP_clif_pProgressbar), 1262 }, +{ HP_POP(clif->pWalkToXY), HP_POP2(HP_clif_pWalkToXY), 1264 }, +{ HP_POP(clif->pQuitGame), HP_POP2(HP_clif_pQuitGame), 1266 }, +{ HP_POP(clif->pGetCharNameRequest), HP_POP2(HP_clif_pGetCharNameRequest), 1268 }, +{ HP_POP(clif->pGlobalMessage), HP_POP2(HP_clif_pGlobalMessage), 1270 }, +{ HP_POP(clif->pMapMove), HP_POP2(HP_clif_pMapMove), 1272 }, +{ HP_POP(clif->pChangeDir), HP_POP2(HP_clif_pChangeDir), 1274 }, +{ HP_POP(clif->pEmotion), HP_POP2(HP_clif_pEmotion), 1276 }, +{ HP_POP(clif->pHowManyConnections), HP_POP2(HP_clif_pHowManyConnections), 1278 }, +{ HP_POP(clif->pActionRequest), HP_POP2(HP_clif_pActionRequest), 1280 }, +{ HP_POP(clif->pActionRequest_sub), HP_POP2(HP_clif_pActionRequest_sub), 1282 }, +{ HP_POP(clif->pRestart), HP_POP2(HP_clif_pRestart), 1284 }, +{ HP_POP(clif->pWisMessage), HP_POP2(HP_clif_pWisMessage), 1286 }, +{ HP_POP(clif->pBroadcast), HP_POP2(HP_clif_pBroadcast), 1288 }, +{ HP_POP(clif->pTakeItem), HP_POP2(HP_clif_pTakeItem), 1290 }, +{ HP_POP(clif->pDropItem), HP_POP2(HP_clif_pDropItem), 1292 }, +{ HP_POP(clif->pUseItem), HP_POP2(HP_clif_pUseItem), 1294 }, +{ HP_POP(clif->pEquipItem), HP_POP2(HP_clif_pEquipItem), 1296 }, +{ HP_POP(clif->pUnequipItem), HP_POP2(HP_clif_pUnequipItem), 1298 }, +{ HP_POP(clif->pNpcClicked), HP_POP2(HP_clif_pNpcClicked), 1300 }, +{ HP_POP(clif->pNpcBuySellSelected), HP_POP2(HP_clif_pNpcBuySellSelected), 1302 }, +{ HP_POP(clif->pNpcBuyListSend), HP_POP2(HP_clif_pNpcBuyListSend), 1304 }, +{ HP_POP(clif->pNpcSellListSend), HP_POP2(HP_clif_pNpcSellListSend), 1306 }, +{ HP_POP(clif->pCreateChatRoom), HP_POP2(HP_clif_pCreateChatRoom), 1308 }, +{ HP_POP(clif->pChatAddMember), HP_POP2(HP_clif_pChatAddMember), 1310 }, +{ HP_POP(clif->pChatRoomStatusChange), HP_POP2(HP_clif_pChatRoomStatusChange), 1312 }, +{ HP_POP(clif->pChangeChatOwner), HP_POP2(HP_clif_pChangeChatOwner), 1314 }, +{ HP_POP(clif->pKickFromChat), HP_POP2(HP_clif_pKickFromChat), 1316 }, +{ HP_POP(clif->pChatLeave), HP_POP2(HP_clif_pChatLeave), 1318 }, +{ HP_POP(clif->pTradeRequest), HP_POP2(HP_clif_pTradeRequest), 1320 }, +{ HP_POP(clif->chann_config_read), HP_POP2(HP_clif_chann_config_read), 1322 }, +{ HP_POP(clif->pTradeAck), HP_POP2(HP_clif_pTradeAck), 1324 }, +{ HP_POP(clif->pTradeAddItem), HP_POP2(HP_clif_pTradeAddItem), 1326 }, +{ HP_POP(clif->pTradeOk), HP_POP2(HP_clif_pTradeOk), 1328 }, +{ HP_POP(clif->pTradeCancel), HP_POP2(HP_clif_pTradeCancel), 1330 }, +{ HP_POP(clif->pTradeCommit), HP_POP2(HP_clif_pTradeCommit), 1332 }, +{ HP_POP(clif->pStopAttack), HP_POP2(HP_clif_pStopAttack), 1334 }, +{ HP_POP(clif->pPutItemToCart), HP_POP2(HP_clif_pPutItemToCart), 1336 }, +{ HP_POP(clif->pGetItemFromCart), HP_POP2(HP_clif_pGetItemFromCart), 1338 }, +{ HP_POP(clif->pRemoveOption), HP_POP2(HP_clif_pRemoveOption), 1340 }, +{ HP_POP(clif->pChangeCart), HP_POP2(HP_clif_pChangeCart), 1342 }, +{ HP_POP(clif->pStatusUp), HP_POP2(HP_clif_pStatusUp), 1344 }, +{ HP_POP(clif->pSkillUp), HP_POP2(HP_clif_pSkillUp), 1346 }, +{ HP_POP(clif->pUseSkillToId), HP_POP2(HP_clif_pUseSkillToId), 1348 }, +{ HP_POP(clif->pUseSkillToId_homun), HP_POP2(HP_clif_pUseSkillToId_homun), 1350 }, +{ HP_POP(clif->pUseSkillToId_mercenary), HP_POP2(HP_clif_pUseSkillToId_mercenary), 1352 }, +{ HP_POP(clif->pUseSkillToPos), HP_POP2(HP_clif_pUseSkillToPos), 1354 }, +{ HP_POP(clif->pUseSkillToPosSub), HP_POP2(HP_clif_pUseSkillToPosSub), 1356 }, +{ HP_POP(clif->pUseSkillToPos_homun), HP_POP2(HP_clif_pUseSkillToPos_homun), 1358 }, +{ HP_POP(clif->pUseSkillToPos_mercenary), HP_POP2(HP_clif_pUseSkillToPos_mercenary), 1360 }, +{ HP_POP(clif->pUseSkillToPosMoreInfo), HP_POP2(HP_clif_pUseSkillToPosMoreInfo), 1362 }, +{ HP_POP(clif->pUseSkillMap), HP_POP2(HP_clif_pUseSkillMap), 1364 }, +{ HP_POP(clif->pRequestMemo), HP_POP2(HP_clif_pRequestMemo), 1366 }, +{ HP_POP(clif->pProduceMix), HP_POP2(HP_clif_pProduceMix), 1368 }, +{ HP_POP(clif->pCooking), HP_POP2(HP_clif_pCooking), 1370 }, +{ HP_POP(clif->pRepairItem), HP_POP2(HP_clif_pRepairItem), 1372 }, +{ HP_POP(clif->pWeaponRefine), HP_POP2(HP_clif_pWeaponRefine), 1374 }, +{ HP_POP(clif->pNpcSelectMenu), HP_POP2(HP_clif_pNpcSelectMenu), 1376 }, +{ HP_POP(clif->pNpcNextClicked), HP_POP2(HP_clif_pNpcNextClicked), 1378 }, +{ HP_POP(clif->pNpcAmountInput), HP_POP2(HP_clif_pNpcAmountInput), 1380 }, +{ HP_POP(clif->pNpcStringInput), HP_POP2(HP_clif_pNpcStringInput), 1382 }, +{ HP_POP(clif->pNpcCloseClicked), HP_POP2(HP_clif_pNpcCloseClicked), 1384 }, +{ HP_POP(clif->pItemIdentify), HP_POP2(HP_clif_pItemIdentify), 1386 }, +{ HP_POP(clif->pSelectArrow), HP_POP2(HP_clif_pSelectArrow), 1388 }, +{ HP_POP(clif->pAutoSpell), HP_POP2(HP_clif_pAutoSpell), 1390 }, +{ HP_POP(clif->pUseCard), HP_POP2(HP_clif_pUseCard), 1392 }, +{ HP_POP(clif->pInsertCard), HP_POP2(HP_clif_pInsertCard), 1394 }, +{ HP_POP(clif->pSolveCharName), HP_POP2(HP_clif_pSolveCharName), 1396 }, +{ HP_POP(clif->pResetChar), HP_POP2(HP_clif_pResetChar), 1398 }, +{ HP_POP(clif->pLocalBroadcast), HP_POP2(HP_clif_pLocalBroadcast), 1400 }, +{ HP_POP(clif->pMoveToKafra), HP_POP2(HP_clif_pMoveToKafra), 1402 }, +{ HP_POP(clif->pMoveFromKafra), HP_POP2(HP_clif_pMoveFromKafra), 1404 }, +{ HP_POP(clif->pMoveToKafraFromCart), HP_POP2(HP_clif_pMoveToKafraFromCart), 1406 }, +{ HP_POP(clif->pMoveFromKafraToCart), HP_POP2(HP_clif_pMoveFromKafraToCart), 1408 }, +{ HP_POP(clif->pCloseKafra), HP_POP2(HP_clif_pCloseKafra), 1410 }, +{ HP_POP(clif->pStoragePassword), HP_POP2(HP_clif_pStoragePassword), 1412 }, +{ HP_POP(clif->pCreateParty), HP_POP2(HP_clif_pCreateParty), 1414 }, +{ HP_POP(clif->pCreateParty2), HP_POP2(HP_clif_pCreateParty2), 1416 }, +{ HP_POP(clif->pPartyInvite), HP_POP2(HP_clif_pPartyInvite), 1418 }, +{ HP_POP(clif->pPartyInvite2), HP_POP2(HP_clif_pPartyInvite2), 1420 }, +{ HP_POP(clif->pReplyPartyInvite), HP_POP2(HP_clif_pReplyPartyInvite), 1422 }, +{ HP_POP(clif->pReplyPartyInvite2), HP_POP2(HP_clif_pReplyPartyInvite2), 1424 }, +{ HP_POP(clif->pLeaveParty), HP_POP2(HP_clif_pLeaveParty), 1426 }, +{ HP_POP(clif->pRemovePartyMember), HP_POP2(HP_clif_pRemovePartyMember), 1428 }, +{ HP_POP(clif->pPartyChangeOption), HP_POP2(HP_clif_pPartyChangeOption), 1430 }, +{ HP_POP(clif->pPartyMessage), HP_POP2(HP_clif_pPartyMessage), 1432 }, +{ HP_POP(clif->pPartyChangeLeader), HP_POP2(HP_clif_pPartyChangeLeader), 1434 }, +{ HP_POP(clif->pPartyBookingRegisterReq), HP_POP2(HP_clif_pPartyBookingRegisterReq), 1436 }, +{ HP_POP(clif->pPartyBookingSearchReq), HP_POP2(HP_clif_pPartyBookingSearchReq), 1438 }, +{ HP_POP(clif->pPartyBookingDeleteReq), HP_POP2(HP_clif_pPartyBookingDeleteReq), 1440 }, +{ HP_POP(clif->pPartyBookingUpdateReq), HP_POP2(HP_clif_pPartyBookingUpdateReq), 1442 }, +{ HP_POP(clif->pCloseVending), HP_POP2(HP_clif_pCloseVending), 1444 }, +{ HP_POP(clif->pVendingListReq), HP_POP2(HP_clif_pVendingListReq), 1446 }, +{ HP_POP(clif->pPurchaseReq), HP_POP2(HP_clif_pPurchaseReq), 1448 }, +{ HP_POP(clif->pPurchaseReq2), HP_POP2(HP_clif_pPurchaseReq2), 1450 }, +{ HP_POP(clif->pOpenVending), HP_POP2(HP_clif_pOpenVending), 1452 }, +{ HP_POP(clif->pCreateGuild), HP_POP2(HP_clif_pCreateGuild), 1454 }, +{ HP_POP(clif->pGuildCheckMaster), HP_POP2(HP_clif_pGuildCheckMaster), 1456 }, +{ HP_POP(clif->pGuildRequestInfo), HP_POP2(HP_clif_pGuildRequestInfo), 1458 }, +{ HP_POP(clif->pGuildChangePositionInfo), HP_POP2(HP_clif_pGuildChangePositionInfo), 1460 }, +{ HP_POP(clif->pGuildChangeMemberPosition), HP_POP2(HP_clif_pGuildChangeMemberPosition), 1462 }, +{ HP_POP(clif->pGuildRequestEmblem), HP_POP2(HP_clif_pGuildRequestEmblem), 1464 }, +{ HP_POP(clif->pGuildChangeEmblem), HP_POP2(HP_clif_pGuildChangeEmblem), 1466 }, +{ HP_POP(clif->pGuildChangeNotice), HP_POP2(HP_clif_pGuildChangeNotice), 1468 }, +{ HP_POP(clif->pGuildInvite), HP_POP2(HP_clif_pGuildInvite), 1470 }, +{ HP_POP(clif->pGuildReplyInvite), HP_POP2(HP_clif_pGuildReplyInvite), 1472 }, +{ HP_POP(clif->pGuildLeave), HP_POP2(HP_clif_pGuildLeave), 1474 }, +{ HP_POP(clif->pGuildExpulsion), HP_POP2(HP_clif_pGuildExpulsion), 1476 }, +{ HP_POP(clif->pGuildMessage), HP_POP2(HP_clif_pGuildMessage), 1478 }, +{ HP_POP(clif->pGuildRequestAlliance), HP_POP2(HP_clif_pGuildRequestAlliance), 1480 }, +{ HP_POP(clif->pGuildReplyAlliance), HP_POP2(HP_clif_pGuildReplyAlliance), 1482 }, +{ HP_POP(clif->pGuildDelAlliance), HP_POP2(HP_clif_pGuildDelAlliance), 1484 }, +{ HP_POP(clif->pGuildOpposition), HP_POP2(HP_clif_pGuildOpposition), 1486 }, +{ HP_POP(clif->pGuildBreak), HP_POP2(HP_clif_pGuildBreak), 1488 }, +{ HP_POP(clif->pPetMenu), HP_POP2(HP_clif_pPetMenu), 1490 }, +{ HP_POP(clif->pCatchPet), HP_POP2(HP_clif_pCatchPet), 1492 }, +{ HP_POP(clif->pSelectEgg), HP_POP2(HP_clif_pSelectEgg), 1494 }, +{ HP_POP(clif->pSendEmotion), HP_POP2(HP_clif_pSendEmotion), 1496 }, +{ HP_POP(clif->pChangePetName), HP_POP2(HP_clif_pChangePetName), 1498 }, +{ HP_POP(clif->pGMKick), HP_POP2(HP_clif_pGMKick), 1500 }, +{ HP_POP(clif->pGMKickAll), HP_POP2(HP_clif_pGMKickAll), 1502 }, +{ HP_POP(clif->pGMShift), HP_POP2(HP_clif_pGMShift), 1504 }, +{ HP_POP(clif->pGMRemove2), HP_POP2(HP_clif_pGMRemove2), 1506 }, +{ HP_POP(clif->pGMRecall), HP_POP2(HP_clif_pGMRecall), 1508 }, +{ HP_POP(clif->pGMRecall2), HP_POP2(HP_clif_pGMRecall2), 1510 }, +{ HP_POP(clif->pGM_Monster_Item), HP_POP2(HP_clif_pGM_Monster_Item), 1512 }, +{ HP_POP(clif->pGMHide), HP_POP2(HP_clif_pGMHide), 1514 }, +{ HP_POP(clif->pGMReqNoChat), HP_POP2(HP_clif_pGMReqNoChat), 1516 }, +{ HP_POP(clif->pGMRc), HP_POP2(HP_clif_pGMRc), 1518 }, +{ HP_POP(clif->pGMReqAccountName), HP_POP2(HP_clif_pGMReqAccountName), 1520 }, +{ HP_POP(clif->pGMChangeMapType), HP_POP2(HP_clif_pGMChangeMapType), 1522 }, +{ HP_POP(clif->pPMIgnore), HP_POP2(HP_clif_pPMIgnore), 1524 }, +{ HP_POP(clif->pPMIgnoreAll), HP_POP2(HP_clif_pPMIgnoreAll), 1526 }, +{ HP_POP(clif->pPMIgnoreList), HP_POP2(HP_clif_pPMIgnoreList), 1528 }, +{ HP_POP(clif->pNoviceDoriDori), HP_POP2(HP_clif_pNoviceDoriDori), 1530 }, +{ HP_POP(clif->pNoviceExplosionSpirits), HP_POP2(HP_clif_pNoviceExplosionSpirits), 1532 }, +{ HP_POP(clif->pFriendsListAdd), HP_POP2(HP_clif_pFriendsListAdd), 1534 }, +{ HP_POP(clif->pFriendsListReply), HP_POP2(HP_clif_pFriendsListReply), 1536 }, +{ HP_POP(clif->pFriendsListRemove), HP_POP2(HP_clif_pFriendsListRemove), 1538 }, +{ HP_POP(clif->pPVPInfo), HP_POP2(HP_clif_pPVPInfo), 1540 }, +{ HP_POP(clif->pBlacksmith), HP_POP2(HP_clif_pBlacksmith), 1542 }, +{ HP_POP(clif->pAlchemist), HP_POP2(HP_clif_pAlchemist), 1544 }, +{ HP_POP(clif->pTaekwon), HP_POP2(HP_clif_pTaekwon), 1546 }, +{ HP_POP(clif->pRankingPk), HP_POP2(HP_clif_pRankingPk), 1548 }, +{ HP_POP(clif->pFeelSaveOk), HP_POP2(HP_clif_pFeelSaveOk), 1550 }, +{ HP_POP(clif->pChangeHomunculusName), HP_POP2(HP_clif_pChangeHomunculusName), 1552 }, +{ HP_POP(clif->pHomMoveToMaster), HP_POP2(HP_clif_pHomMoveToMaster), 1554 }, +{ HP_POP(clif->pHomMoveTo), HP_POP2(HP_clif_pHomMoveTo), 1556 }, +{ HP_POP(clif->pHomAttack), HP_POP2(HP_clif_pHomAttack), 1558 }, +{ HP_POP(clif->pHomMenu), HP_POP2(HP_clif_pHomMenu), 1560 }, +{ HP_POP(clif->pAutoRevive), HP_POP2(HP_clif_pAutoRevive), 1562 }, +{ HP_POP(clif->pCheck), HP_POP2(HP_clif_pCheck), 1564 }, +{ HP_POP(clif->pMail_refreshinbox), HP_POP2(HP_clif_pMail_refreshinbox), 1566 }, +{ HP_POP(clif->pMail_read), HP_POP2(HP_clif_pMail_read), 1568 }, +{ HP_POP(clif->pMail_getattach), HP_POP2(HP_clif_pMail_getattach), 1570 }, +{ HP_POP(clif->pMail_delete), HP_POP2(HP_clif_pMail_delete), 1572 }, +{ HP_POP(clif->pMail_return), HP_POP2(HP_clif_pMail_return), 1574 }, +{ HP_POP(clif->pMail_setattach), HP_POP2(HP_clif_pMail_setattach), 1576 }, +{ HP_POP(clif->pMail_winopen), HP_POP2(HP_clif_pMail_winopen), 1578 }, +{ HP_POP(clif->pMail_send), HP_POP2(HP_clif_pMail_send), 1580 }, +{ HP_POP(clif->pAuction_cancelreg), HP_POP2(HP_clif_pAuction_cancelreg), 1582 }, +{ HP_POP(clif->pAuction_setitem), HP_POP2(HP_clif_pAuction_setitem), 1584 }, +{ HP_POP(clif->pAuction_register), HP_POP2(HP_clif_pAuction_register), 1586 }, +{ HP_POP(clif->pAuction_cancel), HP_POP2(HP_clif_pAuction_cancel), 1588 }, +{ HP_POP(clif->pAuction_close), HP_POP2(HP_clif_pAuction_close), 1590 }, +{ HP_POP(clif->pAuction_bid), HP_POP2(HP_clif_pAuction_bid), 1592 }, +{ HP_POP(clif->pAuction_search), HP_POP2(HP_clif_pAuction_search), 1594 }, +{ HP_POP(clif->pAuction_buysell), HP_POP2(HP_clif_pAuction_buysell), 1596 }, +{ HP_POP(clif->pcashshop_buy), HP_POP2(HP_clif_pcashshop_buy), 1598 }, +{ HP_POP(clif->pAdopt_request), HP_POP2(HP_clif_pAdopt_request), 1600 }, +{ HP_POP(clif->pAdopt_reply), HP_POP2(HP_clif_pAdopt_reply), 1602 }, +{ HP_POP(clif->pViewPlayerEquip), HP_POP2(HP_clif_pViewPlayerEquip), 1604 }, +{ HP_POP(clif->pEquipTick), HP_POP2(HP_clif_pEquipTick), 1606 }, +{ HP_POP(clif->pquestStateAck), HP_POP2(HP_clif_pquestStateAck), 1608 }, +{ HP_POP(clif->pmercenary_action), HP_POP2(HP_clif_pmercenary_action), 1610 }, +{ HP_POP(clif->pBattleChat), HP_POP2(HP_clif_pBattleChat), 1612 }, +{ HP_POP(clif->pLessEffect), HP_POP2(HP_clif_pLessEffect), 1614 }, +{ HP_POP(clif->pItemListWindowSelected), HP_POP2(HP_clif_pItemListWindowSelected), 1616 }, +{ HP_POP(clif->pReqOpenBuyingStore), HP_POP2(HP_clif_pReqOpenBuyingStore), 1618 }, +{ HP_POP(clif->pReqCloseBuyingStore), HP_POP2(HP_clif_pReqCloseBuyingStore), 1620 }, +{ HP_POP(clif->pReqClickBuyingStore), HP_POP2(HP_clif_pReqClickBuyingStore), 1622 }, +{ HP_POP(clif->pReqTradeBuyingStore), HP_POP2(HP_clif_pReqTradeBuyingStore), 1624 }, +{ HP_POP(clif->pSearchStoreInfo), HP_POP2(HP_clif_pSearchStoreInfo), 1626 }, +{ HP_POP(clif->pSearchStoreInfoNextPage), HP_POP2(HP_clif_pSearchStoreInfoNextPage), 1628 }, +{ HP_POP(clif->pCloseSearchStoreInfo), HP_POP2(HP_clif_pCloseSearchStoreInfo), 1630 }, +{ HP_POP(clif->pSearchStoreInfoListItemClick), HP_POP2(HP_clif_pSearchStoreInfoListItemClick), 1632 }, +{ HP_POP(clif->pDebug), HP_POP2(HP_clif_pDebug), 1634 }, +{ HP_POP(clif->pSkillSelectMenu), HP_POP2(HP_clif_pSkillSelectMenu), 1636 }, +{ HP_POP(clif->pMoveItem), HP_POP2(HP_clif_pMoveItem), 1638 }, +{ HP_POP(clif->pDull), HP_POP2(HP_clif_pDull), 1640 }, +{ HP_POP(clif->pBGQueueRegister), HP_POP2(HP_clif_pBGQueueRegister), 1642 }, +{ HP_POP(clif->pBGQueueCheckState), HP_POP2(HP_clif_pBGQueueCheckState), 1644 }, +{ HP_POP(clif->pBGQueueRevokeReq), HP_POP2(HP_clif_pBGQueueRevokeReq), 1646 }, +{ HP_POP(clif->pBGQueueBattleBeginAck), HP_POP2(HP_clif_pBGQueueBattleBeginAck), 1648 }, +{ HP_POP(clif->pCashShopOpen), HP_POP2(HP_clif_pCashShopOpen), 1650 }, +{ HP_POP(clif->pCashShopClose), HP_POP2(HP_clif_pCashShopClose), 1652 }, +{ HP_POP(clif->pCashShopReqTab), HP_POP2(HP_clif_pCashShopReqTab), 1654 }, +{ HP_POP(clif->pCashShopSchedule), HP_POP2(HP_clif_pCashShopSchedule), 1656 }, +{ HP_POP(clif->pCashShopBuy), HP_POP2(HP_clif_pCashShopBuy), 1658 }, +{ HP_POP(clif->pPartyTick), HP_POP2(HP_clif_pPartyTick), 1660 }, +{ HP_POP(clif->pGuildInvite2), HP_POP2(HP_clif_pGuildInvite2), 1662 }, +{ HP_POP(clif->pPartyBookingAddFilter), HP_POP2(HP_clif_pPartyBookingAddFilter), 1664 }, +{ HP_POP(clif->pPartyBookingSubFilter), HP_POP2(HP_clif_pPartyBookingSubFilter), 1666 }, +{ HP_POP(clif->pPartyBookingReqVolunteer), HP_POP2(HP_clif_pPartyBookingReqVolunteer), 1668 }, +{ HP_POP(clif->pPartyBookingRefuseVolunteer), HP_POP2(HP_clif_pPartyBookingRefuseVolunteer), 1670 }, +{ HP_POP(clif->pPartyBookingCancelVolunteer), HP_POP2(HP_clif_pPartyBookingCancelVolunteer), 1672 }, /* duel */ -{ HP_POP(duel->create), HP_POP2(HP_duel_create), 1670 }, -{ HP_POP(duel->invite), HP_POP2(HP_duel_invite), 1672 }, -{ HP_POP(duel->accept), HP_POP2(HP_duel_accept), 1674 }, -{ HP_POP(duel->reject), HP_POP2(HP_duel_reject), 1676 }, -{ HP_POP(duel->leave), HP_POP2(HP_duel_leave), 1678 }, -{ HP_POP(duel->showinfo), HP_POP2(HP_duel_showinfo), 1680 }, -{ HP_POP(duel->checktime), HP_POP2(HP_duel_checktime), 1682 }, -{ HP_POP(duel->init), HP_POP2(HP_duel_init), 1684 }, -{ HP_POP(duel->final), HP_POP2(HP_duel_final), 1686 }, +{ HP_POP(duel->create), HP_POP2(HP_duel_create), 1674 }, +{ HP_POP(duel->invite), HP_POP2(HP_duel_invite), 1676 }, +{ HP_POP(duel->accept), HP_POP2(HP_duel_accept), 1678 }, +{ HP_POP(duel->reject), HP_POP2(HP_duel_reject), 1680 }, +{ HP_POP(duel->leave), HP_POP2(HP_duel_leave), 1682 }, +{ HP_POP(duel->showinfo), HP_POP2(HP_duel_showinfo), 1684 }, +{ HP_POP(duel->checktime), HP_POP2(HP_duel_checktime), 1686 }, +{ HP_POP(duel->init), HP_POP2(HP_duel_init), 1688 }, +{ HP_POP(duel->final), HP_POP2(HP_duel_final), 1690 }, /* elemental */ -{ HP_POP(elemental->init), HP_POP2(HP_elemental_init), 1688 }, -{ HP_POP(elemental->final), HP_POP2(HP_elemental_final), 1690 }, -{ HP_POP(elemental->class), HP_POP2(HP_elemental_class), 1692 }, -{ HP_POP(elemental->get_viewdata), HP_POP2(HP_elemental_get_viewdata), 1694 }, -{ HP_POP(elemental->create), HP_POP2(HP_elemental_create), 1696 }, -{ HP_POP(elemental->data_received), HP_POP2(HP_elemental_data_received), 1698 }, -{ HP_POP(elemental->save), HP_POP2(HP_elemental_save), 1700 }, -{ HP_POP(elemental->change_mode_ack), HP_POP2(HP_elemental_change_mode_ack), 1702 }, -{ HP_POP(elemental->change_mode), HP_POP2(HP_elemental_change_mode), 1704 }, -{ HP_POP(elemental->heal), HP_POP2(HP_elemental_heal), 1706 }, -{ HP_POP(elemental->dead), HP_POP2(HP_elemental_dead), 1708 }, -{ HP_POP(elemental->delete), HP_POP2(HP_elemental_delete), 1710 }, -{ HP_POP(elemental->summon_stop), HP_POP2(HP_elemental_summon_stop), 1712 }, -{ HP_POP(elemental->get_lifetime), HP_POP2(HP_elemental_get_lifetime), 1714 }, -{ HP_POP(elemental->unlocktarget), HP_POP2(HP_elemental_unlocktarget), 1716 }, -{ HP_POP(elemental->skillnotok), HP_POP2(HP_elemental_skillnotok), 1718 }, -{ HP_POP(elemental->set_target), HP_POP2(HP_elemental_set_target), 1720 }, -{ HP_POP(elemental->clean_single_effect), HP_POP2(HP_elemental_clean_single_effect), 1722 }, -{ HP_POP(elemental->clean_effect), HP_POP2(HP_elemental_clean_effect), 1724 }, -{ HP_POP(elemental->action), HP_POP2(HP_elemental_action), 1726 }, -{ HP_POP(elemental->skill_get_requirements), HP_POP2(HP_elemental_skill_get_requirements), 1728 }, -{ HP_POP(elemental->read_skilldb), HP_POP2(HP_elemental_read_skilldb), 1730 }, -{ HP_POP(elemental->reload_db), HP_POP2(HP_elemental_reload_db), 1732 }, -{ HP_POP(elemental->reload_skilldb), HP_POP2(HP_elemental_reload_skilldb), 1734 }, -{ HP_POP(elemental->search_index), HP_POP2(HP_elemental_search_index), 1736 }, -{ HP_POP(elemental->summon_init), HP_POP2(HP_elemental_summon_init), 1738 }, -{ HP_POP(elemental->summon_end_timer), HP_POP2(HP_elemental_summon_end_timer), 1740 }, -{ HP_POP(elemental->ai_sub_timer_activesearch), HP_POP2(HP_elemental_ai_sub_timer_activesearch), 1742 }, -{ HP_POP(elemental->ai_sub_timer), HP_POP2(HP_elemental_ai_sub_timer), 1744 }, -{ HP_POP(elemental->ai_sub_foreachclient), HP_POP2(HP_elemental_ai_sub_foreachclient), 1746 }, -{ HP_POP(elemental->ai_timer), HP_POP2(HP_elemental_ai_timer), 1748 }, -{ HP_POP(elemental->read_db), HP_POP2(HP_elemental_read_db), 1750 }, +{ HP_POP(elemental->init), HP_POP2(HP_elemental_init), 1692 }, +{ HP_POP(elemental->final), HP_POP2(HP_elemental_final), 1694 }, +{ HP_POP(elemental->class), HP_POP2(HP_elemental_class), 1696 }, +{ HP_POP(elemental->get_viewdata), HP_POP2(HP_elemental_get_viewdata), 1698 }, +{ HP_POP(elemental->create), HP_POP2(HP_elemental_create), 1700 }, +{ HP_POP(elemental->data_received), HP_POP2(HP_elemental_data_received), 1702 }, +{ HP_POP(elemental->save), HP_POP2(HP_elemental_save), 1704 }, +{ HP_POP(elemental->change_mode_ack), HP_POP2(HP_elemental_change_mode_ack), 1706 }, +{ HP_POP(elemental->change_mode), HP_POP2(HP_elemental_change_mode), 1708 }, +{ HP_POP(elemental->heal), HP_POP2(HP_elemental_heal), 1710 }, +{ HP_POP(elemental->dead), HP_POP2(HP_elemental_dead), 1712 }, +{ HP_POP(elemental->delete), HP_POP2(HP_elemental_delete), 1714 }, +{ HP_POP(elemental->summon_stop), HP_POP2(HP_elemental_summon_stop), 1716 }, +{ HP_POP(elemental->get_lifetime), HP_POP2(HP_elemental_get_lifetime), 1718 }, +{ HP_POP(elemental->unlocktarget), HP_POP2(HP_elemental_unlocktarget), 1720 }, +{ HP_POP(elemental->skillnotok), HP_POP2(HP_elemental_skillnotok), 1722 }, +{ HP_POP(elemental->set_target), HP_POP2(HP_elemental_set_target), 1724 }, +{ HP_POP(elemental->clean_single_effect), HP_POP2(HP_elemental_clean_single_effect), 1726 }, +{ HP_POP(elemental->clean_effect), HP_POP2(HP_elemental_clean_effect), 1728 }, +{ HP_POP(elemental->action), HP_POP2(HP_elemental_action), 1730 }, +{ HP_POP(elemental->skill_get_requirements), HP_POP2(HP_elemental_skill_get_requirements), 1732 }, +{ HP_POP(elemental->read_skilldb), HP_POP2(HP_elemental_read_skilldb), 1734 }, +{ HP_POP(elemental->reload_db), HP_POP2(HP_elemental_reload_db), 1736 }, +{ HP_POP(elemental->reload_skilldb), HP_POP2(HP_elemental_reload_skilldb), 1738 }, +{ HP_POP(elemental->search_index), HP_POP2(HP_elemental_search_index), 1740 }, +{ HP_POP(elemental->summon_init), HP_POP2(HP_elemental_summon_init), 1742 }, +{ HP_POP(elemental->summon_end_timer), HP_POP2(HP_elemental_summon_end_timer), 1744 }, +{ HP_POP(elemental->ai_sub_timer_activesearch), HP_POP2(HP_elemental_ai_sub_timer_activesearch), 1746 }, +{ HP_POP(elemental->ai_sub_timer), HP_POP2(HP_elemental_ai_sub_timer), 1748 }, +{ HP_POP(elemental->ai_sub_foreachclient), HP_POP2(HP_elemental_ai_sub_foreachclient), 1750 }, +{ HP_POP(elemental->ai_timer), HP_POP2(HP_elemental_ai_timer), 1752 }, +{ HP_POP(elemental->read_db), HP_POP2(HP_elemental_read_db), 1754 }, /* guild */ -{ HP_POP(guild->init), HP_POP2(HP_guild_init), 1752 }, -{ HP_POP(guild->final), HP_POP2(HP_guild_final), 1754 }, -{ HP_POP(guild->skill_get_max), HP_POP2(HP_guild_skill_get_max), 1756 }, -{ HP_POP(guild->checkskill), HP_POP2(HP_guild_checkskill), 1758 }, -{ HP_POP(guild->check_skill_require), HP_POP2(HP_guild_check_skill_require), 1760 }, -{ HP_POP(guild->checkcastles), HP_POP2(HP_guild_checkcastles), 1762 }, -{ HP_POP(guild->isallied), HP_POP2(HP_guild_isallied), 1764 }, -{ HP_POP(guild->search), HP_POP2(HP_guild_search), 1766 }, -{ HP_POP(guild->searchname), HP_POP2(HP_guild_searchname), 1768 }, -{ HP_POP(guild->castle_search), HP_POP2(HP_guild_castle_search), 1770 }, -{ HP_POP(guild->mapname2gc), HP_POP2(HP_guild_mapname2gc), 1772 }, -{ HP_POP(guild->mapindex2gc), HP_POP2(HP_guild_mapindex2gc), 1774 }, -{ HP_POP(guild->getavailablesd), HP_POP2(HP_guild_getavailablesd), 1776 }, -{ HP_POP(guild->getindex), HP_POP2(HP_guild_getindex), 1778 }, -{ HP_POP(guild->getposition), HP_POP2(HP_guild_getposition), 1780 }, -{ HP_POP(guild->payexp), HP_POP2(HP_guild_payexp), 1782 }, -{ HP_POP(guild->getexp), HP_POP2(HP_guild_getexp), 1784 }, -{ HP_POP(guild->create), HP_POP2(HP_guild_create), 1786 }, -{ HP_POP(guild->created), HP_POP2(HP_guild_created), 1788 }, -{ HP_POP(guild->request_info), HP_POP2(HP_guild_request_info), 1790 }, -{ HP_POP(guild->recv_noinfo), HP_POP2(HP_guild_recv_noinfo), 1792 }, -{ HP_POP(guild->recv_info), HP_POP2(HP_guild_recv_info), 1794 }, -{ HP_POP(guild->npc_request_info), HP_POP2(HP_guild_npc_request_info), 1796 }, -{ HP_POP(guild->invite), HP_POP2(HP_guild_invite), 1798 }, -{ HP_POP(guild->reply_invite), HP_POP2(HP_guild_reply_invite), 1800 }, -{ HP_POP(guild->member_joined), HP_POP2(HP_guild_member_joined), 1802 }, -{ HP_POP(guild->member_added), HP_POP2(HP_guild_member_added), 1804 }, -{ HP_POP(guild->leave), HP_POP2(HP_guild_leave), 1806 }, -{ HP_POP(guild->member_withdraw), HP_POP2(HP_guild_member_withdraw), 1808 }, -{ HP_POP(guild->expulsion), HP_POP2(HP_guild_expulsion), 1810 }, -{ HP_POP(guild->skillup), HP_POP2(HP_guild_skillup), 1812 }, -{ HP_POP(guild->block_skill), HP_POP2(HP_guild_block_skill), 1814 }, -{ HP_POP(guild->reqalliance), HP_POP2(HP_guild_reqalliance), 1816 }, -{ HP_POP(guild->reply_reqalliance), HP_POP2(HP_guild_reply_reqalliance), 1818 }, -{ HP_POP(guild->allianceack), HP_POP2(HP_guild_allianceack), 1820 }, -{ HP_POP(guild->delalliance), HP_POP2(HP_guild_delalliance), 1822 }, -{ HP_POP(guild->opposition), HP_POP2(HP_guild_opposition), 1824 }, -{ HP_POP(guild->check_alliance), HP_POP2(HP_guild_check_alliance), 1826 }, -{ HP_POP(guild->send_memberinfoshort), HP_POP2(HP_guild_send_memberinfoshort), 1828 }, -{ HP_POP(guild->recv_memberinfoshort), HP_POP2(HP_guild_recv_memberinfoshort), 1830 }, -{ HP_POP(guild->change_memberposition), HP_POP2(HP_guild_change_memberposition), 1832 }, -{ HP_POP(guild->memberposition_changed), HP_POP2(HP_guild_memberposition_changed), 1834 }, -{ HP_POP(guild->change_position), HP_POP2(HP_guild_change_position), 1836 }, -{ HP_POP(guild->position_changed), HP_POP2(HP_guild_position_changed), 1838 }, -{ HP_POP(guild->change_notice), HP_POP2(HP_guild_change_notice), 1840 }, -{ HP_POP(guild->notice_changed), HP_POP2(HP_guild_notice_changed), 1842 }, -{ HP_POP(guild->change_emblem), HP_POP2(HP_guild_change_emblem), 1844 }, -{ HP_POP(guild->emblem_changed), HP_POP2(HP_guild_emblem_changed), 1846 }, -{ HP_POP(guild->send_message), HP_POP2(HP_guild_send_message), 1848 }, -{ HP_POP(guild->recv_message), HP_POP2(HP_guild_recv_message), 1850 }, -{ HP_POP(guild->send_dot_remove), HP_POP2(HP_guild_send_dot_remove), 1852 }, -{ HP_POP(guild->skillupack), HP_POP2(HP_guild_skillupack), 1854 }, -{ HP_POP(guild->dobreak), HP_POP2(HP_guild_dobreak), 1856 }, -{ HP_POP(guild->broken), HP_POP2(HP_guild_broken), 1858 }, -{ HP_POP(guild->gm_change), HP_POP2(HP_guild_gm_change), 1860 }, -{ HP_POP(guild->gm_changed), HP_POP2(HP_guild_gm_changed), 1862 }, -{ HP_POP(guild->castle_map_init), HP_POP2(HP_guild_castle_map_init), 1864 }, -{ HP_POP(guild->castledatasave), HP_POP2(HP_guild_castledatasave), 1866 }, -{ HP_POP(guild->castledataloadack), HP_POP2(HP_guild_castledataloadack), 1868 }, -{ HP_POP(guild->castle_reconnect), HP_POP2(HP_guild_castle_reconnect), 1870 }, -{ HP_POP(guild->agit_start), HP_POP2(HP_guild_agit_start), 1872 }, -{ HP_POP(guild->agit_end), HP_POP2(HP_guild_agit_end), 1874 }, -{ HP_POP(guild->agit2_start), HP_POP2(HP_guild_agit2_start), 1876 }, -{ HP_POP(guild->agit2_end), HP_POP2(HP_guild_agit2_end), 1878 }, -{ HP_POP(guild->flag_add), HP_POP2(HP_guild_flag_add), 1880 }, -{ HP_POP(guild->flag_remove), HP_POP2(HP_guild_flag_remove), 1882 }, -{ HP_POP(guild->flags_clear), HP_POP2(HP_guild_flags_clear), 1884 }, -{ HP_POP(guild->aura_refresh), HP_POP2(HP_guild_aura_refresh), 1886 }, -{ HP_POP(guild->payexp_timer), HP_POP2(HP_guild_payexp_timer), 1888 }, -{ HP_POP(guild->sd_check), HP_POP2(HP_guild_sd_check), 1890 }, -{ HP_POP(guild->read_guildskill_tree_db), HP_POP2(HP_guild_read_guildskill_tree_db), 1892 }, -{ HP_POP(guild->read_castledb), HP_POP2(HP_guild_read_castledb), 1894 }, -{ HP_POP(guild->payexp_timer_sub), HP_POP2(HP_guild_payexp_timer_sub), 1896 }, -{ HP_POP(guild->send_xy_timer_sub), HP_POP2(HP_guild_send_xy_timer_sub), 1898 }, -{ HP_POP(guild->send_xy_timer), HP_POP2(HP_guild_send_xy_timer), 1900 }, -{ HP_POP(guild->create_expcache), HP_POP2(HP_guild_create_expcache), 1902 }, -{ HP_POP(guild->eventlist_db_final), HP_POP2(HP_guild_eventlist_db_final), 1904 }, -{ HP_POP(guild->expcache_db_final), HP_POP2(HP_guild_expcache_db_final), 1906 }, -{ HP_POP(guild->castle_db_final), HP_POP2(HP_guild_castle_db_final), 1908 }, -{ HP_POP(guild->broken_sub), HP_POP2(HP_guild_broken_sub), 1910 }, -{ HP_POP(guild->castle_broken_sub), HP_POP2(HP_guild_castle_broken_sub), 1912 }, -{ HP_POP(guild->makemember), HP_POP2(HP_guild_makemember), 1914 }, -{ HP_POP(guild->check_member), HP_POP2(HP_guild_check_member), 1916 }, -{ HP_POP(guild->get_alliance_count), HP_POP2(HP_guild_get_alliance_count), 1918 }, -{ HP_POP(guild->castle_reconnect_sub), HP_POP2(HP_guild_castle_reconnect_sub), 1920 }, +{ HP_POP(guild->init), HP_POP2(HP_guild_init), 1756 }, +{ HP_POP(guild->final), HP_POP2(HP_guild_final), 1758 }, +{ HP_POP(guild->skill_get_max), HP_POP2(HP_guild_skill_get_max), 1760 }, +{ HP_POP(guild->checkskill), HP_POP2(HP_guild_checkskill), 1762 }, +{ HP_POP(guild->check_skill_require), HP_POP2(HP_guild_check_skill_require), 1764 }, +{ HP_POP(guild->checkcastles), HP_POP2(HP_guild_checkcastles), 1766 }, +{ HP_POP(guild->isallied), HP_POP2(HP_guild_isallied), 1768 }, +{ HP_POP(guild->search), HP_POP2(HP_guild_search), 1770 }, +{ HP_POP(guild->searchname), HP_POP2(HP_guild_searchname), 1772 }, +{ HP_POP(guild->castle_search), HP_POP2(HP_guild_castle_search), 1774 }, +{ HP_POP(guild->mapname2gc), HP_POP2(HP_guild_mapname2gc), 1776 }, +{ HP_POP(guild->mapindex2gc), HP_POP2(HP_guild_mapindex2gc), 1778 }, +{ HP_POP(guild->getavailablesd), HP_POP2(HP_guild_getavailablesd), 1780 }, +{ HP_POP(guild->getindex), HP_POP2(HP_guild_getindex), 1782 }, +{ HP_POP(guild->getposition), HP_POP2(HP_guild_getposition), 1784 }, +{ HP_POP(guild->payexp), HP_POP2(HP_guild_payexp), 1786 }, +{ HP_POP(guild->getexp), HP_POP2(HP_guild_getexp), 1788 }, +{ HP_POP(guild->create), HP_POP2(HP_guild_create), 1790 }, +{ HP_POP(guild->created), HP_POP2(HP_guild_created), 1792 }, +{ HP_POP(guild->request_info), HP_POP2(HP_guild_request_info), 1794 }, +{ HP_POP(guild->recv_noinfo), HP_POP2(HP_guild_recv_noinfo), 1796 }, +{ HP_POP(guild->recv_info), HP_POP2(HP_guild_recv_info), 1798 }, +{ HP_POP(guild->npc_request_info), HP_POP2(HP_guild_npc_request_info), 1800 }, +{ HP_POP(guild->invite), HP_POP2(HP_guild_invite), 1802 }, +{ HP_POP(guild->reply_invite), HP_POP2(HP_guild_reply_invite), 1804 }, +{ HP_POP(guild->member_joined), HP_POP2(HP_guild_member_joined), 1806 }, +{ HP_POP(guild->member_added), HP_POP2(HP_guild_member_added), 1808 }, +{ HP_POP(guild->leave), HP_POP2(HP_guild_leave), 1810 }, +{ HP_POP(guild->member_withdraw), HP_POP2(HP_guild_member_withdraw), 1812 }, +{ HP_POP(guild->expulsion), HP_POP2(HP_guild_expulsion), 1814 }, +{ HP_POP(guild->skillup), HP_POP2(HP_guild_skillup), 1816 }, +{ HP_POP(guild->block_skill), HP_POP2(HP_guild_block_skill), 1818 }, +{ HP_POP(guild->reqalliance), HP_POP2(HP_guild_reqalliance), 1820 }, +{ HP_POP(guild->reply_reqalliance), HP_POP2(HP_guild_reply_reqalliance), 1822 }, +{ HP_POP(guild->allianceack), HP_POP2(HP_guild_allianceack), 1824 }, +{ HP_POP(guild->delalliance), HP_POP2(HP_guild_delalliance), 1826 }, +{ HP_POP(guild->opposition), HP_POP2(HP_guild_opposition), 1828 }, +{ HP_POP(guild->check_alliance), HP_POP2(HP_guild_check_alliance), 1830 }, +{ HP_POP(guild->send_memberinfoshort), HP_POP2(HP_guild_send_memberinfoshort), 1832 }, +{ HP_POP(guild->recv_memberinfoshort), HP_POP2(HP_guild_recv_memberinfoshort), 1834 }, +{ HP_POP(guild->change_memberposition), HP_POP2(HP_guild_change_memberposition), 1836 }, +{ HP_POP(guild->memberposition_changed), HP_POP2(HP_guild_memberposition_changed), 1838 }, +{ HP_POP(guild->change_position), HP_POP2(HP_guild_change_position), 1840 }, +{ HP_POP(guild->position_changed), HP_POP2(HP_guild_position_changed), 1842 }, +{ HP_POP(guild->change_notice), HP_POP2(HP_guild_change_notice), 1844 }, +{ HP_POP(guild->notice_changed), HP_POP2(HP_guild_notice_changed), 1846 }, +{ HP_POP(guild->change_emblem), HP_POP2(HP_guild_change_emblem), 1848 }, +{ HP_POP(guild->emblem_changed), HP_POP2(HP_guild_emblem_changed), 1850 }, +{ HP_POP(guild->send_message), HP_POP2(HP_guild_send_message), 1852 }, +{ HP_POP(guild->recv_message), HP_POP2(HP_guild_recv_message), 1854 }, +{ HP_POP(guild->send_dot_remove), HP_POP2(HP_guild_send_dot_remove), 1856 }, +{ HP_POP(guild->skillupack), HP_POP2(HP_guild_skillupack), 1858 }, +{ HP_POP(guild->dobreak), HP_POP2(HP_guild_dobreak), 1860 }, +{ HP_POP(guild->broken), HP_POP2(HP_guild_broken), 1862 }, +{ HP_POP(guild->gm_change), HP_POP2(HP_guild_gm_change), 1864 }, +{ HP_POP(guild->gm_changed), HP_POP2(HP_guild_gm_changed), 1866 }, +{ HP_POP(guild->castle_map_init), HP_POP2(HP_guild_castle_map_init), 1868 }, +{ HP_POP(guild->castledatasave), HP_POP2(HP_guild_castledatasave), 1870 }, +{ HP_POP(guild->castledataloadack), HP_POP2(HP_guild_castledataloadack), 1872 }, +{ HP_POP(guild->castle_reconnect), HP_POP2(HP_guild_castle_reconnect), 1874 }, +{ HP_POP(guild->agit_start), HP_POP2(HP_guild_agit_start), 1876 }, +{ HP_POP(guild->agit_end), HP_POP2(HP_guild_agit_end), 1878 }, +{ HP_POP(guild->agit2_start), HP_POP2(HP_guild_agit2_start), 1880 }, +{ HP_POP(guild->agit2_end), HP_POP2(HP_guild_agit2_end), 1882 }, +{ HP_POP(guild->flag_add), HP_POP2(HP_guild_flag_add), 1884 }, +{ HP_POP(guild->flag_remove), HP_POP2(HP_guild_flag_remove), 1886 }, +{ HP_POP(guild->flags_clear), HP_POP2(HP_guild_flags_clear), 1888 }, +{ HP_POP(guild->aura_refresh), HP_POP2(HP_guild_aura_refresh), 1890 }, +{ HP_POP(guild->payexp_timer), HP_POP2(HP_guild_payexp_timer), 1892 }, +{ HP_POP(guild->sd_check), HP_POP2(HP_guild_sd_check), 1894 }, +{ HP_POP(guild->read_guildskill_tree_db), HP_POP2(HP_guild_read_guildskill_tree_db), 1896 }, +{ HP_POP(guild->read_castledb), HP_POP2(HP_guild_read_castledb), 1898 }, +{ HP_POP(guild->payexp_timer_sub), HP_POP2(HP_guild_payexp_timer_sub), 1900 }, +{ HP_POP(guild->send_xy_timer_sub), HP_POP2(HP_guild_send_xy_timer_sub), 1902 }, +{ HP_POP(guild->send_xy_timer), HP_POP2(HP_guild_send_xy_timer), 1904 }, +{ HP_POP(guild->create_expcache), HP_POP2(HP_guild_create_expcache), 1906 }, +{ HP_POP(guild->eventlist_db_final), HP_POP2(HP_guild_eventlist_db_final), 1908 }, +{ HP_POP(guild->expcache_db_final), HP_POP2(HP_guild_expcache_db_final), 1910 }, +{ HP_POP(guild->castle_db_final), HP_POP2(HP_guild_castle_db_final), 1912 }, +{ HP_POP(guild->broken_sub), HP_POP2(HP_guild_broken_sub), 1914 }, +{ HP_POP(guild->castle_broken_sub), HP_POP2(HP_guild_castle_broken_sub), 1916 }, +{ HP_POP(guild->makemember), HP_POP2(HP_guild_makemember), 1918 }, +{ HP_POP(guild->check_member), HP_POP2(HP_guild_check_member), 1920 }, +{ HP_POP(guild->get_alliance_count), HP_POP2(HP_guild_get_alliance_count), 1922 }, +{ HP_POP(guild->castle_reconnect_sub), HP_POP2(HP_guild_castle_reconnect_sub), 1924 }, /* gstorage */ -{ HP_POP(gstorage->id2storage), HP_POP2(HP_gstorage_id2storage), 1922 }, -{ HP_POP(gstorage->id2storage2), HP_POP2(HP_gstorage_id2storage2), 1924 }, -{ HP_POP(gstorage->init), HP_POP2(HP_gstorage_init), 1926 }, -{ HP_POP(gstorage->final), HP_POP2(HP_gstorage_final), 1928 }, -{ HP_POP(gstorage->delete), HP_POP2(HP_gstorage_delete), 1930 }, -{ HP_POP(gstorage->open), HP_POP2(HP_gstorage_open), 1932 }, -{ HP_POP(gstorage->additem), HP_POP2(HP_gstorage_additem), 1934 }, -{ HP_POP(gstorage->delitem), HP_POP2(HP_gstorage_delitem), 1936 }, -{ HP_POP(gstorage->add), HP_POP2(HP_gstorage_add), 1938 }, -{ HP_POP(gstorage->get), HP_POP2(HP_gstorage_get), 1940 }, -{ HP_POP(gstorage->addfromcart), HP_POP2(HP_gstorage_addfromcart), 1942 }, -{ HP_POP(gstorage->gettocart), HP_POP2(HP_gstorage_gettocart), 1944 }, -{ HP_POP(gstorage->close), HP_POP2(HP_gstorage_close), 1946 }, -{ HP_POP(gstorage->pc_quit), HP_POP2(HP_gstorage_pc_quit), 1948 }, -{ HP_POP(gstorage->save), HP_POP2(HP_gstorage_save), 1950 }, -{ HP_POP(gstorage->saved), HP_POP2(HP_gstorage_saved), 1952 }, -{ HP_POP(gstorage->create), HP_POP2(HP_gstorage_create), 1954 }, +{ HP_POP(gstorage->id2storage), HP_POP2(HP_gstorage_id2storage), 1926 }, +{ HP_POP(gstorage->id2storage2), HP_POP2(HP_gstorage_id2storage2), 1928 }, +{ HP_POP(gstorage->init), HP_POP2(HP_gstorage_init), 1930 }, +{ HP_POP(gstorage->final), HP_POP2(HP_gstorage_final), 1932 }, +{ HP_POP(gstorage->delete), HP_POP2(HP_gstorage_delete), 1934 }, +{ HP_POP(gstorage->open), HP_POP2(HP_gstorage_open), 1936 }, +{ HP_POP(gstorage->additem), HP_POP2(HP_gstorage_additem), 1938 }, +{ HP_POP(gstorage->delitem), HP_POP2(HP_gstorage_delitem), 1940 }, +{ HP_POP(gstorage->add), HP_POP2(HP_gstorage_add), 1942 }, +{ HP_POP(gstorage->get), HP_POP2(HP_gstorage_get), 1944 }, +{ HP_POP(gstorage->addfromcart), HP_POP2(HP_gstorage_addfromcart), 1946 }, +{ HP_POP(gstorage->gettocart), HP_POP2(HP_gstorage_gettocart), 1948 }, +{ HP_POP(gstorage->close), HP_POP2(HP_gstorage_close), 1950 }, +{ HP_POP(gstorage->pc_quit), HP_POP2(HP_gstorage_pc_quit), 1952 }, +{ HP_POP(gstorage->save), HP_POP2(HP_gstorage_save), 1954 }, +{ HP_POP(gstorage->saved), HP_POP2(HP_gstorage_saved), 1956 }, +{ HP_POP(gstorage->create), HP_POP2(HP_gstorage_create), 1958 }, /* homun */ -{ HP_POP(homun->init), HP_POP2(HP_homun_init), 1956 }, -{ HP_POP(homun->final), HP_POP2(HP_homun_final), 1958 }, -{ HP_POP(homun->reload), HP_POP2(HP_homun_reload), 1960 }, -{ HP_POP(homun->reload_skill), HP_POP2(HP_homun_reload_skill), 1962 }, -{ HP_POP(homun->get_viewdata), HP_POP2(HP_homun_get_viewdata), 1964 }, -{ HP_POP(homun->class2type), HP_POP2(HP_homun_class2type), 1966 }, -{ HP_POP(homun->damaged), HP_POP2(HP_homun_damaged), 1968 }, -{ HP_POP(homun->dead), HP_POP2(HP_homun_dead), 1970 }, -{ HP_POP(homun->vaporize), HP_POP2(HP_homun_vaporize), 1972 }, -{ HP_POP(homun->delete), HP_POP2(HP_homun_delete), 1974 }, -{ HP_POP(homun->checkskill), HP_POP2(HP_homun_checkskill), 1976 }, -{ HP_POP(homun->calc_skilltree), HP_POP2(HP_homun_calc_skilltree), 1978 }, -{ HP_POP(homun->skill_tree_get_max), HP_POP2(HP_homun_skill_tree_get_max), 1980 }, -{ HP_POP(homun->skillup), HP_POP2(HP_homun_skillup), 1982 }, -{ HP_POP(homun->levelup), HP_POP2(HP_homun_levelup), 1984 }, -{ HP_POP(homun->change_class), HP_POP2(HP_homun_change_class), 1986 }, -{ HP_POP(homun->evolve), HP_POP2(HP_homun_evolve), 1988 }, -{ HP_POP(homun->mutate), HP_POP2(HP_homun_mutate), 1990 }, -{ HP_POP(homun->gainexp), HP_POP2(HP_homun_gainexp), 1992 }, -{ HP_POP(homun->add_intimacy), HP_POP2(HP_homun_add_intimacy), 1994 }, -{ HP_POP(homun->consume_intimacy), HP_POP2(HP_homun_consume_intimacy), 1996 }, -{ HP_POP(homun->healed), HP_POP2(HP_homun_healed), 1998 }, -{ HP_POP(homun->save), HP_POP2(HP_homun_save), 2000 }, -{ HP_POP(homun->menu), HP_POP2(HP_homun_menu), 2002 }, -{ HP_POP(homun->feed), HP_POP2(HP_homun_feed), 2004 }, -{ HP_POP(homun->hunger_timer), HP_POP2(HP_homun_hunger_timer), 2006 }, -{ HP_POP(homun->hunger_timer_delete), HP_POP2(HP_homun_hunger_timer_delete), 2008 }, -{ HP_POP(homun->change_name), HP_POP2(HP_homun_change_name), 2010 }, -{ HP_POP(homun->change_name_ack), HP_POP2(HP_homun_change_name_ack), 2012 }, -{ HP_POP(homun->db_search), HP_POP2(HP_homun_db_search), 2014 }, -{ HP_POP(homun->create), HP_POP2(HP_homun_create), 2016 }, -{ HP_POP(homun->init_timers), HP_POP2(HP_homun_init_timers), 2018 }, -{ HP_POP(homun->call), HP_POP2(HP_homun_call), 2020 }, -{ HP_POP(homun->recv_data), HP_POP2(HP_homun_recv_data), 2022 }, -{ HP_POP(homun->creation_request), HP_POP2(HP_homun_creation_request), 2024 }, -{ HP_POP(homun->ressurect), HP_POP2(HP_homun_ressurect), 2026 }, -{ HP_POP(homun->revive), HP_POP2(HP_homun_revive), 2028 }, -{ HP_POP(homun->stat_reset), HP_POP2(HP_homun_stat_reset), 2030 }, -{ HP_POP(homun->shuffle), HP_POP2(HP_homun_shuffle), 2032 }, -{ HP_POP(homun->read_db_sub), HP_POP2(HP_homun_read_db_sub), 2034 }, -{ HP_POP(homun->read_db), HP_POP2(HP_homun_read_db), 2036 }, -{ HP_POP(homun->read_skill_db_sub), HP_POP2(HP_homun_read_skill_db_sub), 2038 }, -{ HP_POP(homun->skill_db_read), HP_POP2(HP_homun_skill_db_read), 2040 }, -{ HP_POP(homun->exp_db_read), HP_POP2(HP_homun_exp_db_read), 2042 }, -{ HP_POP(homun->addspiritball), HP_POP2(HP_homun_addspiritball), 2044 }, -{ HP_POP(homun->delspiritball), HP_POP2(HP_homun_delspiritball), 2046 }, +{ HP_POP(homun->init), HP_POP2(HP_homun_init), 1960 }, +{ HP_POP(homun->final), HP_POP2(HP_homun_final), 1962 }, +{ HP_POP(homun->reload), HP_POP2(HP_homun_reload), 1964 }, +{ HP_POP(homun->reload_skill), HP_POP2(HP_homun_reload_skill), 1966 }, +{ HP_POP(homun->get_viewdata), HP_POP2(HP_homun_get_viewdata), 1968 }, +{ HP_POP(homun->class2type), HP_POP2(HP_homun_class2type), 1970 }, +{ HP_POP(homun->damaged), HP_POP2(HP_homun_damaged), 1972 }, +{ HP_POP(homun->dead), HP_POP2(HP_homun_dead), 1974 }, +{ HP_POP(homun->vaporize), HP_POP2(HP_homun_vaporize), 1976 }, +{ HP_POP(homun->delete), HP_POP2(HP_homun_delete), 1978 }, +{ HP_POP(homun->checkskill), HP_POP2(HP_homun_checkskill), 1980 }, +{ HP_POP(homun->calc_skilltree), HP_POP2(HP_homun_calc_skilltree), 1982 }, +{ HP_POP(homun->skill_tree_get_max), HP_POP2(HP_homun_skill_tree_get_max), 1984 }, +{ HP_POP(homun->skillup), HP_POP2(HP_homun_skillup), 1986 }, +{ HP_POP(homun->levelup), HP_POP2(HP_homun_levelup), 1988 }, +{ HP_POP(homun->change_class), HP_POP2(HP_homun_change_class), 1990 }, +{ HP_POP(homun->evolve), HP_POP2(HP_homun_evolve), 1992 }, +{ HP_POP(homun->mutate), HP_POP2(HP_homun_mutate), 1994 }, +{ HP_POP(homun->gainexp), HP_POP2(HP_homun_gainexp), 1996 }, +{ HP_POP(homun->add_intimacy), HP_POP2(HP_homun_add_intimacy), 1998 }, +{ HP_POP(homun->consume_intimacy), HP_POP2(HP_homun_consume_intimacy), 2000 }, +{ HP_POP(homun->healed), HP_POP2(HP_homun_healed), 2002 }, +{ HP_POP(homun->save), HP_POP2(HP_homun_save), 2004 }, +{ HP_POP(homun->menu), HP_POP2(HP_homun_menu), 2006 }, +{ HP_POP(homun->feed), HP_POP2(HP_homun_feed), 2008 }, +{ HP_POP(homun->hunger_timer), HP_POP2(HP_homun_hunger_timer), 2010 }, +{ HP_POP(homun->hunger_timer_delete), HP_POP2(HP_homun_hunger_timer_delete), 2012 }, +{ HP_POP(homun->change_name), HP_POP2(HP_homun_change_name), 2014 }, +{ HP_POP(homun->change_name_ack), HP_POP2(HP_homun_change_name_ack), 2016 }, +{ HP_POP(homun->db_search), HP_POP2(HP_homun_db_search), 2018 }, +{ HP_POP(homun->create), HP_POP2(HP_homun_create), 2020 }, +{ HP_POP(homun->init_timers), HP_POP2(HP_homun_init_timers), 2022 }, +{ HP_POP(homun->call), HP_POP2(HP_homun_call), 2024 }, +{ HP_POP(homun->recv_data), HP_POP2(HP_homun_recv_data), 2026 }, +{ HP_POP(homun->creation_request), HP_POP2(HP_homun_creation_request), 2028 }, +{ HP_POP(homun->ressurect), HP_POP2(HP_homun_ressurect), 2030 }, +{ HP_POP(homun->revive), HP_POP2(HP_homun_revive), 2032 }, +{ HP_POP(homun->stat_reset), HP_POP2(HP_homun_stat_reset), 2034 }, +{ HP_POP(homun->shuffle), HP_POP2(HP_homun_shuffle), 2036 }, +{ HP_POP(homun->read_db_sub), HP_POP2(HP_homun_read_db_sub), 2038 }, +{ HP_POP(homun->read_db), HP_POP2(HP_homun_read_db), 2040 }, +{ HP_POP(homun->read_skill_db_sub), HP_POP2(HP_homun_read_skill_db_sub), 2042 }, +{ HP_POP(homun->skill_db_read), HP_POP2(HP_homun_skill_db_read), 2044 }, +{ HP_POP(homun->exp_db_read), HP_POP2(HP_homun_exp_db_read), 2046 }, +{ HP_POP(homun->addspiritball), HP_POP2(HP_homun_addspiritball), 2048 }, +{ HP_POP(homun->delspiritball), HP_POP2(HP_homun_delspiritball), 2050 }, /* instance */ -{ HP_POP(instance->init), HP_POP2(HP_instance_init), 2048 }, -{ HP_POP(instance->final), HP_POP2(HP_instance_final), 2050 }, -{ HP_POP(instance->create), HP_POP2(HP_instance_create), 2052 }, -{ HP_POP(instance->add_map), HP_POP2(HP_instance_add_map), 2054 }, -{ HP_POP(instance->del_map), HP_POP2(HP_instance_del_map), 2056 }, -{ HP_POP(instance->map2imap), HP_POP2(HP_instance_map2imap), 2058 }, -{ HP_POP(instance->mapid2imapid), HP_POP2(HP_instance_mapid2imapid), 2060 }, -{ HP_POP(instance->destroy), HP_POP2(HP_instance_destroy), 2062 }, -{ HP_POP(instance->start), HP_POP2(HP_instance_start), 2064 }, -{ HP_POP(instance->check_idle), HP_POP2(HP_instance_check_idle), 2066 }, -{ HP_POP(instance->check_kick), HP_POP2(HP_instance_check_kick), 2068 }, -{ HP_POP(instance->set_timeout), HP_POP2(HP_instance_set_timeout), 2070 }, -{ HP_POP(instance->valid), HP_POP2(HP_instance_valid), 2072 }, -{ HP_POP(instance->destroy_timer), HP_POP2(HP_instance_destroy_timer), 2074 }, +{ HP_POP(instance->init), HP_POP2(HP_instance_init), 2052 }, +{ HP_POP(instance->final), HP_POP2(HP_instance_final), 2054 }, +{ HP_POP(instance->create), HP_POP2(HP_instance_create), 2056 }, +{ HP_POP(instance->add_map), HP_POP2(HP_instance_add_map), 2058 }, +{ HP_POP(instance->del_map), HP_POP2(HP_instance_del_map), 2060 }, +{ HP_POP(instance->map2imap), HP_POP2(HP_instance_map2imap), 2062 }, +{ HP_POP(instance->mapid2imapid), HP_POP2(HP_instance_mapid2imapid), 2064 }, +{ HP_POP(instance->destroy), HP_POP2(HP_instance_destroy), 2066 }, +{ HP_POP(instance->start), HP_POP2(HP_instance_start), 2068 }, +{ HP_POP(instance->check_idle), HP_POP2(HP_instance_check_idle), 2070 }, +{ HP_POP(instance->check_kick), HP_POP2(HP_instance_check_kick), 2072 }, +{ HP_POP(instance->set_timeout), HP_POP2(HP_instance_set_timeout), 2074 }, +{ HP_POP(instance->valid), HP_POP2(HP_instance_valid), 2076 }, +{ HP_POP(instance->destroy_timer), HP_POP2(HP_instance_destroy_timer), 2078 }, /* intif */ -{ HP_POP(intif->parse), HP_POP2(HP_intif_parse), 2076 }, -{ HP_POP(intif->create_pet), HP_POP2(HP_intif_create_pet), 2078 }, -{ HP_POP(intif->broadcast), HP_POP2(HP_intif_broadcast), 2080 }, -{ HP_POP(intif->broadcast2), HP_POP2(HP_intif_broadcast2), 2082 }, -{ HP_POP(intif->main_message), HP_POP2(HP_intif_main_message), 2084 }, -{ HP_POP(intif->wis_message), HP_POP2(HP_intif_wis_message), 2086 }, -{ HP_POP(intif->wis_message_to_gm), HP_POP2(HP_intif_wis_message_to_gm), 2088 }, -{ HP_POP(intif->saveregistry), HP_POP2(HP_intif_saveregistry), 2090 }, -{ HP_POP(intif->request_registry), HP_POP2(HP_intif_request_registry), 2092 }, -{ HP_POP(intif->request_guild_storage), HP_POP2(HP_intif_request_guild_storage), 2094 }, -{ HP_POP(intif->send_guild_storage), HP_POP2(HP_intif_send_guild_storage), 2096 }, -{ HP_POP(intif->create_party), HP_POP2(HP_intif_create_party), 2098 }, -{ HP_POP(intif->request_partyinfo), HP_POP2(HP_intif_request_partyinfo), 2100 }, -{ HP_POP(intif->party_addmember), HP_POP2(HP_intif_party_addmember), 2102 }, -{ HP_POP(intif->party_changeoption), HP_POP2(HP_intif_party_changeoption), 2104 }, -{ HP_POP(intif->party_leave), HP_POP2(HP_intif_party_leave), 2106 }, -{ HP_POP(intif->party_changemap), HP_POP2(HP_intif_party_changemap), 2108 }, -{ HP_POP(intif->break_party), HP_POP2(HP_intif_break_party), 2110 }, -{ HP_POP(intif->party_message), HP_POP2(HP_intif_party_message), 2112 }, -{ HP_POP(intif->party_leaderchange), HP_POP2(HP_intif_party_leaderchange), 2114 }, -{ HP_POP(intif->guild_create), HP_POP2(HP_intif_guild_create), 2116 }, -{ HP_POP(intif->guild_request_info), HP_POP2(HP_intif_guild_request_info), 2118 }, -{ HP_POP(intif->guild_addmember), HP_POP2(HP_intif_guild_addmember), 2120 }, -{ HP_POP(intif->guild_leave), HP_POP2(HP_intif_guild_leave), 2122 }, -{ HP_POP(intif->guild_memberinfoshort), HP_POP2(HP_intif_guild_memberinfoshort), 2124 }, -{ HP_POP(intif->guild_break), HP_POP2(HP_intif_guild_break), 2126 }, -{ HP_POP(intif->guild_message), HP_POP2(HP_intif_guild_message), 2128 }, -{ HP_POP(intif->guild_change_gm), HP_POP2(HP_intif_guild_change_gm), 2130 }, -{ HP_POP(intif->guild_change_basicinfo), HP_POP2(HP_intif_guild_change_basicinfo), 2132 }, -{ HP_POP(intif->guild_change_memberinfo), HP_POP2(HP_intif_guild_change_memberinfo), 2134 }, -{ HP_POP(intif->guild_position), HP_POP2(HP_intif_guild_position), 2136 }, -{ HP_POP(intif->guild_skillup), HP_POP2(HP_intif_guild_skillup), 2138 }, -{ HP_POP(intif->guild_alliance), HP_POP2(HP_intif_guild_alliance), 2140 }, -{ HP_POP(intif->guild_notice), HP_POP2(HP_intif_guild_notice), 2142 }, -{ HP_POP(intif->guild_emblem), HP_POP2(HP_intif_guild_emblem), 2144 }, -{ HP_POP(intif->guild_castle_dataload), HP_POP2(HP_intif_guild_castle_dataload), 2146 }, -{ HP_POP(intif->guild_castle_datasave), HP_POP2(HP_intif_guild_castle_datasave), 2148 }, -{ HP_POP(intif->request_petdata), HP_POP2(HP_intif_request_petdata), 2150 }, -{ HP_POP(intif->save_petdata), HP_POP2(HP_intif_save_petdata), 2152 }, -{ HP_POP(intif->delete_petdata), HP_POP2(HP_intif_delete_petdata), 2154 }, -{ HP_POP(intif->rename), HP_POP2(HP_intif_rename), 2156 }, -{ HP_POP(intif->homunculus_create), HP_POP2(HP_intif_homunculus_create), 2158 }, -{ HP_POP(intif->homunculus_requestload), HP_POP2(HP_intif_homunculus_requestload), 2160 }, -{ HP_POP(intif->homunculus_requestsave), HP_POP2(HP_intif_homunculus_requestsave), 2162 }, -{ HP_POP(intif->homunculus_requestdelete), HP_POP2(HP_intif_homunculus_requestdelete), 2164 }, -{ HP_POP(intif->request_questlog), HP_POP2(HP_intif_request_questlog), 2166 }, -{ HP_POP(intif->quest_save), HP_POP2(HP_intif_quest_save), 2168 }, -{ HP_POP(intif->mercenary_create), HP_POP2(HP_intif_mercenary_create), 2170 }, -{ HP_POP(intif->mercenary_request), HP_POP2(HP_intif_mercenary_request), 2172 }, -{ HP_POP(intif->mercenary_delete), HP_POP2(HP_intif_mercenary_delete), 2174 }, -{ HP_POP(intif->mercenary_save), HP_POP2(HP_intif_mercenary_save), 2176 }, -{ HP_POP(intif->Mail_requestinbox), HP_POP2(HP_intif_Mail_requestinbox), 2178 }, -{ HP_POP(intif->Mail_read), HP_POP2(HP_intif_Mail_read), 2180 }, -{ HP_POP(intif->Mail_getattach), HP_POP2(HP_intif_Mail_getattach), 2182 }, -{ HP_POP(intif->Mail_delete), HP_POP2(HP_intif_Mail_delete), 2184 }, -{ HP_POP(intif->Mail_return), HP_POP2(HP_intif_Mail_return), 2186 }, -{ HP_POP(intif->Mail_send), HP_POP2(HP_intif_Mail_send), 2188 }, -{ HP_POP(intif->Auction_requestlist), HP_POP2(HP_intif_Auction_requestlist), 2190 }, -{ HP_POP(intif->Auction_register), HP_POP2(HP_intif_Auction_register), 2192 }, -{ HP_POP(intif->Auction_cancel), HP_POP2(HP_intif_Auction_cancel), 2194 }, -{ HP_POP(intif->Auction_close), HP_POP2(HP_intif_Auction_close), 2196 }, -{ HP_POP(intif->Auction_bid), HP_POP2(HP_intif_Auction_bid), 2198 }, -{ HP_POP(intif->elemental_create), HP_POP2(HP_intif_elemental_create), 2200 }, -{ HP_POP(intif->elemental_request), HP_POP2(HP_intif_elemental_request), 2202 }, -{ HP_POP(intif->elemental_delete), HP_POP2(HP_intif_elemental_delete), 2204 }, -{ HP_POP(intif->elemental_save), HP_POP2(HP_intif_elemental_save), 2206 }, -{ HP_POP(intif->request_accinfo), HP_POP2(HP_intif_request_accinfo), 2208 }, -{ HP_POP(intif->CheckForCharServer), HP_POP2(HP_intif_CheckForCharServer), 2210 }, -{ HP_POP(intif->pWisMessage), HP_POP2(HP_intif_pWisMessage), 2212 }, -{ HP_POP(intif->pWisEnd), HP_POP2(HP_intif_pWisEnd), 2214 }, -{ HP_POP(intif->pWisToGM_sub), HP_POP2(HP_intif_pWisToGM_sub), 2216 }, -{ HP_POP(intif->pWisToGM), HP_POP2(HP_intif_pWisToGM), 2218 }, -{ HP_POP(intif->pRegisters), HP_POP2(HP_intif_pRegisters), 2220 }, -{ HP_POP(intif->pChangeNameOk), HP_POP2(HP_intif_pChangeNameOk), 2222 }, -{ HP_POP(intif->pMessageToFD), HP_POP2(HP_intif_pMessageToFD), 2224 }, -{ HP_POP(intif->pLoadGuildStorage), HP_POP2(HP_intif_pLoadGuildStorage), 2226 }, -{ HP_POP(intif->pSaveGuildStorage), HP_POP2(HP_intif_pSaveGuildStorage), 2228 }, -{ HP_POP(intif->pPartyCreated), HP_POP2(HP_intif_pPartyCreated), 2230 }, -{ HP_POP(intif->pPartyInfo), HP_POP2(HP_intif_pPartyInfo), 2232 }, -{ HP_POP(intif->pPartyMemberAdded), HP_POP2(HP_intif_pPartyMemberAdded), 2234 }, -{ HP_POP(intif->pPartyOptionChanged), HP_POP2(HP_intif_pPartyOptionChanged), 2236 }, -{ HP_POP(intif->pPartyMemberWithdraw), HP_POP2(HP_intif_pPartyMemberWithdraw), 2238 }, -{ HP_POP(intif->pPartyMove), HP_POP2(HP_intif_pPartyMove), 2240 }, -{ HP_POP(intif->pPartyBroken), HP_POP2(HP_intif_pPartyBroken), 2242 }, -{ HP_POP(intif->pPartyMessage), HP_POP2(HP_intif_pPartyMessage), 2244 }, -{ HP_POP(intif->pGuildCreated), HP_POP2(HP_intif_pGuildCreated), 2246 }, -{ HP_POP(intif->pGuildInfo), HP_POP2(HP_intif_pGuildInfo), 2248 }, -{ HP_POP(intif->pGuildMemberAdded), HP_POP2(HP_intif_pGuildMemberAdded), 2250 }, -{ HP_POP(intif->pGuildMemberWithdraw), HP_POP2(HP_intif_pGuildMemberWithdraw), 2252 }, -{ HP_POP(intif->pGuildMemberInfoShort), HP_POP2(HP_intif_pGuildMemberInfoShort), 2254 }, -{ HP_POP(intif->pGuildBroken), HP_POP2(HP_intif_pGuildBroken), 2256 }, -{ HP_POP(intif->pGuildMessage), HP_POP2(HP_intif_pGuildMessage), 2258 }, -{ HP_POP(intif->pGuildBasicInfoChanged), HP_POP2(HP_intif_pGuildBasicInfoChanged), 2260 }, -{ HP_POP(intif->pGuildMemberInfoChanged), HP_POP2(HP_intif_pGuildMemberInfoChanged), 2262 }, -{ HP_POP(intif->pGuildPosition), HP_POP2(HP_intif_pGuildPosition), 2264 }, -{ HP_POP(intif->pGuildSkillUp), HP_POP2(HP_intif_pGuildSkillUp), 2266 }, -{ HP_POP(intif->pGuildAlliance), HP_POP2(HP_intif_pGuildAlliance), 2268 }, -{ HP_POP(intif->pGuildNotice), HP_POP2(HP_intif_pGuildNotice), 2270 }, -{ HP_POP(intif->pGuildEmblem), HP_POP2(HP_intif_pGuildEmblem), 2272 }, -{ HP_POP(intif->pGuildCastleDataLoad), HP_POP2(HP_intif_pGuildCastleDataLoad), 2274 }, -{ HP_POP(intif->pGuildMasterChanged), HP_POP2(HP_intif_pGuildMasterChanged), 2276 }, -{ HP_POP(intif->pQuestLog), HP_POP2(HP_intif_pQuestLog), 2278 }, -{ HP_POP(intif->pQuestSave), HP_POP2(HP_intif_pQuestSave), 2280 }, -{ HP_POP(intif->pMailInboxReceived), HP_POP2(HP_intif_pMailInboxReceived), 2282 }, -{ HP_POP(intif->pMailNew), HP_POP2(HP_intif_pMailNew), 2284 }, -{ HP_POP(intif->pMailGetAttach), HP_POP2(HP_intif_pMailGetAttach), 2286 }, -{ HP_POP(intif->pMailDelete), HP_POP2(HP_intif_pMailDelete), 2288 }, -{ HP_POP(intif->pMailReturn), HP_POP2(HP_intif_pMailReturn), 2290 }, -{ HP_POP(intif->pMailSend), HP_POP2(HP_intif_pMailSend), 2292 }, -{ HP_POP(intif->pAuctionResults), HP_POP2(HP_intif_pAuctionResults), 2294 }, -{ HP_POP(intif->pAuctionRegister), HP_POP2(HP_intif_pAuctionRegister), 2296 }, -{ HP_POP(intif->pAuctionCancel), HP_POP2(HP_intif_pAuctionCancel), 2298 }, -{ HP_POP(intif->pAuctionClose), HP_POP2(HP_intif_pAuctionClose), 2300 }, -{ HP_POP(intif->pAuctionMessage), HP_POP2(HP_intif_pAuctionMessage), 2302 }, -{ HP_POP(intif->pAuctionBid), HP_POP2(HP_intif_pAuctionBid), 2304 }, -{ HP_POP(intif->pMercenaryReceived), HP_POP2(HP_intif_pMercenaryReceived), 2306 }, -{ HP_POP(intif->pMercenaryDeleted), HP_POP2(HP_intif_pMercenaryDeleted), 2308 }, -{ HP_POP(intif->pMercenarySaved), HP_POP2(HP_intif_pMercenarySaved), 2310 }, -{ HP_POP(intif->pElementalReceived), HP_POP2(HP_intif_pElementalReceived), 2312 }, -{ HP_POP(intif->pElementalDeleted), HP_POP2(HP_intif_pElementalDeleted), 2314 }, -{ HP_POP(intif->pElementalSaved), HP_POP2(HP_intif_pElementalSaved), 2316 }, -{ HP_POP(intif->pCreatePet), HP_POP2(HP_intif_pCreatePet), 2318 }, -{ HP_POP(intif->pRecvPetData), HP_POP2(HP_intif_pRecvPetData), 2320 }, -{ HP_POP(intif->pSavePetOk), HP_POP2(HP_intif_pSavePetOk), 2322 }, -{ HP_POP(intif->pDeletePetOk), HP_POP2(HP_intif_pDeletePetOk), 2324 }, -{ HP_POP(intif->pCreateHomunculus), HP_POP2(HP_intif_pCreateHomunculus), 2326 }, -{ HP_POP(intif->pRecvHomunculusData), HP_POP2(HP_intif_pRecvHomunculusData), 2328 }, -{ HP_POP(intif->pSaveHomunculusOk), HP_POP2(HP_intif_pSaveHomunculusOk), 2330 }, -{ HP_POP(intif->pDeleteHomunculusOk), HP_POP2(HP_intif_pDeleteHomunculusOk), 2332 }, +{ HP_POP(intif->parse), HP_POP2(HP_intif_parse), 2080 }, +{ HP_POP(intif->create_pet), HP_POP2(HP_intif_create_pet), 2082 }, +{ HP_POP(intif->broadcast), HP_POP2(HP_intif_broadcast), 2084 }, +{ HP_POP(intif->broadcast2), HP_POP2(HP_intif_broadcast2), 2086 }, +{ HP_POP(intif->main_message), HP_POP2(HP_intif_main_message), 2088 }, +{ HP_POP(intif->wis_message), HP_POP2(HP_intif_wis_message), 2090 }, +{ HP_POP(intif->wis_message_to_gm), HP_POP2(HP_intif_wis_message_to_gm), 2092 }, +{ HP_POP(intif->saveregistry), HP_POP2(HP_intif_saveregistry), 2094 }, +{ HP_POP(intif->request_registry), HP_POP2(HP_intif_request_registry), 2096 }, +{ HP_POP(intif->request_guild_storage), HP_POP2(HP_intif_request_guild_storage), 2098 }, +{ HP_POP(intif->send_guild_storage), HP_POP2(HP_intif_send_guild_storage), 2100 }, +{ HP_POP(intif->create_party), HP_POP2(HP_intif_create_party), 2102 }, +{ HP_POP(intif->request_partyinfo), HP_POP2(HP_intif_request_partyinfo), 2104 }, +{ HP_POP(intif->party_addmember), HP_POP2(HP_intif_party_addmember), 2106 }, +{ HP_POP(intif->party_changeoption), HP_POP2(HP_intif_party_changeoption), 2108 }, +{ HP_POP(intif->party_leave), HP_POP2(HP_intif_party_leave), 2110 }, +{ HP_POP(intif->party_changemap), HP_POP2(HP_intif_party_changemap), 2112 }, +{ HP_POP(intif->break_party), HP_POP2(HP_intif_break_party), 2114 }, +{ HP_POP(intif->party_message), HP_POP2(HP_intif_party_message), 2116 }, +{ HP_POP(intif->party_leaderchange), HP_POP2(HP_intif_party_leaderchange), 2118 }, +{ HP_POP(intif->guild_create), HP_POP2(HP_intif_guild_create), 2120 }, +{ HP_POP(intif->guild_request_info), HP_POP2(HP_intif_guild_request_info), 2122 }, +{ HP_POP(intif->guild_addmember), HP_POP2(HP_intif_guild_addmember), 2124 }, +{ HP_POP(intif->guild_leave), HP_POP2(HP_intif_guild_leave), 2126 }, +{ HP_POP(intif->guild_memberinfoshort), HP_POP2(HP_intif_guild_memberinfoshort), 2128 }, +{ HP_POP(intif->guild_break), HP_POP2(HP_intif_guild_break), 2130 }, +{ HP_POP(intif->guild_message), HP_POP2(HP_intif_guild_message), 2132 }, +{ HP_POP(intif->guild_change_gm), HP_POP2(HP_intif_guild_change_gm), 2134 }, +{ HP_POP(intif->guild_change_basicinfo), HP_POP2(HP_intif_guild_change_basicinfo), 2136 }, +{ HP_POP(intif->guild_change_memberinfo), HP_POP2(HP_intif_guild_change_memberinfo), 2138 }, +{ HP_POP(intif->guild_position), HP_POP2(HP_intif_guild_position), 2140 }, +{ HP_POP(intif->guild_skillup), HP_POP2(HP_intif_guild_skillup), 2142 }, +{ HP_POP(intif->guild_alliance), HP_POP2(HP_intif_guild_alliance), 2144 }, +{ HP_POP(intif->guild_notice), HP_POP2(HP_intif_guild_notice), 2146 }, +{ HP_POP(intif->guild_emblem), HP_POP2(HP_intif_guild_emblem), 2148 }, +{ HP_POP(intif->guild_castle_dataload), HP_POP2(HP_intif_guild_castle_dataload), 2150 }, +{ HP_POP(intif->guild_castle_datasave), HP_POP2(HP_intif_guild_castle_datasave), 2152 }, +{ HP_POP(intif->request_petdata), HP_POP2(HP_intif_request_petdata), 2154 }, +{ HP_POP(intif->save_petdata), HP_POP2(HP_intif_save_petdata), 2156 }, +{ HP_POP(intif->delete_petdata), HP_POP2(HP_intif_delete_petdata), 2158 }, +{ HP_POP(intif->rename), HP_POP2(HP_intif_rename), 2160 }, +{ HP_POP(intif->homunculus_create), HP_POP2(HP_intif_homunculus_create), 2162 }, +{ HP_POP(intif->homunculus_requestload), HP_POP2(HP_intif_homunculus_requestload), 2164 }, +{ HP_POP(intif->homunculus_requestsave), HP_POP2(HP_intif_homunculus_requestsave), 2166 }, +{ HP_POP(intif->homunculus_requestdelete), HP_POP2(HP_intif_homunculus_requestdelete), 2168 }, +{ HP_POP(intif->request_questlog), HP_POP2(HP_intif_request_questlog), 2170 }, +{ HP_POP(intif->quest_save), HP_POP2(HP_intif_quest_save), 2172 }, +{ HP_POP(intif->mercenary_create), HP_POP2(HP_intif_mercenary_create), 2174 }, +{ HP_POP(intif->mercenary_request), HP_POP2(HP_intif_mercenary_request), 2176 }, +{ HP_POP(intif->mercenary_delete), HP_POP2(HP_intif_mercenary_delete), 2178 }, +{ HP_POP(intif->mercenary_save), HP_POP2(HP_intif_mercenary_save), 2180 }, +{ HP_POP(intif->Mail_requestinbox), HP_POP2(HP_intif_Mail_requestinbox), 2182 }, +{ HP_POP(intif->Mail_read), HP_POP2(HP_intif_Mail_read), 2184 }, +{ HP_POP(intif->Mail_getattach), HP_POP2(HP_intif_Mail_getattach), 2186 }, +{ HP_POP(intif->Mail_delete), HP_POP2(HP_intif_Mail_delete), 2188 }, +{ HP_POP(intif->Mail_return), HP_POP2(HP_intif_Mail_return), 2190 }, +{ HP_POP(intif->Mail_send), HP_POP2(HP_intif_Mail_send), 2192 }, +{ HP_POP(intif->Auction_requestlist), HP_POP2(HP_intif_Auction_requestlist), 2194 }, +{ HP_POP(intif->Auction_register), HP_POP2(HP_intif_Auction_register), 2196 }, +{ HP_POP(intif->Auction_cancel), HP_POP2(HP_intif_Auction_cancel), 2198 }, +{ HP_POP(intif->Auction_close), HP_POP2(HP_intif_Auction_close), 2200 }, +{ HP_POP(intif->Auction_bid), HP_POP2(HP_intif_Auction_bid), 2202 }, +{ HP_POP(intif->elemental_create), HP_POP2(HP_intif_elemental_create), 2204 }, +{ HP_POP(intif->elemental_request), HP_POP2(HP_intif_elemental_request), 2206 }, +{ HP_POP(intif->elemental_delete), HP_POP2(HP_intif_elemental_delete), 2208 }, +{ HP_POP(intif->elemental_save), HP_POP2(HP_intif_elemental_save), 2210 }, +{ HP_POP(intif->request_accinfo), HP_POP2(HP_intif_request_accinfo), 2212 }, +{ HP_POP(intif->CheckForCharServer), HP_POP2(HP_intif_CheckForCharServer), 2214 }, +{ HP_POP(intif->pWisMessage), HP_POP2(HP_intif_pWisMessage), 2216 }, +{ HP_POP(intif->pWisEnd), HP_POP2(HP_intif_pWisEnd), 2218 }, +{ HP_POP(intif->pWisToGM_sub), HP_POP2(HP_intif_pWisToGM_sub), 2220 }, +{ HP_POP(intif->pWisToGM), HP_POP2(HP_intif_pWisToGM), 2222 }, +{ HP_POP(intif->pRegisters), HP_POP2(HP_intif_pRegisters), 2224 }, +{ HP_POP(intif->pChangeNameOk), HP_POP2(HP_intif_pChangeNameOk), 2226 }, +{ HP_POP(intif->pMessageToFD), HP_POP2(HP_intif_pMessageToFD), 2228 }, +{ HP_POP(intif->pLoadGuildStorage), HP_POP2(HP_intif_pLoadGuildStorage), 2230 }, +{ HP_POP(intif->pSaveGuildStorage), HP_POP2(HP_intif_pSaveGuildStorage), 2232 }, +{ HP_POP(intif->pPartyCreated), HP_POP2(HP_intif_pPartyCreated), 2234 }, +{ HP_POP(intif->pPartyInfo), HP_POP2(HP_intif_pPartyInfo), 2236 }, +{ HP_POP(intif->pPartyMemberAdded), HP_POP2(HP_intif_pPartyMemberAdded), 2238 }, +{ HP_POP(intif->pPartyOptionChanged), HP_POP2(HP_intif_pPartyOptionChanged), 2240 }, +{ HP_POP(intif->pPartyMemberWithdraw), HP_POP2(HP_intif_pPartyMemberWithdraw), 2242 }, +{ HP_POP(intif->pPartyMove), HP_POP2(HP_intif_pPartyMove), 2244 }, +{ HP_POP(intif->pPartyBroken), HP_POP2(HP_intif_pPartyBroken), 2246 }, +{ HP_POP(intif->pPartyMessage), HP_POP2(HP_intif_pPartyMessage), 2248 }, +{ HP_POP(intif->pGuildCreated), HP_POP2(HP_intif_pGuildCreated), 2250 }, +{ HP_POP(intif->pGuildInfo), HP_POP2(HP_intif_pGuildInfo), 2252 }, +{ HP_POP(intif->pGuildMemberAdded), HP_POP2(HP_intif_pGuildMemberAdded), 2254 }, +{ HP_POP(intif->pGuildMemberWithdraw), HP_POP2(HP_intif_pGuildMemberWithdraw), 2256 }, +{ HP_POP(intif->pGuildMemberInfoShort), HP_POP2(HP_intif_pGuildMemberInfoShort), 2258 }, +{ HP_POP(intif->pGuildBroken), HP_POP2(HP_intif_pGuildBroken), 2260 }, +{ HP_POP(intif->pGuildMessage), HP_POP2(HP_intif_pGuildMessage), 2262 }, +{ HP_POP(intif->pGuildBasicInfoChanged), HP_POP2(HP_intif_pGuildBasicInfoChanged), 2264 }, +{ HP_POP(intif->pGuildMemberInfoChanged), HP_POP2(HP_intif_pGuildMemberInfoChanged), 2266 }, +{ HP_POP(intif->pGuildPosition), HP_POP2(HP_intif_pGuildPosition), 2268 }, +{ HP_POP(intif->pGuildSkillUp), HP_POP2(HP_intif_pGuildSkillUp), 2270 }, +{ HP_POP(intif->pGuildAlliance), HP_POP2(HP_intif_pGuildAlliance), 2272 }, +{ HP_POP(intif->pGuildNotice), HP_POP2(HP_intif_pGuildNotice), 2274 }, +{ HP_POP(intif->pGuildEmblem), HP_POP2(HP_intif_pGuildEmblem), 2276 }, +{ HP_POP(intif->pGuildCastleDataLoad), HP_POP2(HP_intif_pGuildCastleDataLoad), 2278 }, +{ HP_POP(intif->pGuildMasterChanged), HP_POP2(HP_intif_pGuildMasterChanged), 2280 }, +{ HP_POP(intif->pQuestLog), HP_POP2(HP_intif_pQuestLog), 2282 }, +{ HP_POP(intif->pQuestSave), HP_POP2(HP_intif_pQuestSave), 2284 }, +{ HP_POP(intif->pMailInboxReceived), HP_POP2(HP_intif_pMailInboxReceived), 2286 }, +{ HP_POP(intif->pMailNew), HP_POP2(HP_intif_pMailNew), 2288 }, +{ HP_POP(intif->pMailGetAttach), HP_POP2(HP_intif_pMailGetAttach), 2290 }, +{ HP_POP(intif->pMailDelete), HP_POP2(HP_intif_pMailDelete), 2292 }, +{ HP_POP(intif->pMailReturn), HP_POP2(HP_intif_pMailReturn), 2294 }, +{ HP_POP(intif->pMailSend), HP_POP2(HP_intif_pMailSend), 2296 }, +{ HP_POP(intif->pAuctionResults), HP_POP2(HP_intif_pAuctionResults), 2298 }, +{ HP_POP(intif->pAuctionRegister), HP_POP2(HP_intif_pAuctionRegister), 2300 }, +{ HP_POP(intif->pAuctionCancel), HP_POP2(HP_intif_pAuctionCancel), 2302 }, +{ HP_POP(intif->pAuctionClose), HP_POP2(HP_intif_pAuctionClose), 2304 }, +{ HP_POP(intif->pAuctionMessage), HP_POP2(HP_intif_pAuctionMessage), 2306 }, +{ HP_POP(intif->pAuctionBid), HP_POP2(HP_intif_pAuctionBid), 2308 }, +{ HP_POP(intif->pMercenaryReceived), HP_POP2(HP_intif_pMercenaryReceived), 2310 }, +{ HP_POP(intif->pMercenaryDeleted), HP_POP2(HP_intif_pMercenaryDeleted), 2312 }, +{ HP_POP(intif->pMercenarySaved), HP_POP2(HP_intif_pMercenarySaved), 2314 }, +{ HP_POP(intif->pElementalReceived), HP_POP2(HP_intif_pElementalReceived), 2316 }, +{ HP_POP(intif->pElementalDeleted), HP_POP2(HP_intif_pElementalDeleted), 2318 }, +{ HP_POP(intif->pElementalSaved), HP_POP2(HP_intif_pElementalSaved), 2320 }, +{ HP_POP(intif->pCreatePet), HP_POP2(HP_intif_pCreatePet), 2322 }, +{ HP_POP(intif->pRecvPetData), HP_POP2(HP_intif_pRecvPetData), 2324 }, +{ HP_POP(intif->pSavePetOk), HP_POP2(HP_intif_pSavePetOk), 2326 }, +{ HP_POP(intif->pDeletePetOk), HP_POP2(HP_intif_pDeletePetOk), 2328 }, +{ HP_POP(intif->pCreateHomunculus), HP_POP2(HP_intif_pCreateHomunculus), 2330 }, +{ HP_POP(intif->pRecvHomunculusData), HP_POP2(HP_intif_pRecvHomunculusData), 2332 }, +{ HP_POP(intif->pSaveHomunculusOk), HP_POP2(HP_intif_pSaveHomunculusOk), 2334 }, +{ HP_POP(intif->pDeleteHomunculusOk), HP_POP2(HP_intif_pDeleteHomunculusOk), 2336 }, /* ircbot */ -{ HP_POP(ircbot->init), HP_POP2(HP_ircbot_init), 2334 }, -{ HP_POP(ircbot->final), HP_POP2(HP_ircbot_final), 2336 }, -{ HP_POP(ircbot->parse), HP_POP2(HP_ircbot_parse), 2338 }, -{ HP_POP(ircbot->parse_sub), HP_POP2(HP_ircbot_parse_sub), 2340 }, -{ HP_POP(ircbot->parse_source), HP_POP2(HP_ircbot_parse_source), 2342 }, -{ HP_POP(ircbot->func_search), HP_POP2(HP_ircbot_func_search), 2344 }, -{ HP_POP(ircbot->connect_timer), HP_POP2(HP_ircbot_connect_timer), 2346 }, -{ HP_POP(ircbot->identify_timer), HP_POP2(HP_ircbot_identify_timer), 2348 }, -{ HP_POP(ircbot->join_timer), HP_POP2(HP_ircbot_join_timer), 2350 }, -{ HP_POP(ircbot->send), HP_POP2(HP_ircbot_send), 2352 }, -{ HP_POP(ircbot->relay), HP_POP2(HP_ircbot_relay), 2354 }, -{ HP_POP(ircbot->pong), HP_POP2(HP_ircbot_pong), 2356 }, -{ HP_POP(ircbot->privmsg), HP_POP2(HP_ircbot_privmsg), 2358 }, -{ HP_POP(ircbot->userjoin), HP_POP2(HP_ircbot_userjoin), 2360 }, -{ HP_POP(ircbot->userleave), HP_POP2(HP_ircbot_userleave), 2362 }, -{ HP_POP(ircbot->usernick), HP_POP2(HP_ircbot_usernick), 2364 }, +{ HP_POP(ircbot->init), HP_POP2(HP_ircbot_init), 2338 }, +{ HP_POP(ircbot->final), HP_POP2(HP_ircbot_final), 2340 }, +{ HP_POP(ircbot->parse), HP_POP2(HP_ircbot_parse), 2342 }, +{ HP_POP(ircbot->parse_sub), HP_POP2(HP_ircbot_parse_sub), 2344 }, +{ HP_POP(ircbot->parse_source), HP_POP2(HP_ircbot_parse_source), 2346 }, +{ HP_POP(ircbot->func_search), HP_POP2(HP_ircbot_func_search), 2348 }, +{ HP_POP(ircbot->connect_timer), HP_POP2(HP_ircbot_connect_timer), 2350 }, +{ HP_POP(ircbot->identify_timer), HP_POP2(HP_ircbot_identify_timer), 2352 }, +{ HP_POP(ircbot->join_timer), HP_POP2(HP_ircbot_join_timer), 2354 }, +{ HP_POP(ircbot->send), HP_POP2(HP_ircbot_send), 2356 }, +{ HP_POP(ircbot->relay), HP_POP2(HP_ircbot_relay), 2358 }, +{ HP_POP(ircbot->pong), HP_POP2(HP_ircbot_pong), 2360 }, +{ HP_POP(ircbot->privmsg), HP_POP2(HP_ircbot_privmsg), 2362 }, +{ HP_POP(ircbot->userjoin), HP_POP2(HP_ircbot_userjoin), 2364 }, +{ HP_POP(ircbot->userleave), HP_POP2(HP_ircbot_userleave), 2366 }, +{ HP_POP(ircbot->usernick), HP_POP2(HP_ircbot_usernick), 2368 }, /* itemdb */ -{ HP_POP(itemdb->init), HP_POP2(HP_itemdb_init), 2366 }, -{ HP_POP(itemdb->final), HP_POP2(HP_itemdb_final), 2368 }, -{ HP_POP(itemdb->reload), HP_POP2(HP_itemdb_reload), 2370 }, -{ HP_POP(itemdb->name_constants), HP_POP2(HP_itemdb_name_constants), 2372 }, -{ HP_POP(itemdb->force_name_constants), HP_POP2(HP_itemdb_force_name_constants), 2374 }, -{ HP_POP(itemdb->read_groups), HP_POP2(HP_itemdb_read_groups), 2376 }, -{ HP_POP(itemdb->read_chains), HP_POP2(HP_itemdb_read_chains), 2378 }, -{ HP_POP(itemdb->read_packages), HP_POP2(HP_itemdb_read_packages), 2380 }, -{ HP_POP(itemdb->write_cached_packages), HP_POP2(HP_itemdb_write_cached_packages), 2382 }, -{ HP_POP(itemdb->read_cached_packages), HP_POP2(HP_itemdb_read_cached_packages), 2384 }, -{ HP_POP(itemdb->name2id), HP_POP2(HP_itemdb_name2id), 2386 }, -{ HP_POP(itemdb->search_name), HP_POP2(HP_itemdb_search_name), 2388 }, -{ HP_POP(itemdb->search_name_array), HP_POP2(HP_itemdb_search_name_array), 2390 }, -{ HP_POP(itemdb->load), HP_POP2(HP_itemdb_load), 2392 }, -{ HP_POP(itemdb->search), HP_POP2(HP_itemdb_search), 2394 }, -{ HP_POP(itemdb->parse_dbrow), HP_POP2(HP_itemdb_parse_dbrow), 2396 }, -{ HP_POP(itemdb->exists), HP_POP2(HP_itemdb_exists), 2398 }, -{ HP_POP(itemdb->in_group), HP_POP2(HP_itemdb_in_group), 2400 }, -{ HP_POP(itemdb->group_item), HP_POP2(HP_itemdb_group_item), 2402 }, -{ HP_POP(itemdb->chain_item), HP_POP2(HP_itemdb_chain_item), 2404 }, -{ HP_POP(itemdb->package_item), HP_POP2(HP_itemdb_package_item), 2406 }, -{ HP_POP(itemdb->searchname_sub), HP_POP2(HP_itemdb_searchname_sub), 2408 }, -{ HP_POP(itemdb->searchname_array_sub), HP_POP2(HP_itemdb_searchname_array_sub), 2410 }, -{ HP_POP(itemdb->searchrandomid), HP_POP2(HP_itemdb_searchrandomid), 2412 }, -{ HP_POP(itemdb->typename), HP_POP2(HP_itemdb_typename), 2414 }, -{ HP_POP(itemdb->jobid2mapid), HP_POP2(HP_itemdb_jobid2mapid), 2416 }, -{ HP_POP(itemdb->create_dummy_data), HP_POP2(HP_itemdb_create_dummy_data), 2418 }, -{ HP_POP(itemdb->create_item_data), HP_POP2(HP_itemdb_create_item_data), 2420 }, -{ HP_POP(itemdb->isequip), HP_POP2(HP_itemdb_isequip), 2422 }, -{ HP_POP(itemdb->isequip2), HP_POP2(HP_itemdb_isequip2), 2424 }, -{ HP_POP(itemdb->isstackable), HP_POP2(HP_itemdb_isstackable), 2426 }, -{ HP_POP(itemdb->isstackable2), HP_POP2(HP_itemdb_isstackable2), 2428 }, -{ HP_POP(itemdb->isdropable_sub), HP_POP2(HP_itemdb_isdropable_sub), 2430 }, -{ HP_POP(itemdb->cantrade_sub), HP_POP2(HP_itemdb_cantrade_sub), 2432 }, -{ HP_POP(itemdb->canpartnertrade_sub), HP_POP2(HP_itemdb_canpartnertrade_sub), 2434 }, -{ HP_POP(itemdb->cansell_sub), HP_POP2(HP_itemdb_cansell_sub), 2436 }, -{ HP_POP(itemdb->cancartstore_sub), HP_POP2(HP_itemdb_cancartstore_sub), 2438 }, -{ HP_POP(itemdb->canstore_sub), HP_POP2(HP_itemdb_canstore_sub), 2440 }, -{ HP_POP(itemdb->canguildstore_sub), HP_POP2(HP_itemdb_canguildstore_sub), 2442 }, -{ HP_POP(itemdb->canmail_sub), HP_POP2(HP_itemdb_canmail_sub), 2444 }, -{ HP_POP(itemdb->canauction_sub), HP_POP2(HP_itemdb_canauction_sub), 2446 }, -{ HP_POP(itemdb->isrestricted), HP_POP2(HP_itemdb_isrestricted), 2448 }, -{ HP_POP(itemdb->isidentified), HP_POP2(HP_itemdb_isidentified), 2450 }, -{ HP_POP(itemdb->isidentified2), HP_POP2(HP_itemdb_isidentified2), 2452 }, -{ HP_POP(itemdb->read_itemavail), HP_POP2(HP_itemdb_read_itemavail), 2454 }, -{ HP_POP(itemdb->read_itemtrade), HP_POP2(HP_itemdb_read_itemtrade), 2456 }, -{ HP_POP(itemdb->read_itemdelay), HP_POP2(HP_itemdb_read_itemdelay), 2458 }, -{ HP_POP(itemdb->read_stack), HP_POP2(HP_itemdb_read_stack), 2460 }, -{ HP_POP(itemdb->read_buyingstore), HP_POP2(HP_itemdb_read_buyingstore), 2462 }, -{ HP_POP(itemdb->read_nouse), HP_POP2(HP_itemdb_read_nouse), 2464 }, -{ HP_POP(itemdb->combo_split_atoi), HP_POP2(HP_itemdb_combo_split_atoi), 2466 }, -{ HP_POP(itemdb->read_combos), HP_POP2(HP_itemdb_read_combos), 2468 }, -{ HP_POP(itemdb->gendercheck), HP_POP2(HP_itemdb_gendercheck), 2470 }, -{ HP_POP(itemdb->re_split_atoi), HP_POP2(HP_itemdb_re_split_atoi), 2472 }, -{ HP_POP(itemdb->readdb), HP_POP2(HP_itemdb_readdb), 2474 }, -{ HP_POP(itemdb->read_sqldb), HP_POP2(HP_itemdb_read_sqldb), 2476 }, -{ HP_POP(itemdb->unique_id), HP_POP2(HP_itemdb_unique_id), 2478 }, -{ HP_POP(itemdb->uid_load), HP_POP2(HP_itemdb_uid_load), 2480 }, -{ HP_POP(itemdb->read), HP_POP2(HP_itemdb_read), 2482 }, -{ HP_POP(itemdb->destroy_item_data), HP_POP2(HP_itemdb_destroy_item_data), 2484 }, -{ HP_POP(itemdb->final_sub), HP_POP2(HP_itemdb_final_sub), 2486 }, +{ HP_POP(itemdb->init), HP_POP2(HP_itemdb_init), 2370 }, +{ HP_POP(itemdb->final), HP_POP2(HP_itemdb_final), 2372 }, +{ HP_POP(itemdb->reload), HP_POP2(HP_itemdb_reload), 2374 }, +{ HP_POP(itemdb->name_constants), HP_POP2(HP_itemdb_name_constants), 2376 }, +{ HP_POP(itemdb->force_name_constants), HP_POP2(HP_itemdb_force_name_constants), 2378 }, +{ HP_POP(itemdb->read_groups), HP_POP2(HP_itemdb_read_groups), 2380 }, +{ HP_POP(itemdb->read_chains), HP_POP2(HP_itemdb_read_chains), 2382 }, +{ HP_POP(itemdb->read_packages), HP_POP2(HP_itemdb_read_packages), 2384 }, +{ HP_POP(itemdb->write_cached_packages), HP_POP2(HP_itemdb_write_cached_packages), 2386 }, +{ HP_POP(itemdb->read_cached_packages), HP_POP2(HP_itemdb_read_cached_packages), 2388 }, +{ HP_POP(itemdb->name2id), HP_POP2(HP_itemdb_name2id), 2390 }, +{ HP_POP(itemdb->search_name), HP_POP2(HP_itemdb_search_name), 2392 }, +{ HP_POP(itemdb->search_name_array), HP_POP2(HP_itemdb_search_name_array), 2394 }, +{ HP_POP(itemdb->load), HP_POP2(HP_itemdb_load), 2396 }, +{ HP_POP(itemdb->search), HP_POP2(HP_itemdb_search), 2398 }, +{ HP_POP(itemdb->parse_dbrow), HP_POP2(HP_itemdb_parse_dbrow), 2400 }, +{ HP_POP(itemdb->exists), HP_POP2(HP_itemdb_exists), 2402 }, +{ HP_POP(itemdb->in_group), HP_POP2(HP_itemdb_in_group), 2404 }, +{ HP_POP(itemdb->group_item), HP_POP2(HP_itemdb_group_item), 2406 }, +{ HP_POP(itemdb->chain_item), HP_POP2(HP_itemdb_chain_item), 2408 }, +{ HP_POP(itemdb->package_item), HP_POP2(HP_itemdb_package_item), 2410 }, +{ HP_POP(itemdb->searchname_sub), HP_POP2(HP_itemdb_searchname_sub), 2412 }, +{ HP_POP(itemdb->searchname_array_sub), HP_POP2(HP_itemdb_searchname_array_sub), 2414 }, +{ HP_POP(itemdb->searchrandomid), HP_POP2(HP_itemdb_searchrandomid), 2416 }, +{ HP_POP(itemdb->typename), HP_POP2(HP_itemdb_typename), 2418 }, +{ HP_POP(itemdb->jobid2mapid), HP_POP2(HP_itemdb_jobid2mapid), 2420 }, +{ HP_POP(itemdb->create_dummy_data), HP_POP2(HP_itemdb_create_dummy_data), 2422 }, +{ HP_POP(itemdb->create_item_data), HP_POP2(HP_itemdb_create_item_data), 2424 }, +{ HP_POP(itemdb->isequip), HP_POP2(HP_itemdb_isequip), 2426 }, +{ HP_POP(itemdb->isequip2), HP_POP2(HP_itemdb_isequip2), 2428 }, +{ HP_POP(itemdb->isstackable), HP_POP2(HP_itemdb_isstackable), 2430 }, +{ HP_POP(itemdb->isstackable2), HP_POP2(HP_itemdb_isstackable2), 2432 }, +{ HP_POP(itemdb->isdropable_sub), HP_POP2(HP_itemdb_isdropable_sub), 2434 }, +{ HP_POP(itemdb->cantrade_sub), HP_POP2(HP_itemdb_cantrade_sub), 2436 }, +{ HP_POP(itemdb->canpartnertrade_sub), HP_POP2(HP_itemdb_canpartnertrade_sub), 2438 }, +{ HP_POP(itemdb->cansell_sub), HP_POP2(HP_itemdb_cansell_sub), 2440 }, +{ HP_POP(itemdb->cancartstore_sub), HP_POP2(HP_itemdb_cancartstore_sub), 2442 }, +{ HP_POP(itemdb->canstore_sub), HP_POP2(HP_itemdb_canstore_sub), 2444 }, +{ HP_POP(itemdb->canguildstore_sub), HP_POP2(HP_itemdb_canguildstore_sub), 2446 }, +{ HP_POP(itemdb->canmail_sub), HP_POP2(HP_itemdb_canmail_sub), 2448 }, +{ HP_POP(itemdb->canauction_sub), HP_POP2(HP_itemdb_canauction_sub), 2450 }, +{ HP_POP(itemdb->isrestricted), HP_POP2(HP_itemdb_isrestricted), 2452 }, +{ HP_POP(itemdb->isidentified), HP_POP2(HP_itemdb_isidentified), 2454 }, +{ HP_POP(itemdb->isidentified2), HP_POP2(HP_itemdb_isidentified2), 2456 }, +{ HP_POP(itemdb->read_itemavail), HP_POP2(HP_itemdb_read_itemavail), 2458 }, +{ HP_POP(itemdb->read_itemtrade), HP_POP2(HP_itemdb_read_itemtrade), 2460 }, +{ HP_POP(itemdb->read_itemdelay), HP_POP2(HP_itemdb_read_itemdelay), 2462 }, +{ HP_POP(itemdb->read_stack), HP_POP2(HP_itemdb_read_stack), 2464 }, +{ HP_POP(itemdb->read_buyingstore), HP_POP2(HP_itemdb_read_buyingstore), 2466 }, +{ HP_POP(itemdb->read_nouse), HP_POP2(HP_itemdb_read_nouse), 2468 }, +{ HP_POP(itemdb->combo_split_atoi), HP_POP2(HP_itemdb_combo_split_atoi), 2470 }, +{ HP_POP(itemdb->read_combos), HP_POP2(HP_itemdb_read_combos), 2472 }, +{ HP_POP(itemdb->gendercheck), HP_POP2(HP_itemdb_gendercheck), 2474 }, +{ HP_POP(itemdb->re_split_atoi), HP_POP2(HP_itemdb_re_split_atoi), 2476 }, +{ HP_POP(itemdb->readdb), HP_POP2(HP_itemdb_readdb), 2478 }, +{ HP_POP(itemdb->read_sqldb), HP_POP2(HP_itemdb_read_sqldb), 2480 }, +{ HP_POP(itemdb->unique_id), HP_POP2(HP_itemdb_unique_id), 2482 }, +{ HP_POP(itemdb->uid_load), HP_POP2(HP_itemdb_uid_load), 2484 }, +{ HP_POP(itemdb->read), HP_POP2(HP_itemdb_read), 2486 }, +{ HP_POP(itemdb->destroy_item_data), HP_POP2(HP_itemdb_destroy_item_data), 2488 }, +{ HP_POP(itemdb->final_sub), HP_POP2(HP_itemdb_final_sub), 2490 }, /* logs */ -{ HP_POP(logs->pick_pc), HP_POP2(HP_logs_pick_pc), 2488 }, -{ HP_POP(logs->pick_mob), HP_POP2(HP_logs_pick_mob), 2490 }, -{ HP_POP(logs->zeny), HP_POP2(HP_logs_zeny), 2492 }, -{ HP_POP(logs->npc), HP_POP2(HP_logs_npc), 2494 }, -{ HP_POP(logs->chat), HP_POP2(HP_logs_chat), 2496 }, -{ HP_POP(logs->atcommand), HP_POP2(HP_logs_atcommand), 2498 }, -{ HP_POP(logs->branch), HP_POP2(HP_logs_branch), 2500 }, -{ HP_POP(logs->mvpdrop), HP_POP2(HP_logs_mvpdrop), 2502 }, -{ HP_POP(logs->pick_sub), HP_POP2(HP_logs_pick_sub), 2504 }, -{ HP_POP(logs->zeny_sub), HP_POP2(HP_logs_zeny_sub), 2506 }, -{ HP_POP(logs->npc_sub), HP_POP2(HP_logs_npc_sub), 2508 }, -{ HP_POP(logs->chat_sub), HP_POP2(HP_logs_chat_sub), 2510 }, -{ HP_POP(logs->atcommand_sub), HP_POP2(HP_logs_atcommand_sub), 2512 }, -{ HP_POP(logs->branch_sub), HP_POP2(HP_logs_branch_sub), 2514 }, -{ HP_POP(logs->mvpdrop_sub), HP_POP2(HP_logs_mvpdrop_sub), 2516 }, -{ HP_POP(logs->config_read), HP_POP2(HP_logs_config_read), 2518 }, -{ HP_POP(logs->config_done), HP_POP2(HP_logs_config_done), 2520 }, -{ HP_POP(logs->sql_init), HP_POP2(HP_logs_sql_init), 2522 }, -{ HP_POP(logs->sql_final), HP_POP2(HP_logs_sql_final), 2524 }, -{ HP_POP(logs->picktype2char), HP_POP2(HP_logs_picktype2char), 2526 }, -{ HP_POP(logs->chattype2char), HP_POP2(HP_logs_chattype2char), 2528 }, -{ HP_POP(logs->should_log_item), HP_POP2(HP_logs_should_log_item), 2530 }, +{ HP_POP(logs->pick_pc), HP_POP2(HP_logs_pick_pc), 2492 }, +{ HP_POP(logs->pick_mob), HP_POP2(HP_logs_pick_mob), 2494 }, +{ HP_POP(logs->zeny), HP_POP2(HP_logs_zeny), 2496 }, +{ HP_POP(logs->npc), HP_POP2(HP_logs_npc), 2498 }, +{ HP_POP(logs->chat), HP_POP2(HP_logs_chat), 2500 }, +{ HP_POP(logs->atcommand), HP_POP2(HP_logs_atcommand), 2502 }, +{ HP_POP(logs->branch), HP_POP2(HP_logs_branch), 2504 }, +{ HP_POP(logs->mvpdrop), HP_POP2(HP_logs_mvpdrop), 2506 }, +{ HP_POP(logs->pick_sub), HP_POP2(HP_logs_pick_sub), 2508 }, +{ HP_POP(logs->zeny_sub), HP_POP2(HP_logs_zeny_sub), 2510 }, +{ HP_POP(logs->npc_sub), HP_POP2(HP_logs_npc_sub), 2512 }, +{ HP_POP(logs->chat_sub), HP_POP2(HP_logs_chat_sub), 2514 }, +{ HP_POP(logs->atcommand_sub), HP_POP2(HP_logs_atcommand_sub), 2516 }, +{ HP_POP(logs->branch_sub), HP_POP2(HP_logs_branch_sub), 2518 }, +{ HP_POP(logs->mvpdrop_sub), HP_POP2(HP_logs_mvpdrop_sub), 2520 }, +{ HP_POP(logs->config_read), HP_POP2(HP_logs_config_read), 2522 }, +{ HP_POP(logs->config_done), HP_POP2(HP_logs_config_done), 2524 }, +{ HP_POP(logs->sql_init), HP_POP2(HP_logs_sql_init), 2526 }, +{ HP_POP(logs->sql_final), HP_POP2(HP_logs_sql_final), 2528 }, +{ HP_POP(logs->picktype2char), HP_POP2(HP_logs_picktype2char), 2530 }, +{ HP_POP(logs->chattype2char), HP_POP2(HP_logs_chattype2char), 2532 }, +{ HP_POP(logs->should_log_item), HP_POP2(HP_logs_should_log_item), 2534 }, /* mail */ -{ HP_POP(mail->clear), HP_POP2(HP_mail_clear), 2532 }, -{ HP_POP(mail->removeitem), HP_POP2(HP_mail_removeitem), 2534 }, -{ HP_POP(mail->removezeny), HP_POP2(HP_mail_removezeny), 2536 }, -{ HP_POP(mail->setitem), HP_POP2(HP_mail_setitem), 2538 }, -{ HP_POP(mail->setattachment), HP_POP2(HP_mail_setattachment), 2540 }, -{ HP_POP(mail->getattachment), HP_POP2(HP_mail_getattachment), 2542 }, -{ HP_POP(mail->openmail), HP_POP2(HP_mail_openmail), 2544 }, -{ HP_POP(mail->deliveryfail), HP_POP2(HP_mail_deliveryfail), 2546 }, -{ HP_POP(mail->invalid_operation), HP_POP2(HP_mail_invalid_operation), 2548 }, +{ HP_POP(mail->clear), HP_POP2(HP_mail_clear), 2536 }, +{ HP_POP(mail->removeitem), HP_POP2(HP_mail_removeitem), 2538 }, +{ HP_POP(mail->removezeny), HP_POP2(HP_mail_removezeny), 2540 }, +{ HP_POP(mail->setitem), HP_POP2(HP_mail_setitem), 2542 }, +{ HP_POP(mail->setattachment), HP_POP2(HP_mail_setattachment), 2544 }, +{ HP_POP(mail->getattachment), HP_POP2(HP_mail_getattachment), 2546 }, +{ HP_POP(mail->openmail), HP_POP2(HP_mail_openmail), 2548 }, +{ HP_POP(mail->deliveryfail), HP_POP2(HP_mail_deliveryfail), 2550 }, +{ HP_POP(mail->invalid_operation), HP_POP2(HP_mail_invalid_operation), 2552 }, /* map */ -{ HP_POP(map->zone_init), HP_POP2(HP_map_zone_init), 2550 }, -{ HP_POP(map->zone_remove), HP_POP2(HP_map_zone_remove), 2552 }, -{ HP_POP(map->zone_apply), HP_POP2(HP_map_zone_apply), 2554 }, -{ HP_POP(map->zone_change), HP_POP2(HP_map_zone_change), 2556 }, -{ HP_POP(map->zone_change2), HP_POP2(HP_map_zone_change2), 2558 }, -{ HP_POP(map->getcell), HP_POP2(HP_map_getcell), 2560 }, -{ HP_POP(map->setgatcell), HP_POP2(HP_map_setgatcell), 2562 }, -{ HP_POP(map->cellfromcache), HP_POP2(HP_map_cellfromcache), 2564 }, -{ HP_POP(map->setusers), HP_POP2(HP_map_setusers), 2566 }, -{ HP_POP(map->getusers), HP_POP2(HP_map_getusers), 2568 }, -{ HP_POP(map->usercount), HP_POP2(HP_map_usercount), 2570 }, -{ HP_POP(map->freeblock), HP_POP2(HP_map_freeblock), 2572 }, -{ HP_POP(map->freeblock_lock), HP_POP2(HP_map_freeblock_lock), 2574 }, -{ HP_POP(map->freeblock_unlock), HP_POP2(HP_map_freeblock_unlock), 2576 }, -{ HP_POP(map->addblock), HP_POP2(HP_map_addblock), 2578 }, -{ HP_POP(map->delblock), HP_POP2(HP_map_delblock), 2580 }, -{ HP_POP(map->moveblock), HP_POP2(HP_map_moveblock), 2582 }, -{ HP_POP(map->count_oncell), HP_POP2(HP_map_count_oncell), 2584 }, -{ HP_POP(map->find_skill_unit_oncell), HP_POP2(HP_map_find_skill_unit_oncell), 2586 }, -{ HP_POP(map->get_new_object_id), HP_POP2(HP_map_get_new_object_id), 2588 }, -{ HP_POP(map->search_freecell), HP_POP2(HP_map_search_freecell), 2590 }, -{ HP_POP(map->quit), HP_POP2(HP_map_quit), 2592 }, -{ HP_POP(map->addnpc), HP_POP2(HP_map_addnpc), 2594 }, -{ HP_POP(map->clearflooritem_timer), HP_POP2(HP_map_clearflooritem_timer), 2596 }, -{ HP_POP(map->removemobs_timer), HP_POP2(HP_map_removemobs_timer), 2598 }, -{ HP_POP(map->clearflooritem), HP_POP2(HP_map_clearflooritem), 2600 }, -{ HP_POP(map->addflooritem), HP_POP2(HP_map_addflooritem), 2602 }, -{ HP_POP(map->addnickdb), HP_POP2(HP_map_addnickdb), 2604 }, -{ HP_POP(map->delnickdb), HP_POP2(HP_map_delnickdb), 2606 }, -{ HP_POP(map->reqnickdb), HP_POP2(HP_map_reqnickdb), 2608 }, -{ HP_POP(map->charid2nick), HP_POP2(HP_map_charid2nick), 2610 }, -{ HP_POP(map->charid2sd), HP_POP2(HP_map_charid2sd), 2612 }, -{ HP_POP(map->vforeachpc), HP_POP2(HP_map_vforeachpc), 2614 }, -{ HP_POP(map->vforeachmob), HP_POP2(HP_map_vforeachmob), 2616 }, -{ HP_POP(map->vforeachnpc), HP_POP2(HP_map_vforeachnpc), 2618 }, -{ HP_POP(map->vforeachregen), HP_POP2(HP_map_vforeachregen), 2620 }, -{ HP_POP(map->vforeachiddb), HP_POP2(HP_map_vforeachiddb), 2622 }, -{ HP_POP(map->vforeachinrange), HP_POP2(HP_map_vforeachinrange), 2624 }, -{ HP_POP(map->vforeachinshootrange), HP_POP2(HP_map_vforeachinshootrange), 2626 }, -{ HP_POP(map->vforeachinarea), HP_POP2(HP_map_vforeachinarea), 2628 }, -{ HP_POP(map->vforcountinrange), HP_POP2(HP_map_vforcountinrange), 2630 }, -{ HP_POP(map->vforcountinarea), HP_POP2(HP_map_vforcountinarea), 2632 }, -{ HP_POP(map->vforeachinmovearea), HP_POP2(HP_map_vforeachinmovearea), 2634 }, -{ HP_POP(map->vforeachincell), HP_POP2(HP_map_vforeachincell), 2636 }, -{ HP_POP(map->vforeachinpath), HP_POP2(HP_map_vforeachinpath), 2638 }, -{ HP_POP(map->vforeachinmap), HP_POP2(HP_map_vforeachinmap), 2640 }, -{ HP_POP(map->vforeachininstance), HP_POP2(HP_map_vforeachininstance), 2642 }, -{ HP_POP(map->id2sd), HP_POP2(HP_map_id2sd), 2644 }, -{ HP_POP(map->id2md), HP_POP2(HP_map_id2md), 2646 }, -{ HP_POP(map->id2nd), HP_POP2(HP_map_id2nd), 2648 }, -{ HP_POP(map->id2hd), HP_POP2(HP_map_id2hd), 2650 }, -{ HP_POP(map->id2mc), HP_POP2(HP_map_id2mc), 2652 }, -{ HP_POP(map->id2cd), HP_POP2(HP_map_id2cd), 2654 }, -{ HP_POP(map->id2bl), HP_POP2(HP_map_id2bl), 2656 }, -{ HP_POP(map->blid_exists), HP_POP2(HP_map_blid_exists), 2658 }, -{ HP_POP(map->mapindex2mapid), HP_POP2(HP_map_mapindex2mapid), 2660 }, -{ HP_POP(map->mapname2mapid), HP_POP2(HP_map_mapname2mapid), 2662 }, -{ HP_POP(map->mapname2ipport), HP_POP2(HP_map_mapname2ipport), 2664 }, -{ HP_POP(map->setipport), HP_POP2(HP_map_setipport), 2666 }, -{ HP_POP(map->eraseipport), HP_POP2(HP_map_eraseipport), 2668 }, -{ HP_POP(map->eraseallipport), HP_POP2(HP_map_eraseallipport), 2670 }, -{ HP_POP(map->addiddb), HP_POP2(HP_map_addiddb), 2672 }, -{ HP_POP(map->deliddb), HP_POP2(HP_map_deliddb), 2674 }, -{ HP_POP(map->nick2sd), HP_POP2(HP_map_nick2sd), 2676 }, -{ HP_POP(map->getmob_boss), HP_POP2(HP_map_getmob_boss), 2678 }, -{ HP_POP(map->id2boss), HP_POP2(HP_map_id2boss), 2680 }, -{ HP_POP(map->reloadnpc), HP_POP2(HP_map_reloadnpc), 2682 }, -{ HP_POP(map->check_dir), HP_POP2(HP_map_check_dir), 2684 }, -{ HP_POP(map->calc_dir), HP_POP2(HP_map_calc_dir), 2686 }, -{ HP_POP(map->random_dir), HP_POP2(HP_map_random_dir), 2688 }, -{ HP_POP(map->cleanup_sub), HP_POP2(HP_map_cleanup_sub), 2690 }, -{ HP_POP(map->delmap), HP_POP2(HP_map_delmap), 2692 }, -{ HP_POP(map->flags_init), HP_POP2(HP_map_flags_init), 2694 }, -{ HP_POP(map->iwall_set), HP_POP2(HP_map_iwall_set), 2696 }, -{ HP_POP(map->iwall_get), HP_POP2(HP_map_iwall_get), 2698 }, -{ HP_POP(map->iwall_remove), HP_POP2(HP_map_iwall_remove), 2700 }, -{ HP_POP(map->addmobtolist), HP_POP2(HP_map_addmobtolist), 2702 }, -{ HP_POP(map->spawnmobs), HP_POP2(HP_map_spawnmobs), 2704 }, -{ HP_POP(map->removemobs), HP_POP2(HP_map_removemobs), 2706 }, -{ HP_POP(map->addmap2db), HP_POP2(HP_map_addmap2db), 2708 }, -{ HP_POP(map->removemapdb), HP_POP2(HP_map_removemapdb), 2710 }, -{ HP_POP(map->clean), HP_POP2(HP_map_clean), 2712 }, -{ HP_POP(map->do_shutdown), HP_POP2(HP_map_do_shutdown), 2714 }, -{ HP_POP(map->freeblock_timer), HP_POP2(HP_map_freeblock_timer), 2716 }, -{ HP_POP(map->searchrandfreecell), HP_POP2(HP_map_searchrandfreecell), 2718 }, -{ HP_POP(map->count_sub), HP_POP2(HP_map_count_sub), 2720 }, -{ HP_POP(map->create_charid2nick), HP_POP2(HP_map_create_charid2nick), 2722 }, -{ HP_POP(map->removemobs_sub), HP_POP2(HP_map_removemobs_sub), 2724 }, -{ HP_POP(map->gat2cell), HP_POP2(HP_map_gat2cell), 2726 }, -{ HP_POP(map->cell2gat), HP_POP2(HP_map_cell2gat), 2728 }, -{ HP_POP(map->getcellp), HP_POP2(HP_map_getcellp), 2730 }, -{ HP_POP(map->setcell), HP_POP2(HP_map_setcell), 2732 }, -{ HP_POP(map->sub_getcellp), HP_POP2(HP_map_sub_getcellp), 2734 }, -{ HP_POP(map->sub_setcell), HP_POP2(HP_map_sub_setcell), 2736 }, -{ HP_POP(map->iwall_nextxy), HP_POP2(HP_map_iwall_nextxy), 2738 }, -{ HP_POP(map->create_map_data_other_server), HP_POP2(HP_map_create_map_data_other_server), 2740 }, -{ HP_POP(map->eraseallipport_sub), HP_POP2(HP_map_eraseallipport_sub), 2742 }, -{ HP_POP(map->init_mapcache), HP_POP2(HP_map_init_mapcache), 2744 }, -{ HP_POP(map->readfromcache), HP_POP2(HP_map_readfromcache), 2746 }, -{ HP_POP(map->addmap), HP_POP2(HP_map_addmap), 2748 }, -{ HP_POP(map->delmapid), HP_POP2(HP_map_delmapid), 2750 }, -{ HP_POP(map->zone_db_clear), HP_POP2(HP_map_zone_db_clear), 2752 }, -{ HP_POP(map->list_final), HP_POP2(HP_map_list_final), 2754 }, -{ HP_POP(map->waterheight), HP_POP2(HP_map_waterheight), 2756 }, -{ HP_POP(map->readgat), HP_POP2(HP_map_readgat), 2758 }, -{ HP_POP(map->readallmaps), HP_POP2(HP_map_readallmaps), 2760 }, -{ HP_POP(map->config_read), HP_POP2(HP_map_config_read), 2762 }, -{ HP_POP(map->config_read_sub), HP_POP2(HP_map_config_read_sub), 2764 }, -{ HP_POP(map->reloadnpc_sub), HP_POP2(HP_map_reloadnpc_sub), 2766 }, -{ HP_POP(map->inter_config_read), HP_POP2(HP_map_inter_config_read), 2768 }, -{ HP_POP(map->sql_init), HP_POP2(HP_map_sql_init), 2770 }, -{ HP_POP(map->sql_close), HP_POP2(HP_map_sql_close), 2772 }, -{ HP_POP(map->zone_mf_cache), HP_POP2(HP_map_zone_mf_cache), 2774 }, -{ HP_POP(map->zone_str2itemid), HP_POP2(HP_map_zone_str2itemid), 2776 }, -{ HP_POP(map->zone_str2skillid), HP_POP2(HP_map_zone_str2skillid), 2778 }, -{ HP_POP(map->zone_bl_type), HP_POP2(HP_map_zone_bl_type), 2780 }, -{ HP_POP(map->read_zone_db), HP_POP2(HP_map_read_zone_db), 2782 }, -{ HP_POP(map->db_final), HP_POP2(HP_map_db_final), 2784 }, -{ HP_POP(map->nick_db_final), HP_POP2(HP_map_nick_db_final), 2786 }, -{ HP_POP(map->cleanup_db_sub), HP_POP2(HP_map_cleanup_db_sub), 2788 }, -{ HP_POP(map->abort_sub), HP_POP2(HP_map_abort_sub), 2790 }, -{ HP_POP(map->helpscreen), HP_POP2(HP_map_helpscreen), 2792 }, -{ HP_POP(map->versionscreen), HP_POP2(HP_map_versionscreen), 2794 }, -{ HP_POP(map->arg_next_value), HP_POP2(HP_map_arg_next_value), 2796 }, +{ HP_POP(map->zone_init), HP_POP2(HP_map_zone_init), 2554 }, +{ HP_POP(map->zone_remove), HP_POP2(HP_map_zone_remove), 2556 }, +{ HP_POP(map->zone_apply), HP_POP2(HP_map_zone_apply), 2558 }, +{ HP_POP(map->zone_change), HP_POP2(HP_map_zone_change), 2560 }, +{ HP_POP(map->zone_change2), HP_POP2(HP_map_zone_change2), 2562 }, +{ HP_POP(map->getcell), HP_POP2(HP_map_getcell), 2564 }, +{ HP_POP(map->setgatcell), HP_POP2(HP_map_setgatcell), 2566 }, +{ HP_POP(map->cellfromcache), HP_POP2(HP_map_cellfromcache), 2568 }, +{ HP_POP(map->setusers), HP_POP2(HP_map_setusers), 2570 }, +{ HP_POP(map->getusers), HP_POP2(HP_map_getusers), 2572 }, +{ HP_POP(map->usercount), HP_POP2(HP_map_usercount), 2574 }, +{ HP_POP(map->freeblock), HP_POP2(HP_map_freeblock), 2576 }, +{ HP_POP(map->freeblock_lock), HP_POP2(HP_map_freeblock_lock), 2578 }, +{ HP_POP(map->freeblock_unlock), HP_POP2(HP_map_freeblock_unlock), 2580 }, +{ HP_POP(map->addblock), HP_POP2(HP_map_addblock), 2582 }, +{ HP_POP(map->delblock), HP_POP2(HP_map_delblock), 2584 }, +{ HP_POP(map->moveblock), HP_POP2(HP_map_moveblock), 2586 }, +{ HP_POP(map->count_oncell), HP_POP2(HP_map_count_oncell), 2588 }, +{ HP_POP(map->find_skill_unit_oncell), HP_POP2(HP_map_find_skill_unit_oncell), 2590 }, +{ HP_POP(map->get_new_object_id), HP_POP2(HP_map_get_new_object_id), 2592 }, +{ HP_POP(map->search_freecell), HP_POP2(HP_map_search_freecell), 2594 }, +{ HP_POP(map->quit), HP_POP2(HP_map_quit), 2596 }, +{ HP_POP(map->addnpc), HP_POP2(HP_map_addnpc), 2598 }, +{ HP_POP(map->clearflooritem_timer), HP_POP2(HP_map_clearflooritem_timer), 2600 }, +{ HP_POP(map->removemobs_timer), HP_POP2(HP_map_removemobs_timer), 2602 }, +{ HP_POP(map->clearflooritem), HP_POP2(HP_map_clearflooritem), 2604 }, +{ HP_POP(map->addflooritem), HP_POP2(HP_map_addflooritem), 2606 }, +{ HP_POP(map->addnickdb), HP_POP2(HP_map_addnickdb), 2608 }, +{ HP_POP(map->delnickdb), HP_POP2(HP_map_delnickdb), 2610 }, +{ HP_POP(map->reqnickdb), HP_POP2(HP_map_reqnickdb), 2612 }, +{ HP_POP(map->charid2nick), HP_POP2(HP_map_charid2nick), 2614 }, +{ HP_POP(map->charid2sd), HP_POP2(HP_map_charid2sd), 2616 }, +{ HP_POP(map->vforeachpc), HP_POP2(HP_map_vforeachpc), 2618 }, +{ HP_POP(map->vforeachmob), HP_POP2(HP_map_vforeachmob), 2620 }, +{ HP_POP(map->vforeachnpc), HP_POP2(HP_map_vforeachnpc), 2622 }, +{ HP_POP(map->vforeachregen), HP_POP2(HP_map_vforeachregen), 2624 }, +{ HP_POP(map->vforeachiddb), HP_POP2(HP_map_vforeachiddb), 2626 }, +{ HP_POP(map->vforeachinrange), HP_POP2(HP_map_vforeachinrange), 2628 }, +{ HP_POP(map->vforeachinshootrange), HP_POP2(HP_map_vforeachinshootrange), 2630 }, +{ HP_POP(map->vforeachinarea), HP_POP2(HP_map_vforeachinarea), 2632 }, +{ HP_POP(map->vforcountinrange), HP_POP2(HP_map_vforcountinrange), 2634 }, +{ HP_POP(map->vforcountinarea), HP_POP2(HP_map_vforcountinarea), 2636 }, +{ HP_POP(map->vforeachinmovearea), HP_POP2(HP_map_vforeachinmovearea), 2638 }, +{ HP_POP(map->vforeachincell), HP_POP2(HP_map_vforeachincell), 2640 }, +{ HP_POP(map->vforeachinpath), HP_POP2(HP_map_vforeachinpath), 2642 }, +{ HP_POP(map->vforeachinmap), HP_POP2(HP_map_vforeachinmap), 2644 }, +{ HP_POP(map->vforeachininstance), HP_POP2(HP_map_vforeachininstance), 2646 }, +{ HP_POP(map->id2sd), HP_POP2(HP_map_id2sd), 2648 }, +{ HP_POP(map->id2md), HP_POP2(HP_map_id2md), 2650 }, +{ HP_POP(map->id2nd), HP_POP2(HP_map_id2nd), 2652 }, +{ HP_POP(map->id2hd), HP_POP2(HP_map_id2hd), 2654 }, +{ HP_POP(map->id2mc), HP_POP2(HP_map_id2mc), 2656 }, +{ HP_POP(map->id2cd), HP_POP2(HP_map_id2cd), 2658 }, +{ HP_POP(map->id2bl), HP_POP2(HP_map_id2bl), 2660 }, +{ HP_POP(map->blid_exists), HP_POP2(HP_map_blid_exists), 2662 }, +{ HP_POP(map->mapindex2mapid), HP_POP2(HP_map_mapindex2mapid), 2664 }, +{ HP_POP(map->mapname2mapid), HP_POP2(HP_map_mapname2mapid), 2666 }, +{ HP_POP(map->mapname2ipport), HP_POP2(HP_map_mapname2ipport), 2668 }, +{ HP_POP(map->setipport), HP_POP2(HP_map_setipport), 2670 }, +{ HP_POP(map->eraseipport), HP_POP2(HP_map_eraseipport), 2672 }, +{ HP_POP(map->eraseallipport), HP_POP2(HP_map_eraseallipport), 2674 }, +{ HP_POP(map->addiddb), HP_POP2(HP_map_addiddb), 2676 }, +{ HP_POP(map->deliddb), HP_POP2(HP_map_deliddb), 2678 }, +{ HP_POP(map->nick2sd), HP_POP2(HP_map_nick2sd), 2680 }, +{ HP_POP(map->getmob_boss), HP_POP2(HP_map_getmob_boss), 2682 }, +{ HP_POP(map->id2boss), HP_POP2(HP_map_id2boss), 2684 }, +{ HP_POP(map->reloadnpc), HP_POP2(HP_map_reloadnpc), 2686 }, +{ HP_POP(map->check_dir), HP_POP2(HP_map_check_dir), 2688 }, +{ HP_POP(map->calc_dir), HP_POP2(HP_map_calc_dir), 2690 }, +{ HP_POP(map->random_dir), HP_POP2(HP_map_random_dir), 2692 }, +{ HP_POP(map->cleanup_sub), HP_POP2(HP_map_cleanup_sub), 2694 }, +{ HP_POP(map->delmap), HP_POP2(HP_map_delmap), 2696 }, +{ HP_POP(map->flags_init), HP_POP2(HP_map_flags_init), 2698 }, +{ HP_POP(map->iwall_set), HP_POP2(HP_map_iwall_set), 2700 }, +{ HP_POP(map->iwall_get), HP_POP2(HP_map_iwall_get), 2702 }, +{ HP_POP(map->iwall_remove), HP_POP2(HP_map_iwall_remove), 2704 }, +{ HP_POP(map->addmobtolist), HP_POP2(HP_map_addmobtolist), 2706 }, +{ HP_POP(map->spawnmobs), HP_POP2(HP_map_spawnmobs), 2708 }, +{ HP_POP(map->removemobs), HP_POP2(HP_map_removemobs), 2710 }, +{ HP_POP(map->addmap2db), HP_POP2(HP_map_addmap2db), 2712 }, +{ HP_POP(map->removemapdb), HP_POP2(HP_map_removemapdb), 2714 }, +{ HP_POP(map->clean), HP_POP2(HP_map_clean), 2716 }, +{ HP_POP(map->do_shutdown), HP_POP2(HP_map_do_shutdown), 2718 }, +{ HP_POP(map->freeblock_timer), HP_POP2(HP_map_freeblock_timer), 2720 }, +{ HP_POP(map->searchrandfreecell), HP_POP2(HP_map_searchrandfreecell), 2722 }, +{ HP_POP(map->count_sub), HP_POP2(HP_map_count_sub), 2724 }, +{ HP_POP(map->create_charid2nick), HP_POP2(HP_map_create_charid2nick), 2726 }, +{ HP_POP(map->removemobs_sub), HP_POP2(HP_map_removemobs_sub), 2728 }, +{ HP_POP(map->gat2cell), HP_POP2(HP_map_gat2cell), 2730 }, +{ HP_POP(map->cell2gat), HP_POP2(HP_map_cell2gat), 2732 }, +{ HP_POP(map->getcellp), HP_POP2(HP_map_getcellp), 2734 }, +{ HP_POP(map->setcell), HP_POP2(HP_map_setcell), 2736 }, +{ HP_POP(map->sub_getcellp), HP_POP2(HP_map_sub_getcellp), 2738 }, +{ HP_POP(map->sub_setcell), HP_POP2(HP_map_sub_setcell), 2740 }, +{ HP_POP(map->iwall_nextxy), HP_POP2(HP_map_iwall_nextxy), 2742 }, +{ HP_POP(map->create_map_data_other_server), HP_POP2(HP_map_create_map_data_other_server), 2744 }, +{ HP_POP(map->eraseallipport_sub), HP_POP2(HP_map_eraseallipport_sub), 2746 }, +{ HP_POP(map->init_mapcache), HP_POP2(HP_map_init_mapcache), 2748 }, +{ HP_POP(map->readfromcache), HP_POP2(HP_map_readfromcache), 2750 }, +{ HP_POP(map->addmap), HP_POP2(HP_map_addmap), 2752 }, +{ HP_POP(map->delmapid), HP_POP2(HP_map_delmapid), 2754 }, +{ HP_POP(map->zone_db_clear), HP_POP2(HP_map_zone_db_clear), 2756 }, +{ HP_POP(map->list_final), HP_POP2(HP_map_list_final), 2758 }, +{ HP_POP(map->waterheight), HP_POP2(HP_map_waterheight), 2760 }, +{ HP_POP(map->readgat), HP_POP2(HP_map_readgat), 2762 }, +{ HP_POP(map->readallmaps), HP_POP2(HP_map_readallmaps), 2764 }, +{ HP_POP(map->config_read), HP_POP2(HP_map_config_read), 2766 }, +{ HP_POP(map->config_read_sub), HP_POP2(HP_map_config_read_sub), 2768 }, +{ HP_POP(map->reloadnpc_sub), HP_POP2(HP_map_reloadnpc_sub), 2770 }, +{ HP_POP(map->inter_config_read), HP_POP2(HP_map_inter_config_read), 2772 }, +{ HP_POP(map->sql_init), HP_POP2(HP_map_sql_init), 2774 }, +{ HP_POP(map->sql_close), HP_POP2(HP_map_sql_close), 2776 }, +{ HP_POP(map->zone_mf_cache), HP_POP2(HP_map_zone_mf_cache), 2778 }, +{ HP_POP(map->zone_str2itemid), HP_POP2(HP_map_zone_str2itemid), 2780 }, +{ HP_POP(map->zone_str2skillid), HP_POP2(HP_map_zone_str2skillid), 2782 }, +{ HP_POP(map->zone_bl_type), HP_POP2(HP_map_zone_bl_type), 2784 }, +{ HP_POP(map->read_zone_db), HP_POP2(HP_map_read_zone_db), 2786 }, +{ HP_POP(map->db_final), HP_POP2(HP_map_db_final), 2788 }, +{ HP_POP(map->nick_db_final), HP_POP2(HP_map_nick_db_final), 2790 }, +{ HP_POP(map->cleanup_db_sub), HP_POP2(HP_map_cleanup_db_sub), 2792 }, +{ HP_POP(map->abort_sub), HP_POP2(HP_map_abort_sub), 2794 }, +{ HP_POP(map->helpscreen), HP_POP2(HP_map_helpscreen), 2796 }, +{ HP_POP(map->versionscreen), HP_POP2(HP_map_versionscreen), 2798 }, +{ HP_POP(map->arg_next_value), HP_POP2(HP_map_arg_next_value), 2800 }, +{ HP_POP(map->addblcell), HP_POP2(HP_map_addblcell), 2802 }, +{ HP_POP(map->delblcell), HP_POP2(HP_map_delblcell), 2804 }, /* mapit */ -{ HP_POP(mapit->alloc), HP_POP2(HP_mapit_alloc), 2798 }, -{ HP_POP(mapit->free), HP_POP2(HP_mapit_free), 2800 }, -{ HP_POP(mapit->first), HP_POP2(HP_mapit_first), 2802 }, -{ HP_POP(mapit->last), HP_POP2(HP_mapit_last), 2804 }, -{ HP_POP(mapit->next), HP_POP2(HP_mapit_next), 2806 }, -{ HP_POP(mapit->prev), HP_POP2(HP_mapit_prev), 2808 }, -{ HP_POP(mapit->exists), HP_POP2(HP_mapit_exists), 2810 }, +{ HP_POP(mapit->alloc), HP_POP2(HP_mapit_alloc), 2806 }, +{ HP_POP(mapit->free), HP_POP2(HP_mapit_free), 2808 }, +{ HP_POP(mapit->first), HP_POP2(HP_mapit_first), 2810 }, +{ HP_POP(mapit->last), HP_POP2(HP_mapit_last), 2812 }, +{ HP_POP(mapit->next), HP_POP2(HP_mapit_next), 2814 }, +{ HP_POP(mapit->prev), HP_POP2(HP_mapit_prev), 2816 }, +{ HP_POP(mapit->exists), HP_POP2(HP_mapit_exists), 2818 }, /* mapreg */ -{ HP_POP(mapreg->init), HP_POP2(HP_mapreg_init), 2812 }, -{ HP_POP(mapreg->final), HP_POP2(HP_mapreg_final), 2814 }, -{ HP_POP(mapreg->readreg), HP_POP2(HP_mapreg_readreg), 2816 }, -{ HP_POP(mapreg->readregstr), HP_POP2(HP_mapreg_readregstr), 2818 }, -{ HP_POP(mapreg->setreg), HP_POP2(HP_mapreg_setreg), 2820 }, -{ HP_POP(mapreg->setregstr), HP_POP2(HP_mapreg_setregstr), 2822 }, -{ HP_POP(mapreg->load), HP_POP2(HP_mapreg_load), 2824 }, -{ HP_POP(mapreg->save), HP_POP2(HP_mapreg_save), 2826 }, -{ HP_POP(mapreg->save_timer), HP_POP2(HP_mapreg_save_timer), 2828 }, -{ HP_POP(mapreg->reload), HP_POP2(HP_mapreg_reload), 2830 }, -{ HP_POP(mapreg->config_read), HP_POP2(HP_mapreg_config_read), 2832 }, +{ HP_POP(mapreg->init), HP_POP2(HP_mapreg_init), 2820 }, +{ HP_POP(mapreg->final), HP_POP2(HP_mapreg_final), 2822 }, +{ HP_POP(mapreg->readreg), HP_POP2(HP_mapreg_readreg), 2824 }, +{ HP_POP(mapreg->readregstr), HP_POP2(HP_mapreg_readregstr), 2826 }, +{ HP_POP(mapreg->setreg), HP_POP2(HP_mapreg_setreg), 2828 }, +{ HP_POP(mapreg->setregstr), HP_POP2(HP_mapreg_setregstr), 2830 }, +{ HP_POP(mapreg->load), HP_POP2(HP_mapreg_load), 2832 }, +{ HP_POP(mapreg->save), HP_POP2(HP_mapreg_save), 2834 }, +{ HP_POP(mapreg->save_timer), HP_POP2(HP_mapreg_save_timer), 2836 }, +{ HP_POP(mapreg->reload), HP_POP2(HP_mapreg_reload), 2838 }, +{ HP_POP(mapreg->config_read), HP_POP2(HP_mapreg_config_read), 2840 }, /* mercenary */ -{ HP_POP(mercenary->init), HP_POP2(HP_mercenary_init), 2834 }, -{ HP_POP(mercenary->class), HP_POP2(HP_mercenary_class), 2836 }, -{ HP_POP(mercenary->get_viewdata), HP_POP2(HP_mercenary_get_viewdata), 2838 }, -{ HP_POP(mercenary->create), HP_POP2(HP_mercenary_create), 2840 }, -{ HP_POP(mercenary->data_received), HP_POP2(HP_mercenary_data_received), 2842 }, -{ HP_POP(mercenary->save), HP_POP2(HP_mercenary_save), 2844 }, -{ HP_POP(mercenary->heal), HP_POP2(HP_mercenary_heal), 2846 }, -{ HP_POP(mercenary->dead), HP_POP2(HP_mercenary_dead), 2848 }, -{ HP_POP(mercenary->delete), HP_POP2(HP_mercenary_delete), 2850 }, -{ HP_POP(mercenary->contract_stop), HP_POP2(HP_mercenary_contract_stop), 2852 }, -{ HP_POP(mercenary->get_lifetime), HP_POP2(HP_mercenary_get_lifetime), 2854 }, -{ HP_POP(mercenary->get_guild), HP_POP2(HP_mercenary_get_guild), 2856 }, -{ HP_POP(mercenary->get_faith), HP_POP2(HP_mercenary_get_faith), 2858 }, -{ HP_POP(mercenary->set_faith), HP_POP2(HP_mercenary_set_faith), 2860 }, -{ HP_POP(mercenary->get_calls), HP_POP2(HP_mercenary_get_calls), 2862 }, -{ HP_POP(mercenary->set_calls), HP_POP2(HP_mercenary_set_calls), 2864 }, -{ HP_POP(mercenary->kills), HP_POP2(HP_mercenary_kills), 2866 }, -{ HP_POP(mercenary->checkskill), HP_POP2(HP_mercenary_checkskill), 2868 }, -{ HP_POP(mercenary->read_db), HP_POP2(HP_mercenary_read_db), 2870 }, -{ HP_POP(mercenary->read_skilldb), HP_POP2(HP_mercenary_read_skilldb), 2872 }, -{ HP_POP(mercenary->killbonus), HP_POP2(HP_mercenary_killbonus), 2874 }, -{ HP_POP(mercenary->search_index), HP_POP2(HP_mercenary_search_index), 2876 }, -{ HP_POP(mercenary->contract_end_timer), HP_POP2(HP_mercenary_contract_end_timer), 2878 }, -{ HP_POP(mercenary->read_db_sub), HP_POP2(HP_mercenary_read_db_sub), 2880 }, -{ HP_POP(mercenary->read_skill_db_sub), HP_POP2(HP_mercenary_read_skill_db_sub), 2882 }, +{ HP_POP(mercenary->init), HP_POP2(HP_mercenary_init), 2842 }, +{ HP_POP(mercenary->class), HP_POP2(HP_mercenary_class), 2844 }, +{ HP_POP(mercenary->get_viewdata), HP_POP2(HP_mercenary_get_viewdata), 2846 }, +{ HP_POP(mercenary->create), HP_POP2(HP_mercenary_create), 2848 }, +{ HP_POP(mercenary->data_received), HP_POP2(HP_mercenary_data_received), 2850 }, +{ HP_POP(mercenary->save), HP_POP2(HP_mercenary_save), 2852 }, +{ HP_POP(mercenary->heal), HP_POP2(HP_mercenary_heal), 2854 }, +{ HP_POP(mercenary->dead), HP_POP2(HP_mercenary_dead), 2856 }, +{ HP_POP(mercenary->delete), HP_POP2(HP_mercenary_delete), 2858 }, +{ HP_POP(mercenary->contract_stop), HP_POP2(HP_mercenary_contract_stop), 2860 }, +{ HP_POP(mercenary->get_lifetime), HP_POP2(HP_mercenary_get_lifetime), 2862 }, +{ HP_POP(mercenary->get_guild), HP_POP2(HP_mercenary_get_guild), 2864 }, +{ HP_POP(mercenary->get_faith), HP_POP2(HP_mercenary_get_faith), 2866 }, +{ HP_POP(mercenary->set_faith), HP_POP2(HP_mercenary_set_faith), 2868 }, +{ HP_POP(mercenary->get_calls), HP_POP2(HP_mercenary_get_calls), 2870 }, +{ HP_POP(mercenary->set_calls), HP_POP2(HP_mercenary_set_calls), 2872 }, +{ HP_POP(mercenary->kills), HP_POP2(HP_mercenary_kills), 2874 }, +{ HP_POP(mercenary->checkskill), HP_POP2(HP_mercenary_checkskill), 2876 }, +{ HP_POP(mercenary->read_db), HP_POP2(HP_mercenary_read_db), 2878 }, +{ HP_POP(mercenary->read_skilldb), HP_POP2(HP_mercenary_read_skilldb), 2880 }, +{ HP_POP(mercenary->killbonus), HP_POP2(HP_mercenary_killbonus), 2882 }, +{ HP_POP(mercenary->search_index), HP_POP2(HP_mercenary_search_index), 2884 }, +{ HP_POP(mercenary->contract_end_timer), HP_POP2(HP_mercenary_contract_end_timer), 2886 }, +{ HP_POP(mercenary->read_db_sub), HP_POP2(HP_mercenary_read_db_sub), 2888 }, +{ HP_POP(mercenary->read_skill_db_sub), HP_POP2(HP_mercenary_read_skill_db_sub), 2890 }, /* mob */ -{ HP_POP(mob->init), HP_POP2(HP_mob_init), 2884 }, -{ HP_POP(mob->final), HP_POP2(HP_mob_final), 2886 }, -{ HP_POP(mob->reload), HP_POP2(HP_mob_reload), 2888 }, -{ HP_POP(mob->db), HP_POP2(HP_mob_db), 2890 }, -{ HP_POP(mob->chat), HP_POP2(HP_mob_chat), 2892 }, -{ HP_POP(mob->makedummymobdb), HP_POP2(HP_mob_makedummymobdb), 2894 }, -{ HP_POP(mob->spawn_guardian_sub), HP_POP2(HP_mob_spawn_guardian_sub), 2896 }, -{ HP_POP(mob->skill_id2skill_idx), HP_POP2(HP_mob_skill_id2skill_idx), 2898 }, -{ HP_POP(mob->db_searchname), HP_POP2(HP_mob_db_searchname), 2900 }, -{ HP_POP(mob->db_searchname_array_sub), HP_POP2(HP_mob_db_searchname_array_sub), 2902 }, -{ HP_POP(mob->mvptomb_create), HP_POP2(HP_mob_mvptomb_create), 2904 }, -{ HP_POP(mob->mvptomb_destroy), HP_POP2(HP_mob_mvptomb_destroy), 2906 }, -{ HP_POP(mob->db_searchname_array), HP_POP2(HP_mob_db_searchname_array), 2908 }, -{ HP_POP(mob->db_checkid), HP_POP2(HP_mob_db_checkid), 2910 }, -{ HP_POP(mob->get_viewdata), HP_POP2(HP_mob_get_viewdata), 2912 }, -{ HP_POP(mob->parse_dataset), HP_POP2(HP_mob_parse_dataset), 2914 }, -{ HP_POP(mob->spawn_dataset), HP_POP2(HP_mob_spawn_dataset), 2916 }, -{ HP_POP(mob->get_random_id), HP_POP2(HP_mob_get_random_id), 2918 }, -{ HP_POP(mob->ksprotected), HP_POP2(HP_mob_ksprotected), 2920 }, -{ HP_POP(mob->once_spawn_sub), HP_POP2(HP_mob_once_spawn_sub), 2922 }, -{ HP_POP(mob->once_spawn), HP_POP2(HP_mob_once_spawn), 2924 }, -{ HP_POP(mob->once_spawn_area), HP_POP2(HP_mob_once_spawn_area), 2926 }, -{ HP_POP(mob->spawn_guardian), HP_POP2(HP_mob_spawn_guardian), 2928 }, -{ HP_POP(mob->spawn_bg), HP_POP2(HP_mob_spawn_bg), 2930 }, -{ HP_POP(mob->can_reach), HP_POP2(HP_mob_can_reach), 2932 }, -{ HP_POP(mob->linksearch), HP_POP2(HP_mob_linksearch), 2934 }, -{ HP_POP(mob->delayspawn), HP_POP2(HP_mob_delayspawn), 2936 }, -{ HP_POP(mob->setdelayspawn), HP_POP2(HP_mob_setdelayspawn), 2938 }, -{ HP_POP(mob->count_sub), HP_POP2(HP_mob_count_sub), 2940 }, -{ HP_POP(mob->spawn), HP_POP2(HP_mob_spawn), 2942 }, -{ HP_POP(mob->can_changetarget), HP_POP2(HP_mob_can_changetarget), 2944 }, -{ HP_POP(mob->target), HP_POP2(HP_mob_target), 2946 }, -{ HP_POP(mob->ai_sub_hard_activesearch), HP_POP2(HP_mob_ai_sub_hard_activesearch), 2948 }, -{ HP_POP(mob->ai_sub_hard_changechase), HP_POP2(HP_mob_ai_sub_hard_changechase), 2950 }, -{ HP_POP(mob->ai_sub_hard_bg_ally), HP_POP2(HP_mob_ai_sub_hard_bg_ally), 2952 }, -{ HP_POP(mob->ai_sub_hard_lootsearch), HP_POP2(HP_mob_ai_sub_hard_lootsearch), 2954 }, -{ HP_POP(mob->warpchase_sub), HP_POP2(HP_mob_warpchase_sub), 2956 }, -{ HP_POP(mob->ai_sub_hard_slavemob), HP_POP2(HP_mob_ai_sub_hard_slavemob), 2958 }, -{ HP_POP(mob->unlocktarget), HP_POP2(HP_mob_unlocktarget), 2960 }, -{ HP_POP(mob->randomwalk), HP_POP2(HP_mob_randomwalk), 2962 }, -{ HP_POP(mob->warpchase), HP_POP2(HP_mob_warpchase), 2964 }, -{ HP_POP(mob->ai_sub_hard), HP_POP2(HP_mob_ai_sub_hard), 2966 }, -{ HP_POP(mob->ai_sub_hard_timer), HP_POP2(HP_mob_ai_sub_hard_timer), 2968 }, -{ HP_POP(mob->ai_sub_foreachclient), HP_POP2(HP_mob_ai_sub_foreachclient), 2970 }, -{ HP_POP(mob->ai_sub_lazy), HP_POP2(HP_mob_ai_sub_lazy), 2972 }, -{ HP_POP(mob->ai_lazy), HP_POP2(HP_mob_ai_lazy), 2974 }, -{ HP_POP(mob->ai_hard), HP_POP2(HP_mob_ai_hard), 2976 }, -{ HP_POP(mob->setdropitem), HP_POP2(HP_mob_setdropitem), 2978 }, -{ HP_POP(mob->setlootitem), HP_POP2(HP_mob_setlootitem), 2980 }, -{ HP_POP(mob->delay_item_drop), HP_POP2(HP_mob_delay_item_drop), 2982 }, -{ HP_POP(mob->item_drop), HP_POP2(HP_mob_item_drop), 2984 }, -{ HP_POP(mob->timer_delete), HP_POP2(HP_mob_timer_delete), 2986 }, -{ HP_POP(mob->deleteslave_sub), HP_POP2(HP_mob_deleteslave_sub), 2988 }, -{ HP_POP(mob->deleteslave), HP_POP2(HP_mob_deleteslave), 2990 }, -{ HP_POP(mob->respawn), HP_POP2(HP_mob_respawn), 2992 }, -{ HP_POP(mob->log_damage), HP_POP2(HP_mob_log_damage), 2994 }, -{ HP_POP(mob->damage), HP_POP2(HP_mob_damage), 2996 }, -{ HP_POP(mob->dead), HP_POP2(HP_mob_dead), 2998 }, -{ HP_POP(mob->revive), HP_POP2(HP_mob_revive), 3000 }, -{ HP_POP(mob->guardian_guildchange), HP_POP2(HP_mob_guardian_guildchange), 3002 }, -{ HP_POP(mob->random_class), HP_POP2(HP_mob_random_class), 3004 }, -{ HP_POP(mob->class_change), HP_POP2(HP_mob_class_change), 3006 }, -{ HP_POP(mob->heal), HP_POP2(HP_mob_heal), 3008 }, -{ HP_POP(mob->warpslave_sub), HP_POP2(HP_mob_warpslave_sub), 3010 }, -{ HP_POP(mob->warpslave), HP_POP2(HP_mob_warpslave), 3012 }, -{ HP_POP(mob->countslave_sub), HP_POP2(HP_mob_countslave_sub), 3014 }, -{ HP_POP(mob->countslave), HP_POP2(HP_mob_countslave), 3016 }, -{ HP_POP(mob->summonslave), HP_POP2(HP_mob_summonslave), 3018 }, -{ HP_POP(mob->getfriendhprate_sub), HP_POP2(HP_mob_getfriendhprate_sub), 3020 }, -{ HP_POP(mob->getfriendhprate), HP_POP2(HP_mob_getfriendhprate), 3022 }, -{ HP_POP(mob->getmasterhpltmaxrate), HP_POP2(HP_mob_getmasterhpltmaxrate), 3024 }, -{ HP_POP(mob->getfriendstatus_sub), HP_POP2(HP_mob_getfriendstatus_sub), 3026 }, -{ HP_POP(mob->getfriendstatus), HP_POP2(HP_mob_getfriendstatus), 3028 }, -{ HP_POP(mob->skill_use), HP_POP2(HP_mob_skill_use), 3030 }, -{ HP_POP(mob->skill_event), HP_POP2(HP_mob_skill_event), 3032 }, -{ HP_POP(mob->is_clone), HP_POP2(HP_mob_is_clone), 3034 }, -{ HP_POP(mob->clone_spawn), HP_POP2(HP_mob_clone_spawn), 3036 }, -{ HP_POP(mob->clone_delete), HP_POP2(HP_mob_clone_delete), 3038 }, -{ HP_POP(mob->drop_adjust), HP_POP2(HP_mob_drop_adjust), 3040 }, -{ HP_POP(mob->item_dropratio_adjust), HP_POP2(HP_mob_item_dropratio_adjust), 3042 }, -{ HP_POP(mob->parse_dbrow), HP_POP2(HP_mob_parse_dbrow), 3044 }, -{ HP_POP(mob->readdb_sub), HP_POP2(HP_mob_readdb_sub), 3046 }, -{ HP_POP(mob->readdb), HP_POP2(HP_mob_readdb), 3048 }, -{ HP_POP(mob->read_sqldb), HP_POP2(HP_mob_read_sqldb), 3050 }, -{ HP_POP(mob->readdb_mobavail), HP_POP2(HP_mob_readdb_mobavail), 3052 }, -{ HP_POP(mob->read_randommonster), HP_POP2(HP_mob_read_randommonster), 3054 }, -{ HP_POP(mob->parse_row_chatdb), HP_POP2(HP_mob_parse_row_chatdb), 3056 }, -{ HP_POP(mob->readchatdb), HP_POP2(HP_mob_readchatdb), 3058 }, -{ HP_POP(mob->parse_row_mobskilldb), HP_POP2(HP_mob_parse_row_mobskilldb), 3060 }, -{ HP_POP(mob->readskilldb), HP_POP2(HP_mob_readskilldb), 3062 }, -{ HP_POP(mob->read_sqlskilldb), HP_POP2(HP_mob_read_sqlskilldb), 3064 }, -{ HP_POP(mob->readdb_race2), HP_POP2(HP_mob_readdb_race2), 3066 }, -{ HP_POP(mob->readdb_itemratio), HP_POP2(HP_mob_readdb_itemratio), 3068 }, -{ HP_POP(mob->load), HP_POP2(HP_mob_load), 3070 }, -{ HP_POP(mob->clear_spawninfo), HP_POP2(HP_mob_clear_spawninfo), 3072 }, +{ HP_POP(mob->init), HP_POP2(HP_mob_init), 2892 }, +{ HP_POP(mob->final), HP_POP2(HP_mob_final), 2894 }, +{ HP_POP(mob->reload), HP_POP2(HP_mob_reload), 2896 }, +{ HP_POP(mob->db), HP_POP2(HP_mob_db), 2898 }, +{ HP_POP(mob->chat), HP_POP2(HP_mob_chat), 2900 }, +{ HP_POP(mob->makedummymobdb), HP_POP2(HP_mob_makedummymobdb), 2902 }, +{ HP_POP(mob->spawn_guardian_sub), HP_POP2(HP_mob_spawn_guardian_sub), 2904 }, +{ HP_POP(mob->skill_id2skill_idx), HP_POP2(HP_mob_skill_id2skill_idx), 2906 }, +{ HP_POP(mob->db_searchname), HP_POP2(HP_mob_db_searchname), 2908 }, +{ HP_POP(mob->db_searchname_array_sub), HP_POP2(HP_mob_db_searchname_array_sub), 2910 }, +{ HP_POP(mob->mvptomb_create), HP_POP2(HP_mob_mvptomb_create), 2912 }, +{ HP_POP(mob->mvptomb_destroy), HP_POP2(HP_mob_mvptomb_destroy), 2914 }, +{ HP_POP(mob->db_searchname_array), HP_POP2(HP_mob_db_searchname_array), 2916 }, +{ HP_POP(mob->db_checkid), HP_POP2(HP_mob_db_checkid), 2918 }, +{ HP_POP(mob->get_viewdata), HP_POP2(HP_mob_get_viewdata), 2920 }, +{ HP_POP(mob->parse_dataset), HP_POP2(HP_mob_parse_dataset), 2922 }, +{ HP_POP(mob->spawn_dataset), HP_POP2(HP_mob_spawn_dataset), 2924 }, +{ HP_POP(mob->get_random_id), HP_POP2(HP_mob_get_random_id), 2926 }, +{ HP_POP(mob->ksprotected), HP_POP2(HP_mob_ksprotected), 2928 }, +{ HP_POP(mob->once_spawn_sub), HP_POP2(HP_mob_once_spawn_sub), 2930 }, +{ HP_POP(mob->once_spawn), HP_POP2(HP_mob_once_spawn), 2932 }, +{ HP_POP(mob->once_spawn_area), HP_POP2(HP_mob_once_spawn_area), 2934 }, +{ HP_POP(mob->spawn_guardian), HP_POP2(HP_mob_spawn_guardian), 2936 }, +{ HP_POP(mob->spawn_bg), HP_POP2(HP_mob_spawn_bg), 2938 }, +{ HP_POP(mob->can_reach), HP_POP2(HP_mob_can_reach), 2940 }, +{ HP_POP(mob->linksearch), HP_POP2(HP_mob_linksearch), 2942 }, +{ HP_POP(mob->delayspawn), HP_POP2(HP_mob_delayspawn), 2944 }, +{ HP_POP(mob->setdelayspawn), HP_POP2(HP_mob_setdelayspawn), 2946 }, +{ HP_POP(mob->count_sub), HP_POP2(HP_mob_count_sub), 2948 }, +{ HP_POP(mob->spawn), HP_POP2(HP_mob_spawn), 2950 }, +{ HP_POP(mob->can_changetarget), HP_POP2(HP_mob_can_changetarget), 2952 }, +{ HP_POP(mob->target), HP_POP2(HP_mob_target), 2954 }, +{ HP_POP(mob->ai_sub_hard_activesearch), HP_POP2(HP_mob_ai_sub_hard_activesearch), 2956 }, +{ HP_POP(mob->ai_sub_hard_changechase), HP_POP2(HP_mob_ai_sub_hard_changechase), 2958 }, +{ HP_POP(mob->ai_sub_hard_bg_ally), HP_POP2(HP_mob_ai_sub_hard_bg_ally), 2960 }, +{ HP_POP(mob->ai_sub_hard_lootsearch), HP_POP2(HP_mob_ai_sub_hard_lootsearch), 2962 }, +{ HP_POP(mob->warpchase_sub), HP_POP2(HP_mob_warpchase_sub), 2964 }, +{ HP_POP(mob->ai_sub_hard_slavemob), HP_POP2(HP_mob_ai_sub_hard_slavemob), 2966 }, +{ HP_POP(mob->unlocktarget), HP_POP2(HP_mob_unlocktarget), 2968 }, +{ HP_POP(mob->randomwalk), HP_POP2(HP_mob_randomwalk), 2970 }, +{ HP_POP(mob->warpchase), HP_POP2(HP_mob_warpchase), 2972 }, +{ HP_POP(mob->ai_sub_hard), HP_POP2(HP_mob_ai_sub_hard), 2974 }, +{ HP_POP(mob->ai_sub_hard_timer), HP_POP2(HP_mob_ai_sub_hard_timer), 2976 }, +{ HP_POP(mob->ai_sub_foreachclient), HP_POP2(HP_mob_ai_sub_foreachclient), 2978 }, +{ HP_POP(mob->ai_sub_lazy), HP_POP2(HP_mob_ai_sub_lazy), 2980 }, +{ HP_POP(mob->ai_lazy), HP_POP2(HP_mob_ai_lazy), 2982 }, +{ HP_POP(mob->ai_hard), HP_POP2(HP_mob_ai_hard), 2984 }, +{ HP_POP(mob->setdropitem), HP_POP2(HP_mob_setdropitem), 2986 }, +{ HP_POP(mob->setlootitem), HP_POP2(HP_mob_setlootitem), 2988 }, +{ HP_POP(mob->delay_item_drop), HP_POP2(HP_mob_delay_item_drop), 2990 }, +{ HP_POP(mob->item_drop), HP_POP2(HP_mob_item_drop), 2992 }, +{ HP_POP(mob->timer_delete), HP_POP2(HP_mob_timer_delete), 2994 }, +{ HP_POP(mob->deleteslave_sub), HP_POP2(HP_mob_deleteslave_sub), 2996 }, +{ HP_POP(mob->deleteslave), HP_POP2(HP_mob_deleteslave), 2998 }, +{ HP_POP(mob->respawn), HP_POP2(HP_mob_respawn), 3000 }, +{ HP_POP(mob->log_damage), HP_POP2(HP_mob_log_damage), 3002 }, +{ HP_POP(mob->damage), HP_POP2(HP_mob_damage), 3004 }, +{ HP_POP(mob->dead), HP_POP2(HP_mob_dead), 3006 }, +{ HP_POP(mob->revive), HP_POP2(HP_mob_revive), 3008 }, +{ HP_POP(mob->guardian_guildchange), HP_POP2(HP_mob_guardian_guildchange), 3010 }, +{ HP_POP(mob->random_class), HP_POP2(HP_mob_random_class), 3012 }, +{ HP_POP(mob->class_change), HP_POP2(HP_mob_class_change), 3014 }, +{ HP_POP(mob->heal), HP_POP2(HP_mob_heal), 3016 }, +{ HP_POP(mob->warpslave_sub), HP_POP2(HP_mob_warpslave_sub), 3018 }, +{ HP_POP(mob->warpslave), HP_POP2(HP_mob_warpslave), 3020 }, +{ HP_POP(mob->countslave_sub), HP_POP2(HP_mob_countslave_sub), 3022 }, +{ HP_POP(mob->countslave), HP_POP2(HP_mob_countslave), 3024 }, +{ HP_POP(mob->summonslave), HP_POP2(HP_mob_summonslave), 3026 }, +{ HP_POP(mob->getfriendhprate_sub), HP_POP2(HP_mob_getfriendhprate_sub), 3028 }, +{ HP_POP(mob->getfriendhprate), HP_POP2(HP_mob_getfriendhprate), 3030 }, +{ HP_POP(mob->getmasterhpltmaxrate), HP_POP2(HP_mob_getmasterhpltmaxrate), 3032 }, +{ HP_POP(mob->getfriendstatus_sub), HP_POP2(HP_mob_getfriendstatus_sub), 3034 }, +{ HP_POP(mob->getfriendstatus), HP_POP2(HP_mob_getfriendstatus), 3036 }, +{ HP_POP(mob->skill_use), HP_POP2(HP_mob_skill_use), 3038 }, +{ HP_POP(mob->skill_event), HP_POP2(HP_mob_skill_event), 3040 }, +{ HP_POP(mob->is_clone), HP_POP2(HP_mob_is_clone), 3042 }, +{ HP_POP(mob->clone_spawn), HP_POP2(HP_mob_clone_spawn), 3044 }, +{ HP_POP(mob->clone_delete), HP_POP2(HP_mob_clone_delete), 3046 }, +{ HP_POP(mob->drop_adjust), HP_POP2(HP_mob_drop_adjust), 3048 }, +{ HP_POP(mob->item_dropratio_adjust), HP_POP2(HP_mob_item_dropratio_adjust), 3050 }, +{ HP_POP(mob->parse_dbrow), HP_POP2(HP_mob_parse_dbrow), 3052 }, +{ HP_POP(mob->readdb_sub), HP_POP2(HP_mob_readdb_sub), 3054 }, +{ HP_POP(mob->readdb), HP_POP2(HP_mob_readdb), 3056 }, +{ HP_POP(mob->read_sqldb), HP_POP2(HP_mob_read_sqldb), 3058 }, +{ HP_POP(mob->readdb_mobavail), HP_POP2(HP_mob_readdb_mobavail), 3060 }, +{ HP_POP(mob->read_randommonster), HP_POP2(HP_mob_read_randommonster), 3062 }, +{ HP_POP(mob->parse_row_chatdb), HP_POP2(HP_mob_parse_row_chatdb), 3064 }, +{ HP_POP(mob->readchatdb), HP_POP2(HP_mob_readchatdb), 3066 }, +{ HP_POP(mob->parse_row_mobskilldb), HP_POP2(HP_mob_parse_row_mobskilldb), 3068 }, +{ HP_POP(mob->readskilldb), HP_POP2(HP_mob_readskilldb), 3070 }, +{ HP_POP(mob->read_sqlskilldb), HP_POP2(HP_mob_read_sqlskilldb), 3072 }, +{ HP_POP(mob->readdb_race2), HP_POP2(HP_mob_readdb_race2), 3074 }, +{ HP_POP(mob->readdb_itemratio), HP_POP2(HP_mob_readdb_itemratio), 3076 }, +{ HP_POP(mob->load), HP_POP2(HP_mob_load), 3078 }, +{ HP_POP(mob->clear_spawninfo), HP_POP2(HP_mob_clear_spawninfo), 3080 }, /* npc */ -{ HP_POP(npc->init), HP_POP2(HP_npc_init), 3074 }, -{ HP_POP(npc->final), HP_POP2(HP_npc_final), 3076 }, -{ HP_POP(npc->get_new_npc_id), HP_POP2(HP_npc_get_new_npc_id), 3078 }, -{ HP_POP(npc->get_viewdata), HP_POP2(HP_npc_get_viewdata), 3080 }, -{ HP_POP(npc->isnear_sub), HP_POP2(HP_npc_isnear_sub), 3082 }, -{ HP_POP(npc->isnear), HP_POP2(HP_npc_isnear), 3084 }, -{ HP_POP(npc->ontouch_event), HP_POP2(HP_npc_ontouch_event), 3086 }, -{ HP_POP(npc->ontouch2_event), HP_POP2(HP_npc_ontouch2_event), 3088 }, -{ HP_POP(npc->enable_sub), HP_POP2(HP_npc_enable_sub), 3090 }, -{ HP_POP(npc->enable), HP_POP2(HP_npc_enable), 3092 }, -{ HP_POP(npc->name2id), HP_POP2(HP_npc_name2id), 3094 }, -{ HP_POP(npc->event_dequeue), HP_POP2(HP_npc_event_dequeue), 3096 }, -{ HP_POP(npc->event_export_create), HP_POP2(HP_npc_event_export_create), 3098 }, -{ HP_POP(npc->event_export), HP_POP2(HP_npc_event_export), 3100 }, -{ HP_POP(npc->event_sub), HP_POP2(HP_npc_event_sub), 3102 }, -{ HP_POP(npc->event_doall_sub), HP_POP2(HP_npc_event_doall_sub), 3104 }, -{ HP_POP(npc->event_do), HP_POP2(HP_npc_event_do), 3106 }, -{ HP_POP(npc->event_doall_id), HP_POP2(HP_npc_event_doall_id), 3108 }, -{ HP_POP(npc->event_doall), HP_POP2(HP_npc_event_doall), 3110 }, -{ HP_POP(npc->event_do_clock), HP_POP2(HP_npc_event_do_clock), 3112 }, -{ HP_POP(npc->event_do_oninit), HP_POP2(HP_npc_event_do_oninit), 3114 }, -{ HP_POP(npc->timerevent_export), HP_POP2(HP_npc_timerevent_export), 3116 }, -{ HP_POP(npc->timerevent), HP_POP2(HP_npc_timerevent), 3118 }, -{ HP_POP(npc->timerevent_start), HP_POP2(HP_npc_timerevent_start), 3120 }, -{ HP_POP(npc->timerevent_stop), HP_POP2(HP_npc_timerevent_stop), 3122 }, -{ HP_POP(npc->timerevent_quit), HP_POP2(HP_npc_timerevent_quit), 3124 }, -{ HP_POP(npc->gettimerevent_tick), HP_POP2(HP_npc_gettimerevent_tick), 3126 }, -{ HP_POP(npc->settimerevent_tick), HP_POP2(HP_npc_settimerevent_tick), 3128 }, -{ HP_POP(npc->event), HP_POP2(HP_npc_event), 3130 }, -{ HP_POP(npc->touch_areanpc_sub), HP_POP2(HP_npc_touch_areanpc_sub), 3132 }, -{ HP_POP(npc->touchnext_areanpc), HP_POP2(HP_npc_touchnext_areanpc), 3134 }, -{ HP_POP(npc->touch_areanpc), HP_POP2(HP_npc_touch_areanpc), 3136 }, -{ HP_POP(npc->touch_areanpc2), HP_POP2(HP_npc_touch_areanpc2), 3138 }, -{ HP_POP(npc->check_areanpc), HP_POP2(HP_npc_check_areanpc), 3140 }, -{ HP_POP(npc->checknear), HP_POP2(HP_npc_checknear), 3142 }, -{ HP_POP(npc->globalmessage), HP_POP2(HP_npc_globalmessage), 3144 }, -{ HP_POP(npc->run_tomb), HP_POP2(HP_npc_run_tomb), 3146 }, -{ HP_POP(npc->click), HP_POP2(HP_npc_click), 3148 }, -{ HP_POP(npc->scriptcont), HP_POP2(HP_npc_scriptcont), 3150 }, -{ HP_POP(npc->buysellsel), HP_POP2(HP_npc_buysellsel), 3152 }, -{ HP_POP(npc->cashshop_buylist), HP_POP2(HP_npc_cashshop_buylist), 3154 }, -{ HP_POP(npc->buylist_sub), HP_POP2(HP_npc_buylist_sub), 3156 }, -{ HP_POP(npc->cashshop_buy), HP_POP2(HP_npc_cashshop_buy), 3158 }, -{ HP_POP(npc->buylist), HP_POP2(HP_npc_buylist), 3160 }, -{ HP_POP(npc->selllist_sub), HP_POP2(HP_npc_selllist_sub), 3162 }, -{ HP_POP(npc->selllist), HP_POP2(HP_npc_selllist), 3164 }, -{ HP_POP(npc->remove_map), HP_POP2(HP_npc_remove_map), 3166 }, -{ HP_POP(npc->unload_ev), HP_POP2(HP_npc_unload_ev), 3168 }, -{ HP_POP(npc->unload_ev_label), HP_POP2(HP_npc_unload_ev_label), 3170 }, -{ HP_POP(npc->unload_dup_sub), HP_POP2(HP_npc_unload_dup_sub), 3172 }, -{ HP_POP(npc->unload_duplicates), HP_POP2(HP_npc_unload_duplicates), 3174 }, -{ HP_POP(npc->unload), HP_POP2(HP_npc_unload), 3176 }, -{ HP_POP(npc->clearsrcfile), HP_POP2(HP_npc_clearsrcfile), 3178 }, -{ HP_POP(npc->addsrcfile), HP_POP2(HP_npc_addsrcfile), 3180 }, -{ HP_POP(npc->delsrcfile), HP_POP2(HP_npc_delsrcfile), 3182 }, -{ HP_POP(npc->parsename), HP_POP2(HP_npc_parsename), 3184 }, -{ HP_POP(npc->add_warp), HP_POP2(HP_npc_add_warp), 3186 }, -{ HP_POP(npc->parse_warp), HP_POP2(HP_npc_parse_warp), 3188 }, -{ HP_POP(npc->parse_shop), HP_POP2(HP_npc_parse_shop), 3190 }, -{ HP_POP(npc->convertlabel_db), HP_POP2(HP_npc_convertlabel_db), 3192 }, -{ HP_POP(npc->skip_script), HP_POP2(HP_npc_skip_script), 3194 }, -{ HP_POP(npc->parse_script), HP_POP2(HP_npc_parse_script), 3196 }, -{ HP_POP(npc->parse_duplicate), HP_POP2(HP_npc_parse_duplicate), 3198 }, -{ HP_POP(npc->duplicate4instance), HP_POP2(HP_npc_duplicate4instance), 3200 }, -{ HP_POP(npc->setcells), HP_POP2(HP_npc_setcells), 3202 }, -{ HP_POP(npc->unsetcells_sub), HP_POP2(HP_npc_unsetcells_sub), 3204 }, -{ HP_POP(npc->unsetcells), HP_POP2(HP_npc_unsetcells), 3206 }, -{ HP_POP(npc->movenpc), HP_POP2(HP_npc_movenpc), 3208 }, -{ HP_POP(npc->setdisplayname), HP_POP2(HP_npc_setdisplayname), 3210 }, -{ HP_POP(npc->setclass), HP_POP2(HP_npc_setclass), 3212 }, -{ HP_POP(npc->do_atcmd_event), HP_POP2(HP_npc_do_atcmd_event), 3214 }, -{ HP_POP(npc->parse_function), HP_POP2(HP_npc_parse_function), 3216 }, -{ HP_POP(npc->parse_mob2), HP_POP2(HP_npc_parse_mob2), 3218 }, -{ HP_POP(npc->parse_mob), HP_POP2(HP_npc_parse_mob), 3220 }, -{ HP_POP(npc->parse_mapflag), HP_POP2(HP_npc_parse_mapflag), 3222 }, -{ HP_POP(npc->parsesrcfile), HP_POP2(HP_npc_parsesrcfile), 3224 }, -{ HP_POP(npc->script_event), HP_POP2(HP_npc_script_event), 3226 }, -{ HP_POP(npc->read_event_script), HP_POP2(HP_npc_read_event_script), 3228 }, -{ HP_POP(npc->path_db_clear_sub), HP_POP2(HP_npc_path_db_clear_sub), 3230 }, -{ HP_POP(npc->ev_label_db_clear_sub), HP_POP2(HP_npc_ev_label_db_clear_sub), 3232 }, -{ HP_POP(npc->reload), HP_POP2(HP_npc_reload), 3234 }, -{ HP_POP(npc->unloadfile), HP_POP2(HP_npc_unloadfile), 3236 }, -{ HP_POP(npc->do_clear_npc), HP_POP2(HP_npc_do_clear_npc), 3238 }, -{ HP_POP(npc->debug_warps_sub), HP_POP2(HP_npc_debug_warps_sub), 3240 }, -{ HP_POP(npc->debug_warps), HP_POP2(HP_npc_debug_warps), 3242 }, +{ HP_POP(npc->init), HP_POP2(HP_npc_init), 3082 }, +{ HP_POP(npc->final), HP_POP2(HP_npc_final), 3084 }, +{ HP_POP(npc->get_new_npc_id), HP_POP2(HP_npc_get_new_npc_id), 3086 }, +{ HP_POP(npc->get_viewdata), HP_POP2(HP_npc_get_viewdata), 3088 }, +{ HP_POP(npc->isnear_sub), HP_POP2(HP_npc_isnear_sub), 3090 }, +{ HP_POP(npc->isnear), HP_POP2(HP_npc_isnear), 3092 }, +{ HP_POP(npc->ontouch_event), HP_POP2(HP_npc_ontouch_event), 3094 }, +{ HP_POP(npc->ontouch2_event), HP_POP2(HP_npc_ontouch2_event), 3096 }, +{ HP_POP(npc->enable_sub), HP_POP2(HP_npc_enable_sub), 3098 }, +{ HP_POP(npc->enable), HP_POP2(HP_npc_enable), 3100 }, +{ HP_POP(npc->name2id), HP_POP2(HP_npc_name2id), 3102 }, +{ HP_POP(npc->event_dequeue), HP_POP2(HP_npc_event_dequeue), 3104 }, +{ HP_POP(npc->event_export_create), HP_POP2(HP_npc_event_export_create), 3106 }, +{ HP_POP(npc->event_export), HP_POP2(HP_npc_event_export), 3108 }, +{ HP_POP(npc->event_sub), HP_POP2(HP_npc_event_sub), 3110 }, +{ HP_POP(npc->event_doall_sub), HP_POP2(HP_npc_event_doall_sub), 3112 }, +{ HP_POP(npc->event_do), HP_POP2(HP_npc_event_do), 3114 }, +{ HP_POP(npc->event_doall_id), HP_POP2(HP_npc_event_doall_id), 3116 }, +{ HP_POP(npc->event_doall), HP_POP2(HP_npc_event_doall), 3118 }, +{ HP_POP(npc->event_do_clock), HP_POP2(HP_npc_event_do_clock), 3120 }, +{ HP_POP(npc->event_do_oninit), HP_POP2(HP_npc_event_do_oninit), 3122 }, +{ HP_POP(npc->timerevent_export), HP_POP2(HP_npc_timerevent_export), 3124 }, +{ HP_POP(npc->timerevent), HP_POP2(HP_npc_timerevent), 3126 }, +{ HP_POP(npc->timerevent_start), HP_POP2(HP_npc_timerevent_start), 3128 }, +{ HP_POP(npc->timerevent_stop), HP_POP2(HP_npc_timerevent_stop), 3130 }, +{ HP_POP(npc->timerevent_quit), HP_POP2(HP_npc_timerevent_quit), 3132 }, +{ HP_POP(npc->gettimerevent_tick), HP_POP2(HP_npc_gettimerevent_tick), 3134 }, +{ HP_POP(npc->settimerevent_tick), HP_POP2(HP_npc_settimerevent_tick), 3136 }, +{ HP_POP(npc->event), HP_POP2(HP_npc_event), 3138 }, +{ HP_POP(npc->touch_areanpc_sub), HP_POP2(HP_npc_touch_areanpc_sub), 3140 }, +{ HP_POP(npc->touchnext_areanpc), HP_POP2(HP_npc_touchnext_areanpc), 3142 }, +{ HP_POP(npc->touch_areanpc), HP_POP2(HP_npc_touch_areanpc), 3144 }, +{ HP_POP(npc->touch_areanpc2), HP_POP2(HP_npc_touch_areanpc2), 3146 }, +{ HP_POP(npc->check_areanpc), HP_POP2(HP_npc_check_areanpc), 3148 }, +{ HP_POP(npc->checknear), HP_POP2(HP_npc_checknear), 3150 }, +{ HP_POP(npc->globalmessage), HP_POP2(HP_npc_globalmessage), 3152 }, +{ HP_POP(npc->run_tomb), HP_POP2(HP_npc_run_tomb), 3154 }, +{ HP_POP(npc->click), HP_POP2(HP_npc_click), 3156 }, +{ HP_POP(npc->scriptcont), HP_POP2(HP_npc_scriptcont), 3158 }, +{ HP_POP(npc->buysellsel), HP_POP2(HP_npc_buysellsel), 3160 }, +{ HP_POP(npc->cashshop_buylist), HP_POP2(HP_npc_cashshop_buylist), 3162 }, +{ HP_POP(npc->buylist_sub), HP_POP2(HP_npc_buylist_sub), 3164 }, +{ HP_POP(npc->cashshop_buy), HP_POP2(HP_npc_cashshop_buy), 3166 }, +{ HP_POP(npc->buylist), HP_POP2(HP_npc_buylist), 3168 }, +{ HP_POP(npc->selllist_sub), HP_POP2(HP_npc_selllist_sub), 3170 }, +{ HP_POP(npc->selllist), HP_POP2(HP_npc_selllist), 3172 }, +{ HP_POP(npc->remove_map), HP_POP2(HP_npc_remove_map), 3174 }, +{ HP_POP(npc->unload_ev), HP_POP2(HP_npc_unload_ev), 3176 }, +{ HP_POP(npc->unload_ev_label), HP_POP2(HP_npc_unload_ev_label), 3178 }, +{ HP_POP(npc->unload_dup_sub), HP_POP2(HP_npc_unload_dup_sub), 3180 }, +{ HP_POP(npc->unload_duplicates), HP_POP2(HP_npc_unload_duplicates), 3182 }, +{ HP_POP(npc->unload), HP_POP2(HP_npc_unload), 3184 }, +{ HP_POP(npc->clearsrcfile), HP_POP2(HP_npc_clearsrcfile), 3186 }, +{ HP_POP(npc->addsrcfile), HP_POP2(HP_npc_addsrcfile), 3188 }, +{ HP_POP(npc->delsrcfile), HP_POP2(HP_npc_delsrcfile), 3190 }, +{ HP_POP(npc->parsename), HP_POP2(HP_npc_parsename), 3192 }, +{ HP_POP(npc->add_warp), HP_POP2(HP_npc_add_warp), 3194 }, +{ HP_POP(npc->parse_warp), HP_POP2(HP_npc_parse_warp), 3196 }, +{ HP_POP(npc->parse_shop), HP_POP2(HP_npc_parse_shop), 3198 }, +{ HP_POP(npc->convertlabel_db), HP_POP2(HP_npc_convertlabel_db), 3200 }, +{ HP_POP(npc->skip_script), HP_POP2(HP_npc_skip_script), 3202 }, +{ HP_POP(npc->parse_script), HP_POP2(HP_npc_parse_script), 3204 }, +{ HP_POP(npc->parse_duplicate), HP_POP2(HP_npc_parse_duplicate), 3206 }, +{ HP_POP(npc->duplicate4instance), HP_POP2(HP_npc_duplicate4instance), 3208 }, +{ HP_POP(npc->setcells), HP_POP2(HP_npc_setcells), 3210 }, +{ HP_POP(npc->unsetcells_sub), HP_POP2(HP_npc_unsetcells_sub), 3212 }, +{ HP_POP(npc->unsetcells), HP_POP2(HP_npc_unsetcells), 3214 }, +{ HP_POP(npc->movenpc), HP_POP2(HP_npc_movenpc), 3216 }, +{ HP_POP(npc->setdisplayname), HP_POP2(HP_npc_setdisplayname), 3218 }, +{ HP_POP(npc->setclass), HP_POP2(HP_npc_setclass), 3220 }, +{ HP_POP(npc->do_atcmd_event), HP_POP2(HP_npc_do_atcmd_event), 3222 }, +{ HP_POP(npc->parse_function), HP_POP2(HP_npc_parse_function), 3224 }, +{ HP_POP(npc->parse_mob2), HP_POP2(HP_npc_parse_mob2), 3226 }, +{ HP_POP(npc->parse_mob), HP_POP2(HP_npc_parse_mob), 3228 }, +{ HP_POP(npc->parse_mapflag), HP_POP2(HP_npc_parse_mapflag), 3230 }, +{ HP_POP(npc->parsesrcfile), HP_POP2(HP_npc_parsesrcfile), 3232 }, +{ HP_POP(npc->script_event), HP_POP2(HP_npc_script_event), 3234 }, +{ HP_POP(npc->read_event_script), HP_POP2(HP_npc_read_event_script), 3236 }, +{ HP_POP(npc->path_db_clear_sub), HP_POP2(HP_npc_path_db_clear_sub), 3238 }, +{ HP_POP(npc->ev_label_db_clear_sub), HP_POP2(HP_npc_ev_label_db_clear_sub), 3240 }, +{ HP_POP(npc->reload), HP_POP2(HP_npc_reload), 3242 }, +{ HP_POP(npc->unloadfile), HP_POP2(HP_npc_unloadfile), 3244 }, +{ HP_POP(npc->do_clear_npc), HP_POP2(HP_npc_do_clear_npc), 3246 }, +{ HP_POP(npc->debug_warps_sub), HP_POP2(HP_npc_debug_warps_sub), 3248 }, +{ HP_POP(npc->debug_warps), HP_POP2(HP_npc_debug_warps), 3250 }, +{ HP_POP(npc->secure_timeout_timer), HP_POP2(HP_npc_secure_timeout_timer), 3252 }, /* party */ -{ HP_POP(party->init), HP_POP2(HP_party_init), 3244 }, -{ HP_POP(party->final), HP_POP2(HP_party_final), 3246 }, -{ HP_POP(party->search), HP_POP2(HP_party_search), 3248 }, -{ HP_POP(party->searchname), HP_POP2(HP_party_searchname), 3250 }, -{ HP_POP(party->getmemberid), HP_POP2(HP_party_getmemberid), 3252 }, -{ HP_POP(party->getavailablesd), HP_POP2(HP_party_getavailablesd), 3254 }, -{ HP_POP(party->create), HP_POP2(HP_party_create), 3256 }, -{ HP_POP(party->created), HP_POP2(HP_party_created), 3258 }, -{ HP_POP(party->request_info), HP_POP2(HP_party_request_info), 3260 }, -{ HP_POP(party->invite), HP_POP2(HP_party_invite), 3262 }, -{ HP_POP(party->member_joined), HP_POP2(HP_party_member_joined), 3264 }, -{ HP_POP(party->member_added), HP_POP2(HP_party_member_added), 3266 }, -{ HP_POP(party->leave), HP_POP2(HP_party_leave), 3268 }, -{ HP_POP(party->removemember), HP_POP2(HP_party_removemember), 3270 }, -{ HP_POP(party->member_withdraw), HP_POP2(HP_party_member_withdraw), 3272 }, -{ HP_POP(party->reply_invite), HP_POP2(HP_party_reply_invite), 3274 }, -{ HP_POP(party->recv_noinfo), HP_POP2(HP_party_recv_noinfo), 3276 }, -{ HP_POP(party->recv_info), HP_POP2(HP_party_recv_info), 3278 }, -{ HP_POP(party->recv_movemap), HP_POP2(HP_party_recv_movemap), 3280 }, -{ HP_POP(party->broken), HP_POP2(HP_party_broken), 3282 }, -{ HP_POP(party->optionchanged), HP_POP2(HP_party_optionchanged), 3284 }, -{ HP_POP(party->changeoption), HP_POP2(HP_party_changeoption), 3286 }, -{ HP_POP(party->changeleader), HP_POP2(HP_party_changeleader), 3288 }, -{ HP_POP(party->send_movemap), HP_POP2(HP_party_send_movemap), 3290 }, -{ HP_POP(party->send_levelup), HP_POP2(HP_party_send_levelup), 3292 }, -{ HP_POP(party->send_logout), HP_POP2(HP_party_send_logout), 3294 }, -{ HP_POP(party->send_message), HP_POP2(HP_party_send_message), 3296 }, -{ HP_POP(party->recv_message), HP_POP2(HP_party_recv_message), 3298 }, -{ HP_POP(party->skill_check), HP_POP2(HP_party_skill_check), 3300 }, -{ HP_POP(party->send_xy_clear), HP_POP2(HP_party_send_xy_clear), 3302 }, -{ HP_POP(party->exp_share), HP_POP2(HP_party_exp_share), 3304 }, -{ HP_POP(party->share_loot), HP_POP2(HP_party_share_loot), 3306 }, -{ HP_POP(party->send_dot_remove), HP_POP2(HP_party_send_dot_remove), 3308 }, -{ HP_POP(party->sub_count), HP_POP2(HP_party_sub_count), 3310 }, -{ HP_POP(party->booking_register), HP_POP2(HP_party_booking_register), 3312 }, -{ HP_POP(party->booking_update), HP_POP2(HP_party_booking_update), 3314 }, -{ HP_POP(party->booking_search), HP_POP2(HP_party_booking_search), 3316 }, -{ HP_POP(party->booking_delete), HP_POP2(HP_party_booking_delete), 3318 }, -{ HP_POP(party->vforeachsamemap), HP_POP2(HP_party_vforeachsamemap), 3320 }, -{ HP_POP(party->send_xy_timer), HP_POP2(HP_party_send_xy_timer), 3322 }, -{ HP_POP(party->fill_member), HP_POP2(HP_party_fill_member), 3324 }, -{ HP_POP(party->sd_check), HP_POP2(HP_party_sd_check), 3326 }, -{ HP_POP(party->check_state), HP_POP2(HP_party_check_state), 3328 }, -{ HP_POP(party->create_booking_data), HP_POP2(HP_party_create_booking_data), 3330 }, -{ HP_POP(party->db_final), HP_POP2(HP_party_db_final), 3332 }, +{ HP_POP(party->init), HP_POP2(HP_party_init), 3254 }, +{ HP_POP(party->final), HP_POP2(HP_party_final), 3256 }, +{ HP_POP(party->search), HP_POP2(HP_party_search), 3258 }, +{ HP_POP(party->searchname), HP_POP2(HP_party_searchname), 3260 }, +{ HP_POP(party->getmemberid), HP_POP2(HP_party_getmemberid), 3262 }, +{ HP_POP(party->getavailablesd), HP_POP2(HP_party_getavailablesd), 3264 }, +{ HP_POP(party->create), HP_POP2(HP_party_create), 3266 }, +{ HP_POP(party->created), HP_POP2(HP_party_created), 3268 }, +{ HP_POP(party->request_info), HP_POP2(HP_party_request_info), 3270 }, +{ HP_POP(party->invite), HP_POP2(HP_party_invite), 3272 }, +{ HP_POP(party->member_joined), HP_POP2(HP_party_member_joined), 3274 }, +{ HP_POP(party->member_added), HP_POP2(HP_party_member_added), 3276 }, +{ HP_POP(party->leave), HP_POP2(HP_party_leave), 3278 }, +{ HP_POP(party->removemember), HP_POP2(HP_party_removemember), 3280 }, +{ HP_POP(party->member_withdraw), HP_POP2(HP_party_member_withdraw), 3282 }, +{ HP_POP(party->reply_invite), HP_POP2(HP_party_reply_invite), 3284 }, +{ HP_POP(party->recv_noinfo), HP_POP2(HP_party_recv_noinfo), 3286 }, +{ HP_POP(party->recv_info), HP_POP2(HP_party_recv_info), 3288 }, +{ HP_POP(party->recv_movemap), HP_POP2(HP_party_recv_movemap), 3290 }, +{ HP_POP(party->broken), HP_POP2(HP_party_broken), 3292 }, +{ HP_POP(party->optionchanged), HP_POP2(HP_party_optionchanged), 3294 }, +{ HP_POP(party->changeoption), HP_POP2(HP_party_changeoption), 3296 }, +{ HP_POP(party->changeleader), HP_POP2(HP_party_changeleader), 3298 }, +{ HP_POP(party->send_movemap), HP_POP2(HP_party_send_movemap), 3300 }, +{ HP_POP(party->send_levelup), HP_POP2(HP_party_send_levelup), 3302 }, +{ HP_POP(party->send_logout), HP_POP2(HP_party_send_logout), 3304 }, +{ HP_POP(party->send_message), HP_POP2(HP_party_send_message), 3306 }, +{ HP_POP(party->recv_message), HP_POP2(HP_party_recv_message), 3308 }, +{ HP_POP(party->skill_check), HP_POP2(HP_party_skill_check), 3310 }, +{ HP_POP(party->send_xy_clear), HP_POP2(HP_party_send_xy_clear), 3312 }, +{ HP_POP(party->exp_share), HP_POP2(HP_party_exp_share), 3314 }, +{ HP_POP(party->share_loot), HP_POP2(HP_party_share_loot), 3316 }, +{ HP_POP(party->send_dot_remove), HP_POP2(HP_party_send_dot_remove), 3318 }, +{ HP_POP(party->sub_count), HP_POP2(HP_party_sub_count), 3320 }, +{ HP_POP(party->booking_register), HP_POP2(HP_party_booking_register), 3322 }, +{ HP_POP(party->booking_update), HP_POP2(HP_party_booking_update), 3324 }, +{ HP_POP(party->booking_search), HP_POP2(HP_party_booking_search), 3326 }, +{ HP_POP(party->recruit_register), HP_POP2(HP_party_recruit_register), 3328 }, +{ HP_POP(party->recruit_update), HP_POP2(HP_party_recruit_update), 3330 }, +{ HP_POP(party->recruit_search), HP_POP2(HP_party_recruit_search), 3332 }, +{ HP_POP(party->booking_delete), HP_POP2(HP_party_booking_delete), 3334 }, +{ HP_POP(party->vforeachsamemap), HP_POP2(HP_party_vforeachsamemap), 3336 }, +{ HP_POP(party->send_xy_timer), HP_POP2(HP_party_send_xy_timer), 3338 }, +{ HP_POP(party->fill_member), HP_POP2(HP_party_fill_member), 3340 }, +{ HP_POP(party->sd_check), HP_POP2(HP_party_sd_check), 3342 }, +{ HP_POP(party->check_state), HP_POP2(HP_party_check_state), 3344 }, +{ HP_POP(party->create_booking_data), HP_POP2(HP_party_create_booking_data), 3346 }, +{ HP_POP(party->db_final), HP_POP2(HP_party_db_final), 3348 }, /* path */ -{ HP_POP(path->blownpos), HP_POP2(HP_path_blownpos), 3334 }, -{ HP_POP(path->search), HP_POP2(HP_path_search), 3336 }, -{ HP_POP(path->search_long), HP_POP2(HP_path_search_long), 3338 }, -{ HP_POP(path->check_distance), HP_POP2(HP_path_check_distance), 3340 }, -{ HP_POP(path->distance), HP_POP2(HP_path_distance), 3342 }, +{ HP_POP(path->blownpos), HP_POP2(HP_path_blownpos), 3350 }, +{ HP_POP(path->search), HP_POP2(HP_path_search), 3352 }, +{ HP_POP(path->search_long), HP_POP2(HP_path_search_long), 3354 }, +{ HP_POP(path->check_distance), HP_POP2(HP_path_check_distance), 3356 }, +{ HP_POP(path->distance), HP_POP2(HP_path_distance), 3358 }, /* pc */ -{ HP_POP(pc->init), HP_POP2(HP_pc_init), 3344 }, -{ HP_POP(pc->final), HP_POP2(HP_pc_final), 3346 }, -{ HP_POP(pc->get_dummy_sd), HP_POP2(HP_pc_get_dummy_sd), 3348 }, -{ HP_POP(pc->class2idx), HP_POP2(HP_pc_class2idx), 3350 }, -{ HP_POP(pc->get_group_level), HP_POP2(HP_pc_get_group_level), 3352 }, -{ HP_POP(pc->can_give_items), HP_POP2(HP_pc_can_give_items), 3354 }, -{ HP_POP(pc->can_use_command), HP_POP2(HP_pc_can_use_command), 3356 }, -{ HP_POP(pc->has_permission), HP_POP2(HP_pc_has_permission), 3358 }, -{ HP_POP(pc->set_group), HP_POP2(HP_pc_set_group), 3360 }, -{ HP_POP(pc->should_log_commands), HP_POP2(HP_pc_should_log_commands), 3362 }, -{ HP_POP(pc->setrestartvalue), HP_POP2(HP_pc_setrestartvalue), 3364 }, -{ HP_POP(pc->makesavestatus), HP_POP2(HP_pc_makesavestatus), 3366 }, -{ HP_POP(pc->respawn), HP_POP2(HP_pc_respawn), 3368 }, -{ HP_POP(pc->setnewpc), HP_POP2(HP_pc_setnewpc), 3370 }, -{ HP_POP(pc->authok), HP_POP2(HP_pc_authok), 3372 }, -{ HP_POP(pc->authfail), HP_POP2(HP_pc_authfail), 3374 }, -{ HP_POP(pc->reg_received), HP_POP2(HP_pc_reg_received), 3376 }, -{ HP_POP(pc->isequip), HP_POP2(HP_pc_isequip), 3378 }, -{ HP_POP(pc->equippoint), HP_POP2(HP_pc_equippoint), 3380 }, -{ HP_POP(pc->setinventorydata), HP_POP2(HP_pc_setinventorydata), 3382 }, -{ HP_POP(pc->checkskill), HP_POP2(HP_pc_checkskill), 3384 }, -{ HP_POP(pc->checkskill2), HP_POP2(HP_pc_checkskill2), 3386 }, -{ HP_POP(pc->checkallowskill), HP_POP2(HP_pc_checkallowskill), 3388 }, -{ HP_POP(pc->checkequip), HP_POP2(HP_pc_checkequip), 3390 }, -{ HP_POP(pc->calc_skilltree), HP_POP2(HP_pc_calc_skilltree), 3392 }, -{ HP_POP(pc->calc_skilltree_normalize_job), HP_POP2(HP_pc_calc_skilltree_normalize_job), 3394 }, -{ HP_POP(pc->clean_skilltree), HP_POP2(HP_pc_clean_skilltree), 3396 }, -{ HP_POP(pc->setpos), HP_POP2(HP_pc_setpos), 3398 }, -{ HP_POP(pc->setsavepoint), HP_POP2(HP_pc_setsavepoint), 3400 }, -{ HP_POP(pc->randomwarp), HP_POP2(HP_pc_randomwarp), 3402 }, -{ HP_POP(pc->memo), HP_POP2(HP_pc_memo), 3404 }, -{ HP_POP(pc->checkadditem), HP_POP2(HP_pc_checkadditem), 3406 }, -{ HP_POP(pc->inventoryblank), HP_POP2(HP_pc_inventoryblank), 3408 }, -{ HP_POP(pc->search_inventory), HP_POP2(HP_pc_search_inventory), 3410 }, -{ HP_POP(pc->payzeny), HP_POP2(HP_pc_payzeny), 3412 }, -{ HP_POP(pc->additem), HP_POP2(HP_pc_additem), 3414 }, -{ HP_POP(pc->getzeny), HP_POP2(HP_pc_getzeny), 3416 }, -{ HP_POP(pc->delitem), HP_POP2(HP_pc_delitem), 3418 }, -{ HP_POP(pc->paycash), HP_POP2(HP_pc_paycash), 3420 }, -{ HP_POP(pc->getcash), HP_POP2(HP_pc_getcash), 3422 }, -{ HP_POP(pc->cart_additem), HP_POP2(HP_pc_cart_additem), 3424 }, -{ HP_POP(pc->cart_delitem), HP_POP2(HP_pc_cart_delitem), 3426 }, -{ HP_POP(pc->putitemtocart), HP_POP2(HP_pc_putitemtocart), 3428 }, -{ HP_POP(pc->getitemfromcart), HP_POP2(HP_pc_getitemfromcart), 3430 }, -{ HP_POP(pc->cartitem_amount), HP_POP2(HP_pc_cartitem_amount), 3432 }, -{ HP_POP(pc->takeitem), HP_POP2(HP_pc_takeitem), 3434 }, -{ HP_POP(pc->dropitem), HP_POP2(HP_pc_dropitem), 3436 }, -{ HP_POP(pc->isequipped), HP_POP2(HP_pc_isequipped), 3438 }, -{ HP_POP(pc->can_Adopt), HP_POP2(HP_pc_can_Adopt), 3440 }, -{ HP_POP(pc->adoption), HP_POP2(HP_pc_adoption), 3442 }, -{ HP_POP(pc->updateweightstatus), HP_POP2(HP_pc_updateweightstatus), 3444 }, -{ HP_POP(pc->addautobonus), HP_POP2(HP_pc_addautobonus), 3446 }, -{ HP_POP(pc->exeautobonus), HP_POP2(HP_pc_exeautobonus), 3448 }, -{ HP_POP(pc->endautobonus), HP_POP2(HP_pc_endautobonus), 3450 }, -{ HP_POP(pc->delautobonus), HP_POP2(HP_pc_delautobonus), 3452 }, -{ HP_POP(pc->bonus), HP_POP2(HP_pc_bonus), 3454 }, -{ HP_POP(pc->bonus2), HP_POP2(HP_pc_bonus2), 3456 }, -{ HP_POP(pc->bonus3), HP_POP2(HP_pc_bonus3), 3458 }, -{ HP_POP(pc->bonus4), HP_POP2(HP_pc_bonus4), 3460 }, -{ HP_POP(pc->bonus5), HP_POP2(HP_pc_bonus5), 3462 }, -{ HP_POP(pc->skill), HP_POP2(HP_pc_skill), 3464 }, -{ HP_POP(pc->insert_card), HP_POP2(HP_pc_insert_card), 3466 }, -{ HP_POP(pc->steal_item), HP_POP2(HP_pc_steal_item), 3468 }, -{ HP_POP(pc->steal_coin), HP_POP2(HP_pc_steal_coin), 3470 }, -{ HP_POP(pc->modifybuyvalue), HP_POP2(HP_pc_modifybuyvalue), 3472 }, -{ HP_POP(pc->modifysellvalue), HP_POP2(HP_pc_modifysellvalue), 3474 }, -{ HP_POP(pc->follow), HP_POP2(HP_pc_follow), 3476 }, -{ HP_POP(pc->stop_following), HP_POP2(HP_pc_stop_following), 3478 }, -{ HP_POP(pc->maxbaselv), HP_POP2(HP_pc_maxbaselv), 3480 }, -{ HP_POP(pc->maxjoblv), HP_POP2(HP_pc_maxjoblv), 3482 }, -{ HP_POP(pc->checkbaselevelup), HP_POP2(HP_pc_checkbaselevelup), 3484 }, -{ HP_POP(pc->checkjoblevelup), HP_POP2(HP_pc_checkjoblevelup), 3486 }, -{ HP_POP(pc->gainexp), HP_POP2(HP_pc_gainexp), 3488 }, -{ HP_POP(pc->nextbaseexp), HP_POP2(HP_pc_nextbaseexp), 3490 }, -{ HP_POP(pc->thisbaseexp), HP_POP2(HP_pc_thisbaseexp), 3492 }, -{ HP_POP(pc->nextjobexp), HP_POP2(HP_pc_nextjobexp), 3494 }, -{ HP_POP(pc->thisjobexp), HP_POP2(HP_pc_thisjobexp), 3496 }, -{ HP_POP(pc->gets_status_point), HP_POP2(HP_pc_gets_status_point), 3498 }, -{ HP_POP(pc->need_status_point), HP_POP2(HP_pc_need_status_point), 3500 }, -{ HP_POP(pc->statusup), HP_POP2(HP_pc_statusup), 3502 }, -{ HP_POP(pc->statusup2), HP_POP2(HP_pc_statusup2), 3504 }, -{ HP_POP(pc->skillup), HP_POP2(HP_pc_skillup), 3506 }, -{ HP_POP(pc->allskillup), HP_POP2(HP_pc_allskillup), 3508 }, -{ HP_POP(pc->resetlvl), HP_POP2(HP_pc_resetlvl), 3510 }, -{ HP_POP(pc->resetstate), HP_POP2(HP_pc_resetstate), 3512 }, -{ HP_POP(pc->resetskill), HP_POP2(HP_pc_resetskill), 3514 }, -{ HP_POP(pc->resetfeel), HP_POP2(HP_pc_resetfeel), 3516 }, -{ HP_POP(pc->resethate), HP_POP2(HP_pc_resethate), 3518 }, -{ HP_POP(pc->equipitem), HP_POP2(HP_pc_equipitem), 3520 }, -{ HP_POP(pc->unequipitem), HP_POP2(HP_pc_unequipitem), 3522 }, -{ HP_POP(pc->checkitem), HP_POP2(HP_pc_checkitem), 3524 }, -{ HP_POP(pc->useitem), HP_POP2(HP_pc_useitem), 3526 }, -{ HP_POP(pc->skillatk_bonus), HP_POP2(HP_pc_skillatk_bonus), 3528 }, -{ HP_POP(pc->skillheal_bonus), HP_POP2(HP_pc_skillheal_bonus), 3530 }, -{ HP_POP(pc->skillheal2_bonus), HP_POP2(HP_pc_skillheal2_bonus), 3532 }, -{ HP_POP(pc->damage), HP_POP2(HP_pc_damage), 3534 }, -{ HP_POP(pc->dead), HP_POP2(HP_pc_dead), 3536 }, -{ HP_POP(pc->revive), HP_POP2(HP_pc_revive), 3538 }, -{ HP_POP(pc->heal), HP_POP2(HP_pc_heal), 3540 }, -{ HP_POP(pc->itemheal), HP_POP2(HP_pc_itemheal), 3542 }, -{ HP_POP(pc->percentheal), HP_POP2(HP_pc_percentheal), 3544 }, -{ HP_POP(pc->jobchange), HP_POP2(HP_pc_jobchange), 3546 }, -{ HP_POP(pc->setoption), HP_POP2(HP_pc_setoption), 3548 }, -{ HP_POP(pc->setcart), HP_POP2(HP_pc_setcart), 3550 }, -{ HP_POP(pc->setfalcon), HP_POP2(HP_pc_setfalcon), 3552 }, -{ HP_POP(pc->setriding), HP_POP2(HP_pc_setriding), 3554 }, -{ HP_POP(pc->setmadogear), HP_POP2(HP_pc_setmadogear), 3556 }, -{ HP_POP(pc->changelook), HP_POP2(HP_pc_changelook), 3558 }, -{ HP_POP(pc->equiplookall), HP_POP2(HP_pc_equiplookall), 3560 }, -{ HP_POP(pc->readparam), HP_POP2(HP_pc_readparam), 3562 }, -{ HP_POP(pc->setparam), HP_POP2(HP_pc_setparam), 3564 }, -{ HP_POP(pc->readreg), HP_POP2(HP_pc_readreg), 3566 }, -{ HP_POP(pc->setreg), HP_POP2(HP_pc_setreg), 3568 }, -{ HP_POP(pc->readregstr), HP_POP2(HP_pc_readregstr), 3570 }, -{ HP_POP(pc->setregstr), HP_POP2(HP_pc_setregstr), 3572 }, -{ HP_POP(pc->readregistry), HP_POP2(HP_pc_readregistry), 3574 }, -{ HP_POP(pc->setregistry), HP_POP2(HP_pc_setregistry), 3576 }, -{ HP_POP(pc->readregistry_str), HP_POP2(HP_pc_readregistry_str), 3578 }, -{ HP_POP(pc->setregistry_str), HP_POP2(HP_pc_setregistry_str), 3580 }, -{ HP_POP(pc->addeventtimer), HP_POP2(HP_pc_addeventtimer), 3582 }, -{ HP_POP(pc->deleventtimer), HP_POP2(HP_pc_deleventtimer), 3584 }, -{ HP_POP(pc->cleareventtimer), HP_POP2(HP_pc_cleareventtimer), 3586 }, -{ HP_POP(pc->addeventtimercount), HP_POP2(HP_pc_addeventtimercount), 3588 }, -{ HP_POP(pc->calc_pvprank), HP_POP2(HP_pc_calc_pvprank), 3590 }, -{ HP_POP(pc->calc_pvprank_timer), HP_POP2(HP_pc_calc_pvprank_timer), 3592 }, -{ HP_POP(pc->ismarried), HP_POP2(HP_pc_ismarried), 3594 }, -{ HP_POP(pc->marriage), HP_POP2(HP_pc_marriage), 3596 }, -{ HP_POP(pc->divorce), HP_POP2(HP_pc_divorce), 3598 }, -{ HP_POP(pc->get_partner), HP_POP2(HP_pc_get_partner), 3600 }, -{ HP_POP(pc->get_father), HP_POP2(HP_pc_get_father), 3602 }, -{ HP_POP(pc->get_mother), HP_POP2(HP_pc_get_mother), 3604 }, -{ HP_POP(pc->get_child), HP_POP2(HP_pc_get_child), 3606 }, -{ HP_POP(pc->bleeding), HP_POP2(HP_pc_bleeding), 3608 }, -{ HP_POP(pc->regen), HP_POP2(HP_pc_regen), 3610 }, -{ HP_POP(pc->setstand), HP_POP2(HP_pc_setstand), 3612 }, -{ HP_POP(pc->candrop), HP_POP2(HP_pc_candrop), 3614 }, -{ HP_POP(pc->jobid2mapid), HP_POP2(HP_pc_jobid2mapid), 3616 }, -{ HP_POP(pc->mapid2jobid), HP_POP2(HP_pc_mapid2jobid), 3618 }, -{ HP_POP(pc->job_name), HP_POP2(HP_pc_job_name), 3620 }, -{ HP_POP(pc->setinvincibletimer), HP_POP2(HP_pc_setinvincibletimer), 3622 }, -{ HP_POP(pc->delinvincibletimer), HP_POP2(HP_pc_delinvincibletimer), 3624 }, -{ HP_POP(pc->addspiritball), HP_POP2(HP_pc_addspiritball), 3626 }, -{ HP_POP(pc->delspiritball), HP_POP2(HP_pc_delspiritball), 3628 }, -{ HP_POP(pc->addfame), HP_POP2(HP_pc_addfame), 3630 }, -{ HP_POP(pc->famerank), HP_POP2(HP_pc_famerank), 3632 }, -{ HP_POP(pc->set_hate_mob), HP_POP2(HP_pc_set_hate_mob), 3634 }, -{ HP_POP(pc->readdb), HP_POP2(HP_pc_readdb), 3636 }, -{ HP_POP(pc->map_day_timer), HP_POP2(HP_pc_map_day_timer), 3638 }, -{ HP_POP(pc->map_night_timer), HP_POP2(HP_pc_map_night_timer), 3640 }, -{ HP_POP(pc->inventory_rentals), HP_POP2(HP_pc_inventory_rentals), 3642 }, -{ HP_POP(pc->inventory_rental_clear), HP_POP2(HP_pc_inventory_rental_clear), 3644 }, -{ HP_POP(pc->inventory_rental_add), HP_POP2(HP_pc_inventory_rental_add), 3646 }, -{ HP_POP(pc->disguise), HP_POP2(HP_pc_disguise), 3648 }, -{ HP_POP(pc->isautolooting), HP_POP2(HP_pc_isautolooting), 3650 }, -{ HP_POP(pc->overheat), HP_POP2(HP_pc_overheat), 3652 }, -{ HP_POP(pc->banding), HP_POP2(HP_pc_banding), 3654 }, -{ HP_POP(pc->itemcd_do), HP_POP2(HP_pc_itemcd_do), 3656 }, -{ HP_POP(pc->load_combo), HP_POP2(HP_pc_load_combo), 3658 }, -{ HP_POP(pc->add_charm), HP_POP2(HP_pc_add_charm), 3660 }, -{ HP_POP(pc->del_charm), HP_POP2(HP_pc_del_charm), 3662 }, -{ HP_POP(pc->baselevelchanged), HP_POP2(HP_pc_baselevelchanged), 3664 }, -{ HP_POP(pc->level_penalty_mod), HP_POP2(HP_pc_level_penalty_mod), 3666 }, -{ HP_POP(pc->calc_skillpoint), HP_POP2(HP_pc_calc_skillpoint), 3668 }, -{ HP_POP(pc->invincible_timer), HP_POP2(HP_pc_invincible_timer), 3670 }, -{ HP_POP(pc->spiritball_timer), HP_POP2(HP_pc_spiritball_timer), 3672 }, -{ HP_POP(pc->check_banding), HP_POP2(HP_pc_check_banding), 3674 }, -{ HP_POP(pc->inventory_rental_end), HP_POP2(HP_pc_inventory_rental_end), 3676 }, -{ HP_POP(pc->check_skilltree), HP_POP2(HP_pc_check_skilltree), 3678 }, -{ HP_POP(pc->bonus_autospell), HP_POP2(HP_pc_bonus_autospell), 3680 }, -{ HP_POP(pc->bonus_autospell_onskill), HP_POP2(HP_pc_bonus_autospell_onskill), 3682 }, -{ HP_POP(pc->bonus_addeff), HP_POP2(HP_pc_bonus_addeff), 3684 }, -{ HP_POP(pc->bonus_addeff_onskill), HP_POP2(HP_pc_bonus_addeff_onskill), 3686 }, -{ HP_POP(pc->bonus_item_drop), HP_POP2(HP_pc_bonus_item_drop), 3688 }, -{ HP_POP(pc->calcexp), HP_POP2(HP_pc_calcexp), 3690 }, -{ HP_POP(pc->respawn_timer), HP_POP2(HP_pc_respawn_timer), 3692 }, -{ HP_POP(pc->jobchange_killclone), HP_POP2(HP_pc_jobchange_killclone), 3694 }, -{ HP_POP(pc->getstat), HP_POP2(HP_pc_getstat), 3696 }, -{ HP_POP(pc->setstat), HP_POP2(HP_pc_setstat), 3698 }, -{ HP_POP(pc->eventtimer), HP_POP2(HP_pc_eventtimer), 3700 }, -{ HP_POP(pc->daynight_timer_sub), HP_POP2(HP_pc_daynight_timer_sub), 3702 }, -{ HP_POP(pc->charm_timer), HP_POP2(HP_pc_charm_timer), 3704 }, -{ HP_POP(pc->readdb_levelpenalty), HP_POP2(HP_pc_readdb_levelpenalty), 3706 }, -{ HP_POP(pc->autosave), HP_POP2(HP_pc_autosave), 3708 }, -{ HP_POP(pc->follow_timer), HP_POP2(HP_pc_follow_timer), 3710 }, -{ HP_POP(pc->read_skill_tree), HP_POP2(HP_pc_read_skill_tree), 3712 }, -{ HP_POP(pc->isUseitem), HP_POP2(HP_pc_isUseitem), 3714 }, -{ HP_POP(pc->show_steal), HP_POP2(HP_pc_show_steal), 3716 }, -{ HP_POP(pc->checkcombo), HP_POP2(HP_pc_checkcombo), 3718 }, -{ HP_POP(pc->calcweapontype), HP_POP2(HP_pc_calcweapontype), 3720 }, -{ HP_POP(pc->removecombo), HP_POP2(HP_pc_removecombo), 3722 }, +{ HP_POP(pc->init), HP_POP2(HP_pc_init), 3360 }, +{ HP_POP(pc->final), HP_POP2(HP_pc_final), 3362 }, +{ HP_POP(pc->get_dummy_sd), HP_POP2(HP_pc_get_dummy_sd), 3364 }, +{ HP_POP(pc->class2idx), HP_POP2(HP_pc_class2idx), 3366 }, +{ HP_POP(pc->get_group_level), HP_POP2(HP_pc_get_group_level), 3368 }, +{ HP_POP(pc->can_give_items), HP_POP2(HP_pc_can_give_items), 3370 }, +{ HP_POP(pc->can_use_command), HP_POP2(HP_pc_can_use_command), 3372 }, +{ HP_POP(pc->has_permission), HP_POP2(HP_pc_has_permission), 3374 }, +{ HP_POP(pc->set_group), HP_POP2(HP_pc_set_group), 3376 }, +{ HP_POP(pc->should_log_commands), HP_POP2(HP_pc_should_log_commands), 3378 }, +{ HP_POP(pc->setrestartvalue), HP_POP2(HP_pc_setrestartvalue), 3380 }, +{ HP_POP(pc->makesavestatus), HP_POP2(HP_pc_makesavestatus), 3382 }, +{ HP_POP(pc->respawn), HP_POP2(HP_pc_respawn), 3384 }, +{ HP_POP(pc->setnewpc), HP_POP2(HP_pc_setnewpc), 3386 }, +{ HP_POP(pc->authok), HP_POP2(HP_pc_authok), 3388 }, +{ HP_POP(pc->authfail), HP_POP2(HP_pc_authfail), 3390 }, +{ HP_POP(pc->reg_received), HP_POP2(HP_pc_reg_received), 3392 }, +{ HP_POP(pc->isequip), HP_POP2(HP_pc_isequip), 3394 }, +{ HP_POP(pc->equippoint), HP_POP2(HP_pc_equippoint), 3396 }, +{ HP_POP(pc->setinventorydata), HP_POP2(HP_pc_setinventorydata), 3398 }, +{ HP_POP(pc->checkskill), HP_POP2(HP_pc_checkskill), 3400 }, +{ HP_POP(pc->checkskill2), HP_POP2(HP_pc_checkskill2), 3402 }, +{ HP_POP(pc->checkallowskill), HP_POP2(HP_pc_checkallowskill), 3404 }, +{ HP_POP(pc->checkequip), HP_POP2(HP_pc_checkequip), 3406 }, +{ HP_POP(pc->calc_skilltree), HP_POP2(HP_pc_calc_skilltree), 3408 }, +{ HP_POP(pc->calc_skilltree_normalize_job), HP_POP2(HP_pc_calc_skilltree_normalize_job), 3410 }, +{ HP_POP(pc->clean_skilltree), HP_POP2(HP_pc_clean_skilltree), 3412 }, +{ HP_POP(pc->setpos), HP_POP2(HP_pc_setpos), 3414 }, +{ HP_POP(pc->setsavepoint), HP_POP2(HP_pc_setsavepoint), 3416 }, +{ HP_POP(pc->randomwarp), HP_POP2(HP_pc_randomwarp), 3418 }, +{ HP_POP(pc->memo), HP_POP2(HP_pc_memo), 3420 }, +{ HP_POP(pc->checkadditem), HP_POP2(HP_pc_checkadditem), 3422 }, +{ HP_POP(pc->inventoryblank), HP_POP2(HP_pc_inventoryblank), 3424 }, +{ HP_POP(pc->search_inventory), HP_POP2(HP_pc_search_inventory), 3426 }, +{ HP_POP(pc->payzeny), HP_POP2(HP_pc_payzeny), 3428 }, +{ HP_POP(pc->additem), HP_POP2(HP_pc_additem), 3430 }, +{ HP_POP(pc->getzeny), HP_POP2(HP_pc_getzeny), 3432 }, +{ HP_POP(pc->delitem), HP_POP2(HP_pc_delitem), 3434 }, +{ HP_POP(pc->paycash), HP_POP2(HP_pc_paycash), 3436 }, +{ HP_POP(pc->getcash), HP_POP2(HP_pc_getcash), 3438 }, +{ HP_POP(pc->cart_additem), HP_POP2(HP_pc_cart_additem), 3440 }, +{ HP_POP(pc->cart_delitem), HP_POP2(HP_pc_cart_delitem), 3442 }, +{ HP_POP(pc->putitemtocart), HP_POP2(HP_pc_putitemtocart), 3444 }, +{ HP_POP(pc->getitemfromcart), HP_POP2(HP_pc_getitemfromcart), 3446 }, +{ HP_POP(pc->cartitem_amount), HP_POP2(HP_pc_cartitem_amount), 3448 }, +{ HP_POP(pc->takeitem), HP_POP2(HP_pc_takeitem), 3450 }, +{ HP_POP(pc->dropitem), HP_POP2(HP_pc_dropitem), 3452 }, +{ HP_POP(pc->isequipped), HP_POP2(HP_pc_isequipped), 3454 }, +{ HP_POP(pc->can_Adopt), HP_POP2(HP_pc_can_Adopt), 3456 }, +{ HP_POP(pc->adoption), HP_POP2(HP_pc_adoption), 3458 }, +{ HP_POP(pc->updateweightstatus), HP_POP2(HP_pc_updateweightstatus), 3460 }, +{ HP_POP(pc->addautobonus), HP_POP2(HP_pc_addautobonus), 3462 }, +{ HP_POP(pc->exeautobonus), HP_POP2(HP_pc_exeautobonus), 3464 }, +{ HP_POP(pc->endautobonus), HP_POP2(HP_pc_endautobonus), 3466 }, +{ HP_POP(pc->delautobonus), HP_POP2(HP_pc_delautobonus), 3468 }, +{ HP_POP(pc->bonus), HP_POP2(HP_pc_bonus), 3470 }, +{ HP_POP(pc->bonus2), HP_POP2(HP_pc_bonus2), 3472 }, +{ HP_POP(pc->bonus3), HP_POP2(HP_pc_bonus3), 3474 }, +{ HP_POP(pc->bonus4), HP_POP2(HP_pc_bonus4), 3476 }, +{ HP_POP(pc->bonus5), HP_POP2(HP_pc_bonus5), 3478 }, +{ HP_POP(pc->skill), HP_POP2(HP_pc_skill), 3480 }, +{ HP_POP(pc->insert_card), HP_POP2(HP_pc_insert_card), 3482 }, +{ HP_POP(pc->steal_item), HP_POP2(HP_pc_steal_item), 3484 }, +{ HP_POP(pc->steal_coin), HP_POP2(HP_pc_steal_coin), 3486 }, +{ HP_POP(pc->modifybuyvalue), HP_POP2(HP_pc_modifybuyvalue), 3488 }, +{ HP_POP(pc->modifysellvalue), HP_POP2(HP_pc_modifysellvalue), 3490 }, +{ HP_POP(pc->follow), HP_POP2(HP_pc_follow), 3492 }, +{ HP_POP(pc->stop_following), HP_POP2(HP_pc_stop_following), 3494 }, +{ HP_POP(pc->maxbaselv), HP_POP2(HP_pc_maxbaselv), 3496 }, +{ HP_POP(pc->maxjoblv), HP_POP2(HP_pc_maxjoblv), 3498 }, +{ HP_POP(pc->checkbaselevelup), HP_POP2(HP_pc_checkbaselevelup), 3500 }, +{ HP_POP(pc->checkjoblevelup), HP_POP2(HP_pc_checkjoblevelup), 3502 }, +{ HP_POP(pc->gainexp), HP_POP2(HP_pc_gainexp), 3504 }, +{ HP_POP(pc->nextbaseexp), HP_POP2(HP_pc_nextbaseexp), 3506 }, +{ HP_POP(pc->thisbaseexp), HP_POP2(HP_pc_thisbaseexp), 3508 }, +{ HP_POP(pc->nextjobexp), HP_POP2(HP_pc_nextjobexp), 3510 }, +{ HP_POP(pc->thisjobexp), HP_POP2(HP_pc_thisjobexp), 3512 }, +{ HP_POP(pc->gets_status_point), HP_POP2(HP_pc_gets_status_point), 3514 }, +{ HP_POP(pc->need_status_point), HP_POP2(HP_pc_need_status_point), 3516 }, +{ HP_POP(pc->statusup), HP_POP2(HP_pc_statusup), 3518 }, +{ HP_POP(pc->statusup2), HP_POP2(HP_pc_statusup2), 3520 }, +{ HP_POP(pc->skillup), HP_POP2(HP_pc_skillup), 3522 }, +{ HP_POP(pc->allskillup), HP_POP2(HP_pc_allskillup), 3524 }, +{ HP_POP(pc->resetlvl), HP_POP2(HP_pc_resetlvl), 3526 }, +{ HP_POP(pc->resetstate), HP_POP2(HP_pc_resetstate), 3528 }, +{ HP_POP(pc->resetskill), HP_POP2(HP_pc_resetskill), 3530 }, +{ HP_POP(pc->resetfeel), HP_POP2(HP_pc_resetfeel), 3532 }, +{ HP_POP(pc->resethate), HP_POP2(HP_pc_resethate), 3534 }, +{ HP_POP(pc->equipitem), HP_POP2(HP_pc_equipitem), 3536 }, +{ HP_POP(pc->unequipitem), HP_POP2(HP_pc_unequipitem), 3538 }, +{ HP_POP(pc->checkitem), HP_POP2(HP_pc_checkitem), 3540 }, +{ HP_POP(pc->useitem), HP_POP2(HP_pc_useitem), 3542 }, +{ HP_POP(pc->skillatk_bonus), HP_POP2(HP_pc_skillatk_bonus), 3544 }, +{ HP_POP(pc->skillheal_bonus), HP_POP2(HP_pc_skillheal_bonus), 3546 }, +{ HP_POP(pc->skillheal2_bonus), HP_POP2(HP_pc_skillheal2_bonus), 3548 }, +{ HP_POP(pc->damage), HP_POP2(HP_pc_damage), 3550 }, +{ HP_POP(pc->dead), HP_POP2(HP_pc_dead), 3552 }, +{ HP_POP(pc->revive), HP_POP2(HP_pc_revive), 3554 }, +{ HP_POP(pc->heal), HP_POP2(HP_pc_heal), 3556 }, +{ HP_POP(pc->itemheal), HP_POP2(HP_pc_itemheal), 3558 }, +{ HP_POP(pc->percentheal), HP_POP2(HP_pc_percentheal), 3560 }, +{ HP_POP(pc->jobchange), HP_POP2(HP_pc_jobchange), 3562 }, +{ HP_POP(pc->setoption), HP_POP2(HP_pc_setoption), 3564 }, +{ HP_POP(pc->setcart), HP_POP2(HP_pc_setcart), 3566 }, +{ HP_POP(pc->setfalcon), HP_POP2(HP_pc_setfalcon), 3568 }, +{ HP_POP(pc->setriding), HP_POP2(HP_pc_setriding), 3570 }, +{ HP_POP(pc->setmadogear), HP_POP2(HP_pc_setmadogear), 3572 }, +{ HP_POP(pc->changelook), HP_POP2(HP_pc_changelook), 3574 }, +{ HP_POP(pc->equiplookall), HP_POP2(HP_pc_equiplookall), 3576 }, +{ HP_POP(pc->readparam), HP_POP2(HP_pc_readparam), 3578 }, +{ HP_POP(pc->setparam), HP_POP2(HP_pc_setparam), 3580 }, +{ HP_POP(pc->readreg), HP_POP2(HP_pc_readreg), 3582 }, +{ HP_POP(pc->setreg), HP_POP2(HP_pc_setreg), 3584 }, +{ HP_POP(pc->readregstr), HP_POP2(HP_pc_readregstr), 3586 }, +{ HP_POP(pc->setregstr), HP_POP2(HP_pc_setregstr), 3588 }, +{ HP_POP(pc->readregistry), HP_POP2(HP_pc_readregistry), 3590 }, +{ HP_POP(pc->setregistry), HP_POP2(HP_pc_setregistry), 3592 }, +{ HP_POP(pc->readregistry_str), HP_POP2(HP_pc_readregistry_str), 3594 }, +{ HP_POP(pc->setregistry_str), HP_POP2(HP_pc_setregistry_str), 3596 }, +{ HP_POP(pc->addeventtimer), HP_POP2(HP_pc_addeventtimer), 3598 }, +{ HP_POP(pc->deleventtimer), HP_POP2(HP_pc_deleventtimer), 3600 }, +{ HP_POP(pc->cleareventtimer), HP_POP2(HP_pc_cleareventtimer), 3602 }, +{ HP_POP(pc->addeventtimercount), HP_POP2(HP_pc_addeventtimercount), 3604 }, +{ HP_POP(pc->calc_pvprank), HP_POP2(HP_pc_calc_pvprank), 3606 }, +{ HP_POP(pc->calc_pvprank_timer), HP_POP2(HP_pc_calc_pvprank_timer), 3608 }, +{ HP_POP(pc->ismarried), HP_POP2(HP_pc_ismarried), 3610 }, +{ HP_POP(pc->marriage), HP_POP2(HP_pc_marriage), 3612 }, +{ HP_POP(pc->divorce), HP_POP2(HP_pc_divorce), 3614 }, +{ HP_POP(pc->get_partner), HP_POP2(HP_pc_get_partner), 3616 }, +{ HP_POP(pc->get_father), HP_POP2(HP_pc_get_father), 3618 }, +{ HP_POP(pc->get_mother), HP_POP2(HP_pc_get_mother), 3620 }, +{ HP_POP(pc->get_child), HP_POP2(HP_pc_get_child), 3622 }, +{ HP_POP(pc->bleeding), HP_POP2(HP_pc_bleeding), 3624 }, +{ HP_POP(pc->regen), HP_POP2(HP_pc_regen), 3626 }, +{ HP_POP(pc->setstand), HP_POP2(HP_pc_setstand), 3628 }, +{ HP_POP(pc->candrop), HP_POP2(HP_pc_candrop), 3630 }, +{ HP_POP(pc->jobid2mapid), HP_POP2(HP_pc_jobid2mapid), 3632 }, +{ HP_POP(pc->mapid2jobid), HP_POP2(HP_pc_mapid2jobid), 3634 }, +{ HP_POP(pc->job_name), HP_POP2(HP_pc_job_name), 3636 }, +{ HP_POP(pc->setinvincibletimer), HP_POP2(HP_pc_setinvincibletimer), 3638 }, +{ HP_POP(pc->delinvincibletimer), HP_POP2(HP_pc_delinvincibletimer), 3640 }, +{ HP_POP(pc->addspiritball), HP_POP2(HP_pc_addspiritball), 3642 }, +{ HP_POP(pc->delspiritball), HP_POP2(HP_pc_delspiritball), 3644 }, +{ HP_POP(pc->addfame), HP_POP2(HP_pc_addfame), 3646 }, +{ HP_POP(pc->famerank), HP_POP2(HP_pc_famerank), 3648 }, +{ HP_POP(pc->set_hate_mob), HP_POP2(HP_pc_set_hate_mob), 3650 }, +{ HP_POP(pc->readdb), HP_POP2(HP_pc_readdb), 3652 }, +{ HP_POP(pc->map_day_timer), HP_POP2(HP_pc_map_day_timer), 3654 }, +{ HP_POP(pc->map_night_timer), HP_POP2(HP_pc_map_night_timer), 3656 }, +{ HP_POP(pc->inventory_rentals), HP_POP2(HP_pc_inventory_rentals), 3658 }, +{ HP_POP(pc->inventory_rental_clear), HP_POP2(HP_pc_inventory_rental_clear), 3660 }, +{ HP_POP(pc->inventory_rental_add), HP_POP2(HP_pc_inventory_rental_add), 3662 }, +{ HP_POP(pc->disguise), HP_POP2(HP_pc_disguise), 3664 }, +{ HP_POP(pc->isautolooting), HP_POP2(HP_pc_isautolooting), 3666 }, +{ HP_POP(pc->overheat), HP_POP2(HP_pc_overheat), 3668 }, +{ HP_POP(pc->banding), HP_POP2(HP_pc_banding), 3670 }, +{ HP_POP(pc->itemcd_do), HP_POP2(HP_pc_itemcd_do), 3672 }, +{ HP_POP(pc->load_combo), HP_POP2(HP_pc_load_combo), 3674 }, +{ HP_POP(pc->add_charm), HP_POP2(HP_pc_add_charm), 3676 }, +{ HP_POP(pc->del_charm), HP_POP2(HP_pc_del_charm), 3678 }, +{ HP_POP(pc->baselevelchanged), HP_POP2(HP_pc_baselevelchanged), 3680 }, +{ HP_POP(pc->level_penalty_mod), HP_POP2(HP_pc_level_penalty_mod), 3682 }, +{ HP_POP(pc->calc_skillpoint), HP_POP2(HP_pc_calc_skillpoint), 3684 }, +{ HP_POP(pc->invincible_timer), HP_POP2(HP_pc_invincible_timer), 3686 }, +{ HP_POP(pc->spiritball_timer), HP_POP2(HP_pc_spiritball_timer), 3688 }, +{ HP_POP(pc->check_banding), HP_POP2(HP_pc_check_banding), 3690 }, +{ HP_POP(pc->inventory_rental_end), HP_POP2(HP_pc_inventory_rental_end), 3692 }, +{ HP_POP(pc->check_skilltree), HP_POP2(HP_pc_check_skilltree), 3694 }, +{ HP_POP(pc->bonus_autospell), HP_POP2(HP_pc_bonus_autospell), 3696 }, +{ HP_POP(pc->bonus_autospell_onskill), HP_POP2(HP_pc_bonus_autospell_onskill), 3698 }, +{ HP_POP(pc->bonus_addeff), HP_POP2(HP_pc_bonus_addeff), 3700 }, +{ HP_POP(pc->bonus_addeff_onskill), HP_POP2(HP_pc_bonus_addeff_onskill), 3702 }, +{ HP_POP(pc->bonus_item_drop), HP_POP2(HP_pc_bonus_item_drop), 3704 }, +{ HP_POP(pc->calcexp), HP_POP2(HP_pc_calcexp), 3706 }, +{ HP_POP(pc->respawn_timer), HP_POP2(HP_pc_respawn_timer), 3708 }, +{ HP_POP(pc->jobchange_killclone), HP_POP2(HP_pc_jobchange_killclone), 3710 }, +{ HP_POP(pc->getstat), HP_POP2(HP_pc_getstat), 3712 }, +{ HP_POP(pc->setstat), HP_POP2(HP_pc_setstat), 3714 }, +{ HP_POP(pc->eventtimer), HP_POP2(HP_pc_eventtimer), 3716 }, +{ HP_POP(pc->daynight_timer_sub), HP_POP2(HP_pc_daynight_timer_sub), 3718 }, +{ HP_POP(pc->charm_timer), HP_POP2(HP_pc_charm_timer), 3720 }, +{ HP_POP(pc->readdb_levelpenalty), HP_POP2(HP_pc_readdb_levelpenalty), 3722 }, +{ HP_POP(pc->autosave), HP_POP2(HP_pc_autosave), 3724 }, +{ HP_POP(pc->follow_timer), HP_POP2(HP_pc_follow_timer), 3726 }, +{ HP_POP(pc->read_skill_tree), HP_POP2(HP_pc_read_skill_tree), 3728 }, +{ HP_POP(pc->isUseitem), HP_POP2(HP_pc_isUseitem), 3730 }, +{ HP_POP(pc->show_steal), HP_POP2(HP_pc_show_steal), 3732 }, +{ HP_POP(pc->checkcombo), HP_POP2(HP_pc_checkcombo), 3734 }, +{ HP_POP(pc->calcweapontype), HP_POP2(HP_pc_calcweapontype), 3736 }, +{ HP_POP(pc->removecombo), HP_POP2(HP_pc_removecombo), 3738 }, /* pet */ -{ HP_POP(pet->init), HP_POP2(HP_pet_init), 3724 }, -{ HP_POP(pet->final), HP_POP2(HP_pet_final), 3726 }, -{ HP_POP(pet->hungry_val), HP_POP2(HP_pet_hungry_val), 3728 }, -{ HP_POP(pet->set_intimate), HP_POP2(HP_pet_set_intimate), 3730 }, -{ HP_POP(pet->create_egg), HP_POP2(HP_pet_create_egg), 3732 }, -{ HP_POP(pet->unlocktarget), HP_POP2(HP_pet_unlocktarget), 3734 }, -{ HP_POP(pet->attackskill), HP_POP2(HP_pet_attackskill), 3736 }, -{ HP_POP(pet->target_check), HP_POP2(HP_pet_target_check), 3738 }, -{ HP_POP(pet->sc_check), HP_POP2(HP_pet_sc_check), 3740 }, -{ HP_POP(pet->hungry), HP_POP2(HP_pet_hungry), 3742 }, -{ HP_POP(pet->search_petDB_index), HP_POP2(HP_pet_search_petDB_index), 3744 }, -{ HP_POP(pet->hungry_timer_delete), HP_POP2(HP_pet_hungry_timer_delete), 3746 }, -{ HP_POP(pet->performance), HP_POP2(HP_pet_performance), 3748 }, -{ HP_POP(pet->return_egg), HP_POP2(HP_pet_return_egg), 3750 }, -{ HP_POP(pet->data_init), HP_POP2(HP_pet_data_init), 3752 }, -{ HP_POP(pet->birth_process), HP_POP2(HP_pet_birth_process), 3754 }, -{ HP_POP(pet->recv_petdata), HP_POP2(HP_pet_recv_petdata), 3756 }, -{ HP_POP(pet->select_egg), HP_POP2(HP_pet_select_egg), 3758 }, -{ HP_POP(pet->catch_process1), HP_POP2(HP_pet_catch_process1), 3760 }, -{ HP_POP(pet->catch_process2), HP_POP2(HP_pet_catch_process2), 3762 }, -{ HP_POP(pet->get_egg), HP_POP2(HP_pet_get_egg), 3764 }, -{ HP_POP(pet->unequipitem), HP_POP2(HP_pet_unequipitem), 3766 }, -{ HP_POP(pet->food), HP_POP2(HP_pet_food), 3768 }, -{ HP_POP(pet->ai_sub_hard_lootsearch), HP_POP2(HP_pet_ai_sub_hard_lootsearch), 3770 }, -{ HP_POP(pet->menu), HP_POP2(HP_pet_menu), 3772 }, -{ HP_POP(pet->change_name), HP_POP2(HP_pet_change_name), 3774 }, -{ HP_POP(pet->change_name_ack), HP_POP2(HP_pet_change_name_ack), 3776 }, -{ HP_POP(pet->equipitem), HP_POP2(HP_pet_equipitem), 3778 }, -{ HP_POP(pet->randomwalk), HP_POP2(HP_pet_randomwalk), 3780 }, -{ HP_POP(pet->ai_sub_hard), HP_POP2(HP_pet_ai_sub_hard), 3782 }, -{ HP_POP(pet->ai_sub_foreachclient), HP_POP2(HP_pet_ai_sub_foreachclient), 3784 }, -{ HP_POP(pet->ai_hard), HP_POP2(HP_pet_ai_hard), 3786 }, -{ HP_POP(pet->delay_item_drop), HP_POP2(HP_pet_delay_item_drop), 3788 }, -{ HP_POP(pet->lootitem_drop), HP_POP2(HP_pet_lootitem_drop), 3790 }, -{ HP_POP(pet->skill_bonus_timer), HP_POP2(HP_pet_skill_bonus_timer), 3792 }, -{ HP_POP(pet->recovery_timer), HP_POP2(HP_pet_recovery_timer), 3794 }, -{ HP_POP(pet->heal_timer), HP_POP2(HP_pet_heal_timer), 3796 }, -{ HP_POP(pet->skill_support_timer), HP_POP2(HP_pet_skill_support_timer), 3798 }, -{ HP_POP(pet->read_db), HP_POP2(HP_pet_read_db), 3800 }, +{ HP_POP(pet->init), HP_POP2(HP_pet_init), 3740 }, +{ HP_POP(pet->final), HP_POP2(HP_pet_final), 3742 }, +{ HP_POP(pet->hungry_val), HP_POP2(HP_pet_hungry_val), 3744 }, +{ HP_POP(pet->set_intimate), HP_POP2(HP_pet_set_intimate), 3746 }, +{ HP_POP(pet->create_egg), HP_POP2(HP_pet_create_egg), 3748 }, +{ HP_POP(pet->unlocktarget), HP_POP2(HP_pet_unlocktarget), 3750 }, +{ HP_POP(pet->attackskill), HP_POP2(HP_pet_attackskill), 3752 }, +{ HP_POP(pet->target_check), HP_POP2(HP_pet_target_check), 3754 }, +{ HP_POP(pet->sc_check), HP_POP2(HP_pet_sc_check), 3756 }, +{ HP_POP(pet->hungry), HP_POP2(HP_pet_hungry), 3758 }, +{ HP_POP(pet->search_petDB_index), HP_POP2(HP_pet_search_petDB_index), 3760 }, +{ HP_POP(pet->hungry_timer_delete), HP_POP2(HP_pet_hungry_timer_delete), 3762 }, +{ HP_POP(pet->performance), HP_POP2(HP_pet_performance), 3764 }, +{ HP_POP(pet->return_egg), HP_POP2(HP_pet_return_egg), 3766 }, +{ HP_POP(pet->data_init), HP_POP2(HP_pet_data_init), 3768 }, +{ HP_POP(pet->birth_process), HP_POP2(HP_pet_birth_process), 3770 }, +{ HP_POP(pet->recv_petdata), HP_POP2(HP_pet_recv_petdata), 3772 }, +{ HP_POP(pet->select_egg), HP_POP2(HP_pet_select_egg), 3774 }, +{ HP_POP(pet->catch_process1), HP_POP2(HP_pet_catch_process1), 3776 }, +{ HP_POP(pet->catch_process2), HP_POP2(HP_pet_catch_process2), 3778 }, +{ HP_POP(pet->get_egg), HP_POP2(HP_pet_get_egg), 3780 }, +{ HP_POP(pet->unequipitem), HP_POP2(HP_pet_unequipitem), 3782 }, +{ HP_POP(pet->food), HP_POP2(HP_pet_food), 3784 }, +{ HP_POP(pet->ai_sub_hard_lootsearch), HP_POP2(HP_pet_ai_sub_hard_lootsearch), 3786 }, +{ HP_POP(pet->menu), HP_POP2(HP_pet_menu), 3788 }, +{ HP_POP(pet->change_name), HP_POP2(HP_pet_change_name), 3790 }, +{ HP_POP(pet->change_name_ack), HP_POP2(HP_pet_change_name_ack), 3792 }, +{ HP_POP(pet->equipitem), HP_POP2(HP_pet_equipitem), 3794 }, +{ HP_POP(pet->randomwalk), HP_POP2(HP_pet_randomwalk), 3796 }, +{ HP_POP(pet->ai_sub_hard), HP_POP2(HP_pet_ai_sub_hard), 3798 }, +{ HP_POP(pet->ai_sub_foreachclient), HP_POP2(HP_pet_ai_sub_foreachclient), 3800 }, +{ HP_POP(pet->ai_hard), HP_POP2(HP_pet_ai_hard), 3802 }, +{ HP_POP(pet->delay_item_drop), HP_POP2(HP_pet_delay_item_drop), 3804 }, +{ HP_POP(pet->lootitem_drop), HP_POP2(HP_pet_lootitem_drop), 3806 }, +{ HP_POP(pet->skill_bonus_timer), HP_POP2(HP_pet_skill_bonus_timer), 3808 }, +{ HP_POP(pet->recovery_timer), HP_POP2(HP_pet_recovery_timer), 3810 }, +{ HP_POP(pet->heal_timer), HP_POP2(HP_pet_heal_timer), 3812 }, +{ HP_POP(pet->skill_support_timer), HP_POP2(HP_pet_skill_support_timer), 3814 }, +{ HP_POP(pet->read_db), HP_POP2(HP_pet_read_db), 3816 }, /* quest */ -{ HP_POP(quest->init), HP_POP2(HP_quest_init), 3802 }, -{ HP_POP(quest->reload), HP_POP2(HP_quest_reload), 3804 }, -{ HP_POP(quest->search_db), HP_POP2(HP_quest_search_db), 3806 }, -{ HP_POP(quest->pc_login), HP_POP2(HP_quest_pc_login), 3808 }, -{ HP_POP(quest->add), HP_POP2(HP_quest_add), 3810 }, -{ HP_POP(quest->change), HP_POP2(HP_quest_change), 3812 }, -{ HP_POP(quest->delete), HP_POP2(HP_quest_delete), 3814 }, -{ HP_POP(quest->update_objective_sub), HP_POP2(HP_quest_update_objective_sub), 3816 }, -{ HP_POP(quest->update_objective), HP_POP2(HP_quest_update_objective), 3818 }, -{ HP_POP(quest->update_status), HP_POP2(HP_quest_update_status), 3820 }, -{ HP_POP(quest->check), HP_POP2(HP_quest_check), 3822 }, -{ HP_POP(quest->read_db), HP_POP2(HP_quest_read_db), 3824 }, +{ HP_POP(quest->init), HP_POP2(HP_quest_init), 3818 }, +{ HP_POP(quest->reload), HP_POP2(HP_quest_reload), 3820 }, +{ HP_POP(quest->search_db), HP_POP2(HP_quest_search_db), 3822 }, +{ HP_POP(quest->pc_login), HP_POP2(HP_quest_pc_login), 3824 }, +{ HP_POP(quest->add), HP_POP2(HP_quest_add), 3826 }, +{ HP_POP(quest->change), HP_POP2(HP_quest_change), 3828 }, +{ HP_POP(quest->delete), HP_POP2(HP_quest_delete), 3830 }, +{ HP_POP(quest->update_objective_sub), HP_POP2(HP_quest_update_objective_sub), 3832 }, +{ HP_POP(quest->update_objective), HP_POP2(HP_quest_update_objective), 3834 }, +{ HP_POP(quest->update_status), HP_POP2(HP_quest_update_status), 3836 }, +{ HP_POP(quest->check), HP_POP2(HP_quest_check), 3838 }, +{ HP_POP(quest->read_db), HP_POP2(HP_quest_read_db), 3840 }, /* script */ -{ HP_POP(script->init), HP_POP2(HP_script_init), 3826 }, -{ HP_POP(script->final), HP_POP2(HP_script_final), 3828 }, -{ HP_POP(script->reload), HP_POP2(HP_script_reload), 3830 }, -{ HP_POP(script->parse), HP_POP2(HP_script_parse), 3832 }, -{ HP_POP(script->parse_builtin), HP_POP2(HP_script_parse_builtin), 3834 }, -{ HP_POP(script->parse_subexpr), HP_POP2(HP_script_parse_subexpr), 3836 }, -{ HP_POP(script->skip_space), HP_POP2(HP_script_skip_space), 3838 }, -{ HP_POP(script->error), HP_POP2(HP_script_error), 3840 }, -{ HP_POP(script->warning), HP_POP2(HP_script_warning), 3842 }, -{ HP_POP(script->addScript), HP_POP2(HP_script_addScript), 3844 }, -{ HP_POP(script->conv_num), HP_POP2(HP_script_conv_num), 3846 }, -{ HP_POP(script->conv_str), HP_POP2(HP_script_conv_str), 3848 }, -{ HP_POP(script->rid2sd), HP_POP2(HP_script_rid2sd), 3850 }, -{ HP_POP(script->detach_rid), HP_POP2(HP_script_detach_rid), 3852 }, -{ HP_POP(script->push_val), HP_POP2(HP_script_push_val), 3854 }, -{ HP_POP(script->get_val), HP_POP2(HP_script_get_val), 3856 }, -{ HP_POP(script->get_val2), HP_POP2(HP_script_get_val2), 3858 }, -{ HP_POP(script->push_str), HP_POP2(HP_script_push_str), 3860 }, -{ HP_POP(script->push_copy), HP_POP2(HP_script_push_copy), 3862 }, -{ HP_POP(script->pop_stack), HP_POP2(HP_script_pop_stack), 3864 }, -{ HP_POP(script->set_constant), HP_POP2(HP_script_set_constant), 3866 }, -{ HP_POP(script->set_constant2), HP_POP2(HP_script_set_constant2), 3868 }, -{ HP_POP(script->set_constant_force), HP_POP2(HP_script_set_constant_force), 3870 }, -{ HP_POP(script->get_constant), HP_POP2(HP_script_get_constant), 3872 }, -{ HP_POP(script->label_add), HP_POP2(HP_script_label_add), 3874 }, -{ HP_POP(script->run), HP_POP2(HP_script_run), 3876 }, -{ HP_POP(script->run_main), HP_POP2(HP_script_run_main), 3878 }, -{ HP_POP(script->run_timer), HP_POP2(HP_script_run_timer), 3880 }, -{ HP_POP(script->set_var), HP_POP2(HP_script_set_var), 3882 }, -{ HP_POP(script->stop_instances), HP_POP2(HP_script_stop_instances), 3884 }, -{ HP_POP(script->free_code), HP_POP2(HP_script_free_code), 3886 }, -{ HP_POP(script->free_vars), HP_POP2(HP_script_free_vars), 3888 }, -{ HP_POP(script->alloc_state), HP_POP2(HP_script_alloc_state), 3890 }, -{ HP_POP(script->free_state), HP_POP2(HP_script_free_state), 3892 }, -{ HP_POP(script->run_autobonus), HP_POP2(HP_script_run_autobonus), 3894 }, -{ HP_POP(script->cleararray_pc), HP_POP2(HP_script_cleararray_pc), 3896 }, -{ HP_POP(script->setarray_pc), HP_POP2(HP_script_setarray_pc), 3898 }, -{ HP_POP(script->config_read), HP_POP2(HP_script_config_read), 3900 }, -{ HP_POP(script->add_str), HP_POP2(HP_script_add_str), 3902 }, -{ HP_POP(script->get_str), HP_POP2(HP_script_get_str), 3904 }, -{ HP_POP(script->search_str), HP_POP2(HP_script_search_str), 3906 }, -{ HP_POP(script->setd_sub), HP_POP2(HP_script_setd_sub), 3908 }, -{ HP_POP(script->attach_state), HP_POP2(HP_script_attach_state), 3910 }, -{ HP_POP(script->queue), HP_POP2(HP_script_queue), 3912 }, -{ HP_POP(script->queue_add), HP_POP2(HP_script_queue_add), 3914 }, -{ HP_POP(script->queue_del), HP_POP2(HP_script_queue_del), 3916 }, -{ HP_POP(script->queue_remove), HP_POP2(HP_script_queue_remove), 3918 }, -{ HP_POP(script->queue_create), HP_POP2(HP_script_queue_create), 3920 }, -{ HP_POP(script->queue_clear), HP_POP2(HP_script_queue_clear), 3922 }, -{ HP_POP(script->parse_curly_close), HP_POP2(HP_script_parse_curly_close), 3924 }, -{ HP_POP(script->parse_syntax_close), HP_POP2(HP_script_parse_syntax_close), 3926 }, -{ HP_POP(script->parse_syntax_close_sub), HP_POP2(HP_script_parse_syntax_close_sub), 3928 }, -{ HP_POP(script->parse_syntax), HP_POP2(HP_script_parse_syntax), 3930 }, -{ HP_POP(script->get_com), HP_POP2(HP_script_get_com), 3932 }, -{ HP_POP(script->get_num), HP_POP2(HP_script_get_num), 3934 }, -{ HP_POP(script->op2name), HP_POP2(HP_script_op2name), 3936 }, -{ HP_POP(script->reportsrc), HP_POP2(HP_script_reportsrc), 3938 }, -{ HP_POP(script->reportdata), HP_POP2(HP_script_reportdata), 3940 }, -{ HP_POP(script->reportfunc), HP_POP2(HP_script_reportfunc), 3942 }, -{ HP_POP(script->disp_error_message2), HP_POP2(HP_script_disp_error_message2), 3944 }, -{ HP_POP(script->disp_warning_message), HP_POP2(HP_script_disp_warning_message), 3946 }, -{ HP_POP(script->check_event), HP_POP2(HP_script_check_event), 3948 }, -{ HP_POP(script->calc_hash), HP_POP2(HP_script_calc_hash), 3950 }, -{ HP_POP(script->addb), HP_POP2(HP_script_addb), 3952 }, -{ HP_POP(script->addc), HP_POP2(HP_script_addc), 3954 }, -{ HP_POP(script->addi), HP_POP2(HP_script_addi), 3956 }, -{ HP_POP(script->addl), HP_POP2(HP_script_addl), 3958 }, -{ HP_POP(script->set_label), HP_POP2(HP_script_set_label), 3960 }, -{ HP_POP(script->skip_word), HP_POP2(HP_script_skip_word), 3962 }, -{ HP_POP(script->add_word), HP_POP2(HP_script_add_word), 3964 }, -{ HP_POP(script->parse_callfunc), HP_POP2(HP_script_parse_callfunc), 3966 }, -{ HP_POP(script->parse_nextline), HP_POP2(HP_script_parse_nextline), 3968 }, -{ HP_POP(script->parse_variable), HP_POP2(HP_script_parse_variable), 3970 }, -{ HP_POP(script->parse_simpleexpr), HP_POP2(HP_script_parse_simpleexpr), 3972 }, -{ HP_POP(script->parse_expr), HP_POP2(HP_script_parse_expr), 3974 }, -{ HP_POP(script->parse_line), HP_POP2(HP_script_parse_line), 3976 }, -{ HP_POP(script->read_constdb), HP_POP2(HP_script_read_constdb), 3978 }, -{ HP_POP(script->print_line), HP_POP2(HP_script_print_line), 3980 }, -{ HP_POP(script->errorwarning_sub), HP_POP2(HP_script_errorwarning_sub), 3982 }, -{ HP_POP(script->set_reg), HP_POP2(HP_script_set_reg), 3984 }, -{ HP_POP(script->stack_expand), HP_POP2(HP_script_stack_expand), 3986 }, -{ HP_POP(script->push_retinfo), HP_POP2(HP_script_push_retinfo), 3988 }, -{ HP_POP(script->pop_val), HP_POP2(HP_script_pop_val), 3990 }, -{ HP_POP(script->op_3), HP_POP2(HP_script_op_3), 3992 }, -{ HP_POP(script->op_2str), HP_POP2(HP_script_op_2str), 3994 }, -{ HP_POP(script->op_2num), HP_POP2(HP_script_op_2num), 3996 }, -{ HP_POP(script->op_2), HP_POP2(HP_script_op_2), 3998 }, -{ HP_POP(script->op_1), HP_POP2(HP_script_op_1), 4000 }, -{ HP_POP(script->check_buildin_argtype), HP_POP2(HP_script_check_buildin_argtype), 4002 }, -{ HP_POP(script->detach_state), HP_POP2(HP_script_detach_state), 4004 }, -{ HP_POP(script->db_free_code_sub), HP_POP2(HP_script_db_free_code_sub), 4006 }, -{ HP_POP(script->add_autobonus), HP_POP2(HP_script_add_autobonus), 4008 }, -{ HP_POP(script->menu_countoptions), HP_POP2(HP_script_menu_countoptions), 4010 }, -{ HP_POP(script->buildin_areawarp_sub), HP_POP2(HP_script_buildin_areawarp_sub), 4012 }, -{ HP_POP(script->buildin_areapercentheal_sub), HP_POP2(HP_script_buildin_areapercentheal_sub), 4014 }, -{ HP_POP(script->getarraysize), HP_POP2(HP_script_getarraysize), 4016 }, -{ HP_POP(script->buildin_delitem_delete), HP_POP2(HP_script_buildin_delitem_delete), 4018 }, -{ HP_POP(script->buildin_delitem_search), HP_POP2(HP_script_buildin_delitem_search), 4020 }, -{ HP_POP(script->buildin_killmonster_sub_strip), HP_POP2(HP_script_buildin_killmonster_sub_strip), 4022 }, -{ HP_POP(script->buildin_killmonster_sub), HP_POP2(HP_script_buildin_killmonster_sub), 4024 }, -{ HP_POP(script->buildin_killmonsterall_sub_strip), HP_POP2(HP_script_buildin_killmonsterall_sub_strip), 4026 }, -{ HP_POP(script->buildin_killmonsterall_sub), HP_POP2(HP_script_buildin_killmonsterall_sub), 4028 }, -{ HP_POP(script->buildin_announce_sub), HP_POP2(HP_script_buildin_announce_sub), 4030 }, -{ HP_POP(script->buildin_getareausers_sub), HP_POP2(HP_script_buildin_getareausers_sub), 4032 }, -{ HP_POP(script->buildin_getareadropitem_sub), HP_POP2(HP_script_buildin_getareadropitem_sub), 4034 }, -{ HP_POP(script->mapflag_pvp_sub), HP_POP2(HP_script_mapflag_pvp_sub), 4036 }, -{ HP_POP(script->buildin_pvpoff_sub), HP_POP2(HP_script_buildin_pvpoff_sub), 4038 }, -{ HP_POP(script->buildin_maprespawnguildid_sub_pc), HP_POP2(HP_script_buildin_maprespawnguildid_sub_pc), 4040 }, -{ HP_POP(script->buildin_maprespawnguildid_sub_mob), HP_POP2(HP_script_buildin_maprespawnguildid_sub_mob), 4042 }, -{ HP_POP(script->buildin_mobcount_sub), HP_POP2(HP_script_buildin_mobcount_sub), 4044 }, -{ HP_POP(script->playBGM_sub), HP_POP2(HP_script_playBGM_sub), 4046 }, -{ HP_POP(script->playBGM_foreachpc_sub), HP_POP2(HP_script_playBGM_foreachpc_sub), 4048 }, -{ HP_POP(script->soundeffect_sub), HP_POP2(HP_script_soundeffect_sub), 4050 }, -{ HP_POP(script->buildin_query_sql_sub), HP_POP2(HP_script_buildin_query_sql_sub), 4052 }, -{ HP_POP(script->axtoi), HP_POP2(HP_script_axtoi), 4054 }, -{ HP_POP(script->buildin_instance_warpall_sub), HP_POP2(HP_script_buildin_instance_warpall_sub), 4056 }, -{ HP_POP(script->buildin_mobuseskill_sub), HP_POP2(HP_script_buildin_mobuseskill_sub), 4058 }, -{ HP_POP(script->cleanfloor_sub), HP_POP2(HP_script_cleanfloor_sub), 4060 }, -{ HP_POP(script->run_func), HP_POP2(HP_script_run_func), 4062 }, +{ HP_POP(script->init), HP_POP2(HP_script_init), 3842 }, +{ HP_POP(script->final), HP_POP2(HP_script_final), 3844 }, +{ HP_POP(script->reload), HP_POP2(HP_script_reload), 3846 }, +{ HP_POP(script->parse), HP_POP2(HP_script_parse), 3848 }, +{ HP_POP(script->parse_builtin), HP_POP2(HP_script_parse_builtin), 3850 }, +{ HP_POP(script->parse_subexpr), HP_POP2(HP_script_parse_subexpr), 3852 }, +{ HP_POP(script->skip_space), HP_POP2(HP_script_skip_space), 3854 }, +{ HP_POP(script->error), HP_POP2(HP_script_error), 3856 }, +{ HP_POP(script->warning), HP_POP2(HP_script_warning), 3858 }, +{ HP_POP(script->addScript), HP_POP2(HP_script_addScript), 3860 }, +{ HP_POP(script->conv_num), HP_POP2(HP_script_conv_num), 3862 }, +{ HP_POP(script->conv_str), HP_POP2(HP_script_conv_str), 3864 }, +{ HP_POP(script->rid2sd), HP_POP2(HP_script_rid2sd), 3866 }, +{ HP_POP(script->detach_rid), HP_POP2(HP_script_detach_rid), 3868 }, +{ HP_POP(script->push_val), HP_POP2(HP_script_push_val), 3870 }, +{ HP_POP(script->get_val), HP_POP2(HP_script_get_val), 3872 }, +{ HP_POP(script->get_val2), HP_POP2(HP_script_get_val2), 3874 }, +{ HP_POP(script->push_str), HP_POP2(HP_script_push_str), 3876 }, +{ HP_POP(script->push_copy), HP_POP2(HP_script_push_copy), 3878 }, +{ HP_POP(script->pop_stack), HP_POP2(HP_script_pop_stack), 3880 }, +{ HP_POP(script->set_constant), HP_POP2(HP_script_set_constant), 3882 }, +{ HP_POP(script->set_constant2), HP_POP2(HP_script_set_constant2), 3884 }, +{ HP_POP(script->set_constant_force), HP_POP2(HP_script_set_constant_force), 3886 }, +{ HP_POP(script->get_constant), HP_POP2(HP_script_get_constant), 3888 }, +{ HP_POP(script->label_add), HP_POP2(HP_script_label_add), 3890 }, +{ HP_POP(script->run), HP_POP2(HP_script_run), 3892 }, +{ HP_POP(script->run_main), HP_POP2(HP_script_run_main), 3894 }, +{ HP_POP(script->run_timer), HP_POP2(HP_script_run_timer), 3896 }, +{ HP_POP(script->set_var), HP_POP2(HP_script_set_var), 3898 }, +{ HP_POP(script->stop_instances), HP_POP2(HP_script_stop_instances), 3900 }, +{ HP_POP(script->free_code), HP_POP2(HP_script_free_code), 3902 }, +{ HP_POP(script->free_vars), HP_POP2(HP_script_free_vars), 3904 }, +{ HP_POP(script->alloc_state), HP_POP2(HP_script_alloc_state), 3906 }, +{ HP_POP(script->free_state), HP_POP2(HP_script_free_state), 3908 }, +{ HP_POP(script->run_autobonus), HP_POP2(HP_script_run_autobonus), 3910 }, +{ HP_POP(script->cleararray_pc), HP_POP2(HP_script_cleararray_pc), 3912 }, +{ HP_POP(script->setarray_pc), HP_POP2(HP_script_setarray_pc), 3914 }, +{ HP_POP(script->config_read), HP_POP2(HP_script_config_read), 3916 }, +{ HP_POP(script->add_str), HP_POP2(HP_script_add_str), 3918 }, +{ HP_POP(script->get_str), HP_POP2(HP_script_get_str), 3920 }, +{ HP_POP(script->search_str), HP_POP2(HP_script_search_str), 3922 }, +{ HP_POP(script->setd_sub), HP_POP2(HP_script_setd_sub), 3924 }, +{ HP_POP(script->attach_state), HP_POP2(HP_script_attach_state), 3926 }, +{ HP_POP(script->queue), HP_POP2(HP_script_queue), 3928 }, +{ HP_POP(script->queue_add), HP_POP2(HP_script_queue_add), 3930 }, +{ HP_POP(script->queue_del), HP_POP2(HP_script_queue_del), 3932 }, +{ HP_POP(script->queue_remove), HP_POP2(HP_script_queue_remove), 3934 }, +{ HP_POP(script->queue_create), HP_POP2(HP_script_queue_create), 3936 }, +{ HP_POP(script->queue_clear), HP_POP2(HP_script_queue_clear), 3938 }, +{ HP_POP(script->parse_curly_close), HP_POP2(HP_script_parse_curly_close), 3940 }, +{ HP_POP(script->parse_syntax_close), HP_POP2(HP_script_parse_syntax_close), 3942 }, +{ HP_POP(script->parse_syntax_close_sub), HP_POP2(HP_script_parse_syntax_close_sub), 3944 }, +{ HP_POP(script->parse_syntax), HP_POP2(HP_script_parse_syntax), 3946 }, +{ HP_POP(script->get_com), HP_POP2(HP_script_get_com), 3948 }, +{ HP_POP(script->get_num), HP_POP2(HP_script_get_num), 3950 }, +{ HP_POP(script->op2name), HP_POP2(HP_script_op2name), 3952 }, +{ HP_POP(script->reportsrc), HP_POP2(HP_script_reportsrc), 3954 }, +{ HP_POP(script->reportdata), HP_POP2(HP_script_reportdata), 3956 }, +{ HP_POP(script->reportfunc), HP_POP2(HP_script_reportfunc), 3958 }, +{ HP_POP(script->disp_error_message2), HP_POP2(HP_script_disp_error_message2), 3960 }, +{ HP_POP(script->disp_warning_message), HP_POP2(HP_script_disp_warning_message), 3962 }, +{ HP_POP(script->check_event), HP_POP2(HP_script_check_event), 3964 }, +{ HP_POP(script->calc_hash), HP_POP2(HP_script_calc_hash), 3966 }, +{ HP_POP(script->addb), HP_POP2(HP_script_addb), 3968 }, +{ HP_POP(script->addc), HP_POP2(HP_script_addc), 3970 }, +{ HP_POP(script->addi), HP_POP2(HP_script_addi), 3972 }, +{ HP_POP(script->addl), HP_POP2(HP_script_addl), 3974 }, +{ HP_POP(script->set_label), HP_POP2(HP_script_set_label), 3976 }, +{ HP_POP(script->skip_word), HP_POP2(HP_script_skip_word), 3978 }, +{ HP_POP(script->add_word), HP_POP2(HP_script_add_word), 3980 }, +{ HP_POP(script->parse_callfunc), HP_POP2(HP_script_parse_callfunc), 3982 }, +{ HP_POP(script->parse_nextline), HP_POP2(HP_script_parse_nextline), 3984 }, +{ HP_POP(script->parse_variable), HP_POP2(HP_script_parse_variable), 3986 }, +{ HP_POP(script->parse_simpleexpr), HP_POP2(HP_script_parse_simpleexpr), 3988 }, +{ HP_POP(script->parse_expr), HP_POP2(HP_script_parse_expr), 3990 }, +{ HP_POP(script->parse_line), HP_POP2(HP_script_parse_line), 3992 }, +{ HP_POP(script->read_constdb), HP_POP2(HP_script_read_constdb), 3994 }, +{ HP_POP(script->print_line), HP_POP2(HP_script_print_line), 3996 }, +{ HP_POP(script->errorwarning_sub), HP_POP2(HP_script_errorwarning_sub), 3998 }, +{ HP_POP(script->set_reg), HP_POP2(HP_script_set_reg), 4000 }, +{ HP_POP(script->stack_expand), HP_POP2(HP_script_stack_expand), 4002 }, +{ HP_POP(script->push_retinfo), HP_POP2(HP_script_push_retinfo), 4004 }, +{ HP_POP(script->pop_val), HP_POP2(HP_script_pop_val), 4006 }, +{ HP_POP(script->op_3), HP_POP2(HP_script_op_3), 4008 }, +{ HP_POP(script->op_2str), HP_POP2(HP_script_op_2str), 4010 }, +{ HP_POP(script->op_2num), HP_POP2(HP_script_op_2num), 4012 }, +{ HP_POP(script->op_2), HP_POP2(HP_script_op_2), 4014 }, +{ HP_POP(script->op_1), HP_POP2(HP_script_op_1), 4016 }, +{ HP_POP(script->check_buildin_argtype), HP_POP2(HP_script_check_buildin_argtype), 4018 }, +{ HP_POP(script->detach_state), HP_POP2(HP_script_detach_state), 4020 }, +{ HP_POP(script->db_free_code_sub), HP_POP2(HP_script_db_free_code_sub), 4022 }, +{ HP_POP(script->add_autobonus), HP_POP2(HP_script_add_autobonus), 4024 }, +{ HP_POP(script->menu_countoptions), HP_POP2(HP_script_menu_countoptions), 4026 }, +{ HP_POP(script->buildin_areawarp_sub), HP_POP2(HP_script_buildin_areawarp_sub), 4028 }, +{ HP_POP(script->buildin_areapercentheal_sub), HP_POP2(HP_script_buildin_areapercentheal_sub), 4030 }, +{ HP_POP(script->getarraysize), HP_POP2(HP_script_getarraysize), 4032 }, +{ HP_POP(script->buildin_delitem_delete), HP_POP2(HP_script_buildin_delitem_delete), 4034 }, +{ HP_POP(script->buildin_delitem_search), HP_POP2(HP_script_buildin_delitem_search), 4036 }, +{ HP_POP(script->buildin_killmonster_sub_strip), HP_POP2(HP_script_buildin_killmonster_sub_strip), 4038 }, +{ HP_POP(script->buildin_killmonster_sub), HP_POP2(HP_script_buildin_killmonster_sub), 4040 }, +{ HP_POP(script->buildin_killmonsterall_sub_strip), HP_POP2(HP_script_buildin_killmonsterall_sub_strip), 4042 }, +{ HP_POP(script->buildin_killmonsterall_sub), HP_POP2(HP_script_buildin_killmonsterall_sub), 4044 }, +{ HP_POP(script->buildin_announce_sub), HP_POP2(HP_script_buildin_announce_sub), 4046 }, +{ HP_POP(script->buildin_getareausers_sub), HP_POP2(HP_script_buildin_getareausers_sub), 4048 }, +{ HP_POP(script->buildin_getareadropitem_sub), HP_POP2(HP_script_buildin_getareadropitem_sub), 4050 }, +{ HP_POP(script->mapflag_pvp_sub), HP_POP2(HP_script_mapflag_pvp_sub), 4052 }, +{ HP_POP(script->buildin_pvpoff_sub), HP_POP2(HP_script_buildin_pvpoff_sub), 4054 }, +{ HP_POP(script->buildin_maprespawnguildid_sub_pc), HP_POP2(HP_script_buildin_maprespawnguildid_sub_pc), 4056 }, +{ HP_POP(script->buildin_maprespawnguildid_sub_mob), HP_POP2(HP_script_buildin_maprespawnguildid_sub_mob), 4058 }, +{ HP_POP(script->buildin_mobcount_sub), HP_POP2(HP_script_buildin_mobcount_sub), 4060 }, +{ HP_POP(script->playBGM_sub), HP_POP2(HP_script_playBGM_sub), 4062 }, +{ HP_POP(script->playBGM_foreachpc_sub), HP_POP2(HP_script_playBGM_foreachpc_sub), 4064 }, +{ HP_POP(script->soundeffect_sub), HP_POP2(HP_script_soundeffect_sub), 4066 }, +{ HP_POP(script->buildin_query_sql_sub), HP_POP2(HP_script_buildin_query_sql_sub), 4068 }, +{ HP_POP(script->axtoi), HP_POP2(HP_script_axtoi), 4070 }, +{ HP_POP(script->buildin_instance_warpall_sub), HP_POP2(HP_script_buildin_instance_warpall_sub), 4072 }, +{ HP_POP(script->buildin_mobuseskill_sub), HP_POP2(HP_script_buildin_mobuseskill_sub), 4074 }, +{ HP_POP(script->cleanfloor_sub), HP_POP2(HP_script_cleanfloor_sub), 4076 }, +{ HP_POP(script->run_func), HP_POP2(HP_script_run_func), 4078 }, /* searchstore */ -{ HP_POP(searchstore->open), HP_POP2(HP_searchstore_open), 4064 }, -{ HP_POP(searchstore->query), HP_POP2(HP_searchstore_query), 4066 }, -{ HP_POP(searchstore->querynext), HP_POP2(HP_searchstore_querynext), 4068 }, -{ HP_POP(searchstore->next), HP_POP2(HP_searchstore_next), 4070 }, -{ HP_POP(searchstore->clear), HP_POP2(HP_searchstore_clear), 4072 }, -{ HP_POP(searchstore->close), HP_POP2(HP_searchstore_close), 4074 }, -{ HP_POP(searchstore->click), HP_POP2(HP_searchstore_click), 4076 }, -{ HP_POP(searchstore->queryremote), HP_POP2(HP_searchstore_queryremote), 4078 }, -{ HP_POP(searchstore->clearremote), HP_POP2(HP_searchstore_clearremote), 4080 }, -{ HP_POP(searchstore->result), HP_POP2(HP_searchstore_result), 4082 }, +{ HP_POP(searchstore->open), HP_POP2(HP_searchstore_open), 4080 }, +{ HP_POP(searchstore->query), HP_POP2(HP_searchstore_query), 4082 }, +{ HP_POP(searchstore->querynext), HP_POP2(HP_searchstore_querynext), 4084 }, +{ HP_POP(searchstore->next), HP_POP2(HP_searchstore_next), 4086 }, +{ HP_POP(searchstore->clear), HP_POP2(HP_searchstore_clear), 4088 }, +{ HP_POP(searchstore->close), HP_POP2(HP_searchstore_close), 4090 }, +{ HP_POP(searchstore->click), HP_POP2(HP_searchstore_click), 4092 }, +{ HP_POP(searchstore->queryremote), HP_POP2(HP_searchstore_queryremote), 4094 }, +{ HP_POP(searchstore->clearremote), HP_POP2(HP_searchstore_clearremote), 4096 }, +{ HP_POP(searchstore->result), HP_POP2(HP_searchstore_result), 4098 }, /* skill */ -{ HP_POP(skill->init), HP_POP2(HP_skill_init), 4084 }, -{ HP_POP(skill->final), HP_POP2(HP_skill_final), 4086 }, -{ HP_POP(skill->reload), HP_POP2(HP_skill_reload), 4088 }, -{ HP_POP(skill->read_db), HP_POP2(HP_skill_read_db), 4090 }, -{ HP_POP(skill->get_index), HP_POP2(HP_skill_get_index), 4092 }, -{ HP_POP(skill->get_type), HP_POP2(HP_skill_get_type), 4094 }, -{ HP_POP(skill->get_hit), HP_POP2(HP_skill_get_hit), 4096 }, -{ HP_POP(skill->get_inf), HP_POP2(HP_skill_get_inf), 4098 }, -{ HP_POP(skill->get_ele), HP_POP2(HP_skill_get_ele), 4100 }, -{ HP_POP(skill->get_nk), HP_POP2(HP_skill_get_nk), 4102 }, -{ HP_POP(skill->get_max), HP_POP2(HP_skill_get_max), 4104 }, -{ HP_POP(skill->get_range), HP_POP2(HP_skill_get_range), 4106 }, -{ HP_POP(skill->get_range2), HP_POP2(HP_skill_get_range2), 4108 }, -{ HP_POP(skill->get_splash), HP_POP2(HP_skill_get_splash), 4110 }, -{ HP_POP(skill->get_hp), HP_POP2(HP_skill_get_hp), 4112 }, -{ HP_POP(skill->get_mhp), HP_POP2(HP_skill_get_mhp), 4114 }, -{ HP_POP(skill->get_sp), HP_POP2(HP_skill_get_sp), 4116 }, -{ HP_POP(skill->get_state), HP_POP2(HP_skill_get_state), 4118 }, -{ HP_POP(skill->get_spiritball), HP_POP2(HP_skill_get_spiritball), 4120 }, -{ HP_POP(skill->get_zeny), HP_POP2(HP_skill_get_zeny), 4122 }, -{ HP_POP(skill->get_num), HP_POP2(HP_skill_get_num), 4124 }, -{ HP_POP(skill->get_cast), HP_POP2(HP_skill_get_cast), 4126 }, -{ HP_POP(skill->get_delay), HP_POP2(HP_skill_get_delay), 4128 }, -{ HP_POP(skill->get_walkdelay), HP_POP2(HP_skill_get_walkdelay), 4130 }, -{ HP_POP(skill->get_time), HP_POP2(HP_skill_get_time), 4132 }, -{ HP_POP(skill->get_time2), HP_POP2(HP_skill_get_time2), 4134 }, -{ HP_POP(skill->get_castnodex), HP_POP2(HP_skill_get_castnodex), 4136 }, -{ HP_POP(skill->get_delaynodex), HP_POP2(HP_skill_get_delaynodex), 4138 }, -{ HP_POP(skill->get_castdef), HP_POP2(HP_skill_get_castdef), 4140 }, -{ HP_POP(skill->get_weapontype), HP_POP2(HP_skill_get_weapontype), 4142 }, -{ HP_POP(skill->get_ammotype), HP_POP2(HP_skill_get_ammotype), 4144 }, -{ HP_POP(skill->get_ammo_qty), HP_POP2(HP_skill_get_ammo_qty), 4146 }, -{ HP_POP(skill->get_unit_id), HP_POP2(HP_skill_get_unit_id), 4148 }, -{ HP_POP(skill->get_inf2), HP_POP2(HP_skill_get_inf2), 4150 }, -{ HP_POP(skill->get_castcancel), HP_POP2(HP_skill_get_castcancel), 4152 }, -{ HP_POP(skill->get_maxcount), HP_POP2(HP_skill_get_maxcount), 4154 }, -{ HP_POP(skill->get_blewcount), HP_POP2(HP_skill_get_blewcount), 4156 }, -{ HP_POP(skill->get_unit_flag), HP_POP2(HP_skill_get_unit_flag), 4158 }, -{ HP_POP(skill->get_unit_target), HP_POP2(HP_skill_get_unit_target), 4160 }, -{ HP_POP(skill->get_unit_interval), HP_POP2(HP_skill_get_unit_interval), 4162 }, -{ HP_POP(skill->get_unit_bl_target), HP_POP2(HP_skill_get_unit_bl_target), 4164 }, -{ HP_POP(skill->get_unit_layout_type), HP_POP2(HP_skill_get_unit_layout_type), 4166 }, -{ HP_POP(skill->get_unit_range), HP_POP2(HP_skill_get_unit_range), 4168 }, -{ HP_POP(skill->get_cooldown), HP_POP2(HP_skill_get_cooldown), 4170 }, -{ HP_POP(skill->tree_get_max), HP_POP2(HP_skill_tree_get_max), 4172 }, -{ HP_POP(skill->get_name), HP_POP2(HP_skill_get_name), 4174 }, -{ HP_POP(skill->get_desc), HP_POP2(HP_skill_get_desc), 4176 }, -{ HP_POP(skill->chk), HP_POP2(HP_skill_chk), 4178 }, -{ HP_POP(skill->get_casttype), HP_POP2(HP_skill_get_casttype), 4180 }, -{ HP_POP(skill->get_casttype2), HP_POP2(HP_skill_get_casttype2), 4182 }, -{ HP_POP(skill->name2id), HP_POP2(HP_skill_name2id), 4184 }, -{ HP_POP(skill->isammotype), HP_POP2(HP_skill_isammotype), 4186 }, -{ HP_POP(skill->castend_id), HP_POP2(HP_skill_castend_id), 4188 }, -{ HP_POP(skill->castend_pos), HP_POP2(HP_skill_castend_pos), 4190 }, -{ HP_POP(skill->castend_map), HP_POP2(HP_skill_castend_map), 4192 }, -{ HP_POP(skill->cleartimerskill), HP_POP2(HP_skill_cleartimerskill), 4194 }, -{ HP_POP(skill->addtimerskill), HP_POP2(HP_skill_addtimerskill), 4196 }, -{ HP_POP(skill->additional_effect), HP_POP2(HP_skill_additional_effect), 4198 }, -{ HP_POP(skill->counter_additional_effect), HP_POP2(HP_skill_counter_additional_effect), 4200 }, -{ HP_POP(skill->blown), HP_POP2(HP_skill_blown), 4202 }, -{ HP_POP(skill->break_equip), HP_POP2(HP_skill_break_equip), 4204 }, -{ HP_POP(skill->strip_equip), HP_POP2(HP_skill_strip_equip), 4206 }, -{ HP_POP(skill->id2group), HP_POP2(HP_skill_id2group), 4208 }, -{ HP_POP(skill->unitsetting), HP_POP2(HP_skill_unitsetting), 4210 }, -{ HP_POP(skill->initunit), HP_POP2(HP_skill_initunit), 4212 }, -{ HP_POP(skill->delunit), HP_POP2(HP_skill_delunit), 4214 }, -{ HP_POP(skill->init_unitgroup), HP_POP2(HP_skill_init_unitgroup), 4216 }, -{ HP_POP(skill->del_unitgroup), HP_POP2(HP_skill_del_unitgroup), 4218 }, -{ HP_POP(skill->clear_unitgroup), HP_POP2(HP_skill_clear_unitgroup), 4220 }, -{ HP_POP(skill->clear_group), HP_POP2(HP_skill_clear_group), 4222 }, -{ HP_POP(skill->unit_onplace), HP_POP2(HP_skill_unit_onplace), 4224 }, -{ HP_POP(skill->unit_ondamaged), HP_POP2(HP_skill_unit_ondamaged), 4226 }, -{ HP_POP(skill->cast_fix), HP_POP2(HP_skill_cast_fix), 4228 }, -{ HP_POP(skill->cast_fix_sc), HP_POP2(HP_skill_cast_fix_sc), 4230 }, -{ HP_POP(skill->vf_cast_fix), HP_POP2(HP_skill_vf_cast_fix), 4232 }, -{ HP_POP(skill->delay_fix), HP_POP2(HP_skill_delay_fix), 4234 }, -{ HP_POP(skill->check_condition_castbegin), HP_POP2(HP_skill_check_condition_castbegin), 4236 }, -{ HP_POP(skill->check_condition_castend), HP_POP2(HP_skill_check_condition_castend), 4238 }, -{ HP_POP(skill->consume_requirement), HP_POP2(HP_skill_consume_requirement), 4240 }, -{ HP_POP(skill->get_requirement), HP_POP2(HP_skill_get_requirement), 4242 }, -{ HP_POP(skill->check_pc_partner), HP_POP2(HP_skill_check_pc_partner), 4244 }, -{ HP_POP(skill->unit_move), HP_POP2(HP_skill_unit_move), 4246 }, -{ HP_POP(skill->unit_onleft), HP_POP2(HP_skill_unit_onleft), 4248 }, -{ HP_POP(skill->unit_onout), HP_POP2(HP_skill_unit_onout), 4250 }, -{ HP_POP(skill->unit_move_unit_group), HP_POP2(HP_skill_unit_move_unit_group), 4252 }, -{ HP_POP(skill->sit), HP_POP2(HP_skill_sit), 4254 }, -{ HP_POP(skill->brandishspear), HP_POP2(HP_skill_brandishspear), 4256 }, -{ HP_POP(skill->repairweapon), HP_POP2(HP_skill_repairweapon), 4258 }, -{ HP_POP(skill->identify), HP_POP2(HP_skill_identify), 4260 }, -{ HP_POP(skill->weaponrefine), HP_POP2(HP_skill_weaponrefine), 4262 }, -{ HP_POP(skill->autospell), HP_POP2(HP_skill_autospell), 4264 }, -{ HP_POP(skill->calc_heal), HP_POP2(HP_skill_calc_heal), 4266 }, -{ HP_POP(skill->check_cloaking), HP_POP2(HP_skill_check_cloaking), 4268 }, -{ HP_POP(skill->enchant_elemental_end), HP_POP2(HP_skill_enchant_elemental_end), 4270 }, -{ HP_POP(skill->not_ok), HP_POP2(HP_skill_not_ok), 4272 }, -{ HP_POP(skill->not_ok_hom), HP_POP2(HP_skill_not_ok_hom), 4274 }, -{ HP_POP(skill->not_ok_mercenary), HP_POP2(HP_skill_not_ok_mercenary), 4276 }, -{ HP_POP(skill->chastle_mob_changetarget), HP_POP2(HP_skill_chastle_mob_changetarget), 4278 }, -{ HP_POP(skill->can_produce_mix), HP_POP2(HP_skill_can_produce_mix), 4280 }, -{ HP_POP(skill->produce_mix), HP_POP2(HP_skill_produce_mix), 4282 }, -{ HP_POP(skill->arrow_create), HP_POP2(HP_skill_arrow_create), 4284 }, -{ HP_POP(skill->castend_nodamage_id), HP_POP2(HP_skill_castend_nodamage_id), 4286 }, -{ HP_POP(skill->castend_damage_id), HP_POP2(HP_skill_castend_damage_id), 4288 }, -{ HP_POP(skill->castend_pos2), HP_POP2(HP_skill_castend_pos2), 4290 }, -{ HP_POP(skill->blockpc_start), HP_POP2(HP_skill_blockpc_start), 4292 }, -{ HP_POP(skill->blockhomun_start), HP_POP2(HP_skill_blockhomun_start), 4294 }, -{ HP_POP(skill->blockmerc_start), HP_POP2(HP_skill_blockmerc_start), 4296 }, -{ HP_POP(skill->attack), HP_POP2(HP_skill_attack), 4298 }, -{ HP_POP(skill->attack_area), HP_POP2(HP_skill_attack_area), 4300 }, -{ HP_POP(skill->area_sub), HP_POP2(HP_skill_area_sub), 4302 }, -{ HP_POP(skill->area_sub_count), HP_POP2(HP_skill_area_sub_count), 4304 }, -{ HP_POP(skill->check_unit_range), HP_POP2(HP_skill_check_unit_range), 4306 }, -{ HP_POP(skill->check_unit_range_sub), HP_POP2(HP_skill_check_unit_range_sub), 4308 }, -{ HP_POP(skill->check_unit_range2), HP_POP2(HP_skill_check_unit_range2), 4310 }, -{ HP_POP(skill->check_unit_range2_sub), HP_POP2(HP_skill_check_unit_range2_sub), 4312 }, -{ HP_POP(skill->toggle_magicpower), HP_POP2(HP_skill_toggle_magicpower), 4314 }, -{ HP_POP(skill->magic_reflect), HP_POP2(HP_skill_magic_reflect), 4316 }, -{ HP_POP(skill->onskillusage), HP_POP2(HP_skill_onskillusage), 4318 }, -{ HP_POP(skill->cell_overlap), HP_POP2(HP_skill_cell_overlap), 4320 }, -{ HP_POP(skill->timerskill), HP_POP2(HP_skill_timerskill), 4322 }, -{ HP_POP(skill->trap_splash), HP_POP2(HP_skill_trap_splash), 4324 }, -{ HP_POP(skill->check_condition_mercenary), HP_POP2(HP_skill_check_condition_mercenary), 4326 }, -{ HP_POP(skill->locate_element_field), HP_POP2(HP_skill_locate_element_field), 4328 }, -{ HP_POP(skill->graffitiremover), HP_POP2(HP_skill_graffitiremover), 4330 }, -{ HP_POP(skill->activate_reverberation), HP_POP2(HP_skill_activate_reverberation), 4332 }, -{ HP_POP(skill->dance_overlap_sub), HP_POP2(HP_skill_dance_overlap_sub), 4334 }, -{ HP_POP(skill->dance_overlap), HP_POP2(HP_skill_dance_overlap), 4336 }, -{ HP_POP(skill->get_unit_layout), HP_POP2(HP_skill_get_unit_layout), 4338 }, -{ HP_POP(skill->frostjoke_scream), HP_POP2(HP_skill_frostjoke_scream), 4340 }, -{ HP_POP(skill->greed), HP_POP2(HP_skill_greed), 4342 }, -{ HP_POP(skill->destroy_trap), HP_POP2(HP_skill_destroy_trap), 4344 }, -{ HP_POP(skill->icewall_block), HP_POP2(HP_skill_icewall_block), 4346 }, -{ HP_POP(skill->unitgrouptickset_search), HP_POP2(HP_skill_unitgrouptickset_search), 4348 }, -{ HP_POP(skill->dance_switch), HP_POP2(HP_skill_dance_switch), 4350 }, -{ HP_POP(skill->check_condition_char_sub), HP_POP2(HP_skill_check_condition_char_sub), 4352 }, -{ HP_POP(skill->check_condition_mob_master_sub), HP_POP2(HP_skill_check_condition_mob_master_sub), 4354 }, -{ HP_POP(skill->brandishspear_first), HP_POP2(HP_skill_brandishspear_first), 4356 }, -{ HP_POP(skill->brandishspear_dir), HP_POP2(HP_skill_brandishspear_dir), 4358 }, -{ HP_POP(skill->get_fixed_cast), HP_POP2(HP_skill_get_fixed_cast), 4360 }, -{ HP_POP(skill->sit_count), HP_POP2(HP_skill_sit_count), 4362 }, -{ HP_POP(skill->sit_in), HP_POP2(HP_skill_sit_in), 4364 }, -{ HP_POP(skill->sit_out), HP_POP2(HP_skill_sit_out), 4366 }, -{ HP_POP(skill->unitsetmapcell), HP_POP2(HP_skill_unitsetmapcell), 4368 }, -{ HP_POP(skill->unit_onplace_timer), HP_POP2(HP_skill_unit_onplace_timer), 4370 }, -{ HP_POP(skill->unit_effect), HP_POP2(HP_skill_unit_effect), 4372 }, -{ HP_POP(skill->unit_timer_sub_onplace), HP_POP2(HP_skill_unit_timer_sub_onplace), 4374 }, -{ HP_POP(skill->unit_move_sub), HP_POP2(HP_skill_unit_move_sub), 4376 }, -{ HP_POP(skill->blockpc_end), HP_POP2(HP_skill_blockpc_end), 4378 }, -{ HP_POP(skill->blockhomun_end), HP_POP2(HP_skill_blockhomun_end), 4380 }, -{ HP_POP(skill->blockmerc_end), HP_POP2(HP_skill_blockmerc_end), 4382 }, -{ HP_POP(skill->split_atoi), HP_POP2(HP_skill_split_atoi), 4384 }, -{ HP_POP(skill->unit_timer), HP_POP2(HP_skill_unit_timer), 4386 }, -{ HP_POP(skill->unit_timer_sub), HP_POP2(HP_skill_unit_timer_sub), 4388 }, -{ HP_POP(skill->init_unit_layout), HP_POP2(HP_skill_init_unit_layout), 4390 }, -{ HP_POP(skill->parse_row_skilldb), HP_POP2(HP_skill_parse_row_skilldb), 4392 }, -{ HP_POP(skill->parse_row_requiredb), HP_POP2(HP_skill_parse_row_requiredb), 4394 }, -{ HP_POP(skill->parse_row_castdb), HP_POP2(HP_skill_parse_row_castdb), 4396 }, -{ HP_POP(skill->parse_row_castnodexdb), HP_POP2(HP_skill_parse_row_castnodexdb), 4398 }, -{ HP_POP(skill->parse_row_unitdb), HP_POP2(HP_skill_parse_row_unitdb), 4400 }, -{ HP_POP(skill->parse_row_producedb), HP_POP2(HP_skill_parse_row_producedb), 4402 }, -{ HP_POP(skill->parse_row_createarrowdb), HP_POP2(HP_skill_parse_row_createarrowdb), 4404 }, -{ HP_POP(skill->parse_row_abradb), HP_POP2(HP_skill_parse_row_abradb), 4406 }, -{ HP_POP(skill->parse_row_spellbookdb), HP_POP2(HP_skill_parse_row_spellbookdb), 4408 }, -{ HP_POP(skill->parse_row_magicmushroomdb), HP_POP2(HP_skill_parse_row_magicmushroomdb), 4410 }, -{ HP_POP(skill->parse_row_reproducedb), HP_POP2(HP_skill_parse_row_reproducedb), 4412 }, -{ HP_POP(skill->parse_row_improvisedb), HP_POP2(HP_skill_parse_row_improvisedb), 4414 }, -{ HP_POP(skill->parse_row_changematerialdb), HP_POP2(HP_skill_parse_row_changematerialdb), 4416 }, -{ HP_POP(skill->usave_add), HP_POP2(HP_skill_usave_add), 4418 }, -{ HP_POP(skill->usave_trigger), HP_POP2(HP_skill_usave_trigger), 4420 }, -{ HP_POP(skill->cooldown_load), HP_POP2(HP_skill_cooldown_load), 4422 }, -{ HP_POP(skill->spellbook), HP_POP2(HP_skill_spellbook), 4424 }, -{ HP_POP(skill->block_check), HP_POP2(HP_skill_block_check), 4426 }, -{ HP_POP(skill->detonator), HP_POP2(HP_skill_detonator), 4428 }, -{ HP_POP(skill->check_camouflage), HP_POP2(HP_skill_check_camouflage), 4430 }, -{ HP_POP(skill->magicdecoy), HP_POP2(HP_skill_magicdecoy), 4432 }, -{ HP_POP(skill->poisoningweapon), HP_POP2(HP_skill_poisoningweapon), 4434 }, -{ HP_POP(skill->select_menu), HP_POP2(HP_skill_select_menu), 4436 }, -{ HP_POP(skill->elementalanalysis), HP_POP2(HP_skill_elementalanalysis), 4438 }, -{ HP_POP(skill->changematerial), HP_POP2(HP_skill_changematerial), 4440 }, -{ HP_POP(skill->get_elemental_type), HP_POP2(HP_skill_get_elemental_type), 4442 }, -{ HP_POP(skill->cooldown_save), HP_POP2(HP_skill_cooldown_save), 4444 }, -{ HP_POP(skill->maelstrom_suction), HP_POP2(HP_skill_maelstrom_suction), 4446 }, -{ HP_POP(skill->get_new_group_id), HP_POP2(HP_skill_get_new_group_id), 4448 }, +{ HP_POP(skill->init), HP_POP2(HP_skill_init), 4100 }, +{ HP_POP(skill->final), HP_POP2(HP_skill_final), 4102 }, +{ HP_POP(skill->reload), HP_POP2(HP_skill_reload), 4104 }, +{ HP_POP(skill->read_db), HP_POP2(HP_skill_read_db), 4106 }, +{ HP_POP(skill->get_index), HP_POP2(HP_skill_get_index), 4108 }, +{ HP_POP(skill->get_type), HP_POP2(HP_skill_get_type), 4110 }, +{ HP_POP(skill->get_hit), HP_POP2(HP_skill_get_hit), 4112 }, +{ HP_POP(skill->get_inf), HP_POP2(HP_skill_get_inf), 4114 }, +{ HP_POP(skill->get_ele), HP_POP2(HP_skill_get_ele), 4116 }, +{ HP_POP(skill->get_nk), HP_POP2(HP_skill_get_nk), 4118 }, +{ HP_POP(skill->get_max), HP_POP2(HP_skill_get_max), 4120 }, +{ HP_POP(skill->get_range), HP_POP2(HP_skill_get_range), 4122 }, +{ HP_POP(skill->get_range2), HP_POP2(HP_skill_get_range2), 4124 }, +{ HP_POP(skill->get_splash), HP_POP2(HP_skill_get_splash), 4126 }, +{ HP_POP(skill->get_hp), HP_POP2(HP_skill_get_hp), 4128 }, +{ HP_POP(skill->get_mhp), HP_POP2(HP_skill_get_mhp), 4130 }, +{ HP_POP(skill->get_sp), HP_POP2(HP_skill_get_sp), 4132 }, +{ HP_POP(skill->get_state), HP_POP2(HP_skill_get_state), 4134 }, +{ HP_POP(skill->get_spiritball), HP_POP2(HP_skill_get_spiritball), 4136 }, +{ HP_POP(skill->get_zeny), HP_POP2(HP_skill_get_zeny), 4138 }, +{ HP_POP(skill->get_num), HP_POP2(HP_skill_get_num), 4140 }, +{ HP_POP(skill->get_cast), HP_POP2(HP_skill_get_cast), 4142 }, +{ HP_POP(skill->get_delay), HP_POP2(HP_skill_get_delay), 4144 }, +{ HP_POP(skill->get_walkdelay), HP_POP2(HP_skill_get_walkdelay), 4146 }, +{ HP_POP(skill->get_time), HP_POP2(HP_skill_get_time), 4148 }, +{ HP_POP(skill->get_time2), HP_POP2(HP_skill_get_time2), 4150 }, +{ HP_POP(skill->get_castnodex), HP_POP2(HP_skill_get_castnodex), 4152 }, +{ HP_POP(skill->get_delaynodex), HP_POP2(HP_skill_get_delaynodex), 4154 }, +{ HP_POP(skill->get_castdef), HP_POP2(HP_skill_get_castdef), 4156 }, +{ HP_POP(skill->get_weapontype), HP_POP2(HP_skill_get_weapontype), 4158 }, +{ HP_POP(skill->get_ammotype), HP_POP2(HP_skill_get_ammotype), 4160 }, +{ HP_POP(skill->get_ammo_qty), HP_POP2(HP_skill_get_ammo_qty), 4162 }, +{ HP_POP(skill->get_unit_id), HP_POP2(HP_skill_get_unit_id), 4164 }, +{ HP_POP(skill->get_inf2), HP_POP2(HP_skill_get_inf2), 4166 }, +{ HP_POP(skill->get_castcancel), HP_POP2(HP_skill_get_castcancel), 4168 }, +{ HP_POP(skill->get_maxcount), HP_POP2(HP_skill_get_maxcount), 4170 }, +{ HP_POP(skill->get_blewcount), HP_POP2(HP_skill_get_blewcount), 4172 }, +{ HP_POP(skill->get_unit_flag), HP_POP2(HP_skill_get_unit_flag), 4174 }, +{ HP_POP(skill->get_unit_target), HP_POP2(HP_skill_get_unit_target), 4176 }, +{ HP_POP(skill->get_unit_interval), HP_POP2(HP_skill_get_unit_interval), 4178 }, +{ HP_POP(skill->get_unit_bl_target), HP_POP2(HP_skill_get_unit_bl_target), 4180 }, +{ HP_POP(skill->get_unit_layout_type), HP_POP2(HP_skill_get_unit_layout_type), 4182 }, +{ HP_POP(skill->get_unit_range), HP_POP2(HP_skill_get_unit_range), 4184 }, +{ HP_POP(skill->get_cooldown), HP_POP2(HP_skill_get_cooldown), 4186 }, +{ HP_POP(skill->tree_get_max), HP_POP2(HP_skill_tree_get_max), 4188 }, +{ HP_POP(skill->get_name), HP_POP2(HP_skill_get_name), 4190 }, +{ HP_POP(skill->get_desc), HP_POP2(HP_skill_get_desc), 4192 }, +{ HP_POP(skill->chk), HP_POP2(HP_skill_chk), 4194 }, +{ HP_POP(skill->get_casttype), HP_POP2(HP_skill_get_casttype), 4196 }, +{ HP_POP(skill->get_casttype2), HP_POP2(HP_skill_get_casttype2), 4198 }, +{ HP_POP(skill->name2id), HP_POP2(HP_skill_name2id), 4200 }, +{ HP_POP(skill->isammotype), HP_POP2(HP_skill_isammotype), 4202 }, +{ HP_POP(skill->castend_id), HP_POP2(HP_skill_castend_id), 4204 }, +{ HP_POP(skill->castend_pos), HP_POP2(HP_skill_castend_pos), 4206 }, +{ HP_POP(skill->castend_map), HP_POP2(HP_skill_castend_map), 4208 }, +{ HP_POP(skill->cleartimerskill), HP_POP2(HP_skill_cleartimerskill), 4210 }, +{ HP_POP(skill->addtimerskill), HP_POP2(HP_skill_addtimerskill), 4212 }, +{ HP_POP(skill->additional_effect), HP_POP2(HP_skill_additional_effect), 4214 }, +{ HP_POP(skill->counter_additional_effect), HP_POP2(HP_skill_counter_additional_effect), 4216 }, +{ HP_POP(skill->blown), HP_POP2(HP_skill_blown), 4218 }, +{ HP_POP(skill->break_equip), HP_POP2(HP_skill_break_equip), 4220 }, +{ HP_POP(skill->strip_equip), HP_POP2(HP_skill_strip_equip), 4222 }, +{ HP_POP(skill->id2group), HP_POP2(HP_skill_id2group), 4224 }, +{ HP_POP(skill->unitsetting), HP_POP2(HP_skill_unitsetting), 4226 }, +{ HP_POP(skill->initunit), HP_POP2(HP_skill_initunit), 4228 }, +{ HP_POP(skill->delunit), HP_POP2(HP_skill_delunit), 4230 }, +{ HP_POP(skill->init_unitgroup), HP_POP2(HP_skill_init_unitgroup), 4232 }, +{ HP_POP(skill->del_unitgroup), HP_POP2(HP_skill_del_unitgroup), 4234 }, +{ HP_POP(skill->clear_unitgroup), HP_POP2(HP_skill_clear_unitgroup), 4236 }, +{ HP_POP(skill->clear_group), HP_POP2(HP_skill_clear_group), 4238 }, +{ HP_POP(skill->unit_onplace), HP_POP2(HP_skill_unit_onplace), 4240 }, +{ HP_POP(skill->unit_ondamaged), HP_POP2(HP_skill_unit_ondamaged), 4242 }, +{ HP_POP(skill->cast_fix), HP_POP2(HP_skill_cast_fix), 4244 }, +{ HP_POP(skill->cast_fix_sc), HP_POP2(HP_skill_cast_fix_sc), 4246 }, +{ HP_POP(skill->vf_cast_fix), HP_POP2(HP_skill_vf_cast_fix), 4248 }, +{ HP_POP(skill->delay_fix), HP_POP2(HP_skill_delay_fix), 4250 }, +{ HP_POP(skill->check_condition_castbegin), HP_POP2(HP_skill_check_condition_castbegin), 4252 }, +{ HP_POP(skill->check_condition_castend), HP_POP2(HP_skill_check_condition_castend), 4254 }, +{ HP_POP(skill->consume_requirement), HP_POP2(HP_skill_consume_requirement), 4256 }, +{ HP_POP(skill->get_requirement), HP_POP2(HP_skill_get_requirement), 4258 }, +{ HP_POP(skill->check_pc_partner), HP_POP2(HP_skill_check_pc_partner), 4260 }, +{ HP_POP(skill->unit_move), HP_POP2(HP_skill_unit_move), 4262 }, +{ HP_POP(skill->unit_onleft), HP_POP2(HP_skill_unit_onleft), 4264 }, +{ HP_POP(skill->unit_onout), HP_POP2(HP_skill_unit_onout), 4266 }, +{ HP_POP(skill->unit_move_unit_group), HP_POP2(HP_skill_unit_move_unit_group), 4268 }, +{ HP_POP(skill->sit), HP_POP2(HP_skill_sit), 4270 }, +{ HP_POP(skill->brandishspear), HP_POP2(HP_skill_brandishspear), 4272 }, +{ HP_POP(skill->repairweapon), HP_POP2(HP_skill_repairweapon), 4274 }, +{ HP_POP(skill->identify), HP_POP2(HP_skill_identify), 4276 }, +{ HP_POP(skill->weaponrefine), HP_POP2(HP_skill_weaponrefine), 4278 }, +{ HP_POP(skill->autospell), HP_POP2(HP_skill_autospell), 4280 }, +{ HP_POP(skill->calc_heal), HP_POP2(HP_skill_calc_heal), 4282 }, +{ HP_POP(skill->check_cloaking), HP_POP2(HP_skill_check_cloaking), 4284 }, +{ HP_POP(skill->enchant_elemental_end), HP_POP2(HP_skill_enchant_elemental_end), 4286 }, +{ HP_POP(skill->not_ok), HP_POP2(HP_skill_not_ok), 4288 }, +{ HP_POP(skill->not_ok_hom), HP_POP2(HP_skill_not_ok_hom), 4290 }, +{ HP_POP(skill->not_ok_mercenary), HP_POP2(HP_skill_not_ok_mercenary), 4292 }, +{ HP_POP(skill->chastle_mob_changetarget), HP_POP2(HP_skill_chastle_mob_changetarget), 4294 }, +{ HP_POP(skill->can_produce_mix), HP_POP2(HP_skill_can_produce_mix), 4296 }, +{ HP_POP(skill->produce_mix), HP_POP2(HP_skill_produce_mix), 4298 }, +{ HP_POP(skill->arrow_create), HP_POP2(HP_skill_arrow_create), 4300 }, +{ HP_POP(skill->castend_nodamage_id), HP_POP2(HP_skill_castend_nodamage_id), 4302 }, +{ HP_POP(skill->castend_damage_id), HP_POP2(HP_skill_castend_damage_id), 4304 }, +{ HP_POP(skill->castend_pos2), HP_POP2(HP_skill_castend_pos2), 4306 }, +{ HP_POP(skill->blockpc_start), HP_POP2(HP_skill_blockpc_start), 4308 }, +{ HP_POP(skill->blockhomun_start), HP_POP2(HP_skill_blockhomun_start), 4310 }, +{ HP_POP(skill->blockmerc_start), HP_POP2(HP_skill_blockmerc_start), 4312 }, +{ HP_POP(skill->attack), HP_POP2(HP_skill_attack), 4314 }, +{ HP_POP(skill->attack_area), HP_POP2(HP_skill_attack_area), 4316 }, +{ HP_POP(skill->area_sub), HP_POP2(HP_skill_area_sub), 4318 }, +{ HP_POP(skill->area_sub_count), HP_POP2(HP_skill_area_sub_count), 4320 }, +{ HP_POP(skill->check_unit_range), HP_POP2(HP_skill_check_unit_range), 4322 }, +{ HP_POP(skill->check_unit_range_sub), HP_POP2(HP_skill_check_unit_range_sub), 4324 }, +{ HP_POP(skill->check_unit_range2), HP_POP2(HP_skill_check_unit_range2), 4326 }, +{ HP_POP(skill->check_unit_range2_sub), HP_POP2(HP_skill_check_unit_range2_sub), 4328 }, +{ HP_POP(skill->toggle_magicpower), HP_POP2(HP_skill_toggle_magicpower), 4330 }, +{ HP_POP(skill->magic_reflect), HP_POP2(HP_skill_magic_reflect), 4332 }, +{ HP_POP(skill->onskillusage), HP_POP2(HP_skill_onskillusage), 4334 }, +{ HP_POP(skill->cell_overlap), HP_POP2(HP_skill_cell_overlap), 4336 }, +{ HP_POP(skill->timerskill), HP_POP2(HP_skill_timerskill), 4338 }, +{ HP_POP(skill->trap_splash), HP_POP2(HP_skill_trap_splash), 4340 }, +{ HP_POP(skill->check_condition_mercenary), HP_POP2(HP_skill_check_condition_mercenary), 4342 }, +{ HP_POP(skill->locate_element_field), HP_POP2(HP_skill_locate_element_field), 4344 }, +{ HP_POP(skill->graffitiremover), HP_POP2(HP_skill_graffitiremover), 4346 }, +{ HP_POP(skill->activate_reverberation), HP_POP2(HP_skill_activate_reverberation), 4348 }, +{ HP_POP(skill->dance_overlap_sub), HP_POP2(HP_skill_dance_overlap_sub), 4350 }, +{ HP_POP(skill->dance_overlap), HP_POP2(HP_skill_dance_overlap), 4352 }, +{ HP_POP(skill->get_unit_layout), HP_POP2(HP_skill_get_unit_layout), 4354 }, +{ HP_POP(skill->frostjoke_scream), HP_POP2(HP_skill_frostjoke_scream), 4356 }, +{ HP_POP(skill->greed), HP_POP2(HP_skill_greed), 4358 }, +{ HP_POP(skill->destroy_trap), HP_POP2(HP_skill_destroy_trap), 4360 }, +{ HP_POP(skill->icewall_block), HP_POP2(HP_skill_icewall_block), 4362 }, +{ HP_POP(skill->unitgrouptickset_search), HP_POP2(HP_skill_unitgrouptickset_search), 4364 }, +{ HP_POP(skill->dance_switch), HP_POP2(HP_skill_dance_switch), 4366 }, +{ HP_POP(skill->check_condition_char_sub), HP_POP2(HP_skill_check_condition_char_sub), 4368 }, +{ HP_POP(skill->check_condition_mob_master_sub), HP_POP2(HP_skill_check_condition_mob_master_sub), 4370 }, +{ HP_POP(skill->brandishspear_first), HP_POP2(HP_skill_brandishspear_first), 4372 }, +{ HP_POP(skill->brandishspear_dir), HP_POP2(HP_skill_brandishspear_dir), 4374 }, +{ HP_POP(skill->get_fixed_cast), HP_POP2(HP_skill_get_fixed_cast), 4376 }, +{ HP_POP(skill->sit_count), HP_POP2(HP_skill_sit_count), 4378 }, +{ HP_POP(skill->sit_in), HP_POP2(HP_skill_sit_in), 4380 }, +{ HP_POP(skill->sit_out), HP_POP2(HP_skill_sit_out), 4382 }, +{ HP_POP(skill->unitsetmapcell), HP_POP2(HP_skill_unitsetmapcell), 4384 }, +{ HP_POP(skill->unit_onplace_timer), HP_POP2(HP_skill_unit_onplace_timer), 4386 }, +{ HP_POP(skill->unit_effect), HP_POP2(HP_skill_unit_effect), 4388 }, +{ HP_POP(skill->unit_timer_sub_onplace), HP_POP2(HP_skill_unit_timer_sub_onplace), 4390 }, +{ HP_POP(skill->unit_move_sub), HP_POP2(HP_skill_unit_move_sub), 4392 }, +{ HP_POP(skill->blockpc_end), HP_POP2(HP_skill_blockpc_end), 4394 }, +{ HP_POP(skill->blockhomun_end), HP_POP2(HP_skill_blockhomun_end), 4396 }, +{ HP_POP(skill->blockmerc_end), HP_POP2(HP_skill_blockmerc_end), 4398 }, +{ HP_POP(skill->split_atoi), HP_POP2(HP_skill_split_atoi), 4400 }, +{ HP_POP(skill->unit_timer), HP_POP2(HP_skill_unit_timer), 4402 }, +{ HP_POP(skill->unit_timer_sub), HP_POP2(HP_skill_unit_timer_sub), 4404 }, +{ HP_POP(skill->init_unit_layout), HP_POP2(HP_skill_init_unit_layout), 4406 }, +{ HP_POP(skill->parse_row_skilldb), HP_POP2(HP_skill_parse_row_skilldb), 4408 }, +{ HP_POP(skill->parse_row_requiredb), HP_POP2(HP_skill_parse_row_requiredb), 4410 }, +{ HP_POP(skill->parse_row_castdb), HP_POP2(HP_skill_parse_row_castdb), 4412 }, +{ HP_POP(skill->parse_row_castnodexdb), HP_POP2(HP_skill_parse_row_castnodexdb), 4414 }, +{ HP_POP(skill->parse_row_unitdb), HP_POP2(HP_skill_parse_row_unitdb), 4416 }, +{ HP_POP(skill->parse_row_producedb), HP_POP2(HP_skill_parse_row_producedb), 4418 }, +{ HP_POP(skill->parse_row_createarrowdb), HP_POP2(HP_skill_parse_row_createarrowdb), 4420 }, +{ HP_POP(skill->parse_row_abradb), HP_POP2(HP_skill_parse_row_abradb), 4422 }, +{ HP_POP(skill->parse_row_spellbookdb), HP_POP2(HP_skill_parse_row_spellbookdb), 4424 }, +{ HP_POP(skill->parse_row_magicmushroomdb), HP_POP2(HP_skill_parse_row_magicmushroomdb), 4426 }, +{ HP_POP(skill->parse_row_reproducedb), HP_POP2(HP_skill_parse_row_reproducedb), 4428 }, +{ HP_POP(skill->parse_row_improvisedb), HP_POP2(HP_skill_parse_row_improvisedb), 4430 }, +{ HP_POP(skill->parse_row_changematerialdb), HP_POP2(HP_skill_parse_row_changematerialdb), 4432 }, +{ HP_POP(skill->usave_add), HP_POP2(HP_skill_usave_add), 4434 }, +{ HP_POP(skill->usave_trigger), HP_POP2(HP_skill_usave_trigger), 4436 }, +{ HP_POP(skill->cooldown_load), HP_POP2(HP_skill_cooldown_load), 4438 }, +{ HP_POP(skill->spellbook), HP_POP2(HP_skill_spellbook), 4440 }, +{ HP_POP(skill->block_check), HP_POP2(HP_skill_block_check), 4442 }, +{ HP_POP(skill->detonator), HP_POP2(HP_skill_detonator), 4444 }, +{ HP_POP(skill->check_camouflage), HP_POP2(HP_skill_check_camouflage), 4446 }, +{ HP_POP(skill->magicdecoy), HP_POP2(HP_skill_magicdecoy), 4448 }, +{ HP_POP(skill->poisoningweapon), HP_POP2(HP_skill_poisoningweapon), 4450 }, +{ HP_POP(skill->select_menu), HP_POP2(HP_skill_select_menu), 4452 }, +{ HP_POP(skill->elementalanalysis), HP_POP2(HP_skill_elementalanalysis), 4454 }, +{ HP_POP(skill->changematerial), HP_POP2(HP_skill_changematerial), 4456 }, +{ HP_POP(skill->get_elemental_type), HP_POP2(HP_skill_get_elemental_type), 4458 }, +{ HP_POP(skill->cooldown_save), HP_POP2(HP_skill_cooldown_save), 4460 }, +{ HP_POP(skill->maelstrom_suction), HP_POP2(HP_skill_maelstrom_suction), 4462 }, +{ HP_POP(skill->get_new_group_id), HP_POP2(HP_skill_get_new_group_id), 4464 }, /* status */ -{ HP_POP(status->init), HP_POP2(HP_status_init), 4450 }, -{ HP_POP(status->final), HP_POP2(HP_status_final), 4452 }, -{ HP_POP(status->get_refine_chance), HP_POP2(HP_status_get_refine_chance), 4454 }, -{ HP_POP(status->skill2sc), HP_POP2(HP_status_skill2sc), 4456 }, -{ HP_POP(status->sc2skill), HP_POP2(HP_status_sc2skill), 4458 }, -{ HP_POP(status->sc2scb_flag), HP_POP2(HP_status_sc2scb_flag), 4460 }, -{ HP_POP(status->type2relevant_bl_types), HP_POP2(HP_status_type2relevant_bl_types), 4462 }, -{ HP_POP(status->get_sc_type), HP_POP2(HP_status_get_sc_type), 4464 }, -{ HP_POP(status->damage), HP_POP2(HP_status_damage), 4466 }, -{ HP_POP(status->charge), HP_POP2(HP_status_charge), 4468 }, -{ HP_POP(status->percent_change), HP_POP2(HP_status_percent_change), 4470 }, -{ HP_POP(status->set_hp), HP_POP2(HP_status_set_hp), 4472 }, -{ HP_POP(status->set_sp), HP_POP2(HP_status_set_sp), 4474 }, -{ HP_POP(status->heal), HP_POP2(HP_status_heal), 4476 }, -{ HP_POP(status->revive), HP_POP2(HP_status_revive), 4478 }, -{ HP_POP(status->get_regen_data), HP_POP2(HP_status_get_regen_data), 4480 }, -{ HP_POP(status->get_status_data), HP_POP2(HP_status_get_status_data), 4482 }, -{ HP_POP(status->get_base_status), HP_POP2(HP_status_get_base_status), 4484 }, -{ HP_POP(status->get_name), HP_POP2(HP_status_get_name), 4486 }, -{ HP_POP(status->get_class), HP_POP2(HP_status_get_class), 4488 }, -{ HP_POP(status->get_lv), HP_POP2(HP_status_get_lv), 4490 }, -{ HP_POP(status->get_def), HP_POP2(HP_status_get_def), 4492 }, -{ HP_POP(status->get_speed), HP_POP2(HP_status_get_speed), 4494 }, -{ HP_POP(status->calc_attack_element), HP_POP2(HP_status_calc_attack_element), 4496 }, -{ HP_POP(status->get_party_id), HP_POP2(HP_status_get_party_id), 4498 }, -{ HP_POP(status->get_guild_id), HP_POP2(HP_status_get_guild_id), 4500 }, -{ HP_POP(status->get_emblem_id), HP_POP2(HP_status_get_emblem_id), 4502 }, -{ HP_POP(status->get_mexp), HP_POP2(HP_status_get_mexp), 4504 }, -{ HP_POP(status->get_race2), HP_POP2(HP_status_get_race2), 4506 }, -{ HP_POP(status->get_viewdata), HP_POP2(HP_status_get_viewdata), 4508 }, -{ HP_POP(status->set_viewdata), HP_POP2(HP_status_set_viewdata), 4510 }, -{ HP_POP(status->change_init), HP_POP2(HP_status_change_init), 4512 }, -{ HP_POP(status->get_sc), HP_POP2(HP_status_get_sc), 4514 }, -{ HP_POP(status->isdead), HP_POP2(HP_status_isdead), 4516 }, -{ HP_POP(status->isimmune), HP_POP2(HP_status_isimmune), 4518 }, -{ HP_POP(status->get_sc_def), HP_POP2(HP_status_get_sc_def), 4520 }, -{ HP_POP(status->change_start), HP_POP2(HP_status_change_start), 4522 }, -{ HP_POP(status->change_end_), HP_POP2(HP_status_change_end_), 4524 }, -{ HP_POP(status->kaahi_heal_timer), HP_POP2(HP_status_kaahi_heal_timer), 4526 }, -{ HP_POP(status->change_timer), HP_POP2(HP_status_change_timer), 4528 }, -{ HP_POP(status->change_timer_sub), HP_POP2(HP_status_change_timer_sub), 4530 }, -{ HP_POP(status->change_clear), HP_POP2(HP_status_change_clear), 4532 }, -{ HP_POP(status->change_clear_buffs), HP_POP2(HP_status_change_clear_buffs), 4534 }, -{ HP_POP(status->calc_bl_), HP_POP2(HP_status_calc_bl_), 4536 }, -{ HP_POP(status->calc_mob_), HP_POP2(HP_status_calc_mob_), 4538 }, -{ HP_POP(status->calc_pet_), HP_POP2(HP_status_calc_pet_), 4540 }, -{ HP_POP(status->calc_pc_), HP_POP2(HP_status_calc_pc_), 4542 }, -{ HP_POP(status->calc_homunculus_), HP_POP2(HP_status_calc_homunculus_), 4544 }, -{ HP_POP(status->calc_mercenary_), HP_POP2(HP_status_calc_mercenary_), 4546 }, -{ HP_POP(status->calc_elemental_), HP_POP2(HP_status_calc_elemental_), 4548 }, -{ HP_POP(status->calc_misc), HP_POP2(HP_status_calc_misc), 4550 }, -{ HP_POP(status->calc_regen), HP_POP2(HP_status_calc_regen), 4552 }, -{ HP_POP(status->calc_regen_rate), HP_POP2(HP_status_calc_regen_rate), 4554 }, -{ HP_POP(status->check_skilluse), HP_POP2(HP_status_check_skilluse), 4556 }, -{ HP_POP(status->check_visibility), HP_POP2(HP_status_check_visibility), 4558 }, -{ HP_POP(status->change_spread), HP_POP2(HP_status_change_spread), 4560 }, -{ HP_POP(status->calc_def), HP_POP2(HP_status_calc_def), 4562 }, -{ HP_POP(status->calc_def2), HP_POP2(HP_status_calc_def2), 4564 }, -{ HP_POP(status->calc_mdef), HP_POP2(HP_status_calc_mdef), 4566 }, -{ HP_POP(status->calc_mdef2), HP_POP2(HP_status_calc_mdef2), 4568 }, -{ HP_POP(status->calc_batk), HP_POP2(HP_status_calc_batk), 4570 }, -{ HP_POP(status->get_total_mdef), HP_POP2(HP_status_get_total_mdef), 4572 }, -{ HP_POP(status->get_total_def), HP_POP2(HP_status_get_total_def), 4574 }, -{ HP_POP(status->get_matk), HP_POP2(HP_status_get_matk), 4576 }, -{ HP_POP(status->readdb), HP_POP2(HP_status_readdb), 4578 }, -{ HP_POP(status->initChangeTables), HP_POP2(HP_status_initChangeTables), 4580 }, -{ HP_POP(status->initDummyData), HP_POP2(HP_status_initDummyData), 4582 }, -{ HP_POP(status->base_amotion_pc), HP_POP2(HP_status_base_amotion_pc), 4584 }, -{ HP_POP(status->base_atk), HP_POP2(HP_status_base_atk), 4586 }, -{ HP_POP(status->calc_sigma), HP_POP2(HP_status_calc_sigma), 4588 }, -{ HP_POP(status->base_pc_maxhp), HP_POP2(HP_status_base_pc_maxhp), 4590 }, -{ HP_POP(status->base_pc_maxsp), HP_POP2(HP_status_base_pc_maxsp), 4592 }, -{ HP_POP(status->calc_npc_), HP_POP2(HP_status_calc_npc_), 4594 }, -{ HP_POP(status->calc_str), HP_POP2(HP_status_calc_str), 4596 }, -{ HP_POP(status->calc_agi), HP_POP2(HP_status_calc_agi), 4598 }, -{ HP_POP(status->calc_vit), HP_POP2(HP_status_calc_vit), 4600 }, -{ HP_POP(status->calc_int), HP_POP2(HP_status_calc_int), 4602 }, -{ HP_POP(status->calc_dex), HP_POP2(HP_status_calc_dex), 4604 }, -{ HP_POP(status->calc_luk), HP_POP2(HP_status_calc_luk), 4606 }, -{ HP_POP(status->calc_watk), HP_POP2(HP_status_calc_watk), 4608 }, -{ HP_POP(status->calc_matk), HP_POP2(HP_status_calc_matk), 4610 }, -{ HP_POP(status->calc_hit), HP_POP2(HP_status_calc_hit), 4612 }, -{ HP_POP(status->calc_critical), HP_POP2(HP_status_calc_critical), 4614 }, -{ HP_POP(status->calc_flee), HP_POP2(HP_status_calc_flee), 4616 }, -{ HP_POP(status->calc_flee2), HP_POP2(HP_status_calc_flee2), 4618 }, -{ HP_POP(status->calc_speed), HP_POP2(HP_status_calc_speed), 4620 }, -{ HP_POP(status->calc_aspd_rate), HP_POP2(HP_status_calc_aspd_rate), 4622 }, -{ HP_POP(status->calc_dmotion), HP_POP2(HP_status_calc_dmotion), 4624 }, -{ HP_POP(status->calc_fix_aspd), HP_POP2(HP_status_calc_fix_aspd), 4626 }, -{ HP_POP(status->calc_maxhp), HP_POP2(HP_status_calc_maxhp), 4628 }, -{ HP_POP(status->calc_maxsp), HP_POP2(HP_status_calc_maxsp), 4630 }, -{ HP_POP(status->calc_element), HP_POP2(HP_status_calc_element), 4632 }, -{ HP_POP(status->calc_element_lv), HP_POP2(HP_status_calc_element_lv), 4634 }, -{ HP_POP(status->calc_mode), HP_POP2(HP_status_calc_mode), 4636 }, -{ HP_POP(status->calc_bl_main), HP_POP2(HP_status_calc_bl_main), 4638 }, -{ HP_POP(status->display_add), HP_POP2(HP_status_display_add), 4640 }, -{ HP_POP(status->display_remove), HP_POP2(HP_status_display_remove), 4642 }, -{ HP_POP(status->natural_heal), HP_POP2(HP_status_natural_heal), 4644 }, -{ HP_POP(status->natural_heal_timer), HP_POP2(HP_status_natural_heal_timer), 4646 }, -{ HP_POP(status->readdb_job1), HP_POP2(HP_status_readdb_job1), 4648 }, -{ HP_POP(status->readdb_job2), HP_POP2(HP_status_readdb_job2), 4650 }, -{ HP_POP(status->readdb_sizefix), HP_POP2(HP_status_readdb_sizefix), 4652 }, -{ HP_POP(status->readdb_refine), HP_POP2(HP_status_readdb_refine), 4654 }, -{ HP_POP(status->readdb_scconfig), HP_POP2(HP_status_readdb_scconfig), 4656 }, +{ HP_POP(status->init), HP_POP2(HP_status_init), 4466 }, +{ HP_POP(status->final), HP_POP2(HP_status_final), 4468 }, +{ HP_POP(status->get_refine_chance), HP_POP2(HP_status_get_refine_chance), 4470 }, +{ HP_POP(status->skill2sc), HP_POP2(HP_status_skill2sc), 4472 }, +{ HP_POP(status->sc2skill), HP_POP2(HP_status_sc2skill), 4474 }, +{ HP_POP(status->sc2scb_flag), HP_POP2(HP_status_sc2scb_flag), 4476 }, +{ HP_POP(status->type2relevant_bl_types), HP_POP2(HP_status_type2relevant_bl_types), 4478 }, +{ HP_POP(status->get_sc_type), HP_POP2(HP_status_get_sc_type), 4480 }, +{ HP_POP(status->damage), HP_POP2(HP_status_damage), 4482 }, +{ HP_POP(status->charge), HP_POP2(HP_status_charge), 4484 }, +{ HP_POP(status->percent_change), HP_POP2(HP_status_percent_change), 4486 }, +{ HP_POP(status->set_hp), HP_POP2(HP_status_set_hp), 4488 }, +{ HP_POP(status->set_sp), HP_POP2(HP_status_set_sp), 4490 }, +{ HP_POP(status->heal), HP_POP2(HP_status_heal), 4492 }, +{ HP_POP(status->revive), HP_POP2(HP_status_revive), 4494 }, +{ HP_POP(status->get_regen_data), HP_POP2(HP_status_get_regen_data), 4496 }, +{ HP_POP(status->get_status_data), HP_POP2(HP_status_get_status_data), 4498 }, +{ HP_POP(status->get_base_status), HP_POP2(HP_status_get_base_status), 4500 }, +{ HP_POP(status->get_name), HP_POP2(HP_status_get_name), 4502 }, +{ HP_POP(status->get_class), HP_POP2(HP_status_get_class), 4504 }, +{ HP_POP(status->get_lv), HP_POP2(HP_status_get_lv), 4506 }, +{ HP_POP(status->get_def), HP_POP2(HP_status_get_def), 4508 }, +{ HP_POP(status->get_speed), HP_POP2(HP_status_get_speed), 4510 }, +{ HP_POP(status->calc_attack_element), HP_POP2(HP_status_calc_attack_element), 4512 }, +{ HP_POP(status->get_party_id), HP_POP2(HP_status_get_party_id), 4514 }, +{ HP_POP(status->get_guild_id), HP_POP2(HP_status_get_guild_id), 4516 }, +{ HP_POP(status->get_emblem_id), HP_POP2(HP_status_get_emblem_id), 4518 }, +{ HP_POP(status->get_mexp), HP_POP2(HP_status_get_mexp), 4520 }, +{ HP_POP(status->get_race2), HP_POP2(HP_status_get_race2), 4522 }, +{ HP_POP(status->get_viewdata), HP_POP2(HP_status_get_viewdata), 4524 }, +{ HP_POP(status->set_viewdata), HP_POP2(HP_status_set_viewdata), 4526 }, +{ HP_POP(status->change_init), HP_POP2(HP_status_change_init), 4528 }, +{ HP_POP(status->get_sc), HP_POP2(HP_status_get_sc), 4530 }, +{ HP_POP(status->isdead), HP_POP2(HP_status_isdead), 4532 }, +{ HP_POP(status->isimmune), HP_POP2(HP_status_isimmune), 4534 }, +{ HP_POP(status->get_sc_def), HP_POP2(HP_status_get_sc_def), 4536 }, +{ HP_POP(status->change_start), HP_POP2(HP_status_change_start), 4538 }, +{ HP_POP(status->change_end_), HP_POP2(HP_status_change_end_), 4540 }, +{ HP_POP(status->kaahi_heal_timer), HP_POP2(HP_status_kaahi_heal_timer), 4542 }, +{ HP_POP(status->change_timer), HP_POP2(HP_status_change_timer), 4544 }, +{ HP_POP(status->change_timer_sub), HP_POP2(HP_status_change_timer_sub), 4546 }, +{ HP_POP(status->change_clear), HP_POP2(HP_status_change_clear), 4548 }, +{ HP_POP(status->change_clear_buffs), HP_POP2(HP_status_change_clear_buffs), 4550 }, +{ HP_POP(status->calc_bl_), HP_POP2(HP_status_calc_bl_), 4552 }, +{ HP_POP(status->calc_mob_), HP_POP2(HP_status_calc_mob_), 4554 }, +{ HP_POP(status->calc_pet_), HP_POP2(HP_status_calc_pet_), 4556 }, +{ HP_POP(status->calc_pc_), HP_POP2(HP_status_calc_pc_), 4558 }, +{ HP_POP(status->calc_homunculus_), HP_POP2(HP_status_calc_homunculus_), 4560 }, +{ HP_POP(status->calc_mercenary_), HP_POP2(HP_status_calc_mercenary_), 4562 }, +{ HP_POP(status->calc_elemental_), HP_POP2(HP_status_calc_elemental_), 4564 }, +{ HP_POP(status->calc_misc), HP_POP2(HP_status_calc_misc), 4566 }, +{ HP_POP(status->calc_regen), HP_POP2(HP_status_calc_regen), 4568 }, +{ HP_POP(status->calc_regen_rate), HP_POP2(HP_status_calc_regen_rate), 4570 }, +{ HP_POP(status->check_skilluse), HP_POP2(HP_status_check_skilluse), 4572 }, +{ HP_POP(status->check_visibility), HP_POP2(HP_status_check_visibility), 4574 }, +{ HP_POP(status->change_spread), HP_POP2(HP_status_change_spread), 4576 }, +{ HP_POP(status->calc_def), HP_POP2(HP_status_calc_def), 4578 }, +{ HP_POP(status->calc_def2), HP_POP2(HP_status_calc_def2), 4580 }, +{ HP_POP(status->calc_mdef), HP_POP2(HP_status_calc_mdef), 4582 }, +{ HP_POP(status->calc_mdef2), HP_POP2(HP_status_calc_mdef2), 4584 }, +{ HP_POP(status->calc_batk), HP_POP2(HP_status_calc_batk), 4586 }, +{ HP_POP(status->base_matk), HP_POP2(HP_status_base_matk), 4588 }, +{ HP_POP(status->get_weapon_atk), HP_POP2(HP_status_get_weapon_atk), 4590 }, +{ HP_POP(status->get_total_mdef), HP_POP2(HP_status_get_total_mdef), 4592 }, +{ HP_POP(status->get_total_def), HP_POP2(HP_status_get_total_def), 4594 }, +{ HP_POP(status->get_matk), HP_POP2(HP_status_get_matk), 4596 }, +{ HP_POP(status->readdb), HP_POP2(HP_status_readdb), 4598 }, +{ HP_POP(status->initChangeTables), HP_POP2(HP_status_initChangeTables), 4600 }, +{ HP_POP(status->initDummyData), HP_POP2(HP_status_initDummyData), 4602 }, +{ HP_POP(status->base_amotion_pc), HP_POP2(HP_status_base_amotion_pc), 4604 }, +{ HP_POP(status->base_atk), HP_POP2(HP_status_base_atk), 4606 }, +{ HP_POP(status->calc_sigma), HP_POP2(HP_status_calc_sigma), 4608 }, +{ HP_POP(status->base_pc_maxhp), HP_POP2(HP_status_base_pc_maxhp), 4610 }, +{ HP_POP(status->base_pc_maxsp), HP_POP2(HP_status_base_pc_maxsp), 4612 }, +{ HP_POP(status->calc_npc_), HP_POP2(HP_status_calc_npc_), 4614 }, +{ HP_POP(status->calc_str), HP_POP2(HP_status_calc_str), 4616 }, +{ HP_POP(status->calc_agi), HP_POP2(HP_status_calc_agi), 4618 }, +{ HP_POP(status->calc_vit), HP_POP2(HP_status_calc_vit), 4620 }, +{ HP_POP(status->calc_int), HP_POP2(HP_status_calc_int), 4622 }, +{ HP_POP(status->calc_dex), HP_POP2(HP_status_calc_dex), 4624 }, +{ HP_POP(status->calc_luk), HP_POP2(HP_status_calc_luk), 4626 }, +{ HP_POP(status->calc_watk), HP_POP2(HP_status_calc_watk), 4628 }, +{ HP_POP(status->calc_matk), HP_POP2(HP_status_calc_matk), 4630 }, +{ HP_POP(status->calc_hit), HP_POP2(HP_status_calc_hit), 4632 }, +{ HP_POP(status->calc_critical), HP_POP2(HP_status_calc_critical), 4634 }, +{ HP_POP(status->calc_flee), HP_POP2(HP_status_calc_flee), 4636 }, +{ HP_POP(status->calc_flee2), HP_POP2(HP_status_calc_flee2), 4638 }, +{ HP_POP(status->calc_speed), HP_POP2(HP_status_calc_speed), 4640 }, +{ HP_POP(status->calc_aspd_rate), HP_POP2(HP_status_calc_aspd_rate), 4642 }, +{ HP_POP(status->calc_dmotion), HP_POP2(HP_status_calc_dmotion), 4644 }, +{ HP_POP(status->calc_aspd), HP_POP2(HP_status_calc_aspd), 4646 }, +{ HP_POP(status->calc_fix_aspd), HP_POP2(HP_status_calc_fix_aspd), 4648 }, +{ HP_POP(status->calc_maxhp), HP_POP2(HP_status_calc_maxhp), 4650 }, +{ HP_POP(status->calc_maxsp), HP_POP2(HP_status_calc_maxsp), 4652 }, +{ HP_POP(status->calc_element), HP_POP2(HP_status_calc_element), 4654 }, +{ HP_POP(status->calc_element_lv), HP_POP2(HP_status_calc_element_lv), 4656 }, +{ HP_POP(status->calc_mode), HP_POP2(HP_status_calc_mode), 4658 }, +{ HP_POP(status->calc_ematk), HP_POP2(HP_status_calc_ematk), 4660 }, +{ HP_POP(status->calc_bl_main), HP_POP2(HP_status_calc_bl_main), 4662 }, +{ HP_POP(status->display_add), HP_POP2(HP_status_display_add), 4664 }, +{ HP_POP(status->display_remove), HP_POP2(HP_status_display_remove), 4666 }, +{ HP_POP(status->natural_heal), HP_POP2(HP_status_natural_heal), 4668 }, +{ HP_POP(status->natural_heal_timer), HP_POP2(HP_status_natural_heal_timer), 4670 }, +{ HP_POP(status->readdb_job1), HP_POP2(HP_status_readdb_job1), 4672 }, +{ HP_POP(status->readdb_job2), HP_POP2(HP_status_readdb_job2), 4674 }, +{ HP_POP(status->readdb_sizefix), HP_POP2(HP_status_readdb_sizefix), 4676 }, +{ HP_POP(status->readdb_refine), HP_POP2(HP_status_readdb_refine), 4678 }, +{ HP_POP(status->readdb_scconfig), HP_POP2(HP_status_readdb_scconfig), 4680 }, /* storage */ -{ HP_POP(storage->reconnect), HP_POP2(HP_storage_reconnect), 4658 }, -{ HP_POP(storage->delitem), HP_POP2(HP_storage_delitem), 4660 }, -{ HP_POP(storage->open), HP_POP2(HP_storage_open), 4662 }, -{ HP_POP(storage->add), HP_POP2(HP_storage_add), 4664 }, -{ HP_POP(storage->get), HP_POP2(HP_storage_get), 4666 }, -{ HP_POP(storage->additem), HP_POP2(HP_storage_additem), 4668 }, -{ HP_POP(storage->addfromcart), HP_POP2(HP_storage_addfromcart), 4670 }, -{ HP_POP(storage->gettocart), HP_POP2(HP_storage_gettocart), 4672 }, -{ HP_POP(storage->close), HP_POP2(HP_storage_close), 4674 }, -{ HP_POP(storage->pc_quit), HP_POP2(HP_storage_pc_quit), 4676 }, -{ HP_POP(storage->comp_item), HP_POP2(HP_storage_comp_item), 4678 }, -{ HP_POP(storage->sortitem), HP_POP2(HP_storage_sortitem), 4680 }, -{ HP_POP(storage->reconnect_sub), HP_POP2(HP_storage_reconnect_sub), 4682 }, +{ HP_POP(storage->reconnect), HP_POP2(HP_storage_reconnect), 4682 }, +{ HP_POP(storage->delitem), HP_POP2(HP_storage_delitem), 4684 }, +{ HP_POP(storage->open), HP_POP2(HP_storage_open), 4686 }, +{ HP_POP(storage->add), HP_POP2(HP_storage_add), 4688 }, +{ HP_POP(storage->get), HP_POP2(HP_storage_get), 4690 }, +{ HP_POP(storage->additem), HP_POP2(HP_storage_additem), 4692 }, +{ HP_POP(storage->addfromcart), HP_POP2(HP_storage_addfromcart), 4694 }, +{ HP_POP(storage->gettocart), HP_POP2(HP_storage_gettocart), 4696 }, +{ HP_POP(storage->close), HP_POP2(HP_storage_close), 4698 }, +{ HP_POP(storage->pc_quit), HP_POP2(HP_storage_pc_quit), 4700 }, +{ HP_POP(storage->comp_item), HP_POP2(HP_storage_comp_item), 4702 }, +{ HP_POP(storage->sortitem), HP_POP2(HP_storage_sortitem), 4704 }, +{ HP_POP(storage->reconnect_sub), HP_POP2(HP_storage_reconnect_sub), 4706 }, /* trade */ -{ HP_POP(trade->request), HP_POP2(HP_trade_request), 4684 }, -{ HP_POP(trade->ack), HP_POP2(HP_trade_ack), 4686 }, -{ HP_POP(trade->check_impossible), HP_POP2(HP_trade_check_impossible), 4688 }, -{ HP_POP(trade->check), HP_POP2(HP_trade_check), 4690 }, -{ HP_POP(trade->additem), HP_POP2(HP_trade_additem), 4692 }, -{ HP_POP(trade->addzeny), HP_POP2(HP_trade_addzeny), 4694 }, -{ HP_POP(trade->ok), HP_POP2(HP_trade_ok), 4696 }, -{ HP_POP(trade->cancel), HP_POP2(HP_trade_cancel), 4698 }, -{ HP_POP(trade->commit), HP_POP2(HP_trade_commit), 4700 }, +{ HP_POP(trade->request), HP_POP2(HP_trade_request), 4708 }, +{ HP_POP(trade->ack), HP_POP2(HP_trade_ack), 4710 }, +{ HP_POP(trade->check_impossible), HP_POP2(HP_trade_check_impossible), 4712 }, +{ HP_POP(trade->check), HP_POP2(HP_trade_check), 4714 }, +{ HP_POP(trade->additem), HP_POP2(HP_trade_additem), 4716 }, +{ HP_POP(trade->addzeny), HP_POP2(HP_trade_addzeny), 4718 }, +{ HP_POP(trade->ok), HP_POP2(HP_trade_ok), 4720 }, +{ HP_POP(trade->cancel), HP_POP2(HP_trade_cancel), 4722 }, +{ HP_POP(trade->commit), HP_POP2(HP_trade_commit), 4724 }, /* unit */ -{ HP_POP(unit->init), HP_POP2(HP_unit_init), 4702 }, -{ HP_POP(unit->final), HP_POP2(HP_unit_final), 4704 }, -{ HP_POP(unit->bl2ud), HP_POP2(HP_unit_bl2ud), 4706 }, -{ HP_POP(unit->bl2ud2), HP_POP2(HP_unit_bl2ud2), 4708 }, -{ HP_POP(unit->attack_timer), HP_POP2(HP_unit_attack_timer), 4710 }, -{ HP_POP(unit->walktoxy_timer), HP_POP2(HP_unit_walktoxy_timer), 4712 }, -{ HP_POP(unit->walktoxy_sub), HP_POP2(HP_unit_walktoxy_sub), 4714 }, -{ HP_POP(unit->delay_walktoxy_timer), HP_POP2(HP_unit_delay_walktoxy_timer), 4716 }, -{ HP_POP(unit->walktoxy), HP_POP2(HP_unit_walktoxy), 4718 }, -{ HP_POP(unit->walktobl_sub), HP_POP2(HP_unit_walktobl_sub), 4720 }, -{ HP_POP(unit->walktobl), HP_POP2(HP_unit_walktobl), 4722 }, -{ HP_POP(unit->run), HP_POP2(HP_unit_run), 4724 }, -{ HP_POP(unit->wugdash), HP_POP2(HP_unit_wugdash), 4726 }, -{ HP_POP(unit->escape), HP_POP2(HP_unit_escape), 4728 }, -{ HP_POP(unit->movepos), HP_POP2(HP_unit_movepos), 4730 }, -{ HP_POP(unit->setdir), HP_POP2(HP_unit_setdir), 4732 }, -{ HP_POP(unit->getdir), HP_POP2(HP_unit_getdir), 4734 }, -{ HP_POP(unit->blown), HP_POP2(HP_unit_blown), 4736 }, -{ HP_POP(unit->warp), HP_POP2(HP_unit_warp), 4738 }, -{ HP_POP(unit->stop_walking), HP_POP2(HP_unit_stop_walking), 4740 }, -{ HP_POP(unit->skilluse_id), HP_POP2(HP_unit_skilluse_id), 4742 }, -{ HP_POP(unit->is_walking), HP_POP2(HP_unit_is_walking), 4744 }, -{ HP_POP(unit->can_move), HP_POP2(HP_unit_can_move), 4746 }, -{ HP_POP(unit->resume_running), HP_POP2(HP_unit_resume_running), 4748 }, -{ HP_POP(unit->set_walkdelay), HP_POP2(HP_unit_set_walkdelay), 4750 }, -{ HP_POP(unit->skilluse_id2), HP_POP2(HP_unit_skilluse_id2), 4752 }, -{ HP_POP(unit->skilluse_pos), HP_POP2(HP_unit_skilluse_pos), 4754 }, -{ HP_POP(unit->skilluse_pos2), HP_POP2(HP_unit_skilluse_pos2), 4756 }, -{ HP_POP(unit->set_target), HP_POP2(HP_unit_set_target), 4758 }, -{ HP_POP(unit->stop_attack), HP_POP2(HP_unit_stop_attack), 4760 }, -{ HP_POP(unit->unattackable), HP_POP2(HP_unit_unattackable), 4762 }, -{ HP_POP(unit->attack), HP_POP2(HP_unit_attack), 4764 }, -{ HP_POP(unit->cancel_combo), HP_POP2(HP_unit_cancel_combo), 4766 }, -{ HP_POP(unit->can_reach_pos), HP_POP2(HP_unit_can_reach_pos), 4768 }, -{ HP_POP(unit->can_reach_bl), HP_POP2(HP_unit_can_reach_bl), 4770 }, -{ HP_POP(unit->calc_pos), HP_POP2(HP_unit_calc_pos), 4772 }, -{ HP_POP(unit->attack_timer_sub), HP_POP2(HP_unit_attack_timer_sub), 4774 }, -{ HP_POP(unit->skillcastcancel), HP_POP2(HP_unit_skillcastcancel), 4776 }, -{ HP_POP(unit->dataset), HP_POP2(HP_unit_dataset), 4778 }, -{ HP_POP(unit->counttargeted), HP_POP2(HP_unit_counttargeted), 4780 }, -{ HP_POP(unit->fixdamage), HP_POP2(HP_unit_fixdamage), 4782 }, -{ HP_POP(unit->changeviewsize), HP_POP2(HP_unit_changeviewsize), 4784 }, -{ HP_POP(unit->remove_map), HP_POP2(HP_unit_remove_map), 4786 }, -{ HP_POP(unit->remove_map_pc), HP_POP2(HP_unit_remove_map_pc), 4788 }, -{ HP_POP(unit->free_pc), HP_POP2(HP_unit_free_pc), 4790 }, -{ HP_POP(unit->free), HP_POP2(HP_unit_free), 4792 }, +{ HP_POP(unit->init), HP_POP2(HP_unit_init), 4726 }, +{ HP_POP(unit->final), HP_POP2(HP_unit_final), 4728 }, +{ HP_POP(unit->bl2ud), HP_POP2(HP_unit_bl2ud), 4730 }, +{ HP_POP(unit->bl2ud2), HP_POP2(HP_unit_bl2ud2), 4732 }, +{ HP_POP(unit->attack_timer), HP_POP2(HP_unit_attack_timer), 4734 }, +{ HP_POP(unit->walktoxy_timer), HP_POP2(HP_unit_walktoxy_timer), 4736 }, +{ HP_POP(unit->walktoxy_sub), HP_POP2(HP_unit_walktoxy_sub), 4738 }, +{ HP_POP(unit->delay_walktoxy_timer), HP_POP2(HP_unit_delay_walktoxy_timer), 4740 }, +{ HP_POP(unit->walktoxy), HP_POP2(HP_unit_walktoxy), 4742 }, +{ HP_POP(unit->walktobl_sub), HP_POP2(HP_unit_walktobl_sub), 4744 }, +{ HP_POP(unit->walktobl), HP_POP2(HP_unit_walktobl), 4746 }, +{ HP_POP(unit->run), HP_POP2(HP_unit_run), 4748 }, +{ HP_POP(unit->wugdash), HP_POP2(HP_unit_wugdash), 4750 }, +{ HP_POP(unit->escape), HP_POP2(HP_unit_escape), 4752 }, +{ HP_POP(unit->movepos), HP_POP2(HP_unit_movepos), 4754 }, +{ HP_POP(unit->setdir), HP_POP2(HP_unit_setdir), 4756 }, +{ HP_POP(unit->getdir), HP_POP2(HP_unit_getdir), 4758 }, +{ HP_POP(unit->blown), HP_POP2(HP_unit_blown), 4760 }, +{ HP_POP(unit->warp), HP_POP2(HP_unit_warp), 4762 }, +{ HP_POP(unit->stop_walking), HP_POP2(HP_unit_stop_walking), 4764 }, +{ HP_POP(unit->skilluse_id), HP_POP2(HP_unit_skilluse_id), 4766 }, +{ HP_POP(unit->is_walking), HP_POP2(HP_unit_is_walking), 4768 }, +{ HP_POP(unit->can_move), HP_POP2(HP_unit_can_move), 4770 }, +{ HP_POP(unit->resume_running), HP_POP2(HP_unit_resume_running), 4772 }, +{ HP_POP(unit->set_walkdelay), HP_POP2(HP_unit_set_walkdelay), 4774 }, +{ HP_POP(unit->skilluse_id2), HP_POP2(HP_unit_skilluse_id2), 4776 }, +{ HP_POP(unit->skilluse_pos), HP_POP2(HP_unit_skilluse_pos), 4778 }, +{ HP_POP(unit->skilluse_pos2), HP_POP2(HP_unit_skilluse_pos2), 4780 }, +{ HP_POP(unit->set_target), HP_POP2(HP_unit_set_target), 4782 }, +{ HP_POP(unit->stop_attack), HP_POP2(HP_unit_stop_attack), 4784 }, +{ HP_POP(unit->unattackable), HP_POP2(HP_unit_unattackable), 4786 }, +{ HP_POP(unit->attack), HP_POP2(HP_unit_attack), 4788 }, +{ HP_POP(unit->cancel_combo), HP_POP2(HP_unit_cancel_combo), 4790 }, +{ HP_POP(unit->can_reach_pos), HP_POP2(HP_unit_can_reach_pos), 4792 }, +{ HP_POP(unit->can_reach_bl), HP_POP2(HP_unit_can_reach_bl), 4794 }, +{ HP_POP(unit->calc_pos), HP_POP2(HP_unit_calc_pos), 4796 }, +{ HP_POP(unit->attack_timer_sub), HP_POP2(HP_unit_attack_timer_sub), 4798 }, +{ HP_POP(unit->skillcastcancel), HP_POP2(HP_unit_skillcastcancel), 4800 }, +{ HP_POP(unit->dataset), HP_POP2(HP_unit_dataset), 4802 }, +{ HP_POP(unit->counttargeted), HP_POP2(HP_unit_counttargeted), 4804 }, +{ HP_POP(unit->fixdamage), HP_POP2(HP_unit_fixdamage), 4806 }, +{ HP_POP(unit->changeviewsize), HP_POP2(HP_unit_changeviewsize), 4808 }, +{ HP_POP(unit->remove_map), HP_POP2(HP_unit_remove_map), 4810 }, +{ HP_POP(unit->remove_map_pc), HP_POP2(HP_unit_remove_map_pc), 4812 }, +{ HP_POP(unit->free_pc), HP_POP2(HP_unit_free_pc), 4814 }, +{ HP_POP(unit->free), HP_POP2(HP_unit_free), 4816 }, /* vending */ -{ HP_POP(vending->init), HP_POP2(HP_vending_init), 4794 }, -{ HP_POP(vending->final), HP_POP2(HP_vending_final), 4796 }, -{ HP_POP(vending->close), HP_POP2(HP_vending_close), 4798 }, -{ HP_POP(vending->open), HP_POP2(HP_vending_open), 4800 }, -{ HP_POP(vending->list), HP_POP2(HP_vending_list), 4802 }, -{ HP_POP(vending->purchase), HP_POP2(HP_vending_purchase), 4804 }, -{ HP_POP(vending->search), HP_POP2(HP_vending_search), 4806 }, -{ HP_POP(vending->searchall), HP_POP2(HP_vending_searchall), 4808 }, +{ HP_POP(vending->init), HP_POP2(HP_vending_init), 4818 }, +{ HP_POP(vending->final), HP_POP2(HP_vending_final), 4820 }, +{ HP_POP(vending->close), HP_POP2(HP_vending_close), 4822 }, +{ HP_POP(vending->open), HP_POP2(HP_vending_open), 4824 }, +{ HP_POP(vending->list), HP_POP2(HP_vending_list), 4826 }, +{ HP_POP(vending->purchase), HP_POP2(HP_vending_purchase), 4828 }, +{ HP_POP(vending->search), HP_POP2(HP_vending_search), 4830 }, +{ HP_POP(vending->searchall), HP_POP2(HP_vending_searchall), 4832 }, }; int HookingPointsLenMax = 41; diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index ce8e3b4b1..115d81071 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -6647,6 +6647,56 @@ void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { } return; } +void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_spawn_unit2_pre ) { + void (*preHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spawn_unit2_pre[hIndex].func; + preHookFunc(bl, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.spawn_unit2(bl, target); + } + if( HPMHooks.count.HP_clif_spawn_unit2_post ) { + void (*postHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spawn_unit2_post[hIndex].func; + postHookFunc(bl, &target); + } + } + return; +} +void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_set_unit_idle2_pre ) { + void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_pre[hIndex].func; + preHookFunc(bl, tsd, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.set_unit_idle2(bl, tsd, target); + } + if( HPMHooks.count.HP_clif_set_unit_idle2_post ) { + void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_post[hIndex].func; + postHookFunc(bl, tsd, &target); + } + } + return; +} void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target target) { int hIndex = 0; if( HPMHooks.count.HP_clif_set_unit_walking_pre ) { @@ -36399,6 +36449,56 @@ bool HP_map_arg_next_value(const char *option, int i, int argc) { } return retVal___; } +void HP_map_addblcell(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addblcell_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addblcell_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addblcell(bl); + } + if( HPMHooks.count.HP_map_addblcell_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addblcell_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_map_delblcell(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_delblcell_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delblcell_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.delblcell(bl); + } + if( HPMHooks.count.HP_map_delblcell_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delblcell_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} /* mapit */ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { int hIndex = 0; @@ -42464,6 +42564,33 @@ void HP_npc_debug_warps(void) { } return; } +int HP_npc_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *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); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + 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); + 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); + } + } + return retVal___; +} /* party */ void HP_party_init(void) { int hIndex = 0; @@ -43372,13 +43499,13 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { } return retVal___; } -void HP_party_booking_register(struct map_session_data *sd, short level, const char *notice) { +void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) { int hIndex = 0; if( HPMHooks.count.HP_party_booking_register_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func; - preHookFunc(sd, &level, notice); + preHookFunc(sd, &level, &mapid, job); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43386,24 +43513,24 @@ void HP_party_booking_register(struct map_session_data *sd, short level, const c } } { - HPMHooks.source.party.booking_register(sd, level, notice); + HPMHooks.source.party.booking_register(sd, level, mapid, job); } if( HPMHooks.count.HP_party_booking_register_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_party_booking_register_post[hIndex].func; - postHookFunc(sd, &level, notice); + postHookFunc(sd, &level, &mapid, job); } } return; } -void HP_party_booking_update(struct map_session_data *sd, const char *notice) { +void HP_party_booking_update(struct map_session_data *sd, short *job) { int hIndex = 0; if( HPMHooks.count.HP_party_booking_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *notice); + void (*preHookFunc) (struct map_session_data *sd, short *job); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func; - preHookFunc(sd, notice); + preHookFunc(sd, job); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43411,24 +43538,24 @@ void HP_party_booking_update(struct map_session_data *sd, const char *notice) { } } { - HPMHooks.source.party.booking_update(sd, notice); + HPMHooks.source.party.booking_update(sd, job); } if( HPMHooks.count.HP_party_booking_update_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *notice); + void (*postHookFunc) (struct map_session_data *sd, short *job); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func; - postHookFunc(sd, notice); + postHookFunc(sd, job); } } return; } -void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { +void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) { int hIndex = 0; if( HPMHooks.count.HP_party_booking_search_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func; - preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + preHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43436,12 +43563,87 @@ void HP_party_booking_search(struct map_session_data *sd, short level, short map } } { - HPMHooks.source.party.booking_search(sd, level, mapid, lastindex, resultcount); + HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount); } if( HPMHooks.count.HP_party_booking_search_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_party_booking_search_post[hIndex].func; + postHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); + } + } + return; +} +void HP_party_recruit_register(struct map_session_data *sd, short level, const char *notice) { + int hIndex = 0; + if( HPMHooks.count.HP_party_recruit_register_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func; + preHookFunc(sd, &level, notice); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.recruit_register(sd, level, notice); + } + if( HPMHooks.count.HP_party_recruit_register_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_register_post[hIndex].func; + postHookFunc(sd, &level, notice); + } + } + return; +} +void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { + int hIndex = 0; + if( HPMHooks.count.HP_party_recruit_update_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func; + preHookFunc(sd, notice); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.recruit_update(sd, notice); + } + if( HPMHooks.count.HP_party_recruit_update_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_update_post[hIndex].func; + postHookFunc(sd, notice); + } + } + return; +} +void HP_party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { + int hIndex = 0; + if( HPMHooks.count.HP_party_recruit_search_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func; + preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount); + } + if( HPMHooks.count.HP_party_recruit_search_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_search_post[hIndex].func; postHookFunc(sd, &level, &mapid, &lastindex, &resultcount); } } @@ -60462,6 +60664,60 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * } return retVal___; } +unsigned short HP_status_base_matk(const struct status_data *st, int level) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_base_matk_pre ) { + unsigned short (*preHookFunc) (const struct status_data *st, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; + retVal___ = preHookFunc(st, &level); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_matk(st, level); + } + if( HPMHooks.count.HP_status_base_matk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &level); + } + } + return retVal___; +} +int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_weapon_atk_pre ) { + int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func; + retVal___ = preHookFunc(src, watk, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag); + } + if( HPMHooks.count.HP_status_get_weapon_atk_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_weapon_atk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, watk, &flag); + } + } + return retVal___; +} int HP_status_get_total_mdef(struct block_list *src) { int hIndex = 0; int retVal___; @@ -61185,6 +61441,33 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang } return retVal___; } +short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { + int hIndex = 0; + short retVal___; + memset(&retVal___, '\0', sizeof(short)); + if( HPMHooks.count.HP_status_calc_aspd_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag); + } + if( HPMHooks.count.HP_status_calc_aspd_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_aspd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flag); + } + } + return retVal___; +} short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { int hIndex = 0; short retVal___; @@ -61347,6 +61630,33 @@ unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change * } return retVal___; } +unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_ematk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &matk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); + } + if( HPMHooks.count.HP_status_calc_ematk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &matk); + } + } + return retVal___; +} void HP_status_calc_bl_main(struct block_list *bl, int flag) { int hIndex = 0; if( HPMHooks.count.HP_status_calc_bl_main_pre ) { -- cgit v1.2.3-70-g09d2 From 44c33fda3614d588e6bf6cee1cf884e98f1531f0 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 11 Oct 2013 05:07:45 +0200 Subject: Changed 'tick' variables to 64 bit - This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru --- configure | 14 ++- configure.in | 8 +- src/char/char.c | 22 ++--- src/char/int_auction.c | 11 ++- src/char/int_guild.c | 5 +- src/char/inter.c | 8 +- src/common/console.c | 2 +- src/common/console.h | 2 +- src/common/random.c | 12 +-- src/common/socket.c | 5 +- src/common/socket.h | 3 +- src/common/sql.c | 2 +- src/common/timer.c | 86 +++++++++++++----- src/common/timer.h | 21 ++--- src/login/ipban_sql.c | 5 +- src/login/login.c | 15 ++-- src/map/atcommand.c | 30 ++++--- src/map/battle.c | 18 ++-- src/map/battle.h | 8 +- src/map/battleground.c | 6 +- src/map/battleground.h | 6 +- src/map/chrif.c | 10 +-- src/map/chrif.h | 16 ++-- src/map/clif.c | 72 +++++++-------- src/map/clif.h | 28 +++--- src/map/elemental.c | 14 +-- src/map/elemental.h | 10 +-- src/map/guild.c | 6 +- src/map/guild.h | 4 +- src/map/homunculus.c | 2 +- src/map/homunculus.h | 2 +- src/map/instance.c | 2 +- src/map/instance.h | 2 +- src/map/irc-bot.c | 6 +- src/map/irc-bot.h | 8 +- src/map/map.c | 10 +-- src/map/map.h | 10 +-- src/map/mapreg.h | 2 +- src/map/mapreg_sql.c | 2 +- src/map/mercenary.c | 4 +- src/map/mercenary.h | 4 +- src/map/mob.c | 81 ++++++++--------- src/map/mob.h | 30 +++---- src/map/npc.c | 23 +++-- src/map/npc.h | 12 +-- src/map/party.c | 3 +- src/map/party.h | 2 +- src/map/pc.c | 41 +++++---- src/map/pc.h | 54 ++++++------ src/map/pet.c | 27 +++--- src/map/pet.h | 20 ++--- src/map/script.c | 12 +-- src/map/script.h | 2 +- src/map/skill.c | 231 ++++++++++++++++++++++++------------------------- src/map/skill.h | 58 ++++++------- src/map/status.c | 37 +++++--- src/map/status.h | 9 +- src/map/unit.c | 30 +++---- src/map/unit.h | 24 ++--- 59 files changed, 609 insertions(+), 590 deletions(-) (limited to 'src/map/npc.h') diff --git a/configure b/configure index abba75ea1..919d6f883 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in d26927e. +# From configure.in c4af60e. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -1333,9 +1333,15 @@ Optional Features: in conjunction with XEN or Other Virtualization mechanisms) Note: Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving - options. (On the most modern Dedicated Servers - cpufreq is preconfigured, see your distribution's - manual how to disable it) + options. (On most modern Dedicated Servers cpufreq + is preconfigured, see your distribution's manual how + to disable it). Furthermore, If your CPU has + built-in CPU-Frequency scaling features (such as + Intel's SpeedStep(R)), do not enable this option. + Recent CPUs (Intel Core or newer) guarantee a fixed + increment rate for their TSC, so it should be safe + to use, but please doublecheck the documentation of + both your CPU and OS before enabling this option. --enable-profiler=ARG Profilers: no, gprof (disabled by default) --disable-64bit Enforce 32bit output on x86_64 systems. --enable-lto Enables or Disables Linktime Code Optimization (LTO diff --git a/configure.in b/configure.in index bd80bd43f..b79e51f6d 100644 --- a/configure.in +++ b/configure.in @@ -112,8 +112,12 @@ AC_ARG_ENABLE( Note: Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving options. - (On the most modern Dedicated Servers cpufreq is preconfigured, see your distribution's manual - how to disable it) + (On most modern Dedicated Servers cpufreq is preconfigured, see your distribution's + manual how to disable it). + Furthermore, If your CPU has built-in CPU-Frequency scaling features (such as Intel's + SpeedStep(R)), do not enable this option. Recent CPUs (Intel Core or newer) guarantee + a fixed increment rate for their TSC, so it should be safe to use, but please doublecheck + the documentation of both your CPU and OS before enabling this option. ] ), [ diff --git a/src/char/char.c b/src/char/char.c index 0b35c0143..2c126836c 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); /** @@ -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) { @@ -4488,8 +4487,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 +4532,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 +4549,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 +4584,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 +4610,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/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..ccd91f9c7 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 @@ -332,8 +370,8 @@ int timer_settick(int tid, unsigned int 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 c815967c2..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 {duration}). 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..4efc5bce4 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; @@ -1462,7 +1462,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 +1509,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 decdfc2ce..9810e2a17 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -595,7 +595,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 */ @@ -787,14 +787,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); @@ -1156,7 +1155,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 @@ -1526,7 +1525,7 @@ 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)); } @@ -1597,7 +1596,7 @@ void clif_move(struct unit_data *ud) 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; @@ -1609,7 +1608,7 @@ void clif_move(struct unit_data *ud) /*========================================== * 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 @@ -4430,8 +4429,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 +4457,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 +4514,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); @@ -5097,7 +5095,7 @@ void clif_skill_fail(struct map_session_data *sd,uint16 skill_id,enum useskill_f /// Skill cooldown display icon (ZC_SKILL_POSTDELAY). /// 043d .W .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 +5106,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 +5115,7 @@ void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned /// Skill attack effect and damage. /// 0114 .W .L .L .L .L .L .W .W
.W .B (ZC_NOTIFY_SKILL) /// 01de .W .L .L .L .L .L .L .W
.W .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 +5136,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 +5167,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 +5203,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 .W .L .L .L .L .L .W .W .W .W
.W .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 +5223,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 +5293,7 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,uint16 ski /// Non-damaging ground skill effect (ZC_NOTIFY_GROUNDSKILL). /// 0117 .W .L .W .W .W .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 +5304,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; @@ -9431,7 +9428,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); } } @@ -9649,12 +9646,12 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { /// Server's tick (ZC_NOTIFY_TIME). /// 007f