void act(Object * obj, char *mode, int num) { char (*slots)[SHORT_STRLEN]; if (!strcmp(mode, "skill")) { slots = obj->skill_slots; act_skill(obj, slots[num]); } if (!strcmp(mode, "item")) { slots = obj->item_slots; act_item(obj, slots[num]); } if (!strcmp(mode, "debug")) { slots = obj->debug_slots; act_debug(obj, slots[num]); } strcpy(obj->last_action, slots[num]); }
void key_loot(Object * obj) { act_debug(obj, "loot"); }