… | |
… | |
280 | * being generated. |
280 | * being generated. |
281 | * If flag is GT_INVISIBLE, only invisible objects are generated (ie, only |
281 | * If flag is GT_INVISIBLE, only invisible objects are generated (ie, only |
282 | * abilities. This is used by summon spells, thus no summoned monsters |
282 | * abilities. This is used by summon spells, thus no summoned monsters |
283 | * start with equipment, but only their abilities). |
283 | * start with equipment, but only their abilities). |
284 | */ |
284 | */ |
285 | |
|
|
286 | |
|
|
287 | static void |
285 | static void |
288 | put_treasure (object *op, object *creator, int flags) |
286 | put_treasure (object *op, object *creator, int flags) |
289 | { |
287 | { |
290 | object *tmp; |
288 | object *tmp; |
291 | |
289 | |
… | |
… | |
302 | insert_ob_in_map (op, creator->map, op, INS_NO_MERGE | INS_NO_WALK_ON); |
300 | insert_ob_in_map (op, creator->map, op, INS_NO_MERGE | INS_NO_WALK_ON); |
303 | } |
301 | } |
304 | else |
302 | else |
305 | { |
303 | { |
306 | op = insert_ob_in_ob (op, creator); |
304 | op = insert_ob_in_ob (op, creator); |
|
|
305 | |
307 | if ((flags & GT_APPLY) && QUERY_FLAG (creator, FLAG_MONSTER)) |
306 | if ((flags & GT_APPLY) && QUERY_FLAG (creator, FLAG_MONSTER)) |
308 | monster_check_apply (creator, op); |
307 | monster_check_apply (creator, op); |
|
|
308 | |
309 | if ((flags & GT_UPDATE_INV) && (tmp = is_player_inv (creator)) != NULL) |
309 | if ((flags & GT_UPDATE_INV) && (tmp = creator->in_player ())) |
310 | esrv_send_item (tmp, op); |
310 | esrv_send_item (tmp, op); |
311 | } |
311 | } |
312 | } |
312 | } |
313 | |
313 | |
314 | /* if there are change_xxx commands in the treasure, we include the changes |
314 | /* if there are change_xxx commands in the treasure, we include the changes |