Fixed potentially dangerous map_addflooritem calls and related behaviors (#8360)
*Removed potentially dangerous map_additemfloor calls *Added weight/inventory checks for marry atcommand *Fixed overweight message for box items *Fixed inventory space check for box items to match official requirement (the total number of the items the box will give you *r min 10, plus 1) *Fixed inventory space message for box items *Fixed pet egg creation not deleting the pet data when failed to add it to the inventory *Fixed pet egg creation dropping the egg on the floor when failed to add it to the inventory *Fixed pet equipment dropping on the floor when failed to retrieve the item *Added a battle configuration to prevent removing the pet equipment (and disappear into nothingness) when failed to retrieve the item *Added missing skill_drop_items_full checks on several skills (official behavior makes the items disappear) --------- Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
@@ -6394,7 +6394,6 @@ void getring (map_session_data* sd)
|
||||
|
||||
if((flag = pc_additem(sd,&item_tmp,1,LOG_TYPE_COMMAND))) {
|
||||
clif_additem(sd,0,0,flag);
|
||||
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,4,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6420,6 +6419,28 @@ ACMD_FUNC(marry)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!pc_inventoryblank(sd)) {
|
||||
clif_msg_color(sd, MSI_CANT_GET_ITEM_BECAUSE_COUNT, color_table[COLOR_RED]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!pc_inventoryblank(pl_sd)) {
|
||||
clif_msg_color(pl_sd, MSI_CANT_GET_ITEM_BECAUSE_COUNT, color_table[COLOR_RED]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint32 w = 0;
|
||||
|
||||
if (w = itemdb_weight((sd->status.sex) ? WEDDING_RING_M : WEDDING_RING_F) && w + sd->weight > sd->max_weight) {
|
||||
clif_msg_color(sd, MSI_CANT_GET_ITEM_BECAUSE_WEIGHT, color_table[COLOR_RED]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (w = itemdb_weight((pl_sd->status.sex) ? WEDDING_RING_M : WEDDING_RING_F) && w + pl_sd->weight > pl_sd->max_weight) {
|
||||
clif_msg_color(pl_sd, MSI_CANT_GET_ITEM_BECAUSE_WEIGHT, color_table[COLOR_RED]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pc_marriage(sd, pl_sd)) {
|
||||
clif_displaymessage(fd, msg_txt(sd,1173)); // They are married... wish them well.
|
||||
clif_wedding_effect(&pl_sd->bl); //wedding effect and music [Lupus]
|
||||
|
||||
Reference in New Issue
Block a user