Converted a bunch of packets to structs (#8295)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
parent
1af1943f85
commit
d445497870
@ -1641,11 +1641,11 @@ ACMD_FUNC(baselevelup)
|
||||
level*=-1;
|
||||
}
|
||||
sd->status.base_exp = 0;
|
||||
clif_updatestatus(sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(sd, SP_BASELEVEL);
|
||||
clif_updatestatus(sd, SP_BASEEXP);
|
||||
clif_updatestatus(sd, SP_NEXTBASEEXP);
|
||||
clif_updatestatus(*sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_BASELEVEL);
|
||||
clif_updatestatus(*sd, SP_BASEEXP);
|
||||
clif_updatestatus(*sd, SP_NEXTBASEEXP);
|
||||
pc_baselevelchanged(sd);
|
||||
if(sd->status.party_id)
|
||||
party_send_levelup(sd);
|
||||
@ -1702,10 +1702,10 @@ ACMD_FUNC(joblevelup)
|
||||
level *=-1;
|
||||
}
|
||||
sd->status.job_exp = 0;
|
||||
clif_updatestatus(sd, SP_JOBLEVEL);
|
||||
clif_updatestatus(sd, SP_JOBEXP);
|
||||
clif_updatestatus(sd, SP_NEXTJOBEXP);
|
||||
clif_updatestatus(sd, SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd, SP_JOBLEVEL);
|
||||
clif_updatestatus(*sd, SP_JOBEXP);
|
||||
clif_updatestatus(*sd, SP_NEXTJOBEXP);
|
||||
clif_updatestatus(*sd, SP_SKILLPOINT);
|
||||
status_calc_pc(sd, SCO_FORCE);
|
||||
|
||||
if( level > 0 && battle_config.atcommand_levelup_events )
|
||||
@ -2417,7 +2417,7 @@ ACMD_FUNC(refine)
|
||||
current_position = sd->inventory.u.items_inventory[i].equip;
|
||||
pc_unequipitem(sd, i, 3);
|
||||
clif_refine(fd, 0, i, sd->inventory.u.items_inventory[i].refine);
|
||||
clif_delitem(sd, i, 1, 3);
|
||||
clif_delitem( *sd, i, 1, 3 );
|
||||
clif_additem(sd, i, 1, 0);
|
||||
pc_equipitem(sd, i, current_position);
|
||||
clif_misceffect(&sd->bl, 3);
|
||||
@ -2496,7 +2496,7 @@ ACMD_FUNC(grade)
|
||||
sd->inventory.u.items_inventory[i].enchantgrade = final_grade;
|
||||
current_position = sd->inventory.u.items_inventory[i].equip;
|
||||
pc_unequipitem(sd, i, 3);
|
||||
clif_delitem(sd, i, 1, 3);
|
||||
clif_delitem( *sd, i, 1, 3 );
|
||||
clif_additem(sd, i, 1, 0);
|
||||
pc_equipitem(sd, i, current_position);
|
||||
clif_misceffect(&sd->bl, 3);
|
||||
@ -2690,7 +2690,7 @@ ACMD_FUNC(statuspoint)
|
||||
|
||||
if (new_status_point != sd->status.status_point) {
|
||||
sd->status.status_point = new_status_point;
|
||||
clif_updatestatus(sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd, SP_STATUSPOINT);
|
||||
clif_displaymessage(fd, msg_txt(sd,174)); // Number of status points changed.
|
||||
} else {
|
||||
if (point < 0)
|
||||
@ -2738,7 +2738,7 @@ ACMD_FUNC(traitpoint)
|
||||
|
||||
if (new_trait_point != sd->status.trait_point) {
|
||||
sd->status.trait_point = new_trait_point;
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
clif_displaymessage(fd, msg_txt(sd, 174)); // Number of status points changed.
|
||||
}
|
||||
else {
|
||||
@ -2788,7 +2788,7 @@ ACMD_FUNC(skillpoint)
|
||||
|
||||
if (new_skill_point != sd->status.skill_point) {
|
||||
sd->status.skill_point = new_skill_point;
|
||||
clif_updatestatus(sd, SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd, SP_SKILLPOINT);
|
||||
clif_displaymessage(fd, msg_txt(sd,175)); // Number of skill points changed.
|
||||
} else {
|
||||
if (point < 0)
|
||||
@ -2884,12 +2884,12 @@ ACMD_FUNC(param)
|
||||
if( new_value != status ){
|
||||
if (stat < PARAM_POW) {
|
||||
pc_setstat( sd, SP_STR + stat - PARAM_STR, new_value );
|
||||
clif_updatestatus(sd, SP_STR + stat);
|
||||
clif_updatestatus(sd, SP_USTR + stat);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_STR + stat ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + stat ) );
|
||||
} else {
|
||||
pc_setstat( sd, SP_POW + stat - PARAM_POW, new_value );
|
||||
clif_updatestatus(sd, SP_POW + stat - PARAM_POW);
|
||||
clif_updatestatus(sd, SP_UPOW + stat - PARAM_POW);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_POW + stat - PARAM_POW ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + stat - PARAM_POW ) );
|
||||
}
|
||||
status_calc_pc(sd, SCO_FORCE);
|
||||
clif_displaymessage(fd, msg_txt(sd,42)); // Stat changed.
|
||||
@ -2947,8 +2947,8 @@ ACMD_FUNC(stat_all)
|
||||
|
||||
if (new_value != status[i]) {
|
||||
pc_setstat( sd, SP_STR + i, new_value );
|
||||
clif_updatestatus(sd, SP_STR + i);
|
||||
clif_updatestatus(sd, SP_USTR + i);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_STR + i ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + i ) );
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@ -3021,8 +3021,8 @@ ACMD_FUNC(trait_all) {
|
||||
|
||||
if (new_value != status[i]) {
|
||||
pc_setstat( sd, SP_POW + i - PARAM_POW, new_value );
|
||||
clif_updatestatus(sd, SP_POW + i - PARAM_POW);
|
||||
clif_updatestatus(sd, SP_UPOW + i - PARAM_POW);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_POW + i - PARAM_POW ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + i - PARAM_POW ) );
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@ -3657,7 +3657,7 @@ ACMD_FUNC(allskill)
|
||||
nullpo_retr(-1, sd);
|
||||
pc_allskillup(sd); // all skills
|
||||
sd->status.skill_point = 0; // 0 skill points
|
||||
clif_updatestatus(sd, SP_SKILLPOINT); // update
|
||||
clif_updatestatus(*sd, SP_SKILLPOINT); // update
|
||||
clif_displaymessage(fd, msg_txt(sd,76)); // All skills have been added to your skill tree.
|
||||
|
||||
return 0;
|
||||
@ -4295,7 +4295,7 @@ ACMD_FUNC(reload) {
|
||||
iter = mapit_getallusers();
|
||||
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ){
|
||||
pc_close_npc(pl_sd,1);
|
||||
clif_cutin(pl_sd, "", 255);
|
||||
clif_cutin( *pl_sd, "", 255 );
|
||||
pl_sd->state.block_action &= ~(PCBLOCK_ALL ^ PCBLOCK_IMMUNE);
|
||||
bg_queue_leave(pl_sd);
|
||||
}
|
||||
@ -6141,7 +6141,7 @@ ACMD_FUNC(clearcart)
|
||||
}
|
||||
|
||||
clif_clearcart(fd);
|
||||
clif_updatestatus(sd,SP_CARTINFO);
|
||||
clif_updatestatus(*sd,SP_CARTINFO);
|
||||
|
||||
clif_displaymessage(fd, msg_txt(sd,1397)); // Your cart was cleaned.
|
||||
return 0;
|
||||
@ -7947,7 +7947,7 @@ ACMD_FUNC(showmobs)
|
||||
continue; // hide mobs waiting for respawn
|
||||
|
||||
++number;
|
||||
clif_viewpoint(sd, 1, 0, md->bl.x, md->bl.y, number, 0xFFFFFF);
|
||||
clif_viewpoint( *sd, 1, 0, md->bl.x, md->bl.y, number, 0xFFFFFF );
|
||||
}
|
||||
mapit_free(it);
|
||||
|
||||
@ -8005,7 +8005,9 @@ ACMD_FUNC(homevolution)
|
||||
clif_displaymessage(fd, msg_txt(sd,1255)); // Your homunculus doesn't evolve.
|
||||
return -1;
|
||||
}
|
||||
clif_homskillinfoblock(sd);
|
||||
|
||||
clif_homskillinfoblock( *sd->hd );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -8088,7 +8090,7 @@ ACMD_FUNC(homfriendly)
|
||||
friendly = cap_value(friendly, 0, 1000);
|
||||
|
||||
sd->hd->homunculus.intimacy = friendly * 100 ;
|
||||
clif_send_homdata(sd,SP_INTIMATE,friendly);
|
||||
clif_send_homdata( *sd->hd, SP_INTIMATE );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -8115,7 +8117,7 @@ ACMD_FUNC(homhungry)
|
||||
hungry = cap_value(hungry, 0, 100);
|
||||
|
||||
sd->hd->homunculus.hunger = hungry;
|
||||
clif_send_homdata(sd,SP_HUNGRY,hungry);
|
||||
clif_send_homdata( *sd->hd, SP_HUNGRY );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -10594,8 +10596,8 @@ ACMD_FUNC(clonestat) {
|
||||
clonestat_check(luk, PARAM_LUK);
|
||||
|
||||
for (i = PARAM_STR; i < PARAM_POW; i++) {
|
||||
clif_updatestatus(sd, SP_STR + i);
|
||||
clif_updatestatus(sd, SP_USTR + i);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_STR + i ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + i ) );
|
||||
}
|
||||
|
||||
if (sd->class_ & JOBL_FOURTH) {
|
||||
@ -10607,8 +10609,8 @@ ACMD_FUNC(clonestat) {
|
||||
clonestat_check(crt, PARAM_CRT);
|
||||
|
||||
for (i = PARAM_POW; i < PARAM_MAX; i++) {
|
||||
clif_updatestatus(sd, SP_POW + i - PARAM_POW);
|
||||
clif_updatestatus(sd, SP_UPOW + i - PARAM_POW);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_POW + i - PARAM_POW ) );
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + i - PARAM_POW ) );
|
||||
}
|
||||
|
||||
}
|
||||
@ -10954,7 +10956,7 @@ ACMD_FUNC(setcard)
|
||||
log_pick_pc( sd, LOG_TYPE_COMMAND, -1, &sd->inventory.u.items_inventory[i] );
|
||||
sd->inventory.u.items_inventory[i].card[slot] = card_id;
|
||||
log_pick_pc( sd, LOG_TYPE_COMMAND, 1, &sd->inventory.u.items_inventory[i] );
|
||||
clif_delitem(sd, i, 1, 0);
|
||||
clif_delitem( *sd, i, 1, 0 );
|
||||
clif_additem(sd, i, 1, 0);
|
||||
pc_equipitem(sd, i, current_position);
|
||||
return 0;
|
||||
|
@ -463,7 +463,7 @@ int chrif_changemapserverack(uint32 account_id, int login_id1, int login_id2, ui
|
||||
clif_authfail_fd(node->fd, 0);
|
||||
chrif_char_offline(node->sd);
|
||||
} else
|
||||
clif_changemapserver(node->sd, map, x, y, ntohl(ip), ntohs(port));
|
||||
clif_changemapserver( *node->sd, map, x, y, ntohl(ip), ntohs(port) );
|
||||
|
||||
//Player has been saved already, remove him from memory. [Skotlex]
|
||||
chrif_auth_delete(account_id, char_id, ST_MAPCHANGE);
|
||||
@ -994,7 +994,7 @@ int chrif_changedsex(int fd) {
|
||||
}
|
||||
}
|
||||
|
||||
clif_updatestatus(sd, SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd, SP_SKILLPOINT);
|
||||
// Change to other gender version of the job if needed.
|
||||
if (sd->status.sex)// Changed from female version of job.
|
||||
sd->status.class_ -= 1;
|
||||
|
1730
src/map/clif.cpp
1730
src/map/clif.cpp
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,8 @@ struct s_laphine_upgrade;
|
||||
struct s_captcha_data;
|
||||
enum e_macro_detect_status : uint8;
|
||||
enum e_macro_report_status : uint8;
|
||||
enum e_hom_state2 : uint8;
|
||||
enum _sp;
|
||||
|
||||
enum e_PacketDBVersion { // packet DB
|
||||
MIN_PACKET_DB = 0x064,
|
||||
@ -629,39 +631,39 @@ void clif_authrefuse(int fd, uint8 error_code);
|
||||
void clif_authfail_fd(int fd, int type);
|
||||
void clif_charselectok(int id, uint8 ok);
|
||||
void clif_dropflooritem(struct flooritem_data* fitem, bool canShowEffect);
|
||||
void clif_clearflooritem(struct flooritem_data *fitem, int fd);
|
||||
void clif_clearflooritem( flooritem_data& fitem, map_session_data* tsd = nullptr );
|
||||
|
||||
void clif_clearunit_single(int id, clr_type type, int fd);
|
||||
void clif_clearunit_area(struct block_list* bl, clr_type type);
|
||||
void clif_clearunit_single( uint32 GID, clr_type type, map_session_data& tsd );
|
||||
void clif_clearunit_area( block_list& bl, clr_type type );
|
||||
void clif_clearunit_delayed(struct block_list* bl, clr_type type, t_tick tick);
|
||||
int clif_spawn(struct block_list *bl, bool walking = false); //area
|
||||
void clif_walkok(map_session_data *sd); // self
|
||||
void clif_walkok( map_session_data& sd );
|
||||
void clif_move(struct unit_data *ud); //area
|
||||
void clif_changemap(map_session_data *sd, short m, int x, int y); //self
|
||||
void clif_changemapserver( map_session_data* sd, const char* map, int x, int y, uint32 ip, uint16 port );
|
||||
void clif_changemap( map_session_data& sd, short m, uint16 x, uint16 y );
|
||||
void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint16 y, uint32 ip, uint16 port );
|
||||
void clif_blown(struct block_list *bl); // area
|
||||
void clif_slide(struct block_list *bl, int x, int y); // area
|
||||
void clif_fixpos(struct block_list *bl); // area
|
||||
void clif_npcbuysell(map_session_data* sd, int id); //self
|
||||
void clif_fixpos( block_list& bl );
|
||||
void clif_npcbuysell( map_session_data& sd, npc_data& nd );
|
||||
void clif_buylist(map_session_data *sd, struct npc_data *nd); //self
|
||||
void clif_selllist(map_session_data *sd); //self
|
||||
void clif_selllist( map_session_data& sd );
|
||||
void clif_npc_market_open(map_session_data *sd, struct npc_data *nd);
|
||||
void clif_parse_NPCMarketClosed(int fd, map_session_data *sd);
|
||||
void clif_parse_NPCMarketPurchase(int fd, map_session_data *sd);
|
||||
void clif_scriptmes( map_session_data& sd, uint32 npcid, const char *mes );
|
||||
void clif_scriptnext( map_session_data& sd, uint32 npcid );
|
||||
void clif_scriptclose(map_session_data *sd, int npcid); //self
|
||||
void clif_scriptclose( map_session_data& sd, uint32 npcid );
|
||||
void clif_scriptclear( map_session_data& sd, int npcid ); //self
|
||||
void clif_scriptmenu(map_session_data* sd, int npcid, const char* mes); //self
|
||||
void clif_scriptinput(map_session_data *sd, int npcid); //self
|
||||
void clif_scriptinputstr(map_session_data *sd, int npcid); // self
|
||||
void clif_cutin(map_session_data* sd, const char* image, int type); //self
|
||||
void clif_viewpoint(map_session_data *sd, int npc_id, int type, int x, int y, int id, int color); //self
|
||||
void clif_scriptmenu( map_session_data& sd, uint32 npcid, const char* mes );
|
||||
void clif_scriptinput( map_session_data& sd, uint32 npcid );
|
||||
void clif_scriptinputstr( map_session_data& sd, uint32 npcid );
|
||||
void clif_cutin( map_session_data& sd, const char* image, int type );
|
||||
void clif_viewpoint( map_session_data& sd, uint32 npc_id, int type, uint16 x, uint16 y, int id, uint32 color );
|
||||
void clif_additem(map_session_data *sd, int n, int amount, unsigned char fail); // self
|
||||
void clif_dropitem(map_session_data *sd,int n,int amount); //self
|
||||
void clif_delitem(map_session_data *sd,int n,int amount, short reason); //self
|
||||
void clif_dropitem( map_session_data& sd, int index, int amount );
|
||||
void clif_delitem( map_session_data& sd, int index, int amount, short reason );
|
||||
void clif_update_hp(map_session_data &sd);
|
||||
void clif_updatestatus(map_session_data *sd,int type); //self
|
||||
void clif_updatestatus( map_session_data& sd, _sp type );
|
||||
void clif_changestatus(map_session_data* sd,int type,int val); //area
|
||||
int clif_damage(struct block_list* src, struct block_list* dst, t_tick tick, int sdelay, int ddelay, int64 sdamage, int div, enum e_damage_type type, int64 sdamage2, bool spdamage); // area
|
||||
void clif_takeitem(struct block_list* src, struct block_list* dst);
|
||||
@ -863,9 +865,9 @@ void clif_guild_allianceack(map_session_data *sd,int flag);
|
||||
void clif_guild_delalliance(map_session_data *sd,int guild_id,int flag);
|
||||
void clif_guild_oppositionack(map_session_data *sd,int flag);
|
||||
void clif_guild_broken(map_session_data *sd,int flag);
|
||||
void clif_guild_xy(map_session_data *sd);
|
||||
void clif_guild_xy_single(int fd, map_session_data *sd);
|
||||
void clif_guild_xy_remove(map_session_data *sd);
|
||||
void clif_guild_xy( map_session_data& sd );
|
||||
void clif_guild_xy_single( map_session_data& sd, map_session_data& tsd );
|
||||
void clif_guild_xy_remove( map_session_data& sd );
|
||||
void clif_guild_castle_list(map_session_data& sd);
|
||||
void clif_guild_castle_info(map_session_data& sd, std::shared_ptr<guild_castle> castle );
|
||||
void clif_guild_castle_teleport_res(map_session_data& sd, enum e_siege_teleport_result result);
|
||||
@ -958,10 +960,10 @@ void clif_feel_hate_reset(map_session_data *sd);
|
||||
|
||||
// [blackhole89]
|
||||
void clif_hominfo(map_session_data *sd, struct homun_data *hd, int flag);
|
||||
int clif_homskillinfoblock(map_session_data *sd);
|
||||
void clif_homskillup(map_session_data *sd, uint16 skill_id); //[orn]
|
||||
void clif_homskillinfoblock( homun_data& hd );
|
||||
void clif_homskillup( homun_data& hd, uint16 skill_id );
|
||||
void clif_hom_food(map_session_data *sd,int foodid,int fail); //[orn]
|
||||
void clif_send_homdata(map_session_data *sd, int state, int param); //[orn]
|
||||
void clif_send_homdata( homun_data& hd, e_hom_state2 state );
|
||||
|
||||
void clif_configuration( map_session_data* sd, enum e_config_type type, bool enabled );
|
||||
void clif_viewequip_ack(map_session_data* sd, map_session_data* tsd);
|
||||
|
@ -22,12 +22,9 @@
|
||||
packet(0x0070,6);
|
||||
packet(0x0071,28);
|
||||
parseable_packet(0x0072,19,clif_parse_WantToConnection,2,6,10,14,18);
|
||||
packet(0x0073,11);
|
||||
packet(0x0074,3);
|
||||
packet(0x0075,-1);
|
||||
packet(0x0076,9);
|
||||
packet(0x0077,5);
|
||||
packet(0x0078,54);
|
||||
packet(0x0079,53);
|
||||
packet(0x007a,58);
|
||||
packet(0x007b,60);
|
||||
@ -35,15 +32,10 @@
|
||||
parseable_packet(0x007d,2,clif_parse_LoadEndAck,0);
|
||||
parseable_packet(0x007e,6,clif_parse_TickSend,2);
|
||||
packet(0x007f,6);
|
||||
packet(0x0080,7);
|
||||
packet(0x0081,3);
|
||||
packet(0x0082,2);
|
||||
packet(0x0083,2);
|
||||
packet(0x0084,2);
|
||||
parseable_packet(0x0085,5,clif_parse_WalkToXY,2);
|
||||
packet(0x0086,16);
|
||||
packet(0x0087,12);
|
||||
packet(0x0088,10);
|
||||
parseable_packet(0x0089,7,clif_parse_ActionRequest,2,6);
|
||||
packet(0x008a,29);
|
||||
packet(0x008b,2);
|
||||
@ -52,8 +44,6 @@
|
||||
packet(0x008e,-1);
|
||||
//packet(0x008f,-1);
|
||||
parseable_packet(0x0090,7,clif_parse_NpcClicked,2,6);
|
||||
packet(0x0091,22);
|
||||
packet(0x0092,28);
|
||||
packet(0x0093,2);
|
||||
parseable_packet(0x0094,6,clif_parse_GetCharNameRequest,2);
|
||||
parseable_packet(0x0096,-1,clif_parse_WisMessage,2,4,28);
|
||||
@ -65,7 +55,6 @@
|
||||
packet( HEADER_ZC_ITEM_ENTRY, sizeof( struct PACKET_ZC_ITEM_ENTRY ) );
|
||||
packet(0x009e,17);
|
||||
parseable_packet(0x009f,6,clif_parse_TakeItem,2);
|
||||
packet(0x00a1,6);
|
||||
parseable_packet(0x00a2,6,clif_parse_DropItem,2,4);
|
||||
packet( inventorylistnormalType, -1 );
|
||||
packet( inventorylistequipType, -1 );
|
||||
@ -78,29 +67,20 @@
|
||||
packet(0x00ac,7);
|
||||
//packet(0x00ad,-1);
|
||||
packet(0x00ae,-1);
|
||||
packet(0x00af,6);
|
||||
packet(0x00b0,8);
|
||||
packet(0x00b1,8);
|
||||
parseable_packet(0x00b2,3,clif_parse_Restart,2);
|
||||
packet(0x00b3,3);
|
||||
packet(0x00b6,6);
|
||||
packet(0x00b7,-1);
|
||||
parseable_packet(0x00b8,7,clif_parse_NpcSelectMenu,2,6);
|
||||
parseable_packet(0x00b9,6,clif_parse_NpcNextClicked,2);
|
||||
packet(0x00ba,2);
|
||||
parseable_packet(0x00bb,5,clif_parse_StatusUp,2,4);
|
||||
packet(0x00bc,6);
|
||||
packet(0x00bd,44);
|
||||
packet(0x00be,5);
|
||||
parseable_packet(0x00bf,3,clif_parse_Emotion,2);
|
||||
packet(0x00c0,7);
|
||||
parseable_packet(0x00c1,2,clif_parse_HowManyConnections,0);
|
||||
packet(0x00c2,6);
|
||||
packet(0x00c3,8);
|
||||
packet(0x00c4,6);
|
||||
parseable_packet(0x00c5,7,clif_parse_NpcBuySellSelected,2,6);
|
||||
packet(0x00c6,-1);
|
||||
packet(0x00c7,-1);
|
||||
parseable_packet(0x00c8,-1,clif_parse_NpcBuyListSend,2,4);
|
||||
parseable_packet(HEADER_CZ_PC_SELL_ITEMLIST,-1,clif_parse_NpcSellListSend,2,4);
|
||||
packet(0x00ca,3);
|
||||
@ -183,7 +163,6 @@
|
||||
packet(0x011e,3);
|
||||
packet(0x011f,16);
|
||||
packet(0x0120,6);
|
||||
packet(0x0121,14);
|
||||
packet( cartlistequipType, -1 );
|
||||
packet( cartlistnormalType, -1 );
|
||||
packet(0x0125,8);
|
||||
@ -192,7 +171,6 @@
|
||||
parseable_packet(0x0128,8,clif_parse_MoveFromKafraToCart,2,4);
|
||||
parseable_packet(0x0129,8,clif_parse_MoveToKafraFromCart,2,4);
|
||||
parseable_packet(0x012a,2,clif_parse_RemoveOption,0);
|
||||
packet(0x012b,2);
|
||||
packet(0x012c,3);
|
||||
packet(0x012d,4);
|
||||
parseable_packet(0x012e,2,clif_parse_CloseVending,0);
|
||||
@ -204,17 +182,13 @@
|
||||
packet(0x0137,6);
|
||||
packet(0x0138,3);
|
||||
packet(0x0139,16);
|
||||
packet(0x013a,4);
|
||||
packet(0x013b,4);
|
||||
packet(0x013c,4);
|
||||
packet(0x013d,6);
|
||||
packet(0x013e,24);
|
||||
parseable_packet(0x013f,26,clif_parse_GM_Item_Monster,2);
|
||||
parseable_packet(0x0140,22,clif_parse_MapMove,2,18,20);
|
||||
packet(0x0141,14);
|
||||
packet(0x0142,6);
|
||||
parseable_packet(0x0143,10,clif_parse_NpcAmountInput,2,6);
|
||||
packet(0x0144,23);
|
||||
packet(0x0145,19);
|
||||
parseable_packet(0x0146,6,clif_parse_NpcCloseClicked,2);
|
||||
packet(0x0147,39);
|
||||
@ -325,7 +299,6 @@
|
||||
packet(0x01b0,11);
|
||||
packet(0x01b1,7);
|
||||
parseable_packet(0x01b2,-1,clif_parse_OpenVending,2,4,84,85);
|
||||
packet(0x01b3,67);
|
||||
packet(0x01b4,12);
|
||||
packet(0x01b5,18);
|
||||
packet(0x01b6,114);
|
||||
@ -353,7 +326,6 @@
|
||||
packet(0x01d0,8);
|
||||
packet(0x01d1,14);
|
||||
packet(0x01d2,10);
|
||||
packet(0x01d4,6);
|
||||
parseable_packet(0x01d5,-1,clif_parse_NpcStringInput,2,4,8);
|
||||
packet(0x01d6,4);
|
||||
packet(0x01d7,11);
|
||||
@ -375,7 +347,6 @@
|
||||
parseable_packet(0x01e7,2,clif_parse_NoviceDoriDori,0);
|
||||
parseable_packet(0x01e8,28,clif_parse_CreateParty2,2,26,27);
|
||||
packet(0x01ea,6);
|
||||
packet(0x01eb,10);
|
||||
packet(0x01ec,26);
|
||||
parseable_packet(0x01ed,2,clif_parse_NoviceExplosionSpirits,0);
|
||||
packet(0x01f0,-1);
|
||||
@ -693,13 +664,11 @@
|
||||
// 2005-05-23aSakexe
|
||||
#if PACKETVER >= 20050523
|
||||
packet(0x022e,69);
|
||||
packet(0x0230,12);
|
||||
#endif
|
||||
|
||||
// 2005-05-30aSakexe
|
||||
#if PACKETVER >= 20050530
|
||||
packet(0x022e,71);
|
||||
packet(0x0235,-1);
|
||||
packet(0x0236,10);
|
||||
parseable_packet(0x0237,2,clif_parse_RankingPk,0);
|
||||
packet(0x0238,282);
|
||||
@ -708,7 +677,6 @@
|
||||
// 2005-05-31aSakexe
|
||||
#if PACKETVER >= 20050531
|
||||
packet(0x0216,2);
|
||||
packet(0x0239,11);
|
||||
#endif
|
||||
|
||||
// 2005-06-08aSakexe
|
||||
@ -1096,7 +1064,6 @@
|
||||
|
||||
// 2007-11-06aSakexe
|
||||
#if PACKETVER >= 20071106
|
||||
packet(0x0078,55);
|
||||
packet(0x007c,42);
|
||||
packet(0x022c,65);
|
||||
packet(0x029b,80);
|
||||
@ -1125,7 +1092,6 @@
|
||||
// 2008-01-02aSakexe
|
||||
#if PACKETVER >= 20080102
|
||||
parseable_packet(0x01df,6,clif_parse_GMReqAccountName,2);
|
||||
packet(0x02eb,13);
|
||||
packet(0x02ec,67);
|
||||
packet(0x02ed,59);
|
||||
packet(0x02ee,60);
|
||||
@ -1327,7 +1293,6 @@
|
||||
// 2008-11-26aSakexe
|
||||
#if PACKETVER >= 20081126
|
||||
packet(0x01a2,37);
|
||||
packet(0x0440,10);
|
||||
packet(0x0441,4);
|
||||
#endif
|
||||
|
||||
@ -1408,7 +1373,6 @@
|
||||
// 2008-12-17aRagexeRE
|
||||
#if PACKETVER >= 20081217
|
||||
packet(0x01a2,37);
|
||||
//packet(0x0440,10);
|
||||
//packet(0x0441,4);
|
||||
//packet(0x0443,8);
|
||||
#endif
|
||||
@ -1559,11 +1523,6 @@
|
||||
packet(0x07f9,-1);
|
||||
#endif
|
||||
|
||||
// 2009-11-17aRagexeRE
|
||||
#if PACKETVER >= 20091117
|
||||
packet(0x07fa,8);
|
||||
#endif
|
||||
|
||||
// 2009-11-24aRagexeRE
|
||||
#if PACKETVER >= 20091124
|
||||
packet(0x07fb,25);
|
||||
@ -1801,7 +1760,6 @@
|
||||
parseable_packet(0x08ab,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15);
|
||||
parseable_packet(0x088b,2,clif_parse_SearchStoreInfoNextPage,0);
|
||||
parseable_packet(0x08a2,sizeof(struct PACKET_CZ_SSILIST_ITEM_CLICK),clif_parse_SearchStoreInfoListItemClick,2,6,10);
|
||||
packet(0x08cf,10); //Amulet spirits
|
||||
#endif
|
||||
|
||||
// 2012-03-07fRagexeRE
|
||||
@ -1915,7 +1873,7 @@
|
||||
parseable_packet(0x0974,2,clif_parse_merge_item_cancel,0); // CZ_CANCEL_MERGE_ITEM
|
||||
parseable_packet(0x0844,2,clif_parse_cashshop_open_request,0);
|
||||
packet(0x0849,16); //clif_cashshop_result
|
||||
parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10);
|
||||
parseable_packet(HEADER_CZ_SE_PC_BUY_CASHITEM_LIST,-1,clif_parse_cashshop_buy,0);
|
||||
parseable_packet(0x084a,2,clif_parse_cashshop_close,0);
|
||||
parseable_packet(0x08c9,2,clif_parse_cashshop_list_request,0);
|
||||
#endif
|
||||
@ -1981,7 +1939,6 @@
|
||||
parseable_packet(0x044A,6,clif_parse_client_version,2);
|
||||
parseable_packet(0x0844,2,clif_parse_cashshop_open_request,0);
|
||||
packet(0x0849,16); //clif_cashshop_result
|
||||
parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10);
|
||||
parseable_packet(0x084a,2,clif_parse_cashshop_close,0);
|
||||
packet(0x084b,19); //fallitem4
|
||||
parseable_packet(0x085a,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10);
|
||||
@ -1999,7 +1956,6 @@
|
||||
parseable_packet(0x089b,10,clif_parse_UseSkillToId,2,4,6);
|
||||
parseable_packet(0x08ac,8,clif_parse_MoveToKafra,2,4);
|
||||
parseable_packet(0x08c9,2,clif_parse_cashshop_list_request,0);
|
||||
packet(0x08cf,10); //Amulet spirits
|
||||
packet(0x08d2,10);
|
||||
parseable_packet(0x0922,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12);
|
||||
//parseable_packet(0x092e,2,clif_parse_SearchStoreInfoNextPage,0);
|
||||
@ -2031,7 +1987,6 @@
|
||||
|
||||
// 2013-07-10Ragexe
|
||||
#if PACKETVER >= 20130710
|
||||
parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10);
|
||||
packet(0x097D,288); //ZC_ACK_RANKING
|
||||
packet(0x097E,12); //ZC_UPDATE_RANKING_POINT
|
||||
#endif
|
||||
@ -2140,7 +2095,6 @@
|
||||
packet(0x006d,149);
|
||||
packet(0x08e3,149);
|
||||
// New Packet
|
||||
packet(0x0A18,14); // ZC_ACCEPT_ENTER3
|
||||
packet(0x0A27,8);
|
||||
packet(0x0A28,3); // ZC_ACK_OPENSTORE2
|
||||
packet(0x09FD,-1); // ZC_NOTIFY_MOVEENTRY11
|
||||
@ -2278,11 +2232,6 @@
|
||||
packet(0x0A9D,4);
|
||||
#endif
|
||||
|
||||
// 2017-03-15cRagexeRE
|
||||
#if PACKETVER >= 20170315
|
||||
packet(0xac7,156);
|
||||
#endif
|
||||
|
||||
// 2017-04-19bRagexeRE
|
||||
#if PACKETVER >= 20170419
|
||||
parseable_packet(0x0AC0,26,clif_parse_Mail_refreshinbox,2,10);
|
||||
@ -2304,7 +2253,6 @@
|
||||
|
||||
// 2017-08-30bRagexeRE
|
||||
#if PACKETVER >= 20170830
|
||||
packet(0x0ACB,12);
|
||||
packet(0x0ACC,18);
|
||||
#endif
|
||||
|
||||
@ -2379,7 +2327,7 @@
|
||||
#endif
|
||||
|
||||
#if PACKETVER >= 20190724
|
||||
parseable_packet(HEADER_CZ_GUILD_EMBLEM_CHANGE2, sizeof( PACKET_CZ_GUILD_EMBLEM_CHANGE2 ), clif_parse_GuildChangeEmblem2, 0 );
|
||||
parseable_packet(HEADER_CZ_REQ_ADD_NEW_EMBLEM, sizeof( PACKET_CZ_REQ_ADD_NEW_EMBLEM ), clif_parse_GuildChangeEmblem2, 0 );
|
||||
packet(HEADER_ZC_CHANGE_GUILD, sizeof(PACKET_ZC_CHANGE_GUILD));
|
||||
#endif
|
||||
|
||||
@ -2412,7 +2360,7 @@
|
||||
#endif
|
||||
|
||||
#if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200724
|
||||
parseable_packet( HEADER_CZ_UNCONFIRMED_TSTATUS_UP, sizeof( PACKET_CZ_UNCONFIRMED_TSTATUS_UP ), clif_parse_traitstatus_up, 0 );
|
||||
parseable_packet( HEADER_CZ_ADVANCED_STATUS_CHANGE, sizeof( PACKET_CZ_ADVANCED_STATUS_CHANGE ), clif_parse_traitstatus_up, 0 );
|
||||
parseable_packet( HEADER_CZ_GRADE_ENCHANT_SELECT_EQUIPMENT, sizeof( struct PACKET_CZ_GRADE_ENCHANT_SELECT_EQUIPMENT ), clif_parse_enchantgrade_add, 0 );
|
||||
parseable_packet( HEADER_CZ_GRADE_ENCHANT_REQUEST, sizeof( struct PACKET_CZ_GRADE_ENCHANT_REQUEST ), clif_parse_enchantgrade_start, 0 );
|
||||
parseable_packet( HEADER_CZ_GRADE_ENCHANT_CLOSE_UI, sizeof( struct PACKET_CZ_GRADE_ENCHANT_CLOSE_UI ), clif_parse_enchantgrade_close, 0 );
|
||||
@ -2429,7 +2377,7 @@
|
||||
|
||||
#if PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818 || PACKETVER_MAIN_NUM >= 20220330
|
||||
parseable_packet( HEADER_CZ_CHECKNAME2, sizeof( struct PACKET_CZ_CHECKNAME2 ), clif_parse_Mail_Receiver_Check, 0 );
|
||||
parseable_packet( HEADER_CZ_UNCONFIRMED_RODEX_RETURN, sizeof( struct PACKET_CZ_UNCONFIRMED_RODEX_RETURN ), clif_parse_Mail_return, 0 );
|
||||
parseable_packet( HEADER_CZ_RODEX_RETURN, sizeof( struct PACKET_CZ_RODEX_RETURN ), clif_parse_Mail_return, 0 );
|
||||
parseable_packet( HEADER_CZ_REQ_TAKEOFF_EQUIP_ALL, sizeof( struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL ), clif_parse_unequipall, 0 );
|
||||
parseable_packet( 0xb93, 12, clif_parse_dull, 0 );
|
||||
#endif
|
||||
|
@ -664,7 +664,7 @@ int guild_send_xy_timer_sub(const struct mmo_guild& g) {
|
||||
for (int i = 0; i < g.max_member; i++) {
|
||||
map_session_data* sd = g.member[i].sd;
|
||||
if( sd != nullptr && sd->fd && (sd->guild_x != sd->bl.x || sd->guild_y != sd->bl.y) && !sd->bg_id ) {
|
||||
clif_guild_xy(sd);
|
||||
clif_guild_xy( *sd );
|
||||
sd->guild_x = sd->bl.x;
|
||||
sd->guild_y = sd->bl.y;
|
||||
}
|
||||
@ -683,7 +683,7 @@ static TIMER_FUNC(guild_send_xy_timer){
|
||||
|
||||
int guild_send_dot_remove(map_session_data *sd) {
|
||||
if (sd->status.guild_id)
|
||||
clif_guild_xy_remove(sd);
|
||||
clif_guild_xy_remove( *sd );
|
||||
return 0;
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
@ -1360,8 +1360,8 @@ int guild_recv_memberinfoshort(int guild_id,uint32 account_id,uint32 char_id,int
|
||||
g->guild.member[i].sd->bl.m != g->guild.member[idx].sd->bl.m)
|
||||
continue;
|
||||
|
||||
clif_guild_xy_single(g->guild.member[idx].sd->fd, g->guild.member[i].sd);
|
||||
clif_guild_xy_single(g->guild.member[i].sd->fd, g->guild.member[idx].sd);
|
||||
clif_guild_xy_single( *g->guild.member[idx].sd, *g->guild.member[i].sd );
|
||||
clif_guild_xy_single( *g->guild.member[i].sd, *g->guild.member[idx].sd );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -394,8 +394,7 @@ void hom_calc_skilltree(homun_data *hd) {
|
||||
|
||||
hom_calc_skilltree_sub(*hd, homun_current->skill_tree);
|
||||
|
||||
if (hd->master)
|
||||
clif_homskillinfoblock(hd->master);
|
||||
clif_homskillinfoblock( *hd );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -484,11 +483,14 @@ void hom_skillup(struct homun_data *hd, uint16 skill_id)
|
||||
hd->homunculus.hskill[idx].lv++;
|
||||
hd->homunculus.skillpts-- ;
|
||||
status_calc_homunculus(hd, SCO_NONE);
|
||||
|
||||
clif_homskillup( *hd, skill_id );
|
||||
|
||||
if (hd->master) {
|
||||
clif_homskillup(hd->master, skill_id);
|
||||
clif_hominfo(hd->master,hd,0);
|
||||
clif_homskillinfoblock(hd->master);
|
||||
}
|
||||
|
||||
clif_homskillinfoblock( *hd );
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,7 +572,7 @@ int hom_levelup(struct homun_data *hd)
|
||||
// Needed to update skill list for mutated homunculus so unlocked skills will appear when the needed level is reached.
|
||||
status_calc_homunculus(hd,SCO_NONE);
|
||||
clif_hominfo(hd->master,hd,0);
|
||||
clif_homskillinfoblock(hd->master);
|
||||
clif_homskillinfoblock( *hd );
|
||||
|
||||
if ( hd->master && battle_config.homunculus_show_growth ) {
|
||||
char output[256] ;
|
||||
@ -905,8 +907,8 @@ int hom_food(map_session_data *sd, struct homun_data *hd)
|
||||
log_feeding(sd, LOG_FEED_HOMUNCULUS, foodID);
|
||||
|
||||
clif_emotion(&hd->bl,emotion);
|
||||
clif_send_homdata(sd,SP_HUNGRY,hd->homunculus.hunger);
|
||||
clif_send_homdata(sd,SP_INTIMATE,hd->homunculus.intimacy / 100);
|
||||
clif_send_homdata( *hd, SP_HUNGRY );
|
||||
clif_send_homdata( *hd, SP_INTIMATE );
|
||||
clif_hom_food(sd,foodID,1);
|
||||
|
||||
// Too much food :/
|
||||
@ -955,10 +957,10 @@ static TIMER_FUNC(hom_hungry){
|
||||
// Delete the homunculus if intimacy <= 100
|
||||
if (!hom_decrease_intimacy(hd, 100))
|
||||
return hom_delete(hd, ET_HUK);
|
||||
clif_send_homdata(sd,SP_INTIMATE,hd->homunculus.intimacy / 100);
|
||||
clif_send_homdata( *hd, SP_INTIMATE );
|
||||
}
|
||||
|
||||
clif_send_homdata(sd,SP_HUNGRY,hd->homunculus.hunger);
|
||||
clif_send_homdata( *hd, SP_HUNGRY );
|
||||
|
||||
int hunger_delay = (battle_config.homunculus_starving_rate > 0 && hd->homunculus.hunger <= battle_config.homunculus_starving_rate) ? battle_config.homunculus_starving_delay : hd->homunculusDB->hungryDelay; // Every 20 seconds if hunger <= 10
|
||||
|
||||
@ -1132,10 +1134,10 @@ bool hom_call(map_session_data *sd)
|
||||
if(map_addblock(&hd->bl))
|
||||
return false;
|
||||
clif_spawn(&hd->bl);
|
||||
clif_send_homdata(sd,SP_ACK,0);
|
||||
clif_send_homdata( *hd, SP_ACK );
|
||||
clif_hominfo(sd,hd,1);
|
||||
clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
|
||||
clif_homskillinfoblock(sd);
|
||||
clif_homskillinfoblock( *hd );
|
||||
if (battle_config.hom_setting&HOMSET_COPY_SPEED)
|
||||
status_calc_bl(&hd->bl, { SCB_SPEED });
|
||||
hom_save(hd);
|
||||
@ -1196,10 +1198,10 @@ int hom_recv_data(uint32 account_id, struct s_homunculus *sh, int flag)
|
||||
if(map_addblock(&hd->bl))
|
||||
return 0;
|
||||
clif_spawn(&hd->bl);
|
||||
clif_send_homdata(sd,SP_ACK,0);
|
||||
clif_send_homdata( *hd, SP_ACK );
|
||||
clif_hominfo(sd,hd,1);
|
||||
clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
|
||||
clif_homskillinfoblock(sd);
|
||||
clif_homskillinfoblock( *hd );
|
||||
hom_init_timers(hd);
|
||||
|
||||
#ifdef RENEWAL
|
||||
@ -1314,12 +1316,14 @@ void hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)
|
||||
hd->homunculus.hp = hd->battle_status.hp;
|
||||
if (!sd)
|
||||
return;
|
||||
clif_send_homdata(sd,SP_ACK,0);
|
||||
clif_send_homdata( *hd, SP_ACK );
|
||||
clif_hominfo(sd,hd,1);
|
||||
clif_hominfo(sd,hd,0);
|
||||
clif_homskillinfoblock(sd);
|
||||
if (hd->homunculus.class_ == 6052) //eleanor
|
||||
clif_homskillinfoblock( *hd );
|
||||
|
||||
if( hd->homunculus.class_ == MER_ELEANOR ){
|
||||
sc_start(&hd->bl,&hd->bl, SC_STYLE_CHANGE, 100, MH_MD_FIGHTING, INFINITE_TICK);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1394,7 +1398,7 @@ int hom_shuffle(struct homun_data *hd)
|
||||
hd->homunculus.exp = exp;
|
||||
memcpy(&hd->homunculus.hskill, &b_skill, sizeof(b_skill));
|
||||
hd->homunculus.skillpts = skillpts;
|
||||
clif_homskillinfoblock(sd);
|
||||
clif_homskillinfoblock( *hd );
|
||||
status_calc_homunculus(hd, SCO_NONE);
|
||||
status_percent_heal(&hd->bl, 100, 100);
|
||||
clif_specialeffect(&hd->bl,EF_HO_UP,AREA);
|
||||
|
@ -143,7 +143,7 @@ bool mail_removezeny( map_session_data *sd, bool flag ){
|
||||
}
|
||||
}else{
|
||||
// Update is called by pc_payzeny, so only call it in the else condition
|
||||
clif_updatestatus(sd, SP_ZENY);
|
||||
clif_updatestatus(*sd, SP_ZENY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ enum mail_attach_result mail_setitem(map_session_data *sd, short idx, uint32 amo
|
||||
#endif
|
||||
|
||||
sd->mail.zeny = amount;
|
||||
// clif_updatestatus(sd, SP_ZENY);
|
||||
// clif_updatestatus(*sd, SP_ZENY);
|
||||
return MAIL_ATTACH_SUCCESS;
|
||||
} else { // Item Transfer
|
||||
int i;
|
||||
|
@ -1622,7 +1622,7 @@ TIMER_FUNC(map_clearflooritem_timer){
|
||||
if (pet_db_search(fitem->item.nameid, PET_EGG))
|
||||
intif_delete_petdata(MakeDWord(fitem->item.card[1], fitem->item.card[2]));
|
||||
|
||||
clif_clearflooritem(fitem, 0);
|
||||
clif_clearflooritem( *fitem );
|
||||
map_deliddb(&fitem->bl);
|
||||
map_delblock(&fitem->bl);
|
||||
map_freeblock(&fitem->bl);
|
||||
@ -1638,7 +1638,7 @@ void map_clearflooritem(struct block_list *bl) {
|
||||
if( fitem->cleartimer != INVALID_TIMER )
|
||||
delete_timer(fitem->cleartimer,map_clearflooritem_timer);
|
||||
|
||||
clif_clearflooritem(fitem, 0);
|
||||
clif_clearflooritem( *fitem );
|
||||
map_deliddb(&fitem->bl);
|
||||
map_delblock(&fitem->bl);
|
||||
map_freeblock(&fitem->bl);
|
||||
|
@ -237,7 +237,7 @@ void mvptomb_destroy(struct mob_data *md) {
|
||||
int i;
|
||||
struct map_data *mapdata = map_getmapdata(nd->bl.m);
|
||||
|
||||
clif_clearunit_area(&nd->bl,CLR_OUTSIGHT);
|
||||
clif_clearunit_area( nd->bl, CLR_OUTSIGHT );
|
||||
map_delblock(&nd->bl);
|
||||
|
||||
ARR_FIND( 0, mapdata->npc_num, i, mapdata->npc[i] == nd );
|
||||
@ -3177,7 +3177,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
||||
|
||||
if( pcdb_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client.
|
||||
/* first we set them dead, then we delay the outsight effect */
|
||||
clif_clearunit_area(&md->bl,CLR_DEAD);
|
||||
clif_clearunit_area( md->bl, CLR_DEAD );
|
||||
clif_clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000);
|
||||
} else
|
||||
/**
|
||||
@ -6702,7 +6702,7 @@ static int mob_reload_sub( struct mob_data *md, va_list args ){
|
||||
// If they are spawned right now
|
||||
if( md->bl.prev != nullptr ){
|
||||
// Respawn all mobs on client side so that they are displayed correctly(if their view id changed)
|
||||
clif_clearunit_area(&md->bl, CLR_OUTSIGHT);
|
||||
clif_clearunit_area( md->bl, CLR_OUTSIGHT );
|
||||
clif_spawn(&md->bl);
|
||||
}
|
||||
}
|
||||
|
@ -1026,7 +1026,7 @@ bool npc_enable_target(npc_data& nd, uint32 char_id, e_npcv_status flag)
|
||||
clif_changeoption_target(&nd.bl, &sd->bl);
|
||||
else {
|
||||
if (nd.sc.option&(OPTION_HIDE|OPTION_CLOAK))
|
||||
clif_clearunit_single(nd.bl.id, CLR_OUTSIGHT, sd->fd);
|
||||
clif_clearunit_single( nd.bl.id, CLR_OUTSIGHT, *sd );
|
||||
else
|
||||
clif_spawn(&nd.bl);
|
||||
}
|
||||
@ -1053,11 +1053,11 @@ bool npc_enable_target(npc_data& nd, uint32 char_id, e_npcv_status flag)
|
||||
if (nd.class_ != JT_WARPNPC && nd.class_ != JT_GUILD_FLAG) { //Client won't display option changes for these classes [Toms]
|
||||
clif_changeoption(&nd.bl);
|
||||
if (nd.is_invisible)
|
||||
clif_clearunit_area(&nd.bl,CLR_OUTSIGHT); // Hack to trick maya purple card [Xazax]
|
||||
clif_clearunit_area( nd.bl, CLR_OUTSIGHT ); // Hack to trick maya purple card [Xazax]
|
||||
}
|
||||
else {
|
||||
if (nd.sc.option&(OPTION_HIDE|OPTION_CLOAK))
|
||||
clif_clearunit_area(&nd.bl,CLR_OUTSIGHT);
|
||||
clif_clearunit_area( nd.bl, CLR_OUTSIGHT );
|
||||
else
|
||||
clif_spawn(&nd.bl);
|
||||
}
|
||||
@ -1146,7 +1146,7 @@ int npc_event_dequeue(map_session_data* sd,bool free_script_stack)
|
||||
if(sd->npc_id)
|
||||
{ //Current script is aborted.
|
||||
if(sd->state.using_fake_npc){
|
||||
clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
if (free_script_stack&&sd->st) {
|
||||
@ -2168,7 +2168,7 @@ void run_tomb(map_session_data* sd, struct npc_data* nd)
|
||||
snprintf( buffer, sizeof( buffer ), msg_txt( sd, 661 ), nd->u.tomb.killer_name[0] ? nd->u.tomb.killer_name : "Unknown" ); // [^EE0000%s^000000]
|
||||
clif_scriptmes( *sd, nd->bl.id, buffer );
|
||||
|
||||
clif_scriptclose(sd, nd->bl.id);
|
||||
clif_scriptclose( *sd, nd->bl.id );
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
@ -2206,7 +2206,7 @@ int npc_click(map_session_data* sd, struct npc_data* nd)
|
||||
|
||||
switch(nd->subtype) {
|
||||
case NPCTYPE_SHOP:
|
||||
clif_npcbuysell(sd,nd->bl.id);
|
||||
clif_npcbuysell( *sd, *nd );
|
||||
break;
|
||||
case NPCTYPE_CASHSHOP:
|
||||
case NPCTYPE_ITEMSHOP:
|
||||
@ -2306,7 +2306,7 @@ bool npc_scriptcont(map_session_data* sd, int id, bool closing){
|
||||
case CLOSE:
|
||||
sd->st->state = END;
|
||||
if (sd->st->clear_cutin)
|
||||
clif_cutin(sd,"",255);
|
||||
clif_cutin( *sd, "", 255 );
|
||||
break;
|
||||
// close2
|
||||
case STOP:
|
||||
@ -2377,8 +2377,9 @@ int npc_buysellsel(map_session_data* sd, int id, int type)
|
||||
if (type == 0) {
|
||||
clif_buylist(sd,nd);
|
||||
} else {
|
||||
clif_selllist(sd);
|
||||
clif_selllist( *sd );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3381,7 +3382,7 @@ int npc_remove_map(struct npc_data* nd)
|
||||
|
||||
if (nd->subtype == NPCTYPE_SCRIPT)
|
||||
skill_clear_unitgroup(&nd->bl);
|
||||
clif_clearunit_area(&nd->bl,CLR_RESPAWN);
|
||||
clif_clearunit_area( nd->bl, CLR_RESPAWN );
|
||||
npc_unsetcells(nd);
|
||||
map_delblock(&nd->bl);
|
||||
//Remove npc from map[].npc list. [Skotlex]
|
||||
|
@ -36,6 +36,7 @@ struct PACKET_ZC_PC_PURCHASE_RESULT{
|
||||
int16 packetType;
|
||||
uint8 result;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_RESULT, 0xca)
|
||||
|
||||
struct PACKET_CZ_REQ_MAKINGARROW{
|
||||
int16 packetType;
|
||||
@ -45,6 +46,7 @@ struct PACKET_CZ_REQ_MAKINGARROW{
|
||||
uint16 itemId;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_MAKINGARROW, 0x1ae)
|
||||
|
||||
struct PACKET_CZ_SE_PC_BUY_CASHITEM_LIST_sub{
|
||||
uint32 itemId;
|
||||
@ -59,6 +61,7 @@ struct PACKET_CZ_SE_PC_BUY_CASHITEM_LIST{
|
||||
uint32 kafraPoints;
|
||||
struct PACKET_CZ_SE_PC_BUY_CASHITEM_LIST_sub items[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_SE_PC_BUY_CASHITEM_LIST, 0x848)
|
||||
|
||||
struct PACKET_CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO{
|
||||
int16 packetType;
|
||||
@ -70,6 +73,7 @@ struct PACKET_CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO{
|
||||
uint16 itemId;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO, 0x9ac)
|
||||
|
||||
struct PACKET_ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO{
|
||||
int16 packetType;
|
||||
@ -81,6 +85,7 @@ struct PACKET_ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO{
|
||||
#endif
|
||||
uint32 price;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO, 0x9ad)
|
||||
|
||||
struct PACKET_CZ_REQ_APPLY_BARGAIN_SALE_ITEM{
|
||||
int16 packetType;
|
||||
@ -98,6 +103,7 @@ struct PACKET_CZ_REQ_APPLY_BARGAIN_SALE_ITEM{
|
||||
uint8 hours;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_APPLY_BARGAIN_SALE_ITEM, 0x9ae)
|
||||
|
||||
struct PACKET_CZ_REQ_REMOVE_BARGAIN_SALE_ITEM{
|
||||
int16 packetType;
|
||||
@ -108,6 +114,7 @@ struct PACKET_CZ_REQ_REMOVE_BARGAIN_SALE_ITEM{
|
||||
uint16 itemId;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_REMOVE_BARGAIN_SALE_ITEM, 0x9b0)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_BARGAIN_SALE_SELLING{
|
||||
int16 packetType;
|
||||
@ -118,6 +125,7 @@ struct PACKET_ZC_NOTIFY_BARGAIN_SALE_SELLING{
|
||||
#endif
|
||||
uint32 remainingTime;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BARGAIN_SALE_SELLING, 0x9b2)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_BARGAIN_SALE_CLOSE{
|
||||
int16 packetType;
|
||||
@ -127,6 +135,7 @@ struct PACKET_ZC_NOTIFY_BARGAIN_SALE_CLOSE{
|
||||
uint16 itemId;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BARGAIN_SALE_CLOSE, 0x9b3)
|
||||
|
||||
struct PACKET_ZC_ACK_COUNT_BARGAIN_SALE_ITEM{
|
||||
int16 packetType;
|
||||
@ -137,6 +146,7 @@ struct PACKET_ZC_ACK_COUNT_BARGAIN_SALE_ITEM{
|
||||
#endif
|
||||
uint32 amount;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_COUNT_BARGAIN_SALE_ITEM, 0x9c4)
|
||||
|
||||
struct PACKET_ZC_ACK_GUILDSTORAGE_LOG_sub{
|
||||
uint32 id;
|
||||
@ -164,24 +174,28 @@ struct PACKET_ZC_ACK_GUILDSTORAGE_LOG{
|
||||
uint16 amount;
|
||||
struct PACKET_ZC_ACK_GUILDSTORAGE_LOG_sub items[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_GUILDSTORAGE_LOG, 0x9da)
|
||||
|
||||
struct PACKET_CZ_UNCONFIRMED_TSTATUS_UP{
|
||||
struct PACKET_CZ_ADVANCED_STATUS_CHANGE{
|
||||
int16 packetType;
|
||||
int16 type;
|
||||
int16 amount;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_ADVANCED_STATUS_CHANGE, 0x0b24)
|
||||
|
||||
struct PACKET_CZ_GUILD_EMBLEM_CHANGE2 {
|
||||
struct PACKET_CZ_REQ_ADD_NEW_EMBLEM {
|
||||
int16 packetType;
|
||||
uint32 guild_id;
|
||||
uint32 version;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_ADD_NEW_EMBLEM, 0x0b46)
|
||||
|
||||
struct PACKET_ZC_BROADCAST{
|
||||
int16 packetType;
|
||||
int16 PacketLength;
|
||||
char message[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_BROADCAST, 0x9a)
|
||||
|
||||
struct PACKET_ZC_BROADCAST2{
|
||||
int16 packetType;
|
||||
@ -193,25 +207,30 @@ struct PACKET_ZC_BROADCAST2{
|
||||
int16 fontY;
|
||||
char message[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_BROADCAST2, 0x1c3)
|
||||
|
||||
struct PACKET_ZC_SOULENERGY{
|
||||
int16 PacketType;
|
||||
uint32 AID;
|
||||
uint16 num;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_SOULENERGY, 0xb73)
|
||||
|
||||
struct PACKET_ZC_ENTRY_QUEUE_INIT {
|
||||
int16 packetType;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ENTRY_QUEUE_INIT, 0x90e)
|
||||
|
||||
struct PACKET_CZ_UNCONFIRMED_RODEX_RETURN{
|
||||
struct PACKET_CZ_RODEX_RETURN{
|
||||
int16 packetType;
|
||||
uint32 msgId;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_RODEX_RETURN, 0xb98)
|
||||
|
||||
struct PACKET_CZ_REQ_STYLE_CLOSE{
|
||||
int16 packetType;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_STYLE_CLOSE, 0xa48)
|
||||
|
||||
struct PACKET_ZC_SUMMON_HP_INIT {
|
||||
int16 PacketType;
|
||||
@ -219,6 +238,7 @@ struct PACKET_ZC_SUMMON_HP_INIT {
|
||||
uint32 CurrentHP;
|
||||
uint32 MaxHP;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_SUMMON_HP_INIT, 0xb6b)
|
||||
|
||||
struct PACKET_ZC_SUMMON_HP_UPDATE {
|
||||
int16 PacketType;
|
||||
@ -226,6 +246,7 @@ struct PACKET_ZC_SUMMON_HP_UPDATE {
|
||||
uint16 VarId;
|
||||
uint32 Value;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_SUMMON_HP_UPDATE, 0xb6c)
|
||||
|
||||
struct PACKET_ZC_REPUTE_INFO_sub{
|
||||
uint64 type;
|
||||
@ -238,12 +259,14 @@ struct PACKET_ZC_REPUTE_INFO{
|
||||
uint8 success;
|
||||
struct PACKET_ZC_REPUTE_INFO_sub list[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_REPUTE_INFO, 0x0b8d)
|
||||
|
||||
struct PACKET_ZC_UI_OPEN_V3{
|
||||
int16 packetType;
|
||||
uint8 type;
|
||||
uint64 data;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_UI_OPEN_V3, 0x0b9a)
|
||||
|
||||
struct PACKET_ZC_TARGET_SPIRITS {
|
||||
int16 packetType;
|
||||
@ -251,6 +274,7 @@ struct PACKET_ZC_TARGET_SPIRITS {
|
||||
uint32 unknown_val;
|
||||
uint16 amount;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_TARGET_SPIRITS, 0xb68)
|
||||
|
||||
struct PACKET_ZC_FRIENDS_LIST_sub{
|
||||
uint32 AID;
|
||||
@ -265,6 +289,7 @@ struct PACKET_ZC_FRIENDS_LIST{
|
||||
int16 PacketLength;
|
||||
struct PACKET_ZC_FRIENDS_LIST_sub friends[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_FRIENDS_LIST, 0x201)
|
||||
|
||||
struct PACKET_CZ_PC_SELL_ITEMLIST_sub {
|
||||
uint16 index;
|
||||
@ -276,6 +301,7 @@ struct PACKET_CZ_PC_SELL_ITEMLIST {
|
||||
int16 packetLength;
|
||||
PACKET_CZ_PC_SELL_ITEMLIST_sub sellList[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_PC_SELL_ITEMLIST, 0x00c9)
|
||||
|
||||
struct PACKET_CZ_REQ_CHANGE_MEMBERPOS_sub{
|
||||
uint32 AID;
|
||||
@ -288,22 +314,26 @@ struct PACKET_CZ_REQ_CHANGE_MEMBERPOS{
|
||||
int16 packetLength;
|
||||
struct PACKET_CZ_REQ_CHANGE_MEMBERPOS_sub list[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_CHANGE_MEMBERPOS, 0x155)
|
||||
|
||||
struct PACKET_ZC_CLEAR_DIALOG{
|
||||
int16 packetType;
|
||||
uint32 GID;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_CLEAR_DIALOG, 0x8d6)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_BIND_ON_EQUIP{
|
||||
int16 packetType;
|
||||
int16 index;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BIND_ON_EQUIP, 0x2d3)
|
||||
|
||||
struct PACKET_ZC_BANKING_CHECK{
|
||||
int16 packetType;
|
||||
int64 money;
|
||||
int16 reason;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_BANKING_CHECK, 0x9a6)
|
||||
|
||||
struct PACKET_ZC_ACK_BANKING_WITHDRAW{
|
||||
int16 packetType;
|
||||
@ -311,6 +341,7 @@ struct PACKET_ZC_ACK_BANKING_WITHDRAW{
|
||||
int64 money;
|
||||
int32 zeny;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_BANKING_WITHDRAW, 0x9aa)
|
||||
|
||||
struct PACKET_ZC_ACK_BANKING_DEPOSIT{
|
||||
int16 packetType;
|
||||
@ -318,33 +349,39 @@ struct PACKET_ZC_ACK_BANKING_DEPOSIT{
|
||||
int64 money;
|
||||
int32 zeny;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_BANKING_DEPOSIT, 0x9a8)
|
||||
|
||||
struct PACKET_ZC_ACK_CLOSE_BANKING{
|
||||
int16 packetType;
|
||||
int16 unknown;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_BANKING, 0x9b9)
|
||||
|
||||
struct PACKET_ZC_ACK_OPEN_BANKING{
|
||||
int16 packetType;
|
||||
int16 unknown;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_OPEN_BANKING, 0x9b7)
|
||||
|
||||
struct PACKET_ZC_ACK_ADD_EXCHANGE_ITEM {
|
||||
int16 packetType;
|
||||
uint16 index;
|
||||
uint8 result;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_ADD_EXCHANGE_ITEM, 0xea)
|
||||
|
||||
struct PACKET_ZC_COUPLENAME {
|
||||
int16 packetType;
|
||||
char name[NAME_LENGTH];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_COUPLENAME, 0x1e6);
|
||||
|
||||
struct PACKET_CZ_PARTY_REQ_MASTER_TO_JOIN{
|
||||
int16 packetType;
|
||||
uint32 CID;
|
||||
uint32 AID;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_PARTY_REQ_MASTER_TO_JOIN, 0x0ae6)
|
||||
|
||||
struct PACKET_ZC_PARTY_REQ_MASTER_TO_JOIN{
|
||||
int16 packetType;
|
||||
@ -354,6 +391,7 @@ struct PACKET_ZC_PARTY_REQ_MASTER_TO_JOIN{
|
||||
uint16 x;
|
||||
uint16 y;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_PARTY_REQ_MASTER_TO_JOIN, 0x0ae7)
|
||||
|
||||
struct PACKET_CZ_PARTY_REQ_ACK_MASTER_TO_JOIN{
|
||||
int16 packetType;
|
||||
@ -361,6 +399,7 @@ struct PACKET_CZ_PARTY_REQ_ACK_MASTER_TO_JOIN{
|
||||
uint32 AID;
|
||||
uint8 accept;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_PARTY_REQ_ACK_MASTER_TO_JOIN, 0x0af8)
|
||||
|
||||
struct PACKET_ZC_PARTY_JOIN_REQ_ACK_FROM_MASTER{
|
||||
int16 packetType;
|
||||
@ -369,11 +408,13 @@ struct PACKET_ZC_PARTY_JOIN_REQ_ACK_FROM_MASTER{
|
||||
uint32 AID;
|
||||
uint32 refused;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK_FROM_MASTER, 0x0afa)
|
||||
|
||||
struct PACKET_CZ_REQ_SE_CASH_TAB_CODE{
|
||||
int16 packetType;
|
||||
int16 tab;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_SE_CASH_TAB_CODE, 0x846)
|
||||
|
||||
struct PACKET_ZC_ACK_SE_CASH_ITEM_LIST2_sub{
|
||||
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
|
||||
@ -391,17 +432,20 @@ struct PACKET_ZC_ACK_SE_CASH_ITEM_LIST2{
|
||||
int16 count;
|
||||
struct PACKET_ZC_ACK_SE_CASH_ITEM_LIST2_sub items[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_SE_CASH_ITEM_LIST2, 0x8c0)
|
||||
|
||||
struct PACKET_CZ_REQ_MERGE_ITEM{
|
||||
int16 packetType;
|
||||
int16 packetLength;
|
||||
uint16 indices[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_MERGE_ITEM, 0x96e)
|
||||
|
||||
struct PACKET_CZ_RESET_SKILL{
|
||||
int16 packetType;
|
||||
uint8 unknown;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_RESET_SKILL, 0x0bb1)
|
||||
|
||||
struct PACKET_ZC_BOSS_INFO{
|
||||
int16 packetType;
|
||||
@ -414,18 +458,21 @@ struct PACKET_ZC_BOSS_INFO{
|
||||
uint16 maxMinutes;
|
||||
char name[51];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_BOSS_INFO, 0x293)
|
||||
|
||||
struct PACKET_CZ_INVENTORY_TAB{
|
||||
int16 packetType;
|
||||
int16 index;
|
||||
bool favorite;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(CZ_INVENTORY_TAB, 0x907)
|
||||
|
||||
struct PACKET_ZC_INVENTORY_TAB{
|
||||
int16 packetType;
|
||||
int16 index;
|
||||
bool favorite;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_INVENTORY_TAB, 0x908)
|
||||
|
||||
struct PACKET_ZC_SKILL_SELECT_REQUEST_sub{
|
||||
int16 skill_id;
|
||||
@ -465,88 +512,367 @@ struct PACKET_CZ_REQ_BANKING_WITHDRAW{
|
||||
int32 zeny;
|
||||
} __attribute__((packed));
|
||||
|
||||
#if PACKETVER < 20080102
|
||||
struct PACKET_ZC_ACCEPT_ENTER {
|
||||
int16 packetType;
|
||||
uint32 startTime;
|
||||
uint8 posDir[3];
|
||||
uint8 xSize;
|
||||
uint8 ySize;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACCEPT_ENTER, 0x73)
|
||||
#elif PACKETVER < 20141022 || PACKETVER >= 20160330
|
||||
struct PACKET_ZC_ACCEPT_ENTER {
|
||||
int16 packetType;
|
||||
uint32 startTime;
|
||||
uint8 posDir[3];
|
||||
uint8 xSize;
|
||||
uint8 ySize;
|
||||
uint16 font;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACCEPT_ENTER, 0x2eb)
|
||||
#else
|
||||
struct PACKET_ZC_ACCEPT_ENTER {
|
||||
int16 packetType;
|
||||
uint32 startTime;
|
||||
uint8 posDir[3];
|
||||
uint8 xSize;
|
||||
uint8 ySize;
|
||||
uint16 font;
|
||||
uint8 sex;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ACCEPT_ENTER, 0xa18)
|
||||
#endif
|
||||
|
||||
struct PACKET_ZC_REFUSE_ENTER {
|
||||
int16 packetType;
|
||||
uint8 errorCode;
|
||||
} __attribute__((packed));
|
||||
static_assert(sizeof(PACKET_ZC_REFUSE_ENTER) == 3);
|
||||
DEFINE_PACKET_HEADER(ZC_REFUSE_ENTER, 0x74)
|
||||
|
||||
struct PACKET_SC_NOTIFY_BAN {
|
||||
int16 packetType;
|
||||
uint8 errorCode;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(SC_NOTIFY_BAN, 0x81)
|
||||
|
||||
struct PACKET_ZC_RESTART_ACK {
|
||||
int16 packetType;
|
||||
uint8 type;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_RESTART_ACK, 0xb3)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_VANISH {
|
||||
int16 packetType;
|
||||
uint32 gid;
|
||||
uint8 type;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_VANISH, 0x80)
|
||||
|
||||
struct PACKET_ZC_ITEM_DISAPPEAR {
|
||||
int16 packetType;
|
||||
uint32 itemAid;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ITEM_DISAPPEAR, 0xa1)
|
||||
|
||||
struct PACKET_ZC_MILLENNIUMSHIELD {
|
||||
int16 packetType;
|
||||
uint32 aid;
|
||||
int16 num;
|
||||
int16 state;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_MILLENNIUMSHIELD, 0x440)
|
||||
|
||||
struct PACKET_ZC_SPIRITS_ATTRIBUTE {
|
||||
int16 packetType;
|
||||
uint32 aid;
|
||||
int16 spiritsType;
|
||||
int16 num;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_SPIRITS_ATTRIBUTE, 0x8cf)
|
||||
|
||||
struct PACKET_ZC_CHANGESTATE_MER {
|
||||
int16 packetType;
|
||||
uint8 type;
|
||||
uint8 state;
|
||||
uint32 gid;
|
||||
uint32 data;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_CHANGESTATE_MER, 0x230)
|
||||
|
||||
struct PACKET_ZC_HOSKILLINFO_LIST_sub {
|
||||
uint16 id;
|
||||
uint16 inf;
|
||||
uint16 unknown;
|
||||
uint16 level;
|
||||
uint16 sp;
|
||||
uint16 range;
|
||||
char name[NAME_LENGTH];
|
||||
uint8 upgradable;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct PACKET_ZC_HOSKILLINFO_LIST {
|
||||
int16 packetType;
|
||||
int16 packetLength;
|
||||
PACKET_ZC_HOSKILLINFO_LIST_sub skills[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_HOSKILLINFO_LIST, 0x235)
|
||||
|
||||
struct PACKET_ZC_HOSKILLINFO_UPDATE {
|
||||
int16 packetType;
|
||||
uint16 skill_id;
|
||||
int16 Level;
|
||||
int16 SP;
|
||||
int16 AttackRange;
|
||||
bool upgradable;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_HOSKILLINFO_UPDATE, 0x239)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_MOVE {
|
||||
int16 packetType;
|
||||
uint32 gid;
|
||||
uint8 moveData[6];
|
||||
uint32 moveStartTime;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_MOVE, 0x86)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_PLAYERMOVE {
|
||||
int16 packetType;
|
||||
uint32 moveStartTime;
|
||||
uint8 moveData[6];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_PLAYERMOVE, 0x87);
|
||||
|
||||
struct PACKET_ZC_NPCACK_MAPMOVE {
|
||||
int16 packetType;
|
||||
char mapName[MAP_NAME_LENGTH_EXT];
|
||||
uint16 xPos;
|
||||
uint16 yPos;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NPCACK_MAPMOVE, 0x91)
|
||||
|
||||
#if PACKETVER >= 20170315
|
||||
// Actually ZC_NPCACK_SERVERMOVE_DOMAIN
|
||||
struct PACKET_ZC_NPCACK_SERVERMOVE {
|
||||
int16 packetType;
|
||||
char mapName[MAP_NAME_LENGTH_EXT];
|
||||
uint16 xPos;
|
||||
uint16 yPos;
|
||||
uint32 ip;
|
||||
uint16 port;
|
||||
char domain[128];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NPCACK_SERVERMOVE, 0xac7)
|
||||
#else
|
||||
struct PACKET_ZC_NPCACK_SERVERMOVE {
|
||||
int16 packetType;
|
||||
char mapName[MAP_NAME_LENGTH_EXT];
|
||||
uint16 xPos;
|
||||
uint16 yPos;
|
||||
uint32 ip;
|
||||
uint16 port;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NPCACK_SERVERMOVE, 0x92)
|
||||
#endif
|
||||
|
||||
struct PACKET_ZC_STOPMOVE {
|
||||
int16 packetType;
|
||||
uint32 AID;
|
||||
uint16 xPos;
|
||||
uint16 yPos;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_STOPMOVE, 0x88)
|
||||
|
||||
struct PACKET_ZC_SELECT_DEALTYPE {
|
||||
int16 packetType;
|
||||
uint32 npcId;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_SELECT_DEALTYPE, 0xc4)
|
||||
|
||||
struct PACKET_ZC_PC_SELL_ITEMLIST_sub {
|
||||
uint16 index;
|
||||
uint32 price;
|
||||
uint32 overcharge;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct PACKET_ZC_PC_SELL_ITEMLIST {
|
||||
int16 packetType;
|
||||
int16 packetLength;
|
||||
PACKET_ZC_PC_SELL_ITEMLIST_sub items[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_PC_SELL_ITEMLIST, 0xc7)
|
||||
|
||||
struct PACKET_ZC_CLOSE_DIALOG {
|
||||
int16 packetType;
|
||||
uint32 npcId;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_CLOSE_DIALOG, 0xb6)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_STANDENTRY {
|
||||
int16 packetType;
|
||||
#if PACKETVER >= 20071106
|
||||
uint8 objecttype;
|
||||
#endif
|
||||
uint32 GID;
|
||||
int16 speed;
|
||||
int16 bodyState;
|
||||
int16 effectState;
|
||||
int16 job;
|
||||
int16 head;
|
||||
int16 weapon;
|
||||
int16 accessory;
|
||||
int16 shield;
|
||||
int16 accessory2;
|
||||
int16 accessory3;
|
||||
int16 headpalette;
|
||||
int16 bodypalette;
|
||||
int16 headDir;
|
||||
uint32 GUID;
|
||||
int16 GEmblemVer;
|
||||
int16 honor;
|
||||
int16 virtue;
|
||||
bool isPKModeON;
|
||||
uint8 sex;
|
||||
uint8 PosDir[3];
|
||||
uint8 xSize;
|
||||
uint8 ySize;
|
||||
uint8 state;
|
||||
int16 clevel;
|
||||
uint16 spr_idx;
|
||||
uint16 effect_idx;
|
||||
unsigned char scale;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_STANDENTRY, 0x78)
|
||||
|
||||
struct PACKET_ZC_MENU_LIST {
|
||||
int16 packetType;
|
||||
int16 packetLength;
|
||||
uint32 npcId;
|
||||
char menu[];
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_MENU_LIST, 0xb7)
|
||||
|
||||
struct PACKET_ZC_OPEN_EDITDLG {
|
||||
int16 packetType;
|
||||
uint32 npcId;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_OPEN_EDITDLG, 0x142)
|
||||
|
||||
struct PACKET_ZC_OPEN_EDITDLGSTR {
|
||||
int16 packetType;
|
||||
uint32 npcId;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_OPEN_EDITDLGSTR, 0x1d4)
|
||||
|
||||
struct PACKET_ZC_COMPASS {
|
||||
int16 packetType;
|
||||
uint32 npcId;
|
||||
uint32 type;
|
||||
uint32 xPos;
|
||||
uint32 yPos;
|
||||
uint8 id;
|
||||
uint32 color;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_COMPASS, 0x144)
|
||||
|
||||
struct PACKET_ZC_ITEM_THROW_ACK {
|
||||
int16 packetType;
|
||||
uint16 index;
|
||||
uint16 count;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_ITEM_THROW_ACK, 0xaf)
|
||||
|
||||
struct PACKET_ZC_DELETE_ITEM_FROM_BODY {
|
||||
int16 packetType;
|
||||
int16 deleteType;
|
||||
uint16 index;
|
||||
int16 count;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_DELETE_ITEM_FROM_BODY, 0x7fa)
|
||||
|
||||
struct PACKET_ZC_CARTOFF {
|
||||
int16 packetType;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_CARTOFF, 0x12b)
|
||||
|
||||
struct PACKET_ZC_NOTIFY_POSITION_TO_GUILDM {
|
||||
int16 packetType;
|
||||
uint32 aid;
|
||||
int16 xPos;
|
||||
int16 yPos;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_POSITION_TO_GUILDM, 0x1eb)
|
||||
|
||||
struct PACKET_ZC_STATUS {
|
||||
int16 packetType;
|
||||
uint16 point;
|
||||
uint8 str;
|
||||
uint8 standardStr;
|
||||
uint8 agi;
|
||||
uint8 standardAgi;
|
||||
uint8 vit;
|
||||
uint8 standardVit;
|
||||
uint8 int_;
|
||||
uint8 standardInt;
|
||||
uint8 dex;
|
||||
uint8 standardDex;
|
||||
uint8 luk;
|
||||
uint8 standardLuk;
|
||||
int16 attPower;
|
||||
int16 refiningPower;
|
||||
int16 max_mattPower;
|
||||
int16 min_mattPower;
|
||||
int16 itemdefPower;
|
||||
int16 plusdefPower;
|
||||
int16 mdefPower;
|
||||
int16 plusmdefPower;
|
||||
int16 hitSuccessValue;
|
||||
int16 avoidSuccessValue;
|
||||
int16 plusAvoidSuccessValue;
|
||||
int16 criticalSuccessValue;
|
||||
int16 ASPD;
|
||||
int16 plusASPD;
|
||||
} __attribute__((packed));
|
||||
DEFINE_PACKET_HEADER(ZC_STATUS, 0xbd)
|
||||
|
||||
// NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
|
||||
#if !defined( sun ) && ( !defined( __NETBSD__ ) || __NetBSD_Version__ >= 600000000 )
|
||||
#pragma pack( pop )
|
||||
#endif
|
||||
|
||||
// Other packets without struct defined in this file
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_CHAT, 0x8d)
|
||||
DEFINE_PACKET_HEADER(ZC_BROADCAST, 0x9a)
|
||||
DEFINE_PACKET_HEADER(ZC_ITEM_ENTRY, 0x9d)
|
||||
DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_RESULT, 0xca)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_ADD_EXCHANGE_ITEM, 0xea)
|
||||
DEFINE_PACKET_HEADER(ZC_MVP_GETTING_ITEM, 0x10a)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_CHANGE_MEMBERPOS, 0x155)
|
||||
DEFINE_PACKET_HEADER(CZ_REQMAKINGITEM, 0x18e)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_REQMAKINGITEM, 0x18f)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_MAKINGARROW, 0x1ae)
|
||||
DEFINE_PACKET_HEADER(ZC_BROADCAST2, 0x1c3)
|
||||
#if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200724
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_ITEMREPAIR, 0xb66)
|
||||
#else
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_ITEMREPAIR, 0x1fd)
|
||||
#endif
|
||||
DEFINE_PACKET_HEADER(ZC_COUPLENAME, 0x1e6);
|
||||
DEFINE_PACKET_HEADER(ZC_FRIENDS_LIST, 0x201)
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_WEAPONITEMLIST, 0x221)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_WEAPONREFINE, 0x223)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_MAKINGITEM, 0x25b)
|
||||
DEFINE_PACKET_HEADER(ZC_PC_CASH_POINT_ITEMLIST, 0x287)
|
||||
DEFINE_PACKET_HEADER(ZC_BOSS_INFO, 0x293)
|
||||
DEFINE_PACKET_HEADER(ZC_CASH_TIME_COUNTER, 0x298)
|
||||
DEFINE_PACKET_HEADER(ZC_CASH_ITEM_DELETE, 0x299)
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BIND_ON_EQUIP, 0x2d3)
|
||||
DEFINE_PACKET_HEADER(ZC_SKILL_SELECT_REQUEST, 0x442)
|
||||
DEFINE_PACKET_HEADER(ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER, 0x824)
|
||||
DEFINE_PACKET_HEADER(CZ_SSILIST_ITEM_CLICK, 0x83c)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_SE_CASH_TAB_CODE, 0x846)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_SE_CASH_ITEM_LIST2, 0x8c0)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_SCHEDULER_CASHITEM, 0x8ca)
|
||||
DEFINE_PACKET_HEADER(ZC_CLEAR_DIALOG, 0x8d6)
|
||||
DEFINE_PACKET_HEADER(CZ_INVENTORY_TAB, 0x907)
|
||||
DEFINE_PACKET_HEADER(ZC_INVENTORY_TAB, 0x908)
|
||||
DEFINE_PACKET_HEADER(ZC_ENTRY_QUEUE_INIT, 0x90e)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_MERGE_ITEM, 0x96e)
|
||||
DEFINE_PACKET_HEADER(ZC_BANKING_CHECK, 0x9a6)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_BANKING_DEPOSIT, 0x9a7)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_BANKING_DEPOSIT, 0x9a8)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_BANKING_WITHDRAW, 0x9a9)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_BANKING_WITHDRAW, 0x9aa)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_BANKING_CHECK, 0x9ab)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO, 0x9ac)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO, 0x9ad)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_APPLY_BARGAIN_SALE_ITEM, 0x9ae)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_REMOVE_BARGAIN_SALE_ITEM, 0x9b0)
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BARGAIN_SALE_SELLING, 0x9b2)
|
||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_BARGAIN_SALE_CLOSE, 0x9b3)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_OPEN_BANKING, 0x9b6)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_OPEN_BANKING, 0x9b7)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_CLOSE_BANKING, 0x9b8)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_BANKING, 0x9b9)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_COUNT_BARGAIN_SALE_ITEM, 0x9c4)
|
||||
DEFINE_PACKET_HEADER(ZC_ACK_GUILDSTORAGE_LOG, 0x9da)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_APPLY_BARGAIN_SALE_ITEM2, 0xa3d)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_STYLE_CHANGE, 0xa46)
|
||||
DEFINE_PACKET_HEADER(ZC_STYLE_CHANGE_RES, 0xa47)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_STYLE_CLOSE, 0xa48)
|
||||
DEFINE_PACKET_HEADER(ZC_GROUP_ISALIVE, 0xab2)
|
||||
DEFINE_PACKET_HEADER(CZ_PARTY_REQ_MASTER_TO_JOIN, 0x0ae6)
|
||||
DEFINE_PACKET_HEADER(ZC_PARTY_REQ_MASTER_TO_JOIN, 0x0ae7)
|
||||
DEFINE_PACKET_HEADER(CZ_PARTY_REQ_ACK_MASTER_TO_JOIN, 0x0af8)
|
||||
DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK_FROM_MASTER, 0x0afa)
|
||||
DEFINE_PACKET_HEADER(CZ_REQ_STYLE_CHANGE2, 0xafc)
|
||||
DEFINE_PACKET_HEADER(ZC_REMOVE_EFFECT, 0x0b0d)
|
||||
DEFINE_PACKET_HEADER(CZ_UNCONFIRMED_TSTATUS_UP, 0x0b24)
|
||||
DEFINE_PACKET_HEADER(CZ_GUILD_EMBLEM_CHANGE2, 0x0b46)
|
||||
DEFINE_PACKET_HEADER(ZC_TARGET_SPIRITS, 0xb68)
|
||||
DEFINE_PACKET_HEADER(ZC_SOULENERGY, 0xb73)
|
||||
DEFINE_PACKET_HEADER(CZ_UNCONFIRMED_RODEX_RETURN, 0xb98)
|
||||
DEFINE_PACKET_HEADER(ZC_SUMMON_HP_INIT, 0xb6b)
|
||||
DEFINE_PACKET_HEADER(ZC_SUMMON_HP_UPDATE, 0xb6c)
|
||||
DEFINE_PACKET_HEADER(ZC_REPUTE_INFO, 0x0b8d)
|
||||
DEFINE_PACKET_HEADER(ZC_UI_OPEN_V3, 0x0b9a)
|
||||
DEFINE_PACKET_HEADER(CZ_RESET_SKILL, 0x0bb1)
|
||||
DEFINE_PACKET_HEADER(CZ_PC_SELL_ITEMLIST, 0x00c9)
|
||||
|
||||
const int16 MAX_INVENTORY_ITEM_PACKET_NORMAL = ( ( INT16_MAX - ( sizeof( struct packet_itemlist_normal ) - ( sizeof( struct NORMALITEM_INFO ) * MAX_ITEMLIST) ) ) / sizeof( struct NORMALITEM_INFO ) );
|
||||
const int16 MAX_INVENTORY_ITEM_PACKET_EQUIP = ( ( INT16_MAX - ( sizeof( struct packet_itemlist_equip ) - ( sizeof( struct EQUIPITEM_INFO ) * MAX_ITEMLIST ) ) ) / sizeof( struct EQUIPITEM_INFO ) );
|
||||
|
309
src/map/pc.cpp
309
src/map/pc.cpp
@ -1682,9 +1682,9 @@ bool pc_adoption(map_session_data *p1_sd, map_session_data *p2_sd, map_session_d
|
||||
|
||||
// Restore progress
|
||||
b_sd->status.job_level = joblevel;
|
||||
clif_updatestatus(b_sd, SP_JOBLEVEL);
|
||||
clif_updatestatus(*b_sd, SP_JOBLEVEL);
|
||||
b_sd->status.job_exp = jobexp;
|
||||
clif_updatestatus(b_sd, SP_JOBEXP);
|
||||
clif_updatestatus(*b_sd, SP_JOBEXP);
|
||||
|
||||
// Baby Skills
|
||||
pc_skill(b_sd, WE_BABY, 1, ADDSKILL_PERMANENT);
|
||||
@ -2204,7 +2204,7 @@ bool pc_authok(map_session_data *sd, uint32 login_id2, time_t expiration_time, i
|
||||
/**
|
||||
* Fixes login-without-aura glitch (the screen won't blink at this point, don't worry :P)
|
||||
**/
|
||||
clif_changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y);
|
||||
clif_changemap( *sd, sd->bl.m, sd->bl.x, sd->bl.y );
|
||||
}
|
||||
|
||||
pc_validate_skill(sd);
|
||||
@ -2233,11 +2233,11 @@ bool pc_authok(map_session_data *sd, uint32 login_id2, time_t expiration_time, i
|
||||
// Check EXP overflow, since in previous revision EXP on Max Level can be more than 'official' Max EXP
|
||||
if (pc_is_maxbaselv(sd) && sd->status.base_exp > MAX_LEVEL_BASE_EXP) {
|
||||
sd->status.base_exp = MAX_LEVEL_BASE_EXP;
|
||||
clif_updatestatus(sd, SP_BASEEXP);
|
||||
clif_updatestatus(*sd, SP_BASEEXP);
|
||||
}
|
||||
if (pc_is_maxjoblv(sd) && sd->status.job_exp > MAX_LEVEL_JOB_EXP) {
|
||||
sd->status.job_exp = MAX_LEVEL_JOB_EXP;
|
||||
clif_updatestatus(sd, SP_JOBEXP);
|
||||
clif_updatestatus(*sd, SP_JOBEXP);
|
||||
}
|
||||
|
||||
// Request all registries (auth is considered completed whence they arrive)
|
||||
@ -3003,7 +3003,7 @@ int pc_disguise(map_session_data *sd, int class_)
|
||||
|
||||
if (sd->bl.prev != nullptr) {
|
||||
pc_stop_walking(sd, 0);
|
||||
clif_clearunit_area(&sd->bl, CLR_OUTSIGHT);
|
||||
clif_clearunit_area( sd->bl, CLR_OUTSIGHT );
|
||||
}
|
||||
|
||||
if (!class_) {
|
||||
@ -3020,7 +3020,7 @@ int pc_disguise(map_session_data *sd, int class_)
|
||||
if (class_ == sd->status.class_ && pc_iscarton(sd))
|
||||
{ //It seems the cart info is lost on undisguise.
|
||||
clif_cartlist(sd);
|
||||
clif_updatestatus(sd,SP_CARTINFO);
|
||||
clif_updatestatus(*sd,SP_CARTINFO);
|
||||
}
|
||||
if (sd->chatID) {
|
||||
struct chat_data* cd;
|
||||
@ -5691,7 +5691,7 @@ char pc_payzeny(map_session_data *sd, int zeny, enum e_log_pick_type type, uint3
|
||||
return 1; //Not enough.
|
||||
|
||||
sd->status.zeny -= zeny;
|
||||
clif_updatestatus(sd,SP_ZENY);
|
||||
clif_updatestatus(*sd,SP_ZENY);
|
||||
|
||||
log_zeny(*sd, type, log_charid, -zeny);
|
||||
if( zeny > 0 && sd->state.showzeny ) {
|
||||
@ -5725,7 +5725,7 @@ char pc_getzeny(map_session_data *sd, int zeny, enum e_log_pick_type type, uint3
|
||||
zeny = MAX_ZENY - sd->status.zeny;
|
||||
|
||||
sd->status.zeny += zeny;
|
||||
clif_updatestatus(sd,SP_ZENY);
|
||||
clif_updatestatus(*sd,SP_ZENY);
|
||||
|
||||
log_zeny(*sd, type, log_charid, zeny);
|
||||
if( zeny > 0 && sd->state.showzeny ) {
|
||||
@ -5952,7 +5952,7 @@ enum e_additem_result pc_additem(map_session_data *sd,struct item *item,int amou
|
||||
log_pick_pc(sd, log_type, amount, &sd->inventory.u.items_inventory[i]);
|
||||
|
||||
sd->weight += w;
|
||||
clif_updatestatus(sd,SP_WEIGHT);
|
||||
clif_updatestatus(*sd,SP_WEIGHT);
|
||||
//Auto-equip
|
||||
if(id->flag.autoequip)
|
||||
pc_equipitem(sd, i, id->equip);
|
||||
@ -6003,9 +6003,9 @@ char pc_delitem(map_session_data *sd,int n,int amount,int type, short reason, e_
|
||||
sd->inventory_data[n] = nullptr;
|
||||
}
|
||||
if(!(type&1))
|
||||
clif_delitem(sd,n,amount,reason);
|
||||
clif_delitem( *sd, n, amount, reason );
|
||||
if(!(type&2))
|
||||
clif_updatestatus(sd,SP_WEIGHT);
|
||||
clif_updatestatus(*sd,SP_WEIGHT);
|
||||
|
||||
pc_show_questinfo(sd);
|
||||
|
||||
@ -6057,7 +6057,8 @@ bool pc_dropitem(map_session_data *sd,int n,int amount)
|
||||
return false;
|
||||
|
||||
pc_delitem(sd, n, amount, 1, 0, LOG_TYPE_PICKDROP_PLAYER);
|
||||
clif_dropitem(sd, n, amount);
|
||||
clif_dropitem( *sd, n, amount );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6484,7 +6485,7 @@ enum e_additem_result pc_cart_additem(map_session_data *sd,struct item *item,int
|
||||
log_pick_pc(sd, log_type, amount, &sd->cart.u.items_cart[i]);
|
||||
|
||||
sd->cart_weight += w;
|
||||
clif_updatestatus(sd,SP_CARTINFO);
|
||||
clif_updatestatus(*sd,SP_CARTINFO);
|
||||
|
||||
return ADDITEM_SUCCESS;
|
||||
}
|
||||
@ -6510,7 +6511,7 @@ void pc_cart_delitem(map_session_data *sd,int n,int amount,int type,e_log_pick_t
|
||||
}
|
||||
if(!type) {
|
||||
clif_cart_delitem(sd,n,amount);
|
||||
clif_updatestatus(sd,SP_CARTINFO);
|
||||
clif_updatestatus(*sd,SP_CARTINFO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6541,7 +6542,7 @@ void pc_putitemtocart(map_session_data *sd,int idx,int amount)
|
||||
else {
|
||||
clif_cart_additem_ack(sd, (flag == ADDITEM_OVERAMOUNT) ? ADDITEM_TO_CART_FAIL_COUNT : ADDITEM_TO_CART_FAIL_WEIGHT);
|
||||
clif_additem(sd, idx, amount, 0);
|
||||
clif_delitem(sd, idx, amount, 0);
|
||||
clif_delitem( *sd, idx, amount, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -6953,7 +6954,7 @@ enum e_setpos pc_setpos(map_session_data* sd, unsigned short mapindex, int x, in
|
||||
|
||||
if(sd->bl.prev != nullptr){
|
||||
unit_remove_map_pc(sd,clrtype);
|
||||
clif_changemap(sd,m,x,y); // [MouseJstr]
|
||||
clif_changemap( *sd, m, x, y );
|
||||
} else if(sd->state.active) //Tag player for rewarping after map-loading is done. [Skotlex]
|
||||
sd->state.rewarp = 1;
|
||||
|
||||
@ -8095,11 +8096,11 @@ int pc_checkbaselevelup(map_session_data *sd) {
|
||||
if (battle_config.pet_lv_rate && sd->pd) //<Skotlex> update pet's level
|
||||
status_calc_pet(sd->pd,SCO_NONE);
|
||||
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(sd,SP_BASELEVEL);
|
||||
clif_updatestatus(sd,SP_BASEEXP);
|
||||
clif_updatestatus(sd,SP_NEXTBASEEXP);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd,SP_BASELEVEL);
|
||||
clif_updatestatus(*sd,SP_BASEEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
||||
status_calc_pc(sd,SCO_FORCE);
|
||||
status_percent_heal(&sd->bl,100,100);
|
||||
|
||||
@ -8166,10 +8167,10 @@ int pc_checkjoblevelup(map_session_data *sd)
|
||||
}
|
||||
} while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);
|
||||
|
||||
clif_updatestatus(sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(sd,SP_JOBEXP);
|
||||
clif_updatestatus(sd,SP_NEXTJOBEXP);
|
||||
clif_updatestatus(sd,SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(*sd,SP_JOBEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
||||
clif_updatestatus(*sd,SP_SKILLPOINT);
|
||||
status_calc_pc(sd,SCO_FORCE);
|
||||
clif_misceffect(&sd->bl,1);
|
||||
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)) )
|
||||
@ -8338,7 +8339,7 @@ void pc_gainexp(map_session_data *sd, struct block_list *src, t_exp base_exp, t_
|
||||
sd->status.base_exp = util::safe_addition_cap(sd->status.base_exp, base_exp, MAX_EXP);
|
||||
|
||||
if (!pc_checkbaselevelup(sd))
|
||||
clif_updatestatus(sd,SP_BASEEXP);
|
||||
clif_updatestatus(*sd,SP_BASEEXP);
|
||||
}
|
||||
|
||||
// Give EXP for Job Level
|
||||
@ -8346,7 +8347,7 @@ void pc_gainexp(map_session_data *sd, struct block_list *src, t_exp base_exp, t_
|
||||
sd->status.job_exp = util::safe_addition_cap(sd->status.job_exp, job_exp, MAX_EXP);
|
||||
|
||||
if (!pc_checkjoblevelup(sd))
|
||||
clif_updatestatus(sd,SP_JOBEXP);
|
||||
clif_updatestatus(*sd,SP_JOBEXP);
|
||||
}
|
||||
|
||||
if (flag&1)
|
||||
@ -8372,14 +8373,14 @@ void pc_lostexp(map_session_data *sd, t_exp base_exp, t_exp job_exp) {
|
||||
base_exp = u64min(sd->status.base_exp, base_exp);
|
||||
sd->status.base_exp -= base_exp;
|
||||
clif_displayexp(sd, base_exp, SP_BASEEXP, false, true);
|
||||
clif_updatestatus(sd, SP_BASEEXP);
|
||||
clif_updatestatus(*sd, SP_BASEEXP);
|
||||
}
|
||||
|
||||
if (job_exp) {
|
||||
job_exp = u64min(sd->status.job_exp, job_exp);
|
||||
sd->status.job_exp -= job_exp;
|
||||
clif_displayexp(sd, job_exp, SP_JOBEXP, false, true);
|
||||
clif_updatestatus(sd, SP_JOBEXP);
|
||||
clif_updatestatus(*sd, SP_JOBEXP);
|
||||
}
|
||||
|
||||
if (sd->state.showexp && (base_exp || job_exp))
|
||||
@ -8730,15 +8731,15 @@ bool pc_statusup(map_session_data* sd, int type, int increase)
|
||||
status_calc_pc(sd,SCO_NONE);
|
||||
|
||||
// update increase cost indicator
|
||||
clif_updatestatus(sd, SP_USTR + type-SP_STR);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + type-SP_STR ) );
|
||||
|
||||
// update statpoint count
|
||||
clif_updatestatus(sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd, SP_STATUSPOINT);
|
||||
|
||||
// update stat value
|
||||
clif_statusupack(sd, type, 1, final_value); // required
|
||||
if( final_value > 255 )
|
||||
clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
||||
clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
||||
|
||||
achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
||||
|
||||
@ -8777,12 +8778,12 @@ int pc_statusup2(map_session_data* sd, int type, int val)
|
||||
|
||||
// update increase cost indicator
|
||||
if( need != pc_need_status_point(sd,type,1) )
|
||||
clif_updatestatus(sd, SP_USTR + type-SP_STR);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + type-SP_STR ) );
|
||||
|
||||
// update stat value
|
||||
clif_statusupack(sd,type,1,val); // required
|
||||
if( val > 255 )
|
||||
clif_updatestatus(sd,type); // send after the 'ack' to override the truncated value
|
||||
clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -8893,15 +8894,15 @@ bool pc_traitstatusup(map_session_data* sd, int type, int increase)
|
||||
status_calc_pc(sd, SCO_NONE);
|
||||
|
||||
// update increase cost indicator
|
||||
clif_updatestatus(sd, SP_UPOW + type - SP_POW);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + type - SP_POW ) );
|
||||
|
||||
// update statpoint count
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
|
||||
// update stat value
|
||||
clif_statusupack(sd, type, 1, final_value); // required
|
||||
if (final_value > 255)
|
||||
clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
||||
clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
||||
|
||||
//achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
||||
|
||||
@ -8938,12 +8939,12 @@ int pc_traitstatusup2(map_session_data* sd, int type, int val)
|
||||
|
||||
// update increase cost indicator
|
||||
if (need != pc_need_trait_point(sd, type, 1))
|
||||
clif_updatestatus(sd, SP_UPOW + type - SP_POW);
|
||||
clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + type - SP_POW ) );
|
||||
|
||||
// update stat value
|
||||
clif_statusupack(sd, type, 1, val); // required
|
||||
if (val > 255)
|
||||
clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
||||
clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -8994,9 +8995,9 @@ void pc_skillup(map_session_data *sd,uint16 skill_id)
|
||||
range = skill_get_range2(&sd->bl, skill_id, lv, false);
|
||||
upgradable = (lv < skill_tree_get_max(sd->status.skill[idx].id, sd->status.class_)) ? 1 : 0;
|
||||
clif_skillup(sd,skill_id,lv,range,upgradable);
|
||||
clif_updatestatus(sd,SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd,SP_SKILLPOINT);
|
||||
if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */
|
||||
clif_updatestatus(sd,SP_CARTINFO);
|
||||
clif_updatestatus(*sd,SP_CARTINFO);
|
||||
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)))
|
||||
clif_status_change(&sd->bl, EFST_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL.
|
||||
if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown
|
||||
@ -9117,41 +9118,41 @@ int pc_resetlvl(map_session_data* sd,int type)
|
||||
sd->status.job_exp=0;
|
||||
}
|
||||
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(sd,SP_STR);
|
||||
clif_updatestatus(sd,SP_AGI);
|
||||
clif_updatestatus(sd,SP_VIT);
|
||||
clif_updatestatus(sd,SP_INT);
|
||||
clif_updatestatus(sd,SP_DEX);
|
||||
clif_updatestatus(sd,SP_LUK);
|
||||
clif_updatestatus(sd,SP_POW);
|
||||
clif_updatestatus(sd,SP_STA);
|
||||
clif_updatestatus(sd,SP_WIS);
|
||||
clif_updatestatus(sd,SP_SPL);
|
||||
clif_updatestatus(sd,SP_CON);
|
||||
clif_updatestatus(sd,SP_CRT);
|
||||
clif_updatestatus(sd,SP_BASELEVEL);
|
||||
clif_updatestatus(sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(sd,SP_BASEEXP);
|
||||
clif_updatestatus(sd,SP_JOBEXP);
|
||||
clif_updatestatus(sd,SP_NEXTBASEEXP);
|
||||
clif_updatestatus(sd,SP_NEXTJOBEXP);
|
||||
clif_updatestatus(sd,SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd,SP_STR);
|
||||
clif_updatestatus(*sd,SP_AGI);
|
||||
clif_updatestatus(*sd,SP_VIT);
|
||||
clif_updatestatus(*sd,SP_INT);
|
||||
clif_updatestatus(*sd,SP_DEX);
|
||||
clif_updatestatus(*sd,SP_LUK);
|
||||
clif_updatestatus(*sd,SP_POW);
|
||||
clif_updatestatus(*sd,SP_STA);
|
||||
clif_updatestatus(*sd,SP_WIS);
|
||||
clif_updatestatus(*sd,SP_SPL);
|
||||
clif_updatestatus(*sd,SP_CON);
|
||||
clif_updatestatus(*sd,SP_CRT);
|
||||
clif_updatestatus(*sd,SP_BASELEVEL);
|
||||
clif_updatestatus(*sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_BASEEXP);
|
||||
clif_updatestatus(*sd,SP_JOBEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
||||
clif_updatestatus(*sd,SP_SKILLPOINT);
|
||||
|
||||
clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
|
||||
clif_updatestatus(sd,SP_UAGI);
|
||||
clif_updatestatus(sd,SP_UVIT);
|
||||
clif_updatestatus(sd,SP_UINT);
|
||||
clif_updatestatus(sd,SP_UDEX);
|
||||
clif_updatestatus(sd,SP_ULUK); // End Addition
|
||||
clif_updatestatus(sd,SP_UPOW);
|
||||
clif_updatestatus(sd,SP_USTA);
|
||||
clif_updatestatus(sd,SP_UWIS);
|
||||
clif_updatestatus(sd,SP_USPL);
|
||||
clif_updatestatus(sd,SP_UCON);
|
||||
clif_updatestatus(sd,SP_UCRT);
|
||||
clif_updatestatus(*sd,SP_USTR); // Updates needed stat points - Valaris
|
||||
clif_updatestatus(*sd,SP_UAGI);
|
||||
clif_updatestatus(*sd,SP_UVIT);
|
||||
clif_updatestatus(*sd,SP_UINT);
|
||||
clif_updatestatus(*sd,SP_UDEX);
|
||||
clif_updatestatus(*sd,SP_ULUK); // End Addition
|
||||
clif_updatestatus(*sd,SP_UPOW);
|
||||
clif_updatestatus(*sd,SP_USTA);
|
||||
clif_updatestatus(*sd,SP_UWIS);
|
||||
clif_updatestatus(*sd,SP_USPL);
|
||||
clif_updatestatus(*sd,SP_UCON);
|
||||
clif_updatestatus(*sd,SP_UCRT);
|
||||
|
||||
for(i=0;i<EQI_MAX;i++) { // unequip items that can't be equipped by base 1 [Valaris]
|
||||
if(sd->equip_index[i] >= 0)
|
||||
@ -9179,7 +9180,7 @@ int pc_resetstate(map_session_data* sd)
|
||||
ShowError( "pc_resetstate: Capping the Level to %d to reset the stats of %d:%d, the base level (%d) is greater than the max level supported.\n",
|
||||
pc_maxbaselv( sd ), sd->status.account_id, sd->status.char_id, sd->status.base_level );
|
||||
sd->status.base_level = pc_maxbaselv( sd );
|
||||
clif_updatestatus( sd, SP_BASELEVEL );
|
||||
clif_updatestatus( *sd, SP_BASELEVEL );
|
||||
}
|
||||
|
||||
sd->status.status_point = statpoint_db.get_table_point( sd->status.base_level );
|
||||
@ -9206,34 +9207,34 @@ int pc_resetstate(map_session_data* sd)
|
||||
pc_setstat(sd, SP_CON, 0);
|
||||
pc_setstat(sd, SP_CRT, 0);
|
||||
|
||||
clif_updatestatus(sd,SP_STR);
|
||||
clif_updatestatus(sd,SP_AGI);
|
||||
clif_updatestatus(sd,SP_VIT);
|
||||
clif_updatestatus(sd,SP_INT);
|
||||
clif_updatestatus(sd,SP_DEX);
|
||||
clif_updatestatus(sd,SP_LUK);
|
||||
clif_updatestatus(sd,SP_POW);
|
||||
clif_updatestatus(sd,SP_STA);
|
||||
clif_updatestatus(sd,SP_WIS);
|
||||
clif_updatestatus(sd,SP_SPL);
|
||||
clif_updatestatus(sd,SP_CON);
|
||||
clif_updatestatus(sd,SP_CRT);
|
||||
clif_updatestatus(*sd,SP_STR);
|
||||
clif_updatestatus(*sd,SP_AGI);
|
||||
clif_updatestatus(*sd,SP_VIT);
|
||||
clif_updatestatus(*sd,SP_INT);
|
||||
clif_updatestatus(*sd,SP_DEX);
|
||||
clif_updatestatus(*sd,SP_LUK);
|
||||
clif_updatestatus(*sd,SP_POW);
|
||||
clif_updatestatus(*sd,SP_STA);
|
||||
clif_updatestatus(*sd,SP_WIS);
|
||||
clif_updatestatus(*sd,SP_SPL);
|
||||
clif_updatestatus(*sd,SP_CON);
|
||||
clif_updatestatus(*sd,SP_CRT);
|
||||
|
||||
clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
|
||||
clif_updatestatus(sd,SP_UAGI);
|
||||
clif_updatestatus(sd,SP_UVIT);
|
||||
clif_updatestatus(sd,SP_UINT);
|
||||
clif_updatestatus(sd,SP_UDEX);
|
||||
clif_updatestatus(sd,SP_ULUK); // End Addition
|
||||
clif_updatestatus(sd,SP_UPOW);
|
||||
clif_updatestatus(sd,SP_USTA);
|
||||
clif_updatestatus(sd,SP_UWIS);
|
||||
clif_updatestatus(sd,SP_USPL);
|
||||
clif_updatestatus(sd,SP_UCON);
|
||||
clif_updatestatus(sd,SP_UCRT);
|
||||
clif_updatestatus(*sd,SP_USTR); // Updates needed stat points - Valaris
|
||||
clif_updatestatus(*sd,SP_UAGI);
|
||||
clif_updatestatus(*sd,SP_UVIT);
|
||||
clif_updatestatus(*sd,SP_UINT);
|
||||
clif_updatestatus(*sd,SP_UDEX);
|
||||
clif_updatestatus(*sd,SP_ULUK); // End Addition
|
||||
clif_updatestatus(*sd,SP_UPOW);
|
||||
clif_updatestatus(*sd,SP_USTA);
|
||||
clif_updatestatus(*sd,SP_UWIS);
|
||||
clif_updatestatus(*sd,SP_USPL);
|
||||
clif_updatestatus(*sd,SP_UCON);
|
||||
clif_updatestatus(*sd,SP_UCRT);
|
||||
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_TRAITPOINT);
|
||||
|
||||
if( sd->mission_mobid ) { //bugreport:2200
|
||||
sd->mission_mobid = 0;
|
||||
@ -9356,7 +9357,7 @@ int pc_resetskill(map_session_data* sd, int flag)
|
||||
sd->status.skill_point += skill_point;
|
||||
|
||||
if (flag&1) {
|
||||
clif_updatestatus(sd,SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd,SP_SKILLPOINT);
|
||||
clif_skillinfoblock(sd);
|
||||
status_calc_pc(sd, SCO_FORCE);
|
||||
}
|
||||
@ -9508,9 +9509,9 @@ static TIMER_FUNC(pc_respawn_timer){
|
||||
*------------------------------------------*/
|
||||
void pc_damage(map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp, unsigned int ap)
|
||||
{
|
||||
if (ap) clif_updatestatus(sd,SP_AP);
|
||||
if (sp) clif_updatestatus(sd,SP_SP);
|
||||
if (hp) clif_updatestatus(sd,SP_HP);
|
||||
if (ap) clif_updatestatus(*sd,SP_AP);
|
||||
if (sp) clif_updatestatus(*sd,SP_SP);
|
||||
if (hp) clif_updatestatus(*sd,SP_HP);
|
||||
else return;
|
||||
|
||||
if (!src)
|
||||
@ -9552,7 +9553,7 @@ void pc_close_npc(map_session_data *sd,int flag)
|
||||
|
||||
if (sd->npc_id || sd->npc_shopid) {
|
||||
if (sd->state.using_fake_npc) {
|
||||
clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
|
||||
@ -9575,7 +9576,7 @@ void pc_close_npc(map_session_data *sd,int flag)
|
||||
#endif
|
||||
if (sd->st) {
|
||||
if (sd->st->state == CLOSE) {
|
||||
clif_scriptclose(sd, sd->npc_id);
|
||||
clif_scriptclose( *sd, sd->npc_id );
|
||||
clif_scriptclear( *sd, sd->npc_id ); // [Ind/Hercules]
|
||||
sd->st->state = END; // Force to end now
|
||||
}
|
||||
@ -9959,9 +9960,9 @@ int pc_dead(map_session_data *sd,struct block_list *src)
|
||||
}
|
||||
|
||||
void pc_revive(map_session_data *sd,unsigned int hp, unsigned int sp, unsigned int ap) {
|
||||
if(hp) clif_updatestatus(sd,SP_HP);
|
||||
if(sp) clif_updatestatus(sd,SP_SP);
|
||||
if(ap) clif_updatestatus(sd,SP_AP);
|
||||
if(hp) clif_updatestatus(*sd,SP_HP);
|
||||
if(sp) clif_updatestatus(*sd,SP_SP);
|
||||
if(ap) clif_updatestatus(*sd,SP_AP);
|
||||
|
||||
pc_setstand(sd, true);
|
||||
if(battle_config.pc_invincible_time > 0)
|
||||
@ -10230,11 +10231,11 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
}
|
||||
sd->status.base_level = val;
|
||||
sd->status.base_exp = 0;
|
||||
// clif_updatestatus(sd, SP_BASELEVEL); // Gets updated at the bottom
|
||||
clif_updatestatus(sd, SP_NEXTBASEEXP);
|
||||
clif_updatestatus(sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(sd, SP_BASEEXP);
|
||||
// clif_updatestatus(*sd, SP_BASELEVEL); // Gets updated at the bottom
|
||||
clif_updatestatus(*sd, SP_NEXTBASEEXP);
|
||||
clif_updatestatus(*sd, SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_BASEEXP);
|
||||
status_calc_pc(sd, SCO_FORCE);
|
||||
if(sd->status.party_id)
|
||||
party_send_levelup(sd);
|
||||
@ -10243,13 +10244,13 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
if (val >= sd->status.job_level) {
|
||||
if (val > pc_maxjoblv(sd)) val = pc_maxjoblv(sd);
|
||||
sd->status.skill_point += val - sd->status.job_level;
|
||||
clif_updatestatus(sd, SP_SKILLPOINT);
|
||||
clif_updatestatus(*sd, SP_SKILLPOINT);
|
||||
}
|
||||
sd->status.job_level = val;
|
||||
sd->status.job_exp = 0;
|
||||
// clif_updatestatus(sd, SP_JOBLEVEL); // Gets updated at the bottom
|
||||
clif_updatestatus(sd, SP_NEXTJOBEXP);
|
||||
clif_updatestatus(sd, SP_JOBEXP);
|
||||
// clif_updatestatus(*sd, SP_JOBLEVEL); // Gets updated at the bottom
|
||||
clif_updatestatus(*sd, SP_NEXTJOBEXP);
|
||||
clif_updatestatus(*sd, SP_JOBEXP);
|
||||
status_calc_pc(sd, SCO_FORCE);
|
||||
break;
|
||||
case SP_SKILLPOINT:
|
||||
@ -10304,7 +10305,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
if( sd->battle_status.max_hp < sd->battle_status.hp )
|
||||
{
|
||||
sd->battle_status.hp = sd->battle_status.max_hp;
|
||||
clif_updatestatus(sd, SP_HP);
|
||||
clif_updatestatus(*sd, SP_HP);
|
||||
}
|
||||
break;
|
||||
case SP_SP:
|
||||
@ -10316,7 +10317,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
if( sd->battle_status.max_sp < sd->battle_status.sp )
|
||||
{
|
||||
sd->battle_status.sp = sd->battle_status.max_sp;
|
||||
clif_updatestatus(sd, SP_SP);
|
||||
clif_updatestatus(*sd, SP_SP);
|
||||
}
|
||||
break;
|
||||
case SP_AP:
|
||||
@ -10327,7 +10328,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
|
||||
if (sd->battle_status.max_ap < sd->battle_status.ap) {
|
||||
sd->battle_status.ap = sd->battle_status.max_ap;
|
||||
clif_updatestatus(sd, SP_AP);
|
||||
clif_updatestatus(*sd, SP_AP);
|
||||
}
|
||||
break;
|
||||
case SP_STR:
|
||||
@ -10456,7 +10457,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
||||
ShowError("pc_setparam: Attempted to set unknown parameter '%lld'.\n", type);
|
||||
return false;
|
||||
}
|
||||
clif_updatestatus(sd,static_cast<int>(type));
|
||||
clif_updatestatus(*sd,static_cast<_sp>(type));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -10479,11 +10480,11 @@ void pc_heal(map_session_data *sd,unsigned int hp,unsigned int sp, unsigned int
|
||||
clif_heal(sd->fd,SP_AP,ap);
|
||||
} else {
|
||||
if(hp)
|
||||
clif_updatestatus(sd,SP_HP);
|
||||
clif_updatestatus(*sd,SP_HP);
|
||||
if(sp)
|
||||
clif_updatestatus(sd,SP_SP);
|
||||
clif_updatestatus(*sd,SP_SP);
|
||||
if (ap)
|
||||
clif_updatestatus(sd,SP_AP);
|
||||
clif_updatestatus(*sd,SP_AP);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -10739,56 +10740,56 @@ bool pc_jobchange(map_session_data *sd,int job, char upper)
|
||||
sd->status.base_level = pc_maxbaselv(sd);
|
||||
sd->status.base_exp=0;
|
||||
pc_resetstate(sd);
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(sd,SP_BASELEVEL);
|
||||
clif_updatestatus(sd,SP_BASEEXP);
|
||||
clif_updatestatus(sd,SP_NEXTBASEEXP);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd,SP_BASELEVEL);
|
||||
clif_updatestatus(*sd,SP_BASEEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
||||
}
|
||||
|
||||
// Give or reduce transcendent status points
|
||||
if( (b_class&JOBL_UPPER) && !(previous_class&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points
|
||||
sd->status.status_point += battle_config.transcendent_status_points;
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
}else if( !(b_class&JOBL_UPPER) && (previous_class&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points
|
||||
if( sd->status.status_point < battle_config.transcendent_status_points ){
|
||||
// The player already used his bonus points, so we have to reset his status points
|
||||
pc_resetstate(sd);
|
||||
}else{
|
||||
sd->status.status_point -= battle_config.transcendent_status_points;
|
||||
clif_updatestatus(sd,SP_STATUSPOINT);
|
||||
clif_updatestatus(*sd,SP_STATUSPOINT);
|
||||
}
|
||||
}
|
||||
|
||||
// Give or reduce trait status points
|
||||
if ((b_class & JOBL_FOURTH) && !(previous_class & JOBL_FOURTH)) {// Change to a 4th job.
|
||||
sd->status.trait_point += battle_config.trait_points_job_change;
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(sd, SP_UPOW);
|
||||
clif_updatestatus(sd, SP_USTA);
|
||||
clif_updatestatus(sd, SP_UWIS);
|
||||
clif_updatestatus(sd, SP_USPL);
|
||||
clif_updatestatus(sd, SP_UCON);
|
||||
clif_updatestatus(sd, SP_UCRT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_UPOW);
|
||||
clif_updatestatus(*sd, SP_USTA);
|
||||
clif_updatestatus(*sd, SP_UWIS);
|
||||
clif_updatestatus(*sd, SP_USPL);
|
||||
clif_updatestatus(*sd, SP_UCON);
|
||||
clif_updatestatus(*sd, SP_UCRT);
|
||||
} else if (!(b_class & JOBL_FOURTH) && (previous_class & JOBL_FOURTH)) {// Change to a non 4th job.
|
||||
if (sd->status.trait_point < battle_config.trait_points_job_change) {
|
||||
// Player may have already used the trait status points. Force a reset.
|
||||
pc_resetstate(sd);
|
||||
} else {
|
||||
sd->status.trait_point = 0;
|
||||
clif_updatestatus(sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(sd, SP_UPOW);
|
||||
clif_updatestatus(sd, SP_USTA);
|
||||
clif_updatestatus(sd, SP_UWIS);
|
||||
clif_updatestatus(sd, SP_USPL);
|
||||
clif_updatestatus(sd, SP_UCON);
|
||||
clif_updatestatus(sd, SP_UCRT);
|
||||
clif_updatestatus(*sd, SP_TRAITPOINT);
|
||||
clif_updatestatus(*sd, SP_UPOW);
|
||||
clif_updatestatus(*sd, SP_USTA);
|
||||
clif_updatestatus(*sd, SP_UWIS);
|
||||
clif_updatestatus(*sd, SP_USPL);
|
||||
clif_updatestatus(*sd, SP_UCON);
|
||||
clif_updatestatus(*sd, SP_UCRT);
|
||||
}
|
||||
}
|
||||
|
||||
clif_updatestatus(sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(sd,SP_JOBEXP);
|
||||
clif_updatestatus(sd,SP_NEXTJOBEXP);
|
||||
clif_updatestatus(*sd,SP_JOBLEVEL);
|
||||
clif_updatestatus(*sd,SP_JOBEXP);
|
||||
clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
||||
|
||||
for(i=0;i<EQI_MAX;i++) {
|
||||
if(sd->equip_index[i] >= 0)
|
||||
@ -11007,7 +11008,7 @@ void pc_setoption(map_session_data *sd,int type, int subtype)
|
||||
#ifndef NEW_CARTS
|
||||
if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On
|
||||
clif_cartlist(sd);
|
||||
clif_updatestatus(sd, SP_CARTINFO);
|
||||
clif_updatestatus(*sd, SP_CARTINFO);
|
||||
if(pc_checkskill(sd, MC_PUSHCART) < 10)
|
||||
status_calc_pc(sd,SCO_NONE); //Apply speed penalty.
|
||||
} else if( !( type&OPTION_CART ) && p_type&OPTION_CART ){ //Cart Off
|
||||
@ -11090,7 +11091,7 @@ bool pc_setcart(map_session_data *sd,int type) {
|
||||
clif_cartlist(sd);
|
||||
status_calc_cart_weight(sd, (e_status_calc_weight_opt)(CALCWT_ITEM|CALCWT_MAXBONUS|CALCWT_CARTSTATE));
|
||||
}
|
||||
clif_updatestatus(sd, SP_CARTINFO);
|
||||
clif_updatestatus(*sd, SP_CARTINFO);
|
||||
sc_start(&sd->bl, &sd->bl, SC_PUSH_CART, 100, type, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -2287,7 +2287,7 @@ void pet_evolution(map_session_data *sd, int16 pet_id) {
|
||||
|
||||
// Virtually delete the old egg
|
||||
log_pick_pc(sd, LOG_TYPE_OTHER, -1, &sd->inventory.u.items_inventory[idx]);
|
||||
clif_delitem(sd, idx, 1, 0);
|
||||
clif_delitem( *sd, idx, 1, 0 );
|
||||
|
||||
// Change the old egg to the new one
|
||||
sd->inventory.u.items_inventory[idx].nameid = new_data->EggID;
|
||||
|
@ -3674,7 +3674,7 @@ void script_free_state(struct script_state* st)
|
||||
|
||||
if (sd && sd->st == st) { // Current script is aborted.
|
||||
if(sd->state.using_fake_npc) {
|
||||
clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
sd->st = nullptr;
|
||||
@ -4306,7 +4306,7 @@ static void script_detach_state(struct script_state* st, bool dequeue_event)
|
||||
|
||||
if(st->rid && (sd = map_id2sd(st->rid))!=nullptr) {
|
||||
if( sd->state.using_fake_npc ){
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, sd->fd );
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
|
||||
@ -4511,7 +4511,7 @@ void run_script_main(struct script_state *st)
|
||||
if ((sd = map_id2sd(st->rid))!=nullptr)
|
||||
{ //Restore previous stack and save char.
|
||||
if(sd->state.using_fake_npc){
|
||||
clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
||||
clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
//Restore previous script if any.
|
||||
@ -5008,7 +5008,8 @@ BUILDIN_FUNC(close)
|
||||
st->clear_cutin = true;
|
||||
}
|
||||
|
||||
clif_scriptclose(sd, st->oid);
|
||||
clif_scriptclose( *sd, st->oid );
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -5028,7 +5029,8 @@ BUILDIN_FUNC(close2)
|
||||
if( st->mes_active )
|
||||
st->mes_active = 0;
|
||||
|
||||
clif_scriptclose(sd, st->oid);
|
||||
clif_scriptclose( *sd, st->oid );
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -5148,10 +5150,10 @@ BUILDIN_FUNC(menu)
|
||||
CREATE(menu, char, 2048);
|
||||
safestrncpy(menu, StringBuf_Value(&buf), 2047);
|
||||
ShowWarning("buildin_menu: NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
|
||||
clif_scriptmenu(sd, st->oid, menu);
|
||||
clif_scriptmenu( *sd, st->oid, menu );
|
||||
aFree(menu);
|
||||
} else
|
||||
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
|
||||
clif_scriptmenu( *sd, st->oid, StringBuf_Value( &buf ) );
|
||||
|
||||
StringBuf_Destroy(&buf);
|
||||
|
||||
@ -5252,10 +5254,10 @@ BUILDIN_FUNC(select)
|
||||
CREATE(menu, char, 2048);
|
||||
safestrncpy(menu, StringBuf_Value(&buf), 2047);
|
||||
ShowWarning("buildin_select: NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
|
||||
clif_scriptmenu(sd, st->oid, menu);
|
||||
clif_scriptmenu( *sd, st->oid, menu );
|
||||
aFree(menu);
|
||||
} else
|
||||
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
|
||||
clif_scriptmenu( *sd, st->oid, StringBuf_Value( &buf ) );
|
||||
StringBuf_Destroy(&buf);
|
||||
|
||||
if( sd->npc_menu >= 0xff ) {
|
||||
@ -5330,10 +5332,10 @@ BUILDIN_FUNC(prompt)
|
||||
CREATE(menu, char, 2048);
|
||||
safestrncpy(menu, StringBuf_Value(&buf), 2047);
|
||||
ShowWarning("buildin_prompt: NPC Menu too long! (source:%s / length:%d)\n",nd?nd->name:"Unknown",StringBuf_Length(&buf));
|
||||
clif_scriptmenu(sd, st->oid, menu);
|
||||
clif_scriptmenu( *sd, st->oid, menu );
|
||||
aFree(menu);
|
||||
} else
|
||||
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
|
||||
clif_scriptmenu( *sd, st->oid, StringBuf_Value( &buf ) );
|
||||
StringBuf_Destroy(&buf);
|
||||
|
||||
if( sd->npc_menu >= 0xff )
|
||||
@ -6161,9 +6163,9 @@ BUILDIN_FUNC(input)
|
||||
sd->state.menu_or_input = 1;
|
||||
st->state = RERUNLINE;
|
||||
if( is_string_variable(name) )
|
||||
clif_scriptinputstr(sd,st->oid);
|
||||
clif_scriptinputstr( *sd, st->oid );
|
||||
else
|
||||
clif_scriptinput(sd,st->oid);
|
||||
clif_scriptinput( *sd, st->oid );
|
||||
}
|
||||
else
|
||||
{ // take received text/value and store it in the designated variable
|
||||
@ -6909,7 +6911,8 @@ BUILDIN_FUNC(cutin)
|
||||
if( !script_rid2sd(sd) )
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
|
||||
clif_cutin(sd,script_getstr(st,2),script_getnum(st,3));
|
||||
clif_cutin( *sd, script_getstr( st, 2 ), script_getnum( st, 3 ) );
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -6932,7 +6935,7 @@ BUILDIN_FUNC(viewpoint)
|
||||
id=script_getnum(st,5);
|
||||
color=script_getnum(st,6);
|
||||
|
||||
clif_viewpoint(sd,st->oid,type,x,y,id,color);
|
||||
clif_viewpoint( *sd, st->oid, type, x, y, id, color );
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
@ -6947,7 +6950,8 @@ static int buildin_viewpointmap_sub(block_list *bl, va_list ap) {
|
||||
id = va_arg(ap, int);
|
||||
color = va_arg(ap, int);
|
||||
|
||||
clif_viewpoint((map_session_data *)bl, oid, type, x, y, id, color);
|
||||
clif_viewpoint( *reinterpret_cast<map_session_data*>( bl ), oid, type, x, y, id, color );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -8588,7 +8592,8 @@ BUILDIN_FUNC(delitem)
|
||||
ShowError("buildin_%s: failed to delete %d items (AID=%d item_id=%u).\n", command, it.amount, sd->status.account_id, it.nameid);
|
||||
st->state = END;
|
||||
st->mes_active = 0;
|
||||
clif_scriptclose(sd, st->oid);
|
||||
clif_scriptclose( *sd, st->oid );
|
||||
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -8712,7 +8717,8 @@ BUILDIN_FUNC(delitem2)
|
||||
ShowError("buildin_%s: failed to delete %d items (AID=%d item_id=%u).\n", command, it.amount, sd->status.account_id, it.nameid);
|
||||
st->state = END;
|
||||
st->mes_active = 0;
|
||||
clif_scriptclose(sd, st->oid);
|
||||
clif_scriptclose( *sd, st->oid );
|
||||
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -9629,7 +9635,7 @@ BUILDIN_FUNC(successrefitem) {
|
||||
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
|
||||
|
||||
clif_refine(sd->fd,0,i,sd->inventory.u.items_inventory[i].refine);
|
||||
clif_delitem(sd,i,1,3);
|
||||
clif_delitem( *sd, i, 1, 3 );
|
||||
|
||||
//Logs items, got from (N)PC scripts [Lupus]
|
||||
log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->inventory.u.items_inventory[i]);
|
||||
@ -9731,7 +9737,7 @@ BUILDIN_FUNC(downrefitem) {
|
||||
sd->inventory.u.items_inventory[i].refine = cap_value( sd->inventory.u.items_inventory[i].refine, 0, MAX_REFINE);
|
||||
|
||||
clif_refine(sd->fd,2,i,sd->inventory.u.items_inventory[i].refine);
|
||||
clif_delitem(sd,i,1,3);
|
||||
clif_delitem( *sd, i, 1, 3 );
|
||||
|
||||
//Logs items, got from (N)PC scripts [Lupus]
|
||||
log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->inventory.u.items_inventory[i]);
|
||||
@ -10381,9 +10387,10 @@ BUILDIN_FUNC(end)
|
||||
st->mes_active = 0;
|
||||
|
||||
if (sd){
|
||||
if (sd->state.callshop == 0)
|
||||
clif_scriptclose(sd, st->oid); // If a menu/select/prompt is active, close it.
|
||||
else
|
||||
if (sd->state.callshop == 0){
|
||||
// If a menu/select/prompt is active, close it.
|
||||
clif_scriptclose( *sd, st->oid );
|
||||
}else
|
||||
sd->state.callshop = 0;
|
||||
}
|
||||
|
||||
@ -15846,7 +15853,9 @@ BUILDIN_FUNC(addhomintimacy)
|
||||
hom_increase_intimacy(hd, (uint32)value);
|
||||
else
|
||||
hom_decrease_intimacy(hd, (uint32)abs(value));
|
||||
clif_send_homdata(sd, SP_INTIMATE, hd->homunculus.intimacy / 100);
|
||||
|
||||
clif_send_homdata( *hd, SP_INTIMATE );
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -17890,7 +17899,7 @@ BUILDIN_FUNC(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
|
||||
default: clif_npcbuysell(sd,nd->bl.id); break; //Show menu
|
||||
default: clif_npcbuysell( *sd, *nd ); break; //Show menu
|
||||
}
|
||||
}
|
||||
#if PACKETVER >= 20131223
|
||||
@ -19273,8 +19282,8 @@ BUILDIN_FUNC(setunitdata)
|
||||
case UHOM_MAPID: if (mapname) value = map_mapname2mapid(mapname); unit_warp(bl, (short)value, 0, 0, CLR_TELEPORT); break;
|
||||
case UHOM_X: if (!unit_walktoxy(bl, (short)value, hd->bl.y, 2)) unit_movepos(bl, (short)value, hd->bl.y, 0, 0); break;
|
||||
case UHOM_Y: if (!unit_walktoxy(bl, hd->bl.x, (short)value, 2)) unit_movepos(bl, hd->bl.x, (short)value, 0, 0); break;
|
||||
case UHOM_HUNGER: hd->homunculus.hunger = (short)value; clif_send_homdata(map_charid2sd(hd->homunculus.char_id), SP_HUNGRY, hd->homunculus.hunger); break;
|
||||
case UHOM_INTIMACY: hom_increase_intimacy(hd, (unsigned int)value); clif_send_homdata(map_charid2sd(hd->homunculus.char_id), SP_INTIMATE, hd->homunculus.intimacy / 100); break;
|
||||
case UHOM_HUNGER: hd->homunculus.hunger = (short)value; clif_send_homdata(*hd, SP_HUNGRY); break;
|
||||
case UHOM_INTIMACY: hom_increase_intimacy(hd, (unsigned int)value); clif_send_homdata(*hd, SP_INTIMATE); break;
|
||||
case UHOM_SPEED: hd->base_status.speed = (unsigned short)value; status_calc_misc(bl, &hd->base_status, hd->homunculus.level); calc_status = true; break;
|
||||
case UHOM_LOOKDIR: unit_setdir(bl, (uint8)value); break;
|
||||
case UHOM_CANMOVETICK: hd->ud.canmove_tick = value > 0 ? (unsigned int)value : 0; break;
|
||||
@ -19570,7 +19579,7 @@ BUILDIN_FUNC(setunitdata)
|
||||
// Client information updates
|
||||
switch (bl->type) {
|
||||
case BL_HOM:
|
||||
clif_send_homdata(hd->master, SP_ACK, 0);
|
||||
clif_send_homdata( *hd, SP_ACK );
|
||||
break;
|
||||
case BL_PET:
|
||||
clif_send_petstatus(pd->master);
|
||||
@ -24521,7 +24530,7 @@ BUILDIN_FUNC(setrandomoption) {
|
||||
sd->inventory.u.items_inventory[i].option[index].id = id;
|
||||
sd->inventory.u.items_inventory[i].option[index].value = value;
|
||||
sd->inventory.u.items_inventory[i].option[index].param = param;
|
||||
clif_delitem(sd, i, 1, 3);
|
||||
clif_delitem( *sd, i, 1, 3 );
|
||||
log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->inventory.u.items_inventory[i]);
|
||||
clif_additem(sd, i, 1, 0);
|
||||
pc_equipitem(sd, i, ep);
|
||||
|
@ -2589,12 +2589,11 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
||||
break;
|
||||
case HFLI_SBR44: //[orn]
|
||||
if(src->type == BL_HOM){
|
||||
struct homun_data *hd = (struct homun_data *)src;
|
||||
if (hd != nullptr) {
|
||||
hd->homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION);
|
||||
if (hd->master)
|
||||
clif_send_homdata(hd->master,SP_INTIMATE,hd->homunculus.intimacy / 100);
|
||||
}
|
||||
homun_data& hd = reinterpret_cast<homun_data&>( *src );
|
||||
|
||||
hd.homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION);
|
||||
|
||||
clif_send_homdata( hd, SP_INTIMATE );
|
||||
}
|
||||
break;
|
||||
case CR_GRANDCROSS:
|
||||
@ -3211,9 +3210,8 @@ void skill_combo_toggle_inf(struct block_list* bl, uint16 skill_id, int inf){
|
||||
TBL_HOM *hd = BL_CAST(BL_HOM, bl);
|
||||
if (idx == -1)
|
||||
break;
|
||||
sd = hd->master;
|
||||
hd->homunculus.hskill[idx].flag= flag;
|
||||
if(sd) clif_homskillinfoblock(sd); //refresh info //@FIXME we only want to refresh one skill
|
||||
clif_homskillinfoblock( *hd ); //refresh info //@FIXME we only want to refresh one skill
|
||||
}
|
||||
break;
|
||||
case MO_COMBOFINISH:
|
||||
@ -3498,7 +3496,8 @@ void skill_attack_blow(struct block_list *src, struct block_list *dsrc, struct b
|
||||
}
|
||||
break;
|
||||
}
|
||||
clif_fixpos(target);
|
||||
|
||||
clif_fixpos( *target );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -8833,12 +8832,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
}
|
||||
status_damage(src, src, sstatus->max_hp,0,0,1, skill_id);
|
||||
if(skill_id == HVAN_EXPLOSION && src->type == BL_HOM) {
|
||||
struct homun_data *hd = (struct homun_data *)src;
|
||||
if (hd != nullptr) {
|
||||
hd->homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION);
|
||||
if (hd->master)
|
||||
clif_send_homdata(hd->master,SP_INTIMATE,hd->homunculus.intimacy / 100);
|
||||
}
|
||||
homun_data& hd = reinterpret_cast<homun_data&>( *src );
|
||||
|
||||
hd.homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION);
|
||||
|
||||
clif_send_homdata( hd, SP_INTIMATE );
|
||||
}
|
||||
break;
|
||||
case AL_ANGELUS:
|
||||
@ -9001,7 +8999,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
}
|
||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(src,bl,type,100,skill_lv,unit_getdir(bl),0,0,0));
|
||||
if (sd) // If the client receives a skill-use packet inmediately before a walkok packet, it will discard the walk packet! [Skotlex]
|
||||
clif_walkok(sd); // So aegis has to resend the walk ok.
|
||||
clif_walkok(*sd); // So aegis has to resend the walk ok.
|
||||
break;
|
||||
|
||||
case AS_CLOAKING:
|
||||
@ -11343,7 +11341,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
}
|
||||
if( sd && pc_isridingwug(sd) ) {
|
||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(src,bl,type,100,skill_lv,unit_getdir(bl),0,0,0));
|
||||
clif_walkok(sd);
|
||||
clif_walkok(*sd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -15685,7 +15683,7 @@ static int skill_unit_onplace(struct skill_unit *unit, struct block_list *bl, t_
|
||||
if (td)
|
||||
sec = DIFF_TICK(td->tick, tick);
|
||||
map_moveblock(bl, unit->bl.x, unit->bl.y, tick);
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
}
|
||||
else
|
||||
sec = 3000; //Couldn't trap it?
|
||||
@ -16226,7 +16224,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
|
||||
|| !unit_blown_immune(bl,0x1) )
|
||||
{
|
||||
unit_movepos(bl, unit->bl.x, unit->bl.y, 0, 0);
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
}
|
||||
sg->val2 = bl->id;
|
||||
} else
|
||||
@ -16255,7 +16253,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
|
||||
if( bl->id != ss->id ) {
|
||||
if( status_change_start(ss, bl,type,10000,sg->skill_lv,sg->group_id,0,0,skill_get_time2(sg->skill_id, sg->skill_lv), SCSTART_NORATEDEF) ) {
|
||||
map_moveblock(bl, unit->bl.x, unit->bl.y, tick);
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
}
|
||||
map_foreachinallrange(skill_trap_splash, &unit->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &unit->bl, tick);
|
||||
sg->unit_id = UNT_USED_TRAPS; //Changed ID so it does not invoke a for each in area again.
|
||||
@ -16567,7 +16565,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
|
||||
if( td )
|
||||
sec = DIFF_TICK(td->tick, tick);
|
||||
///map_moveblock(bl, src->bl.x, src->bl.y, tick); // in official server it doesn't behave like this. [malufett]
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
sg->val2 = bl->id;
|
||||
} else
|
||||
sec = 3000; // Couldn't trap it?
|
||||
@ -19720,7 +19718,7 @@ void skill_weaponrefine( map_session_data& sd, int idx ){
|
||||
ep = item->equip;
|
||||
pc_unequipitem(&sd,idx,3);
|
||||
}
|
||||
clif_delitem(&sd,idx,1,3);
|
||||
clif_delitem(sd,idx,1,3);
|
||||
clif_upgrademessage(&sd, 0, item->nameid);
|
||||
clif_inventorylist(&sd);
|
||||
clif_refine(sd.fd,0,idx,item->refine);
|
||||
@ -20455,7 +20453,7 @@ static int skill_trap_splash(struct block_list *bl, va_list ap)
|
||||
break;
|
||||
if (status_change_start(ss, bl, SC_ELECTRICSHOCKER, 10000, sg->skill_lv, sg->group_id, 0, 0, skill_get_time2(sg->skill_id, sg->skill_lv), SCSTART_NORATEDEF)) {
|
||||
map_moveblock(bl, unit->bl.x, unit->bl.y, tick);
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
clif_skill_damage(src, bl, tick, 0, 0, -30000, 1, sg->skill_id, sg->skill_lv, DMG_SPLASH);
|
||||
}
|
||||
}
|
||||
@ -22662,8 +22660,8 @@ void skill_toggle_magicpower(struct block_list *bl, uint16 skill_id)
|
||||
sc->getSCE(SC_MAGICPOWER)->val4 = 1;
|
||||
status_calc_bl_(bl, status_db.getCalcFlag(SC_MAGICPOWER));
|
||||
if(bl->type == BL_PC){// update current display.
|
||||
clif_updatestatus(((TBL_PC *)bl),SP_MATK1);
|
||||
clif_updatestatus(((TBL_PC *)bl),SP_MATK2);
|
||||
clif_updatestatus(*((map_session_data *)bl),SP_MATK1);
|
||||
clif_updatestatus(*((map_session_data *)bl),SP_MATK2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1665,7 +1665,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 dhp, in
|
||||
unit_stop_attack(target);
|
||||
unit_stop_walking(target,1);
|
||||
unit_skillcastcancel(target,0);
|
||||
clif_clearunit_area(target,CLR_DEAD);
|
||||
clif_clearunit_area( *target, CLR_DEAD );
|
||||
skill_unit_move(target,gettick(),4);
|
||||
skill_cleartimerskill(target);
|
||||
}
|
||||
@ -3560,9 +3560,9 @@ bool status_calc_weight(map_session_data *sd, enum e_status_calc_weight_opt flag
|
||||
|
||||
// Update the client if the new weight calculations don't match
|
||||
if (b_weight != sd->weight)
|
||||
clif_updatestatus(sd, SP_WEIGHT);
|
||||
clif_updatestatus(*sd, SP_WEIGHT);
|
||||
if (b_max_weight != sd->max_weight) {
|
||||
clif_updatestatus(sd, SP_MAXWEIGHT);
|
||||
clif_updatestatus(*sd, SP_MAXWEIGHT);
|
||||
pc_updateweightstatus(sd);
|
||||
}
|
||||
|
||||
@ -3608,7 +3608,7 @@ bool status_calc_cart_weight(map_session_data *sd, enum e_status_calc_weight_opt
|
||||
|
||||
// Update the client if the new weight calculations don't match
|
||||
if (b_cart_weight_max != sd->cart_weight_max)
|
||||
clif_updatestatus(sd, SP_CARTINFO);
|
||||
clif_updatestatus(*sd, SP_CARTINFO);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -5916,7 +5916,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
||||
|
||||
if( status->hp > status->max_hp ) { // !FIXME: Should perhaps a status_zap should be issued?
|
||||
status->hp = status->max_hp;
|
||||
if( sd ) clif_updatestatus(sd,SP_HP);
|
||||
if( sd ) clif_updatestatus(*sd,SP_HP);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5934,7 +5934,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
||||
|
||||
if( status->sp > status->max_sp ) {
|
||||
status->sp = status->max_sp;
|
||||
if( sd ) clif_updatestatus(sd,SP_SP);
|
||||
if( sd ) clif_updatestatus(*sd,SP_SP);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6160,7 +6160,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
||||
|
||||
if (status->ap > status->max_ap) {
|
||||
status->ap = status->max_ap;
|
||||
if (sd) clif_updatestatus(sd, SP_AP);
|
||||
if (sd) clif_updatestatus(*sd, SP_AP);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -6230,37 +6230,37 @@ void status_calc_bl_(struct block_list* bl, std::bitset<SCB_MAX> flag, uint8 opt
|
||||
TBL_PC* sd = BL_CAST(BL_PC, bl);
|
||||
|
||||
if(b_status.str != status->str)
|
||||
clif_updatestatus(sd,SP_STR);
|
||||
clif_updatestatus(*sd,SP_STR);
|
||||
if(b_status.agi != status->agi)
|
||||
clif_updatestatus(sd,SP_AGI);
|
||||
clif_updatestatus(*sd,SP_AGI);
|
||||
if(b_status.vit != status->vit)
|
||||
clif_updatestatus(sd,SP_VIT);
|
||||
clif_updatestatus(*sd,SP_VIT);
|
||||
if(b_status.int_ != status->int_)
|
||||
clif_updatestatus(sd,SP_INT);
|
||||
clif_updatestatus(*sd,SP_INT);
|
||||
if(b_status.dex != status->dex)
|
||||
clif_updatestatus(sd,SP_DEX);
|
||||
clif_updatestatus(*sd,SP_DEX);
|
||||
if(b_status.luk != status->luk)
|
||||
clif_updatestatus(sd,SP_LUK);
|
||||
clif_updatestatus(*sd,SP_LUK);
|
||||
if(b_status.hit != status->hit)
|
||||
clif_updatestatus(sd,SP_HIT);
|
||||
clif_updatestatus(*sd,SP_HIT);
|
||||
if(b_status.flee != status->flee)
|
||||
clif_updatestatus(sd,SP_FLEE1);
|
||||
clif_updatestatus(*sd,SP_FLEE1);
|
||||
if(b_status.amotion != status->amotion)
|
||||
clif_updatestatus(sd,SP_ASPD);
|
||||
clif_updatestatus(*sd,SP_ASPD);
|
||||
if(b_status.speed != status->speed)
|
||||
clif_updatestatus(sd,SP_SPEED);
|
||||
clif_updatestatus(*sd,SP_SPEED);
|
||||
|
||||
if(b_status.batk != status->batk
|
||||
#ifndef RENEWAL
|
||||
|| b_status.rhw.atk != status->rhw.atk || b_status.lhw.atk != status->lhw.atk
|
||||
#endif
|
||||
)
|
||||
clif_updatestatus(sd,SP_ATK1);
|
||||
clif_updatestatus(*sd,SP_ATK1);
|
||||
|
||||
if(b_status.def != status->def) {
|
||||
clif_updatestatus(sd,SP_DEF1);
|
||||
clif_updatestatus(*sd,SP_DEF1);
|
||||
#ifdef RENEWAL
|
||||
clif_updatestatus(sd,SP_DEF2);
|
||||
clif_updatestatus(*sd,SP_DEF2);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -6271,80 +6271,80 @@ void status_calc_bl_(struct block_list* bl, std::bitset<SCB_MAX> flag, uint8 opt
|
||||
b_status.rhw.atk2 != status->rhw.atk2 || b_status.lhw.atk2 != status->lhw.atk2
|
||||
#endif
|
||||
)
|
||||
clif_updatestatus(sd,SP_ATK2);
|
||||
clif_updatestatus(*sd,SP_ATK2);
|
||||
|
||||
if(b_status.def2 != status->def2) {
|
||||
clif_updatestatus(sd,SP_DEF2);
|
||||
clif_updatestatus(*sd,SP_DEF2);
|
||||
#ifdef RENEWAL
|
||||
clif_updatestatus(sd,SP_DEF1);
|
||||
clif_updatestatus(*sd,SP_DEF1);
|
||||
#endif
|
||||
}
|
||||
if(b_status.flee2 != status->flee2)
|
||||
clif_updatestatus(sd,SP_FLEE2);
|
||||
clif_updatestatus(*sd,SP_FLEE2);
|
||||
if(b_status.cri != status->cri)
|
||||
clif_updatestatus(sd,SP_CRITICAL);
|
||||
clif_updatestatus(*sd,SP_CRITICAL);
|
||||
#ifndef RENEWAL
|
||||
if(b_status.matk_max != status->matk_max)
|
||||
clif_updatestatus(sd,SP_MATK1);
|
||||
clif_updatestatus(*sd,SP_MATK1);
|
||||
if(b_status.matk_min != status->matk_min)
|
||||
clif_updatestatus(sd,SP_MATK2);
|
||||
clif_updatestatus(*sd,SP_MATK2);
|
||||
#else
|
||||
if(b_status.matk_max != status->matk_max || b_status.matk_min != status->matk_min) {
|
||||
clif_updatestatus(sd,SP_MATK2);
|
||||
clif_updatestatus(sd,SP_MATK1);
|
||||
clif_updatestatus(*sd,SP_MATK2);
|
||||
clif_updatestatus(*sd,SP_MATK1);
|
||||
}
|
||||
#endif
|
||||
if(b_status.mdef != status->mdef) {
|
||||
clif_updatestatus(sd,SP_MDEF1);
|
||||
clif_updatestatus(*sd,SP_MDEF1);
|
||||
#ifdef RENEWAL
|
||||
clif_updatestatus(sd,SP_MDEF2);
|
||||
clif_updatestatus(*sd,SP_MDEF2);
|
||||
#endif
|
||||
}
|
||||
if(b_status.mdef2 != status->mdef2) {
|
||||
clif_updatestatus(sd,SP_MDEF2);
|
||||
clif_updatestatus(*sd,SP_MDEF2);
|
||||
#ifdef RENEWAL
|
||||
clif_updatestatus(sd,SP_MDEF1);
|
||||
clif_updatestatus(*sd,SP_MDEF1);
|
||||
#endif
|
||||
}
|
||||
if(b_status.rhw.range != status->rhw.range)
|
||||
clif_updatestatus(sd,SP_ATTACKRANGE);
|
||||
clif_updatestatus(*sd,SP_ATTACKRANGE);
|
||||
if(b_status.max_hp != status->max_hp)
|
||||
clif_updatestatus(sd,SP_MAXHP);
|
||||
clif_updatestatus(*sd,SP_MAXHP);
|
||||
if(b_status.max_sp != status->max_sp)
|
||||
clif_updatestatus(sd,SP_MAXSP);
|
||||
clif_updatestatus(*sd,SP_MAXSP);
|
||||
if(b_status.hp != status->hp)
|
||||
clif_updatestatus(sd,SP_HP);
|
||||
clif_updatestatus(*sd,SP_HP);
|
||||
if(b_status.sp != status->sp)
|
||||
clif_updatestatus(sd,SP_SP);
|
||||
clif_updatestatus(*sd,SP_SP);
|
||||
#ifdef RENEWAL
|
||||
if (b_status.pow != status->pow)
|
||||
clif_updatestatus(sd,SP_POW);
|
||||
clif_updatestatus(*sd,SP_POW);
|
||||
if (b_status.sta != status->sta)
|
||||
clif_updatestatus(sd,SP_STA);
|
||||
clif_updatestatus(*sd,SP_STA);
|
||||
if (b_status.wis != status->wis)
|
||||
clif_updatestatus(sd,SP_WIS);
|
||||
clif_updatestatus(*sd,SP_WIS);
|
||||
if (b_status.spl != status->spl)
|
||||
clif_updatestatus(sd,SP_SPL);
|
||||
clif_updatestatus(*sd,SP_SPL);
|
||||
if (b_status.con != status->con)
|
||||
clif_updatestatus(sd,SP_CON);
|
||||
clif_updatestatus(*sd,SP_CON);
|
||||
if (b_status.crt != status->crt)
|
||||
clif_updatestatus(sd,SP_CRT);
|
||||
clif_updatestatus(*sd,SP_CRT);
|
||||
if (b_status.patk != status->patk)
|
||||
clif_updatestatus(sd, SP_PATK);
|
||||
clif_updatestatus(*sd, SP_PATK);
|
||||
if (b_status.smatk != status->smatk)
|
||||
clif_updatestatus(sd, SP_SMATK);
|
||||
clif_updatestatus(*sd, SP_SMATK);
|
||||
if (b_status.res != status->res)
|
||||
clif_updatestatus(sd, SP_RES);
|
||||
clif_updatestatus(*sd, SP_RES);
|
||||
if (b_status.mres != status->mres)
|
||||
clif_updatestatus(sd, SP_MRES);
|
||||
clif_updatestatus(*sd, SP_MRES);
|
||||
if (b_status.hplus != status->hplus)
|
||||
clif_updatestatus(sd, SP_HPLUS);
|
||||
clif_updatestatus(*sd, SP_HPLUS);
|
||||
if (b_status.crate != status->crate)
|
||||
clif_updatestatus(sd, SP_CRATE);
|
||||
clif_updatestatus(*sd, SP_CRATE);
|
||||
if (b_status.max_ap != status->max_ap)
|
||||
clif_updatestatus(sd, SP_MAXAP);
|
||||
clif_updatestatus(*sd, SP_MAXAP);
|
||||
if (b_status.ap != status->ap)
|
||||
clif_updatestatus(sd, SP_AP);
|
||||
clif_updatestatus(*sd, SP_AP);
|
||||
#endif
|
||||
} else if( bl->type == BL_HOM ) {
|
||||
TBL_HOM* hd = BL_CAST(BL_HOM, bl);
|
||||
@ -10896,7 +10896,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
val1 = battle_config.manner_system; // Mute filters.
|
||||
if (sd) {
|
||||
clif_changestatus(sd,SP_MANNER,sd->status.manner);
|
||||
clif_updatestatus(sd,SP_MANNER);
|
||||
clif_updatestatus(*sd,SP_MANNER);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -13400,7 +13400,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
|
||||
sd->status.manner = 0;
|
||||
if (sd && tid == INVALID_TIMER) {
|
||||
clif_changestatus(sd,SP_MANNER,sd->status.manner);
|
||||
clif_updatestatus(sd,SP_MANNER);
|
||||
clif_updatestatus(*sd,SP_MANNER);
|
||||
}
|
||||
break;
|
||||
case SC_SPLASHER:
|
||||
@ -14221,7 +14221,7 @@ TIMER_FUNC(status_change_timer){
|
||||
if(sd) {
|
||||
sd->status.manner++;
|
||||
clif_changestatus(sd,SP_MANNER,sd->status.manner);
|
||||
clif_updatestatus(sd,SP_MANNER);
|
||||
clif_updatestatus(*sd,SP_MANNER);
|
||||
if (sd->status.manner < 0) { // Every 60 seconds your manner goes up by 1 until it gets back to 0.
|
||||
sc_timer_next(60000+tick);
|
||||
return 0;
|
||||
@ -14710,7 +14710,7 @@ TIMER_FUNC(status_change_timer){
|
||||
|
||||
if (distance_xy(x, y, bl->x, bl->y) <= skill_get_unit_range(SO_VACUUM_EXTREME, sce->val1) && unit_movepos(bl, x, y, 0, false)) {
|
||||
clif_slide(bl, x, y);
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
}
|
||||
}
|
||||
sc_timer_next(tick + sce->val4);
|
||||
|
@ -354,7 +354,7 @@ void storage_storageadd(map_session_data* sd, struct s_storage *stor, int index,
|
||||
}
|
||||
|
||||
clif_storageitemremoved(sd,index,0);
|
||||
clif_dropitem(sd,index,0);
|
||||
clif_dropitem( *sd, index, 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -417,7 +417,7 @@ void storage_storageaddfromcart(map_session_data *sd, struct s_storage *stor, in
|
||||
}
|
||||
|
||||
clif_storageitemremoved(sd,index,0);
|
||||
clif_dropitem(sd,index,0);
|
||||
clif_dropitem( *sd, index, 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -900,7 +900,7 @@ void storage_guild_storageadd(map_session_data* sd, int index, int amount)
|
||||
pc_delitem(sd,index,amount,0,4,LOG_TYPE_GSTORAGE);
|
||||
else {
|
||||
clif_storageitemremoved(sd,index,0);
|
||||
clif_dropitem(sd,index,0);
|
||||
clif_dropitem( *sd, index, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -973,7 +973,7 @@ void storage_guild_storageaddfromcart(map_session_data* sd, int index, int amoun
|
||||
pc_cart_delitem(sd,index,amount,0,LOG_TYPE_GSTORAGE);
|
||||
else {
|
||||
clif_storageitemremoved(sd,index,0);
|
||||
clif_dropitem(sd,index,0);
|
||||
clif_dropitem( *sd, index, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ void trade_tradecancel(map_session_data *sd)
|
||||
}
|
||||
|
||||
if (sd->deal.zeny) {
|
||||
clif_updatestatus(sd, SP_ZENY);
|
||||
clif_updatestatus(*sd, SP_ZENY);
|
||||
sd->deal.zeny = 0;
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ void trade_tradecancel(map_session_data *sd)
|
||||
}
|
||||
|
||||
if (target_sd->deal.zeny) {
|
||||
clif_updatestatus(target_sd, SP_ZENY);
|
||||
clif_updatestatus(*target_sd, SP_ZENY);
|
||||
target_sd->deal.zeny = 0;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ int unit_walktoxy_sub(struct block_list *bl)
|
||||
map_session_data *sd = BL_CAST(BL_PC, bl);
|
||||
|
||||
sd->head_dir = DIR_NORTH;
|
||||
clif_walkok(sd);
|
||||
clif_walkok(*sd);
|
||||
}
|
||||
#if PACKETVER >= 20170726
|
||||
// If this is a walking NPC and it will use a player sprite
|
||||
@ -447,7 +447,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
||||
if(md && !ud->state.force_walk && md->walktoxy_fail_count < icewall_walk_block && map_getcell(bl->m,x,y,CELL_CHKICEWALL) && (dx > 0 || dy > 0)) {
|
||||
//Needs to be done here so that rudeattack skills are invoked
|
||||
md->walktoxy_fail_count++;
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
// Monsters in this situation will unlock target and then attempt an idle skill
|
||||
// When they start chasing again, they will check for a chase skill before returning here
|
||||
mob_unlocktarget(md, tick);
|
||||
@ -551,7 +551,8 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
||||
&& ud->skill_id != NPC_EMOTION && ud->skill_id != NPC_EMOTION_ON //NPC_EMOTION doesn't make the monster stop
|
||||
&& md->state.skillstate != MSS_WALK) //Walk skills are supposed to be used while walking
|
||||
{ // Skill used, abort walking
|
||||
clif_fixpos(bl); // Fix position as walk has been cancelled.
|
||||
// Fix position as walk has been cancelled.
|
||||
clif_fixpos( *bl );
|
||||
return 0;
|
||||
}
|
||||
// Resend walk packet for proper Self Destruction display.
|
||||
@ -602,7 +603,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
||||
if(unit_walktoxy_sub(bl)) {
|
||||
return 1;
|
||||
} else {
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -648,7 +649,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
||||
// Aegis uses one before every attack, we should
|
||||
// only need this one for syncing purposes. [Skotlex]
|
||||
ud->target_to = 0;
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
unit_attack(bl, tbl->id, ud->state.attack_continue);
|
||||
}
|
||||
} else { // Update chase-path
|
||||
@ -938,7 +939,7 @@ void unit_run_hit(struct block_list *bl, status_change *sc, map_session_data *sd
|
||||
skill_blown(bl, bl, skill_get_blewcount(TK_RUN, lv), unit_getdir(bl), BLOWN_NONE);
|
||||
clif_status_change(bl, EFST_TING, 0, 0, 0, 0, 0);
|
||||
} else if (sd) {
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
skill_castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, gettick(), SD_LEVEL);
|
||||
}
|
||||
return;
|
||||
@ -1444,7 +1445,7 @@ int unit_stop_walking(struct block_list *bl,int type)
|
||||
}
|
||||
|
||||
if(type&USW_FIXPOS)
|
||||
clif_fixpos(bl);
|
||||
clif_fixpos( *bl );
|
||||
|
||||
ud->walkpath.path_len = 0;
|
||||
ud->walkpath.path_pos = 0;
|
||||
@ -1562,7 +1563,7 @@ TIMER_FUNC(unit_resume_running){
|
||||
clif_skill_nodamage(ud->bl,ud->bl,TK_RUN,ud->skill_lv,sc_start4(ud->bl,ud->bl,SC_RUN,100,ud->skill_lv,unit_getdir(ud->bl),0,0,0));
|
||||
|
||||
if (sd)
|
||||
clif_walkok(sd);
|
||||
clif_walkok(*sd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -2806,7 +2807,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, t_tick tick)
|
||||
// Sync packet only for players.
|
||||
// Non-players use the sync packet on the walk timer. [Skotlex]
|
||||
if (tid == INVALID_TIMER && sd)
|
||||
clif_fixpos(src);
|
||||
clif_fixpos( *src );
|
||||
|
||||
if( DIFF_TICK(ud->attackabletime,tick) <= 0 ) {
|
||||
if (battle_config.attack_direction_change && (src->type&battle_config.attack_direction_change))
|
||||
@ -3250,7 +3251,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
|
||||
if( pd->pet.intimate <= PET_INTIMATE_NONE && !(pd->master && !pd->master->state.active) ) {
|
||||
// If logging out, this is deleted on unit_free
|
||||
clif_clearunit_area(bl,clrtype);
|
||||
clif_clearunit_area( *bl, clrtype );
|
||||
map_delblock(bl);
|
||||
unit_free(bl,CLR_OUTSIGHT);
|
||||
map_freeblock_unlock();
|
||||
@ -3267,7 +3268,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
if( !hd->homunculus.intimacy && !(hd->master && !hd->master->state.active) ) {
|
||||
// If logging out, this is deleted on unit_free
|
||||
clif_emotion(bl, ET_CRY);
|
||||
clif_clearunit_area(bl,clrtype);
|
||||
clif_clearunit_area( *bl, clrtype );
|
||||
map_delblock(bl);
|
||||
unit_free(bl,CLR_OUTSIGHT);
|
||||
map_freeblock_unlock();
|
||||
@ -3282,7 +3283,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
ud->canact_tick = ud->canmove_tick;
|
||||
|
||||
if( mercenary_get_lifetime(md) <= 0 && !(md->master && !md->master->state.active) ) {
|
||||
clif_clearunit_area(bl,clrtype);
|
||||
clif_clearunit_area( *bl, clrtype );
|
||||
map_delblock(bl);
|
||||
unit_free(bl,CLR_OUTSIGHT);
|
||||
map_freeblock_unlock();
|
||||
@ -3297,7 +3298,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
ud->canact_tick = ud->canmove_tick;
|
||||
|
||||
if( elemental_get_lifetime(ed) <= 0 && !(ed->master && !ed->master->state.active) ) {
|
||||
clif_clearunit_area(bl,clrtype);
|
||||
clif_clearunit_area( *bl, clrtype );
|
||||
map_delblock(bl);
|
||||
unit_free(bl,CLR_OUTSIGHT);
|
||||
map_freeblock_unlock();
|
||||
@ -3331,7 +3332,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
}
|
||||
[[fallthrough]];
|
||||
default:
|
||||
clif_clearunit_area(bl, clrtype);
|
||||
clif_clearunit_area( *bl, clrtype );
|
||||
map_delblock(bl);
|
||||
break;
|
||||
}
|
||||
@ -3356,7 +3357,7 @@ void unit_refresh(struct block_list *bl, bool walking) {
|
||||
// Using CLR_TRICKDEAD because other flags show effects
|
||||
// Probably need to use another flag or other way to refresh it
|
||||
if (mapdata->users) {
|
||||
clif_clearunit_area(bl, CLR_TRICKDEAD); // Fade out
|
||||
clif_clearunit_area( *bl, CLR_TRICKDEAD ); // Fade out
|
||||
clif_spawn(bl,walking); // Fade in
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user