diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 5 | ||||
-rw-r--r-- | src/map/clif.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 13 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 1caff12b1..1fcbb77bc 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -14843,6 +14843,11 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) if ((data = itemdb->exists(sd->mail.inbox.msg[i].item.nameid)) == NULL) return; + if( pc_is90overweight(sd) ) { + clif->mail_getattachment(fd, 2); + return; + } + switch( pc->checkadditem(sd, data->nameid, sd->mail.inbox.msg[i].item.amount) ) { case ADDITEM_NEW: fail = ( pc->inventoryblank(sd) == 0 ); diff --git a/src/map/clif.h b/src/map/clif.h index 3418b0557..6ccd951a0 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -342,6 +342,7 @@ typedef enum useskill_fail_cause { // clif_skill_fail }useskill_fail_cause; enum clif_messages { + ITEM_CANT_OBTAIN_WEIGHT = 0x34, /* you cannot carry more items because you are overweight. */ SKILL_CANT_USE_AREA = 0x536, ITEM_CANT_USE_AREA = 0x537, }; diff --git a/src/map/pc.c b/src/map/pc.c index d0f5b0635..f29ff7567 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4310,10 +4310,15 @@ int pc_isUseitem(struct map_session_data *sd,int n) else if( itemdb_is_poison(nameid) && (sd->class_&MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS ) return 0; - if( (item->package || item->group) && pc_is90overweight(sd) ) { - //##TODO## find official response to this - clif->colormes(sd->fd,COLOR_RED,msg_txt(1477));// Item cannot be open when overweight by 90% - return 0; + if( item->package || item->group ) { + if( pc_is90overweight(sd) ) { + clif->msgtable(sd->fd,ITEM_CANT_OBTAIN_WEIGHT); + return 0; + } + if( !pc->inventoryblank(sd) ) { + clif->colormes(sd->fd,COLOR_RED,msg_txt(1477)); + return 0; + } } //Gender check |