summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 04:55:18 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 04:55:18 +0200
commit484ac06f39d1b576284c137538f05347ba7aee0c (patch)
tree2dadbe9ad2784c8813079c904c05441192614237
parent6d33154da962ede5f5e30fae53e76d5d2a1cc4ca (diff)
downloadhercules-484ac06f39d1b576284c137538f05347ba7aee0c.tar.gz
hercules-484ac06f39d1b576284c137538f05347ba7aee0c.tar.bz2
hercules-484ac06f39d1b576284c137538f05347ba7aee0c.tar.xz
hercules-484ac06f39d1b576284c137538f05347ba7aee0c.zip
Update pet's egg data in ACMD(petrename)
-rw-r--r--src/map/atcommand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index bee1f8c90..379405833 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2881,6 +2881,15 @@ ACMD(petrename)
}
pd->pet.rename_flag = 0;
+
+ int i;
+
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].card[0] == CARD0_PET
+ && pd->pet.pet_id == MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]));
+
+ if (i != sd->status.inventorySize)
+ sd->status.inventory[i].card[3] = pet->get_card4_value(pd->pet.rename_flag, pd->pet.intimate);
+
intif->save_petdata(sd->status.account_id, &pd->pet);
clif->send_petstatus(sd);
clif->message(fd, msg_fd(fd,187)); // You can now rename your pet.