So every few months I go through TBA's /log folder and make sure none of the log files are out of control and to clean up log/errors. FYI we limited all log files to 5000 lines a while back since they could fill up rather quickly in certain cases.
Anyways I came across the typical "mob using char data" error, but this one was repeated a few thousand times so I fixed it. A lot of these SYSERR's have popped up due to mob triggers having mobs do player actions. This one was in can_take_obj since we removed weight limitations on players with nohassle. The code is here:
Code:
static int can_take_obj(struct char_data *ch, struct obj_data *obj)
{
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);
}
}
Here is my reasoning in the changelog:
Added a !NPC check to can_take_object. It was spamming a "mob using player data SYSERR". This means mobs do not have a max weight carrying capacity anymore. I think this is a good thing because I've seen people stumped when mob triggers fail due to weight limitations. But it could be unbalancing on some MUDs since pets could then carry unlimited gear.
I just wanted to let everyone know in case they think this is unbalancing to their MUD. Feel free to reply back if you agree or disagree.