mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-28 04:58:48 +01:00
Moved object take check --Rumble
This commit is contained in:
parent
30f241d4c7
commit
9f923bae24
1 changed files with 13 additions and 11 deletions
|
|
@ -161,18 +161,20 @@ ACMD(do_put)
|
|||
|
||||
static int can_take_obj(struct char_data *ch, struct obj_data *obj)
|
||||
{
|
||||
if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE)) {
|
||||
if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) {
|
||||
act("$p: you can't carry that many items.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
} else if ((IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj)) > CAN_CARRY_W(ch)) {
|
||||
act("$p: you can't carry that much weight.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
} else if (!(CAN_WEAR(obj, ITEM_WEAR_TAKE))) {
|
||||
act("$p: you can't take that!", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
}
|
||||
if (!(CAN_WEAR(obj, ITEM_WEAR_TAKE))) {
|
||||
act("$p: you can't take that!", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE)) {
|
||||
if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) {
|
||||
act("$p: you can't carry that many items.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
} else if ((IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj)) > CAN_CARRY_W(ch)) {
|
||||
act("$p: you can't carry that much weight.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if (OBJ_SAT_IN_BY(obj)){
|
||||
act("It appears someone is sitting on $p..", FALSE, ch, obj, 0, TO_CHAR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue