Skip to content
Permalink
Browse files

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
  • Loading branch information...
admkakaroto authored and Lemongrass3110 committed Jul 7, 2019
1 parent e6eaa9f commit 87b858199b7eb82c77ee30a244c91b7bcaee1eb9
Showing with 8 additions and 0 deletions.
  1. +1 −0 src/map/clif.cpp
  2. +7 −0 src/map/pet.cpp
@@ -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)
@@ -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);
}

0 comments on commit 87b8581

Please sign in to comment.
You can’t perform that action at this time.