int command_otrigger(char_data *actor, char *cmd, char *argument) { obj_data *obj; int i; for (i = 0; i < NUM_WEARS; i++) if (cmd_otrig(GET_EQ(actor, i), actor, cmd, argument, OCMD_EQUIP)) return 1; for (obj = actor->carrying; obj; obj = obj->next_content) if (cmd_otrig(obj, actor, cmd, argument, OCMD_INVEN)) return 1; for (obj = world[IN_ROOM(actor)].contents; obj; obj = obj->next_content) if (cmd_otrig(obj, actor, cmd, argument, OCMD_ROOM)) return 1; return 0; }
int command_otrigger(char_data *actor, char *cmd, char *argument) { obj_data *obj; int i; /* prevent people we like from becoming trapped :P */ if (!valid_dg_target(actor, 0)) return 0; for (i = 0; i < NUM_WEARS; i++) if (GET_EQ(actor, i)) if (cmd_otrig(GET_EQ(actor, i), actor, cmd, argument, OCMD_EQUIP)) return 1; for (obj = actor->carrying; obj; obj = obj->next_content) if (cmd_otrig(obj, actor, cmd, argument, OCMD_INVEN)) return 1; for (obj = world[IN_ROOM(actor)].contents; obj; obj = obj->next_content) if (cmd_otrig(obj, actor, cmd, argument, OCMD_ROOM)) return 1; return 0; }