… | |
… | |
925 | */ |
925 | */ |
926 | if (op->inv && QUERY_FLAG (op, FLAG_APPLIED)) |
926 | if (op->inv && QUERY_FLAG (op, FLAG_APPLIED)) |
927 | { |
927 | { |
928 | object *current, *next; |
928 | object *current, *next; |
929 | |
929 | |
|
|
930 | int cnt = MAX_ITEM_PER_DROP; |
|
|
931 | |
930 | for (current = op->inv; current != NULL; current = next) |
932 | for (current = op->inv; current != NULL; current = next) |
931 | { |
933 | { |
932 | next = current->below; |
934 | next = current->below; |
933 | drop_object (pl, current, 0); |
935 | drop_object (pl, current, 0); |
|
|
936 | |
|
|
937 | if (--cnt <= 0) break; |
934 | } |
938 | } |
|
|
939 | |
|
|
940 | if (cnt <= 0) |
|
|
941 | pl->failmsg (format ( |
|
|
942 | "Moved only %d items, you can't move more than that at once.", |
|
|
943 | MAX_ITEM_PER_DROP |
|
|
944 | )); |
935 | |
945 | |
936 | esrv_update_item (UPD_WEIGHT, pl, op); |
946 | esrv_update_item (UPD_WEIGHT, pl, op); |
937 | } |
947 | } |
938 | else |
948 | else |
939 | drop_object (pl, op, nrof); |
949 | drop_object (pl, op, nrof); |