diff options
author | shennetsind <ind@henn.et> | 2013-07-21 15:57:33 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-21 15:57:33 -0300 |
commit | b2e12fbc71d2e5e1005c9daa386345a45105be03 (patch) | |
tree | 48865d702822e1497c888ac22f6932e7b458fe9b | |
parent | 2548a8cee42fae1225cd9ff3266beb4feb13dc83 (diff) | |
download | hercules-b2e12fbc71d2e5e1005c9daa386345a45105be03.tar.gz hercules-b2e12fbc71d2e5e1005c9daa386345a45105be03.tar.bz2 hercules-b2e12fbc71d2e5e1005c9daa386345a45105be03.tar.xz hercules-b2e12fbc71d2e5e1005c9daa386345a45105be03.zip |
For Bug #7542
Attempting to open boxes or packages while 90% overweight will fail and result in a error message.
http://hercules.ws/board/tracker/issue-7542-bug-when-weight-90/
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | conf/messages.conf | 3 | ||||
-rw-r--r-- | src/map/pc.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/conf/messages.conf b/conf/messages.conf index 21e24e91a..51815c256 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -1507,5 +1507,8 @@ 1476: You are already mounting something else +//src/map/pc.c::pc_isUseitem +1477: Item cannot be open when overweight by 90% + //Custom translations import: conf/import/msg_conf.txt diff --git a/src/map/pc.c b/src/map/pc.c index d1ff57978..855b103b1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4221,6 +4221,11 @@ 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) ) { + clif->colormes(sd->fd,COLOR_RED,msg_txt(1477));// Item cannot be open when overweight by 90% + return 0; + } + //Gender check if(item->sex != 2 && sd->status.sex != item->sex) return 0; |