Crossfire Server, Trunk  R21189
CREWrapperObject.cpp
Go to the documentation of this file.
1 #include "CREWrapperObject.h"
2 
4 {
5  myObject = NULL;
6  myArchetype = NULL;
7 }
8 
10 {
11  delete myArchetype;
12 }
13 
14 void CREWrapperObject::setObject(const object* obj)
15 {
16  myObject = obj;
17  if (myArchetype == NULL)
18  myArchetype = new CREWrapperArchetype(this, obj->arch);
19  else
21 }
22 
24 {
25  return myArchetype;
26 }
27 
28 QString CREWrapperObject::name() const
29 {
30  return myObject->name;
31 }
32 
33 QString CREWrapperObject::race() const
34 {
35  return myObject->race;
36 }
37 
38 int CREWrapperObject::type() const
39 {
40  return myObject->type;
41 }
42 
43 int CREWrapperObject::level() const
44 {
45  return myObject->level;
46 }
47 
48 bool CREWrapperObject::isMonster() const
49 {
51 }
52 
53 bool CREWrapperObject::isAlive() const
54 {
56 }
57 
58 qint64 CREWrapperObject::experience() const
59 {
60  return myObject->stats.exp;
61 }
62 
63 quint32 CREWrapperObject::attacktype() const
64 {
65  return myObject->attacktype;
66 }
67 
68 qint8 CREWrapperObject::ac() const
69 {
70  return myObject->stats.ac;
71 }
72 
73 qint8 CREWrapperObject::wc() const
74 {
75  return myObject->stats.wc;
76 }
77 
78 qint16 CREWrapperObject::damage() const
79 {
80  return myObject->stats.dam;
81 }
82 
83 qint16 CREWrapperObject::hp() const
84 {
85  return myObject->stats.hp;
86 }
87 
88 qint32 CREWrapperObject::weight() const
89 {
90  return myObject->weight;
91 }
92 
93 QString CREWrapperObject::materialName() const
94 {
95  return myObject->materialname;
96 }
Definition: object.h:274
int8_t ac
Definition: living.h:38
bool isMonster() const
const char * race
Definition: object.h:318
CREWrapperArchetype * arch()
int type() const
qint64 experience() const
int64_t exp
Definition: living.h:47
qint16 hp() const
int level() const
int16_t hp
Definition: living.h:40
virtual ~CREWrapperObject()
const object * myObject
#define FLAG_ALIVE
Definition: define.h:230
qint16 damage() const
QString name() const
QString materialName() const
const char * materialname
Definition: object.h:346
int32_t weight
Definition: object.h:365
void setObject(const object *obj)
int16_t dam
Definition: living.h:46
const char * name
Definition: object.h:311
bool isAlive() const
CREWrapperArchetype * myArchetype
qint8 wc() const
#define QUERY_FLAG(xyz, p)
Definition: define.h:225
int8_t wc
Definition: living.h:37
qint8 ac() const
uint32_t attacktype
Definition: object.h:342
void setArchetype(const archetype *arch)
living stats
Definition: object.h:368
struct archt * arch
Definition: object.h:412
uint8_t type
Definition: object.h:338
#define FLAG_MONSTER
Definition: define.h:245
QString race() const
qint32 weight() const
int16_t level
Definition: object.h:351
quint32 attacktype() const