blob: b9ced9d0c6ecaa47fe09b23ee10bbf6b0711a2c1 [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{
Zesstra5f9c0be2020-01-21 18:32:36 +010024 if( race )
25 return race;
26 string shell = master()->query_userlist(lower_case(name), USER_OBJECT);
27 if (shell)
28 race = shell->QueryProp(P_RACE);
29 return race;
MG Mud User88f12472016-06-24 23:31:02 +020030}
31
32_query_hands()
33{
34 if( hands ) return hands;
35 return ({ " nicht", 0 });
36}
37
38_query_autoload()
39{
40 return autoload;
41}
42
43Load( str )
44{
Zesstra703da222017-01-31 10:47:36 +010045 restore_object( SAVEPATH+str[0..0]+"/"+str );
MG Mud User88f12472016-06-24 23:31:02 +020046}
47
48Notlogged() { return TRUE; }
49
50QueryMoney()
51{
52 if( !mappingp(autoload) )
53 return 0;
54 return autoload["/items/money"];
55}
56
57QueryEnemies()
58{
59 return ({({}),({})});
60}
61
62QueryAttributeOffset( arr ) { return "?"; }