Crossfire Server, Trunk
R21670
CREWrapperArtifact.cpp
Go to the documentation of this file.
1
#include "
CREWrapperArtifact.h
"
2
3
CREWrapperArtifact::CREWrapperArtifact
()
4
{
5
myArtifact
= NULL;
6
}
7
8
void
CREWrapperArtifact::setArtifact
(
const
artifact
* art)
9
{
10
myArtifact
= art;
11
myItem
.
setObject
(
myArtifact
->
item
);
12
}
13
14
QObject*
CREWrapperArtifact::item
()
15
{
16
return
&
myItem
;
17
}
18
19
int
CREWrapperArtifact::chance
()
const
20
{
21
return
myArtifact
->
chance
;
22
}
23
24
int
CREWrapperArtifact::difficulty
()
const
25
{
26
return
myArtifact
->
difficulty
;
27
}
28
29
QStringList
CREWrapperArtifact::allowed
()
const
30
{
31
QStringList
allowed
;
32
linked_char
* a =
myArtifact
->
allowed
;
33
34
while
(a)
35
{
36
allowed.append(a->
name
);
37
a = a->
next
;
38
}
39
return
allowed
;
40
}
linked_char
Definition:
global.h:86
CREWrapperArtifact::myArtifact
const artifact * myArtifact
Definition:
CREWrapperArtifact.h:33
CREWrapperArtifact::difficulty
int difficulty() const
CREWrapperObject::setObject
void setObject(const object *obj)
Definition:
CREWrapperObject.cpp:14
artifactstruct::difficulty
uint8_t difficulty
Definition:
artifact.h:17
CREWrapperArtifact::allowed
QStringList allowed() const
linked_char::next
struct linked_char * next
Definition:
global.h:88
CREWrapperArtifact::CREWrapperArtifact
CREWrapperArtifact()
Definition:
CREWrapperArtifact.cpp:3
artifactstruct::allowed
linked_char * allowed
Definition:
artifact.h:19
CREWrapperArtifact.h
artifactstruct
Definition:
artifact.h:14
CREWrapperArtifact::myItem
CREWrapperObject myItem
Definition:
CREWrapperArtifact.h:34
linked_char::name
const char * name
Definition:
global.h:87
CREWrapperArtifact::item
QObject * item()
artifactstruct::item
object * item
Definition:
artifact.h:15
artifactstruct::chance
uint16_t chance
Definition:
artifact.h:16
CREWrapperArtifact::setArtifact
void setArtifact(const artifact *art)
Definition:
CREWrapperArtifact.cpp:8
CREWrapperArtifact::chance
int chance() const
crossfire-code
server
trunk
utils
cre
CREWrapperArtifact.cpp
Generated by
1.8.13