diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 351 |
1 files changed, 238 insertions, 113 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index ed75e9aa0..357c4dc6a 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); @@ -1251,22 +1255,22 @@ void clif_weather_check(struct map_session_data *sd) { int16 m = sd->bl.m; int fd = sd->fd; - if (maplist[m].flag.snow) + if (map->list[m].flag.snow) clif->specialeffect_single(&sd->bl, 162, fd); - if (maplist[m].flag.clouds) + if (map->list[m].flag.clouds) clif->specialeffect_single(&sd->bl, 233, fd); - if (maplist[m].flag.clouds2) + if (map->list[m].flag.clouds2) clif->specialeffect_single(&sd->bl, 516, fd); - if (maplist[m].flag.fog) + if (map->list[m].flag.fog) clif->specialeffect_single(&sd->bl, 515, fd); - if (maplist[m].flag.fireworks) { + if (map->list[m].flag.fireworks) { clif->specialeffect_single(&sd->bl, 297, fd); clif->specialeffect_single(&sd->bl, 299, fd); clif->specialeffect_single(&sd->bl, 301, fd); } - if (maplist[m].flag.sakura) + if (map->list[m].flag.sakura) clif->specialeffect_single(&sd->bl, 163, fd); - if (maplist[m].flag.leaves) + if (map->list[m].flag.leaves) clif->specialeffect_single(&sd->bl, 333, fd); } /** @@ -1319,10 +1323,10 @@ int clif_spawn(struct block_list *bl) clif->specialeffect(bl,423,AREA); else if(sd->state.size==SZ_MEDIUM) clif->specialeffect(bl,421,AREA); - if( sd->bg_id && maplist[sd->bl.m].flag.battleground ) + if( sd->bg_id && map->list[sd->bl.m].flag.battleground ) clif->sendbgemblem_area(sd); for( i = 0; i < sd->sc_display_count; i++ ) { - clif->sc_load(&sd->bl, sd->bl.id,AREA,StatusIconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3); + clif->sc_load(&sd->bl, sd->bl.id,AREA,status->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3); } for(i = 1; i < 5; i++){ if( sd->charm[i] > 0 ) @@ -1638,7 +1642,7 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) { WFIFOHEAD(fd,packet_len(0x91)); WFIFOW(fd,0) = 0x91; - mapindex_getmapname_ext(maplist[m].custom_name ? maplist[maplist[m].instance_src_map].name : maplist[m].name, (char*)WFIFOP(fd,2)); + mapindex_getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, (char*)WFIFOP(fd,2)); WFIFOW(fd,18) = x; WFIFOW(fd,20) = y; WFIFOSET(fd,packet_len(0x91)); @@ -4283,7 +4287,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds clif->charm_single(sd->fd, dstsd, i); } for( i = 0; i < dstsd->sc_display_count; i++ ) { - clif->sc_load(&sd->bl,dstsd->bl.id,SELF,StatusIconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3); + clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3); } if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting. (sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround @@ -4332,7 +4336,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { clif->specialeffect_single(bl,423,sd->fd); else if(tsd->state.size==SZ_MEDIUM) clif->specialeffect_single(bl,421,sd->fd); - if( tsd->bg_id && maplist[tsd->bl.m].flag.battleground ) + if( tsd->bg_id && map->list[tsd->bl.m].flag.battleground ) clif->sendbgemblem_single(sd->fd,tsd); if ( tsd->status.robe ) clif->refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF); @@ -4574,7 +4578,7 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe WBUFW(buf,2) = x; WBUFW(buf,4) = y; WBUFW(buf,6) = type; - mapindex_getmapname_ext(maplist[m].custom_name ? maplist[maplist[m].instance_src_map].name : maplist[m].name,(char*)WBUFP(buf,8)); + mapindex_getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name,(char*)WBUFP(buf,8)); if( fd ) { WFIFOHEAD(fd,packet_len(0x192)); @@ -6525,7 +6529,7 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd) WBUFB(buf,14) = (p->party.member[i].online)?0:1; memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH); memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH); - mapindex_getmapname_ext(maplist[sd->bl.m].custom_name ? maplist[maplist[sd->bl.m].instance_src_map].name : maplist[sd->bl.m].name, (char*)WBUFP(buf,63)); + mapindex_getmapname_ext(map->list[sd->bl.m].custom_name ? map->list[map->list[sd->bl.m].instance_src_map].name : map->list[sd->bl.m].name, (char*)WBUFP(buf,63)); WBUFB(buf,79) = (p->party.item&1)?1:0; WBUFB(buf,80) = (p->party.item&2)?1:0; clif->send(buf,packet_len(0x1e9),&sd->bl,PARTY); @@ -9286,24 +9290,24 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) { chrif->authreq(sd); } void clif_hercules_chsys_mjoin(struct map_session_data *sd) { - if( !maplist[sd->bl.m].channel ) { - CREATE(maplist[sd->bl.m].channel, struct hChSysCh , 1); - safestrncpy(maplist[sd->bl.m].channel->name, hChSys.local_name, HCHSYS_NAME_LENGTH); - maplist[sd->bl.m].channel->type = hChSys_MAP; - maplist[sd->bl.m].channel->m = sd->bl.m; + if( !map->list[sd->bl.m].channel ) { + CREATE(map->list[sd->bl.m].channel, struct hChSysCh , 1); + safestrncpy(map->list[sd->bl.m].channel->name, hChSys.local_name, HCHSYS_NAME_LENGTH); + map->list[sd->bl.m].channel->type = hChSys_MAP; + map->list[sd->bl.m].channel->m = sd->bl.m; - clif->chsys_create(maplist[sd->bl.m].channel,NULL,NULL,hChSys.local_color); + clif->chsys_create(map->list[sd->bl.m].channel,NULL,NULL,hChSys.local_color); } - if( maplist[sd->bl.m].channel->banned && idb_exists(maplist[sd->bl.m].channel->banned, sd->status.account_id) ) { + if( map->list[sd->bl.m].channel->banned && idb_exists(map->list[sd->bl.m].channel->banned, sd->status.account_id) ) { return; } - clif->chsys_join(maplist[sd->bl.m].channel,sd); + clif->chsys_join(map->list[sd->bl.m].channel,sd); - if( !( maplist[sd->bl.m].channel->opt & hChSys_OPT_ANNOUNCE_JOIN ) ) { + if( !( map->list[sd->bl.m].channel->opt & hChSys_OPT_ANNOUNCE_JOIN ) ) { char mout[60]; - sprintf(mout, msg_txt(1435),hChSys.local_name,maplist[sd->bl.m].name); // You're now in the '#%s' channel for '%s' + sprintf(mout, msg_txt(1435),hChSys.local_name,map->list[sd->bl.m].name); // You're now in the '#%s' channel for '%s' clif->colormes(sd->fd, COLOR_DEFAULT, mout); } } @@ -9362,14 +9366,14 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { pc->setinvincibletimer(sd,battle_config.pc_invincible_time); } - if( maplist[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs ) + if( map->list[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs ) map->spawnmobs(sd->bl.m); if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map - maplist[sd->bl.m].users_pvp++; + map->list[sd->bl.m].users_pvp++; } - if( maplist[sd->bl.m].instance_id >= 0 ) { - instances[maplist[sd->bl.m].instance_id].users++; - instance->check_idle(maplist[sd->bl.m].instance_id); + if( map->list[sd->bl.m].instance_id >= 0 ) { + instance->list[map->list[sd->bl.m].instance_id].users++; + instance->check_idle(map->list[sd->bl.m].instance_id); } sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS] @@ -9388,9 +9392,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if( sd->bg_id ) clif->bg_hp(sd); // BattleGround System - if(maplist[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) { + if(map->list[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) { if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris] - if (!maplist[sd->bl.m].flag.pvp_nocalcrank) + if (!map->list[sd->bl.m].flag.pvp_nocalcrank) sd->pvp_timer = timer->add(timer->gettick()+200, pc->calc_pvprank_timer, sd->bl.id, 0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; @@ -9404,7 +9408,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if(sd->duel_group) clif->map_property(sd, MAPPROPERTY_FREEPVPZONE); - if (maplist[sd->bl.m].flag.gvg_dungeon) + if (map->list[sd->bl.m].flag.gvg_dungeon) clif->map_property(sd, MAPPROPERTY_FREEPVPZONE); //TODO: Figure out the real packet to send here. if( map_flag_gvg2(sd->bl.m) ) @@ -9496,13 +9500,13 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if(homun_alive(sd->hd)) homun->init_timers(sd->hd); - if (map->night_flag && maplist[sd->bl.m].flag.nightenabled) { + if (map->night_flag && map->list[sd->bl.m].flag.nightenabled) { sd->state.night = 1; clif->status_change(&sd->bl, SI_SKE, 1, 0, 0, 0, 0); } // Notify everyone that this char logged in [Skotlex]. - map->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); + map->foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); //Login Event npc->script_event(sd, NPCE_LOGIN); @@ -9534,10 +9538,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { #endif if( (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100) && (map_flag_gvg2(sd->state.pmap) || map_flag_gvg2(sd->bl.m) - || maplist[sd->state.pmap].flag.battleground || maplist[sd->bl.m].flag.battleground) ) + || map->list[sd->state.pmap].flag.battleground || map->list[sd->bl.m].flag.battleground) ) status_calc_bl(&sd->bl, SCB_FLEE); //Refresh flee penalty - if( map->night_flag && maplist[sd->bl.m].flag.nightenabled ) { + if( map->night_flag && map->list[sd->bl.m].flag.nightenabled ) { //Display night. if( !sd->state.night ) { sd->state.night = 1; @@ -9548,13 +9552,13 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_SKE); } - if( maplist[sd->bl.m].flag.battleground ) { + if( map->list[sd->bl.m].flag.battleground ) { clif->map_type(sd, MAPTYPE_BATTLEFIELD); // Battleground Mode - if( maplist[sd->bl.m].flag.battleground == 2 ) + if( map->list[sd->bl.m].flag.battleground == 2 ) clif->bg_updatescore_single(sd); } - if( maplist[sd->bl.m].flag.allowks && !map_flag_ks(sd->bl.m) ) { + if( map->list[sd->bl.m].flag.allowks && !map_flag_ks(sd->bl.m) ) { char output[128]; sprintf(output, "[ Kill Steal Protection Disabled. KS is allowed in this map ]"); clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF); @@ -9564,7 +9568,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { status_calc_pc(sd, false);/* some conditions are map-dependent so we must recalculate */ sd->state.changemap = false; - if( hChSys.local && hChSys.local_autojoin && !maplist[sd->bl.m].flag.chsysnolocalaj ) { + if( hChSys.local && hChSys.local_autojoin && !map->list[sd->bl.m].flag.chsysnolocalaj ) { clif->chsys_mjoin(sd); } } @@ -9586,7 +9590,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { clif->showvendingboard(&sd->bl,sd->message,0); } - if(maplist[sd->bl.m].flag.loadevent) // Lance + if(map->list[sd->bl.m].flag.loadevent) // Lance npc->script_event(sd, NPCE_LOADMAP); if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd)) //blindness [Komurka] @@ -10415,10 +10419,10 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) chname++; if( hChSys.local && strcmpi(chname, hChSys.local_name) == 0 ) { - if( !maplist[sd->bl.m].channel ) { + if( !map->list[sd->bl.m].channel ) { clif->chsys_mjoin(sd); } - channel = maplist[sd->bl.m].channel; + channel = map->list[sd->bl.m].channel; } else if( hChSys.ally && sd->status.guild_id && strcmpi(chname, hChSys.ally_name) == 0 ) { struct guild *g = sd->guild; if( !g ) return; @@ -10699,7 +10703,7 @@ void clif_hercules_chsys_delete(struct hChSysCh *channel) { } db_destroy(channel->users); if( channel->m ) { - maplist[channel->m].channel = NULL; + map->list[channel->m].channel = NULL; aFree(channel); } else if ( channel->type == hChSys_ALLY ) aFree(channel); @@ -12000,7 +12004,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) { char* name = (char*)RFIFOP(fd,2); name[NAME_LENGTH-1] = '\0'; - if( maplist[sd->bl.m].flag.partylock ) { + if( map->list[sd->bl.m].flag.partylock ) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12019,7 +12023,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) { int item2 = RFIFOB(fd,27); name[NAME_LENGTH-1] = '\0'; - if( maplist[sd->bl.m].flag.partylock ) { + if( map->list[sd->bl.m].flag.partylock ) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12039,7 +12043,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) { void clif_parse_PartyInvite(int fd, struct map_session_data *sd) { struct map_session_data *t_sd; - if(maplist[sd->bl.m].flag.partylock) { + if(map->list[sd->bl.m].flag.partylock) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12060,7 +12064,7 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) { char *name = (char*)RFIFOP(fd,2); name[NAME_LENGTH-1] = '\0'; - if(maplist[sd->bl.m].flag.partylock) { + if(map->list[sd->bl.m].flag.partylock) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12097,7 +12101,7 @@ void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd) /// Request to leave party (CZ_REQ_LEAVE_GROUP). /// 0100 void clif_parse_LeaveParty(int fd, struct map_session_data *sd) { - if(maplist[sd->bl.m].flag.partylock) { + if(map->list[sd->bl.m].flag.partylock) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12109,7 +12113,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) { /// Request to expel a party member (CZ_REQ_EXPEL_GROUP_MEMBER). /// 0103 <account id>.L <char name>.24B void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) { - if(maplist[sd->bl.m].flag.partylock) { + if(map->list[sd->bl.m].flag.partylock) { // Party locked. clif->message(fd, msg_txt(227)); return; @@ -12186,7 +12190,6 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) { party->changeleader(sd, map->id2sd(RFIFOL(fd,2))); } -#ifndef PARTY_RECRUIT /// Party Booking in KRO [Spiria] /// @@ -12194,6 +12197,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) { /// 0802 <level>.W <map id>.W { <job>.W }*6 void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) { +#ifndef PARTY_RECRUIT short level = RFIFOW(fd,2); short mapid = RFIFOW(fd,4); short job[PARTY_BOOKING_JOBS]; @@ -12203,6 +12207,9 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) job[i] = RFIFOB(fd,6+i*2); party->booking_register(sd, level, mapid, job); +#else + return; +#endif } @@ -12214,12 +12221,16 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) /// 2 = already registered void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { +#ifndef PARTY_RECRUIT int fd = sd->fd; WFIFOHEAD(fd,packet_len(0x803)); WFIFOW(fd,0) = 0x803; WFIFOW(fd,2) = flag; WFIFOSET(fd,packet_len(0x803)); +#else + return; +#endif } @@ -12227,6 +12238,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) /// 0804 <level>.W <map id>.W <job>.W <last index>.L <result count>.W void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) { +#ifndef PARTY_RECRUIT short level = RFIFOW(fd,2); short mapid = RFIFOW(fd,4); short job = RFIFOW(fd,6); @@ -12234,6 +12246,9 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) short resultcount = RFIFOW(fd,12); party->booking_search(sd, level, mapid, job, lastindex, resultcount); +#else + return; +#endif } @@ -12244,6 +12259,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) /// 1 = yes void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result) { +#ifndef PARTY_RECRUIT int i, j; int size = sizeof(struct party_booking_ad_info); // structure size (48) struct party_booking_ad_info *pb_ad; @@ -12263,6 +12279,9 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, WFIFOW(fd,i*size+41+j*2) = pb_ad->p_detail.job[j]; } WFIFOSET(fd,WFIFOW(fd,2)); +#else + return; +#endif } @@ -12270,8 +12289,12 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, /// 0806 void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) { +#ifndef PARTY_RECRUIT if(party->booking_delete(sd)) clif->PartyBookingDeleteAck(sd, 0); +#else + return; +#endif } @@ -12284,12 +12307,16 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) /// 3 = nothing registered void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag) { +#ifndef PARTY_RECRUIT int fd = sd->fd; WFIFOHEAD(fd,packet_len(0x807)); WFIFOW(fd,0) = 0x807; WFIFOW(fd,2) = flag; WFIFOSET(fd,packet_len(0x807)); +#else + return; +#endif } @@ -12297,6 +12324,7 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag) /// 0808 { <job>.W }*6 void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) { +#ifndef PARTY_RECRUIT short job[PARTY_BOOKING_JOBS]; int i; @@ -12304,6 +12332,9 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) job[i] = RFIFOW(fd,2+i*2); party->booking_update(sd, job); +#else + return; +#endif } @@ -12311,6 +12342,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) /// 0809 <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6 void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { +#ifndef PARTY_RECRUIT int i; uint8 buf[38+PARTY_BOOKING_JOBS*2]; @@ -12326,6 +12358,9 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo WBUFW(buf,38+i*2) = pb_ad->p_detail.job[i]; clif->send(buf, packet_len(0x809), &sd->bl, ALL_CLIENT); +#else + return; +#endif } @@ -12333,6 +12368,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo /// 080a <index>.L { <job>.W }*6 void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { +#ifndef PARTY_RECRUIT int i; uint8 buf[6+PARTY_BOOKING_JOBS*2]; @@ -12343,6 +12379,9 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo for(i=0; i<PARTY_BOOKING_JOBS; i++) WBUFW(buf,6+i*2) = pb_ad->p_detail.job[i]; clif->send(buf,packet_len(0x80a),&sd->bl,ALL_CLIENT); // Now UPDATE all client. +#else + return; +#endif } @@ -12350,26 +12389,33 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo /// 080b <index>.L void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) { +#ifndef PARTY_RECRUIT uint8 buf[6]; WBUFW(buf,0) = 0x80b; WBUFL(buf,2) = index; clif->send(buf, packet_len(0x80b), &sd->bl, ALL_CLIENT); // Now UPDATE all client. +#else + return; +#endif } -#else /// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE). /// Code written by mkbu95, Spiria, Yommy and Ind /// Request to register a party booking advertisment (CZ_PARTY_RECRUIT_REQ_REGISTER). /// 08e5 <level>.W <notice>.37B -void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) +void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd) { +#ifdef PARTY_RECRUIT 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); +#else + return; +#endif } /// Party booking search results (ZC_PARTY_RECRUIT_ACK_SEARCH). @@ -12377,8 +12423,9 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) /// more results: /// 0 = no /// 1 = yes -void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result) +void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result) { +#ifdef PARTY_RECRUIT int i; int size = sizeof(struct party_booking_ad_info); struct party_booking_ad_info *pb_ad; @@ -12399,6 +12446,9 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, } WFIFOSET(fd,WFIFOW(fd,2)); +#else + return; +#endif } /// Result of request to register a party booking advertisment (ZC_PARTY_RECRUIT_ACK_REGISTER). @@ -12407,34 +12457,46 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, /// 0 = success /// 1 = failure /// 2 = already registered -void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) +void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { +#ifdef PARTY_RECRUIT int fd = sd->fd; WFIFOHEAD(fd, packet_len(0x8e6)); WFIFOW(fd, 0) = 0x8e6; WFIFOW(fd, 2) = flag; WFIFOSET(fd, packet_len(0x8e6)); +#else + return; +#endif } /// Request to search for party booking advertisments (CZ_PARTY_RECRUIT_REQ_SEARCH). /// 08e7 <level>.W <map id>.W <last index>.L <result count>.W -void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) +void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) { +#ifdef PARTY_RECRUIT short level = RFIFOW(fd, 2); short mapid = RFIFOW(fd, 4); 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); +#else + return; +#endif } /// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE). /// 08e9 -void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) +void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) { +#ifdef PARTY_RECRUIT if(party->booking_delete(sd)) - clif->PartyBookingDeleteAck(sd, 0); + clif->PartyRecruitDeleteAck(sd, 0); +#else + return; +#endif } /// Result of request to delete own party booking advertisment (ZC_PARTY_RECRUIT_ACK_DELETE). @@ -12444,31 +12506,40 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) /// 1 = success (auto-removed expired ad) /// 2 = failure /// 3 = nothing registered -void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag) +void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag) { +#ifdef PARTY_RECRUIT int fd = sd->fd; WFIFOHEAD(fd, packet_len(0x8ea)); WFIFOW(fd, 0) = 0x8ea; WFIFOW(fd, 2) = flag; WFIFOSET(fd, packet_len(0x8ea)); +#else + return; +#endif } /// Request to update party booking advertisment (CZ_PARTY_RECRUIT_REQ_UPDATE). /// 08eb <notice>.37B -void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd) +void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT const char *notice; notice = (const char*)RFIFOP(fd, 2); - party->booking_update(sd, notice); + party->recruit_update(sd, notice); +#else + return; +#endif } /// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT). /// 08ec <index>.L <expire time>.L <char name>.24B <level>.W <notice>.37B -void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) +void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+6+24+4+37+1]; if (pb_ad == NULL) @@ -12481,12 +12552,16 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo WBUFW(buf,34) = pb_ad->p_detail.level; memcpy(WBUFP(buf, 36), pb_ad->p_detail.notice, PB_NOTICE_LENGTH); clif->send(buf, packet_len(0x8ec), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// Notification about updated party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_UPDATE). /// 08ed <index>.L <notice>.37B -void clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad) +void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+37+1]; WBUFW(buf, 0) = 0x8ed; @@ -12494,51 +12569,71 @@ void clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_boo memcpy(WBUFP(buf, 6), pb_ad->p_detail.notice, PB_NOTICE_LENGTH); clif->send(buf, packet_len(0x8ed), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// Notification about deleted party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_DELETE). /// 08ee <index>.L -void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) +void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+1]; WBUFW(buf, 0) = 0x8ee; WBUFL(buf, 2) = index; clif->send(buf, packet_len(0x8ee), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// Request to add to filtering list (PARTY_RECRUIT_ADD_FILTERLINGLIST). /// 08ef <index>.L void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT int index = RFIFOL(fd, 2); clif->PartyBookingAddFilteringList(index, sd); +#else + return; +#endif } /// Request to remove from filtering list (PARTY_RECRUIT_SUB_FILTERLINGLIST). /// 08f0 <GID>.L void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT int gid = RFIFOL(fd, 2); clif->PartyBookingSubFilteringList(gid, sd); +#else + return; +#endif } /// Request to recruit volunteer (PARTY_RECRUIT_REQ_VOLUNTEER). /// 08f1 <index>.L void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT int index = RFIFOL(fd, 2); clif->PartyBookingVolunteerInfo(index, sd); +#else + return; +#endif } /// Request volunteer information (PARTY_RECRUIT_VOLUNTEER_INFO). /// 08f2 <AID>.L <job>.L <level>.W <char name>.24B void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned char buf[2+4+4+2+24+1]; WBUFW(buf, 0) = 0x8f2; @@ -12548,6 +12643,9 @@ void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) memcpy(WBUFP(buf, 12), sd->status.name, NAME_LENGTH); clif->send(buf, packet_len(0x8f2), &sd->bl, ALL_CLIENT); +#else + return; +#endif } #if 0 //Disabled for now. Needs more info. @@ -12591,44 +12689,61 @@ void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd) /// 08f9 <refuse AID>.L void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned long aid = RFIFOL(fd, 2); clif->PartyBookingRefuseVolunteer(aid, sd); +#else + return; +#endif } /// 08fa <index>.L void clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6]; WBUFW(buf, 0) = 0x8fa; WBUFL(buf, 2) = aid; clif->send(buf, packet_len(0x8fa), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// 08fb <index>.L void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT int index = RFIFOL(fd, 2); clif->PartyBookingCancelVolunteer(index, sd); +#else + return; +#endif } /// 0909 <index>.L void clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+1]; WBUFW(buf, 0) = 0x909; WBUFL(buf, 2) = index; clif->send(buf, packet_len(0x909), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// 090b <gid>.L <char name>.24B void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+24+1]; WBUFW(buf, 0) = 0x90b; @@ -12636,11 +12751,15 @@ void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd) memcpy(WBUFP(buf, 6), sd->status.name, NAME_LENGTH); clif->send(buf, packet_len(0x90b), &sd->bl, ALL_CLIENT); +#else + return; +#endif } /// 090c <gid>.L <char name>.24B void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) { +#ifdef PARTY_RECRUIT unsigned char buf[2+6+24+1]; WBUFW(buf, 0) = 0x90c; @@ -12648,6 +12767,9 @@ void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) memcpy(WBUFP(buf, 6), sd->status.name, NAME_LENGTH); clif->send(buf, packet_len(0x90c), &sd->bl, ALL_CLIENT); +#else + return; +#endif } #if 0 @@ -12661,7 +12783,6 @@ void clif_PartyBookingRefuseVolunteerToPM(struct map_session_data *sd) { } #endif //if 0 -#endif /// Request to close own vending (CZ_REQ_CLOSESTORE). /// 012e @@ -12730,7 +12851,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) { if( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM ) return; - if( maplist[sd->bl.m].flag.novending ) { + if( map->list[sd->bl.m].flag.novending ) { clif->message (sd->fd, msg_txt(276)); // "You can't open a shop on this map" return; } @@ -12751,7 +12872,7 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd) { char* name = (char*)RFIFOP(fd,6); name[NAME_LENGTH-1] = '\0'; - if(maplist[sd->bl.m].flag.guildlock) { + if(map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -12914,7 +13035,7 @@ clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_da return 1; } - if (maplist[sd->bl.m].flag.guildlock) { + if (map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return 1; @@ -12961,7 +13082,7 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) /// Request to leave guild (CZ_REQ_LEAVE_GUILD). /// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B void clif_parse_GuildLeave(int fd,struct map_session_data *sd) { - if(maplist[sd->bl.m].flag.guildlock) { + if(map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -12978,7 +13099,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) { /// Request to expel a member of a guild (CZ_REQ_BAN_GUILD). /// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) { - if( maplist[sd->bl.m].flag.guildlock || sd->bg_id ) { + if( map->list[sd->bl.m].flag.guildlock || sd->bg_id ) { // Guild locked. clif->message(fd, msg_txt(228)); return; @@ -13029,7 +13150,7 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) { if(!sd->state.gmaster_flag) return; - if(maplist[sd->bl.m].flag.guildlock) { + if(map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -13067,7 +13188,7 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) { if(!sd->state.gmaster_flag) return; - if(maplist[sd->bl.m].flag.guildlock) { + if(map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -13084,7 +13205,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) { if(!sd->state.gmaster_flag) return; - if(maplist[sd->bl.m].flag.guildlock) { + if(map->list[sd->bl.m].flag.guildlock) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -13108,7 +13229,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) { /// now guild name; might have been (intended) email, since the /// field name and size is same as the one in CH_DELETE_CHAR. void clif_parse_GuildBreak(int fd, struct map_session_data *sd) { - if( maplist[sd->bl.m].flag.guildlock ) { + if( map->list[sd->bl.m].flag.guildlock ) { //Guild locked. clif->message(fd, msg_txt(228)); return; @@ -14000,9 +14121,9 @@ void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) { int i; switch( type ) { - case RANKTYPE_BLACKSMITH: list = smith_fame_list; break; - case RANKTYPE_ALCHEMIST: list = chemist_fame_list; break; - case RANKTYPE_TAEKWON: list = taekwon_fame_list; break; + case RANKTYPE_BLACKSMITH: list = pc->smith_fame_list; break; + case RANKTYPE_ALCHEMIST: list = pc->chemist_fame_list; break; + case RANKTYPE_TAEKWON: list = pc->taekwon_fame_list; break; default: return; // Unsupported } @@ -14208,7 +14329,7 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd) sd->feel_map[i].index = map_id2index(sd->bl.m); sd->feel_map[i].m = sd->bl.m; - pc_setglobalreg(sd,sg_info[i].feel_var,sd->feel_map[i].index); + pc_setglobalreg(sd,pc->sg_info[i].feel_var,sd->feel_map[i].index); //Are these really needed? Shouldn't they show up automatically from the feel save packet? // clif_misceffect2(&sd->bl, 0x1b0); @@ -15950,8 +16071,8 @@ void clif_bg_updatescore(int16 m) { bl.m = m; WBUFW(buf,0) = 0x2de; - WBUFW(buf,2) = maplist[m].bgscore_lion; - WBUFW(buf,4) = maplist[m].bgscore_eagle; + WBUFW(buf,2) = map->list[m].bgscore_lion; + WBUFW(buf,4) = map->list[m].bgscore_eagle; clif->send(buf,packet_len(0x2de),&bl,ALL_SAMEMAP); } @@ -15962,8 +16083,8 @@ void clif_bg_updatescore_single(struct map_session_data *sd) { WFIFOHEAD(fd,packet_len(0x2de)); WFIFOW(fd,0) = 0x2de; - WFIFOW(fd,2) = maplist[sd->bl.m].bgscore_lion; - WFIFOW(fd,4) = maplist[sd->bl.m].bgscore_eagle; + WFIFOW(fd,2) = map->list[sd->bl.m].bgscore_lion; + WFIFOW(fd,4) = map->list[sd->bl.m].bgscore_eagle; WFIFOSET(fd,packet_len(0x2de)); } @@ -16017,20 +16138,20 @@ int clif_instance(int instance_id, int type, int flag) { unsigned char buf[255]; enum send_target target = PARTY; - switch( instances[instance_id].owner_type ) { + switch( instance->list[instance_id].owner_type ) { case IOT_NONE: return 0; case IOT_GUILD: target = GUILD; - sd = guild->getavailablesd(guild->search(instances[instance_id].owner_id)); + sd = guild->getavailablesd(guild->search(instance->list[instance_id].owner_id)); break; case IOT_PARTY: /* default is already PARTY */ - sd = party->getavailablesd(party->search(instances[instance_id].owner_id)); + sd = party->getavailablesd(party->search(instance->list[instance_id].owner_id)); break; case IOT_CHAR: target = SELF; - sd = map->id2sd(instances[instance_id].owner_id); + sd = map->id2sd(instance->list[instance_id].owner_id); break; } @@ -16043,7 +16164,7 @@ int clif_instance(int instance_id, int type, int flag) { // Required to start the instancing information window on Client // This window re-appear each "refresh" of client automatically until type 4 is send to client. WBUFW(buf,0) = 0x02CB; - memcpy(WBUFP(buf,2),instances[instance_id].name,INSTANCE_NAME_LENGTH); + memcpy(WBUFP(buf,2),instance->list[instance_id].name,INSTANCE_NAME_LENGTH); WBUFW(buf,63) = flag; clif->send(buf,packet_len(0x02CB),&sd->bl,target); break; @@ -16058,13 +16179,13 @@ int clif_instance(int instance_id, int type, int flag) { case 4: // S 0x2cd <Instance Name>.61B <Instance Remaining Time>.L <Instance Noplayers close time>.L WBUFW(buf,0) = 0x02CD; - memcpy(WBUFP(buf,2),instances[instance_id].name,61); + memcpy(WBUFP(buf,2),instance->list[instance_id].name,61); if( type == 3 ) { - WBUFL(buf,63) = instances[instance_id].progress_timeout; + WBUFL(buf,63) = instance->list[instance_id].progress_timeout; WBUFL(buf,67) = 0; } else { WBUFL(buf,63) = 0; - WBUFL(buf,67) = instances[instance_id].idle_timeout; + WBUFL(buf,67) = instance->list[instance_id].idle_timeout; } clif->send(buf,packet_len(0x02CD),&sd->bl,target); break; @@ -16086,24 +16207,24 @@ int clif_instance(int instance_id, int type, int flag) { void clif_instance_join(int fd, int instance_id) { - if( instances[instance_id].idle_timer != INVALID_TIMER ) { + if( instance->list[instance_id].idle_timer != INVALID_TIMER ) { WFIFOHEAD(fd,packet_len(0x02CD)); WFIFOW(fd,0) = 0x02CD; - memcpy(WFIFOP(fd,2),instances[instance_id].name,61); + memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61); WFIFOL(fd,63) = 0; - WFIFOL(fd,67) = instances[instance_id].idle_timeout; + WFIFOL(fd,67) = instance->list[instance_id].idle_timeout; WFIFOSET(fd,packet_len(0x02CD)); - } else if( instances[instance_id].progress_timer != INVALID_TIMER ) { + } else if( instance->list[instance_id].progress_timer != INVALID_TIMER ) { WFIFOHEAD(fd,packet_len(0x02CD)); WFIFOW(fd,0) = 0x02CD; - memcpy(WFIFOP(fd,2),instances[instance_id].name,61); - WFIFOL(fd,63) = instances[instance_id].progress_timeout; + memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61); + WFIFOL(fd,63) = instance->list[instance_id].progress_timeout; WFIFOL(fd,67) = 0; WFIFOSET(fd,packet_len(0x02CD)); } else { WFIFOHEAD(fd,packet_len(0x02CB)); WFIFOW(fd,0) = 0x02CB; - memcpy(WFIFOP(fd,2),instances[instance_id].name,61); + memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61); WFIFOW(fd,63) = 0; WFIFOSET(fd,packet_len(0x02CB)); } @@ -17358,14 +17479,14 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) { p.PacketType = maptypeproperty2Type; p.type = 0x28; - p.flag.party = maplist[bl->m].flag.pvp ? 1 : 0; + p.flag.party = map->list[bl->m].flag.pvp ? 1 : 0; p.flag.guild = map_flag_gvg(bl->m) ? 1 : 0; p.flag.siege = map_flag_gvg2(bl->m) ? 1: 0; p.flag.mineffect = map_flag_gvg(bl->m); // FIXME/CHECKME Forcing /mineffect in castles during WoE (probably redundant? I'm not sure) p.flag.nolockon = 0; // TODO - p.flag.countpk = maplist[bl->m].flag.pvp ? 1 : 0; - p.flag.nopartyformation = maplist[bl->m].flag.partylock ? 1 : 0; - p.flag.bg = maplist[bl->m].flag.battleground ? 1 : 0; + p.flag.countpk = map->list[bl->m].flag.pvp ? 1 : 0; + p.flag.nopartyformation = map->list[bl->m].flag.partylock ? 1 : 0; + p.flag.bg = map->list[bl->m].flag.battleground ? 1 : 0; p.flag.noitemconsumption = 0; // TODO p.flag.summonstarmiracle = 0; // TODO p.flag.usecart = 1; // TODO @@ -17984,10 +18105,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; @@ -18342,14 +18461,18 @@ void clif_defaults(void) { clif->PartyBookingUpdateNotify = clif_PartyBookingUpdateNotify; clif->PartyBookingDeleteNotify = clif_PartyBookingDeleteNotify; clif->PartyBookingInsertNotify = clif_PartyBookingInsertNotify; + clif->PartyRecruitRegisterAck = clif_PartyRecruitRegisterAck; + clif->PartyRecruitDeleteAck = clif_PartyRecruitDeleteAck; + clif->PartyRecruitSearchAck = clif_PartyRecruitSearchAck; + clif->PartyRecruitUpdateNotify = clif_PartyRecruitUpdateNotify; + clif->PartyRecruitDeleteNotify = clif_PartyRecruitDeleteNotify; + clif->PartyRecruitInsertNotify = clif_PartyRecruitInsertNotify; /* 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; @@ -18498,6 +18621,10 @@ void clif_defaults(void) { clif->pPartyBookingSearchReq = clif_parse_PartyBookingSearchReq; clif->pPartyBookingDeleteReq = clif_parse_PartyBookingDeleteReq; clif->pPartyBookingUpdateReq = clif_parse_PartyBookingUpdateReq; + clif->pPartyRecruitRegisterReq = clif_parse_PartyRecruitRegisterReq; + clif->pPartyRecruitSearchReq = clif_parse_PartyRecruitSearchReq; + clif->pPartyRecruitDeleteReq = clif_parse_PartyRecruitDeleteReq; + clif->pPartyRecruitUpdateReq = clif_parse_PartyRecruitUpdateReq; clif->pCloseVending = clif_parse_CloseVending; clif->pVendingListReq = clif_parse_VendingListReq; clif->pPurchaseReq = clif_parse_PurchaseReq; @@ -18613,11 +18740,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 } |