Resolved a map crash with pet items (fixes #1716)

* Follow up to ade1b17.
* Added a pet data check that was removed.
Thanks to @Keniski!
This commit is contained in:
aleos89 2016-11-15 21:52:05 -05:00
parent ab7ca67ff4
commit 5332d7f0e7

View File

@ -861,6 +861,9 @@ int pet_equipitem(struct map_session_data *sd,int index)
pd = sd->pd;
if (!pd)
return 1;
nameid = sd->inventory.u.items_inventory[index].nameid;
if(pd->petDB->AcceID == 0 || nameid != pd->petDB->AcceID || pd->pet.equip != 0) {