Pet Fix Client after 20180704 (#4202)

A minor fix that corrects a problem when hatching eggs from pets to clients after 20180704.

Fixes #4190 

Thanks @4144 and @Asheraf
This commit is contained in:
Kakaroto 2019-07-07 15:13:24 -03:00 committed by Lemongrass3110
parent e6eaa9fe63
commit 87b858199b
2 changed files with 8 additions and 0 deletions

View File

@ -7922,6 +7922,7 @@ void clif_sendegg(struct map_session_data *sd)
/// 3 = accessory
/// 4 = performance (data = 1~3: normal, 4: special)
/// 5 = hairstyle
/// 6 = close egg selection ui and update egg in inventory (PACKETVER >= 20180704)
///
/// If sd is null, the update is sent to nearby objects, otherwise it is sent only to that player.
void clif_send_petdata(struct map_session_data* sd, struct pet_data* pd, int type, int param)

View File

@ -927,6 +927,10 @@ bool pet_return_egg( struct map_session_data *sd, struct pet_data *pd ){
sd->inventory.u.items_inventory[i].attribute = 0;
sd->inventory.dirty = true;
pd->pet.incubate = 1;
#if PACKETVER >= 20180704
clif_inventorylist(sd);
clif_send_petdata(sd, pd, 6, 0);
#endif
unit_free(&pd->bl,CLR_OUTSIGHT);
status_calc_pc(sd,SCO_NONE);
@ -1067,6 +1071,9 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *pet)
clif_spawn(&sd->pd->bl);
clif_send_petdata(sd,sd->pd, 0,0);
clif_send_petdata(sd,sd->pd, 5,battle_config.pet_hair_style);
#if PACKETVER >= 20180704
clif_send_petdata(sd, sd->pd, 6, 1);
#endif
clif_pet_equip_area(sd->pd);
clif_send_petstatus(sd);
}