blob: 416c4c5a81f1ea0b9a2ad35091d17123fcef4316 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// npc/put_and_get.c.c -- Geben und nehmen fuer NPCs
4//
5// $Id: put_and_get.c 6371 2007-07-17 22:46:50Z Zesstra $
6#pragma strong_types
7#pragma save_types
8#pragma range_check
9#pragma no_clone
MG Mud User88f12472016-06-24 23:31:02 +020010
11inherit "std/living/put_and_get";
12#include <moving.h>
13#include <properties.h>
14
15void give_notify( object obj )
16{
17 mixed* msg;
18 if (pointerp(msg=QueryProp(P_REJECT))) {
19 switch(msg[0]) {
20 case REJECT_GIVE:
21 say(msg[1]);
22 give_obj( obj, this_player() );
23 break;
24 case REJECT_LIGHT_MODIFIER:
25 if (obj->QueryProp(P_LIGHT_MODIFIER) ||
26 obj->QueryProp(P_LIGHT)) break;
27 case REJECT_DROP:
28 say(msg[1]);
29 drop_obj( obj );
30 break;
31 case REJECT_KEEP:
32 default: say(msg[1]); /* keep it */
33 }
34 }
35}