|
@@ -75,6 +75,7 @@ int pet_create_egg(struct map_session_data *sd, int item_id)
|
|
{
|
|
{
|
|
int pet_id = search_petDB_index(item_id, PET_EGG);
|
|
int pet_id = search_petDB_index(item_id, PET_EGG);
|
|
if (pet_id < 0) return 0; //No pet egg here.
|
|
if (pet_id < 0) return 0; //No pet egg here.
|
|
|
|
+ if (!pc_inventoryblank(sd)) return 0; // Inventory full
|
|
sd->catch_target_class = pet_db[pet_id].class_;
|
|
sd->catch_target_class = pet_db[pet_id].class_;
|
|
intif_create_pet(sd->status.account_id, sd->status.char_id,
|
|
intif_create_pet(sd->status.account_id, sd->status.char_id,
|
|
(short)pet_db[pet_id].class_,
|
|
(short)pet_db[pet_id].class_,
|
|
@@ -581,13 +582,23 @@ static int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap);
|
|
|
|
|
|
int pet_menu(struct map_session_data *sd,int menunum)
|
|
int pet_menu(struct map_session_data *sd,int menunum)
|
|
{
|
|
{
|
|
|
|
+ struct item_data *egg_id;
|
|
nullpo_ret(sd);
|
|
nullpo_ret(sd);
|
|
|
|
+
|
|
if (sd->pd == NULL)
|
|
if (sd->pd == NULL)
|
|
return 1;
|
|
return 1;
|
|
|
|
|
|
//You lost the pet already.
|
|
//You lost the pet already.
|
|
if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate)
|
|
if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate)
|
|
return 1;
|
|
return 1;
|
|
|
|
+
|
|
|
|
+ egg_id = itemdb_exists(sd->pd->petDB->EggID);
|
|
|
|
+ if (egg_id) {
|
|
|
|
+ if ((egg_id->flag.trade_restriction&0x01) && !pc_inventoryblank(sd)) {
|
|
|
|
+ printf ("THERE WILL NEVER BE ANOTHER TONIGHT = %d.\n", ARRAYLENGTH(sd->status.inventory));
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
switch(menunum) {
|
|
switch(menunum) {
|
|
case 0:
|
|
case 0:
|