Crossfire Server, Trunk  R20513
CREWrapperArtifact.cpp
Go to the documentation of this file.
1 #include "CREWrapperArtifact.h"
2 
4 {
5  myArtifact = NULL;
6 }
7 
9 {
10  myArtifact = art;
12 }
13 
14 QObject* CREWrapperArtifact::item()
15 {
16  return &myItem;
17 }
18 
20 {
21  return myArtifact->chance;
22 }
23 
25 {
26  return myArtifact->difficulty;
27 }
28 
29 QStringList CREWrapperArtifact::allowed() const
30 {
31  QStringList allowed;
33 
34  while (a)
35  {
36  allowed.append(a->name);
37  a = a->next;
38  }
39  return allowed;
40 }
QStringList allowed() const
const artifact * myArtifact
void setObject(const object *obj)
uint8_t difficulty
Minimum map difficulty for the artifact to happen.
Definition: artifact.h:17
struct linked_char * next
Definition: global.h:88
linked_char * allowed
List of archetypes the artifact can affect.
Definition: artifact.h:19
int chance() const
This is one artifact, ie one special item.
Definition: artifact.h:14
CREWrapperObject myItem
const char * name
Definition: global.h:87
QObject * item()
object * item
Special values of the artifact.
Definition: artifact.h:15
uint16_t chance
Chance of the artifact to happen.
Definition: artifact.h:16
void setArtifact(const artifact *art)
int difficulty() const