… | |
… | |
1029 | if (sack == NULL || sack->type != CONTAINER) |
1029 | if (sack == NULL || sack->type != CONTAINER) |
1030 | { |
1030 | { |
1031 | LOG (llevError, "apply_container: %s is not container!\n", sack ? &sack->name : "[nullobject]"); |
1031 | LOG (llevError, "apply_container: %s is not container!\n", sack ? &sack->name : "[nullobject]"); |
1032 | return 0; |
1032 | return 0; |
1033 | } |
1033 | } |
1034 | op->contr->last_used = NULL; |
1034 | |
1035 | op->contr->last_used_id = 0; |
1035 | op->contr->last_used = 0; |
1036 | |
1036 | |
1037 | if (sack->env != op) |
1037 | if (sack->env != op) |
1038 | { |
1038 | { |
1039 | if (sack->other_arch == NULL || sack->env != NULL) |
1039 | if (sack->other_arch == NULL || sack->env != NULL) |
1040 | { |
1040 | { |
1041 | new_draw_info (NDI_UNIQUE, 0, op, "You must get it first."); |
1041 | new_draw_info (NDI_UNIQUE, 0, op, "You must get it first."); |
1042 | return 1; |
1042 | return 1; |
1043 | } |
1043 | } |
|
|
1044 | |
1044 | /* It's on the ground, the problems begin */ |
1045 | /* It's on the ground, the problems begin */ |
1045 | if (op->container != sack) |
1046 | if (op->container != sack) |
1046 | { |
1047 | { |
1047 | /* it's closed OR some player has opened it */ |
1048 | /* it's closed OR some player has opened it */ |
1048 | if (QUERY_FLAG (sack, FLAG_APPLIED)) |
1049 | if (QUERY_FLAG (sack, FLAG_APPLIED)) |
… | |
… | |
2808 | op->destroy (); |
2809 | op->destroy (); |
2809 | return 1; |
2810 | return 1; |
2810 | } |
2811 | } |
2811 | |
2812 | |
2812 | pl->contr->last_used = op; |
2813 | pl->contr->last_used = op; |
2813 | pl->contr->last_used_id = op->count; |
|
|
2814 | |
2814 | |
2815 | tmp = manual_apply (pl, op, aflag); |
2815 | tmp = manual_apply (pl, op, aflag); |
2816 | if (!quiet) |
2816 | if (!quiet) |
2817 | { |
2817 | { |
2818 | if (tmp == 0) |
2818 | if (tmp == 0) |