Crossfire Server, Trunk
CREWrapperObject.cpp
Go to the documentation of this file.
1 #include "CREWrapperObject.h"
2 
4 {
5  myObject = NULL;
6  myArchetype = NULL;
7  myTreasure = nullptr;
8 }
9 
11 {
12  delete myArchetype;
13  delete myTreasure;
14 }
15 
17 {
18  myObject = obj;
19  if (myArchetype == NULL)
21  else
23  delete myTreasure;
24  myTreasure = nullptr;
25 }
26 
28 {
29  return myArchetype;
30 }
31 
32 QString CREWrapperObject::name() const
33 {
34  return myObject->name;
35 }
36 
37 QString CREWrapperObject::race() const
38 {
39  return myObject->race;
40 }
41 
42 int CREWrapperObject::type() const
43 {
44  return myObject->type;
45 }
46 
47 int CREWrapperObject::level() const
48 {
49  return myObject->level;
50 }
51 
52 bool CREWrapperObject::isMonster() const
53 {
55 }
56 
57 bool CREWrapperObject::isAlive() const
58 {
60 }
61 
62 quint32 CREWrapperObject::attacktype() const
63 {
64  return myObject->attacktype;
65 }
66 
67 QString CREWrapperObject::materialName() const
68 {
69  return myObject->materialname;
70 }
71 
73  if (!myObject->randomitems) {
74  return nullptr;
75  }
76  if (!myTreasure) {
78  }
79  return myTreasure;
80 }
CREWrapperObject::myArchetype
CREWrapperArchetype * myArchetype
Definition: CREWrapperObject.h:79
CREWrapperObject::name
QString name
Definition: CREWrapperObject.h:16
CREWrapperObject::materialName
QString materialName
Definition: CREWrapperObject.h:35
altar_valkyrie.obj
obj
Definition: altar_valkyrie.py:33
QUERY_FLAG
#define QUERY_FLAG(xyz, p)
Definition: define.h:226
obj::race
sstring race
Definition: object.h:319
CREWrapperObject::isMonster
bool isMonster
Definition: CREWrapperObject.h:24
CREWrapperObject::setObject
void setObject(object *obj)
Definition: CREWrapperObject.cpp:16
CREWrapperObject::type
int type
Definition: CREWrapperObject.h:21
CREWrapperObject::isAlive
bool isAlive
Definition: CREWrapperObject.h:25
obj::randomitems
struct treasureliststruct * randomitems
Definition: object.h:389
CREWrapperObject::randomItems
QObject randomItems
Definition: CREWrapperObject.h:36
CREWrapperObject::myTreasure
CREWrapperTreasureList * myTreasure
Definition: CREWrapperObject.h:80
obj
Definition: object.h:275
FLAG_ALIVE
#define FLAG_ALIVE
Definition: define.h:230
CREWrapperObject::race
QString race
Definition: CREWrapperObject.h:17
obj::name
sstring name
Definition: object.h:312
CREWrapperObject::myObject
object * myObject
Definition: CREWrapperObject.h:78
CREWrapperObject::CREWrapperObject
CREWrapperObject()
Definition: CREWrapperObject.cpp:3
CREWrapperObject::level
int level
Definition: CREWrapperObject.h:23
FLAG_MONSTER
#define FLAG_MONSTER
Definition: define.h:245
CREWrapperArchetype::setArchetype
void setArchetype(archetype *arch)
Definition: CREWrapperArchetype.cpp:10
obj::arch
struct archt * arch
Definition: object.h:416
obj::type
uint8_t type
Definition: object.h:341
obj::materialname
sstring materialname
Definition: object.h:349
CREWrapperObject::attacktype
quint32 attacktype
Definition: CREWrapperObject.h:28
CREWrapperArchetype
Definition: CREWrapperArchetype.h:13
obj::attacktype
uint32_t attacktype
Definition: object.h:345
CREWrapperObject::arch
QObject arch
Definition: CREWrapperObject.h:31
obj::level
int16_t level
Definition: object.h:354
CREWrapperObject::~CREWrapperObject
virtual ~CREWrapperObject()
Definition: CREWrapperObject.cpp:10
CREWrapperObject.h
CREWrapperTreasureList
Definition: CREWrapperTreasure.h:11