diff options
Diffstat (limited to 'src/emap')
-rw-r--r-- | src/emap/clif.c | 20 | ||||
-rw-r--r-- | src/emap/clif.h | 8 | ||||
-rw-r--r-- | src/emap/init.c | 2 | ||||
-rw-r--r-- | src/emap/map.c | 2 | ||||
-rw-r--r-- | src/emap/pc.c | 7 |
5 files changed, 23 insertions, 16 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c index d0d3cde..53d9a29 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -149,7 +149,7 @@ void eclif_quest_add(TBL_PC *sd, hookStop(); } -// legacy eclif_charnameack_legacy start +// legacy eclif_blname_ack_legacy start // clientVersion <= 24 // @@ -189,7 +189,7 @@ struct packet_reqnameall_legacy_ack { /// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME) /// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL) /// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2) -static void eclif_charnameack_legacy(int fd, struct block_list *bl) +static void eclif_blname_ack_legacy(int fd, struct block_list *bl) { struct packet_reqnameall_legacy_ack packet; memset(&packet, 0, sizeof(struct packet_reqnameall_legacy_ack)); @@ -312,7 +312,7 @@ static void eclif_charnameack_legacy(int fd, struct block_list *bl) memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH); break; default: - ShowError("clif_charnameack: bad type %u(%d)\n", bl->type, bl->id); + ShowError("clif_blname_ack: bad type %u(%d)\n", bl->type, bl->id); return; } @@ -388,12 +388,12 @@ static void eclif_charnameupdate_legacy(struct map_session_data *ssd) // // clientVersion <= 24 -// legacy eclif_charnameack_legacy end +// legacy eclif_blname_ack_legacy end -void eclif_charnameack_pre(int *fdPtr, - struct block_list **blPtr) +void eclif_blname_ack_pre(int *fdPtr, + struct block_list **blPtr) { - eclif_charnameack_pre_sub(fdPtr, blPtr); + eclif_blname_ack_pre_sub(fdPtr, blPtr); if (hookStopped()) return; @@ -402,13 +402,13 @@ void eclif_charnameack_pre(int *fdPtr, return; if (data->clientVersion <= 24) { - eclif_charnameack_legacy(*fdPtr, *blPtr); + eclif_blname_ack_legacy(*fdPtr, *blPtr); hookStop(); } } -void eclif_charnameack_pre_sub(int *fdPtr, - struct block_list **blPtr) +void eclif_blname_ack_pre_sub(int *fdPtr, + struct block_list **blPtr) { struct block_list *bl = *blPtr; if (!bl) diff --git a/src/emap/clif.h b/src/emap/clif.h index 3a563fd..1c602d8 100644 --- a/src/emap/clif.h +++ b/src/emap/clif.h @@ -9,10 +9,10 @@ void eclif_quest_add(TBL_PC *sd, struct quest *qd); void eclif_quest_add_pre(TBL_PC **sdPtr, struct quest **qdPtr); -void eclif_charnameack_pre(int *fdPtr, - struct block_list **blPtr); -void eclif_charnameack_pre_sub(int *fdPtr, - struct block_list **blPtr); +void eclif_blname_ack_pre(int *fdPtr, + struct block_list **blPtr); +void eclif_blname_ack_pre_sub(int *fdPtr, + struct block_list **blPtr); void eclif_charnameupdate_pre(struct map_session_data **ssdPtr); void eclif_getareachar_unit_post(TBL_PC *sd, struct block_list *bl); diff --git a/src/emap/init.c b/src/emap/init.c index d8a6d12..3c40f30 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -288,7 +288,7 @@ HPExport void plugin_init (void) addHookPre(npc, unload, enpc_unload_pre); addHookPre(clif, quest_send_list, eclif_quest_send_list_pre); addHookPre(clif, quest_add, eclif_quest_add_pre); - addHookPre(clif, charnameack, eclif_charnameack_pre); + addHookPre(clif, blname_ack, eclif_blname_ack_pre); addHookPre(clif, charnameupdate, eclif_charnameupdate_pre); addHookPre(clif, getareachar_item, eclif_getareachar_item_pre); addHookPre(clif, dropflooritem, eclif_dropflooritem_pre); diff --git a/src/emap/map.c b/src/emap/map.c index cfbffef..9b38045 100644 --- a/src/emap/map.c +++ b/src/emap/map.c @@ -614,7 +614,7 @@ void map_alwaysVisible_send(TBL_PC *sd) continue; } clif->set_unit_idle(&npc->bl, sd, SELF); - clif->charnameack(sd->fd, &npc->bl); + clif->blname_ack(sd->fd, &npc->bl); } } diff --git a/src/emap/pc.c b/src/emap/pc.c index 9149e1e..ec45cdc 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -940,6 +940,13 @@ int epc_jobchange(struct map_session_data *sd, if (sd->disguise != -1) pc->disguise(sd, -1); + // Fix atcommand @jobchange when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client +// if (pc->has_second_costume(sd) == false) { +// sd->status.body = 0; +// sd->vd.body_style = 0; +// clif->changelook(&sd->bl, LOOK_BODY2, sd->vd.body_style); +// } + status->set_viewdata(&sd->bl, class); send_changelook2(sd, &sd->bl, sd->bl.id, LOOK_BASE, sd->vd.class, 0, NULL, 0, AREA); // clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris] |