blob: d457038709cfd702b1c8cab0ab2150c5dfc2d387 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// ----------------------------------------------------------------------
2// Zwischenobjekt zum Lesen der Spielerdaten auch von nichteingeloggten.
3// ----------------------------------------------------------------------
4#include "teller.h"
Zesstra703da222017-01-31 10:47:36 +01005#include <config.h>
MG Mud User88f12472016-06-24 23:31:02 +02006
7inherit "std/player/base";
8
9create() {
10 used_attributes_offsets = ([]);
11}
12
13string name;
14string race;
15string hands;
Zesstra703da222017-01-31 10:47:36 +010016//mapping autoload;
MG Mud User88f12472016-06-24 23:31:02 +020017
18_query_name() { return name; }
19playername() { return name; }
20_set_name( str ) { return name=str; }
21
22_query_race()
23{
24 if( race ) return race;
25
26 return "/secure/master"
27 ->query_player_object(lower_case(name))
28 ->QueryProp(P_RACE);
29}
30
31_query_hands()
32{
33 if( hands ) return hands;
34 return ({ " nicht", 0 });
35}
36
37_query_autoload()
38{
39 return autoload;
40}
41
42Load( str )
43{
Zesstra703da222017-01-31 10:47:36 +010044 restore_object( SAVEPATH+str[0..0]+"/"+str );
MG Mud User88f12472016-06-24 23:31:02 +020045}
46
47Notlogged() { return TRUE; }
48
49QueryMoney()
50{
51 if( !mappingp(autoload) )
52 return 0;
53 return autoload["/items/money"];
54}
55
56QueryEnemies()
57{
58 return ({({}),({})});
59}
60
61QueryAttributeOffset( arr ) { return "?"; }