This repository has been archived by the owner on May 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CPerson.h
102 lines (73 loc) · 2.03 KB
/
CPerson.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//Header CPerson
// @Author = Jan van Dick
#ifndef CPERSON_H
#define CPERSON_H
class CGame;
class CInventory;
class CDialog;
#include "CColor.h"
#include "CFunctions.h"
#include "CInventory.h"
#include "CGame.h"
#include "CQuest.h"
#include "CDialog.h"
class CPerson
{
private:
char* m_chName; //Name of the person (might change during he game
int m_ID; //Id clearly identifing this person
//Game instance
CGame* m_game;
//Attributes:
unsigned int m_maxLife; //maximun of life
unsigned int m_Life; //Lifepoints
//Money and items
int m_Gold; //Gold
CInventory* m_Inventory; //Person's inventory
//Dialog
CDialog* m_Dialog; //Dialog of a person (represented through a graph)
//Quest handeling
CList<CQuest>* m_Quests; //All quests a person sets during the game
void(CQuest::*m_createQuest)(); //create all of a persons quests
public:
//Constructor
CPerson(char* chName, int ID, CGame* game, void(CDialog::*dialog)(), void (CQuest::*createQuest)());
//Getter
//Get person's name
char* getName() {
return m_chName;
}
//Get ID
int getID() {
return m_ID;
}
//getQuests
CList<CQuest>* getQuests() {
return m_Quests;
}
//getQuest: return a quest (search by name)
CQuest* getQuest(char* chQuestName) {
return m_Quests->getElement(chQuestName);
}
//getQuest: return a quest (search by number)
CQuest* getQuest(int questNumber) {
return m_Quests->getElement(questNumber);
}
void setDialog(void (CPerson::*dialog)()) {}
//Dialogs and quests:
//call dialog
void callDialog();
void dialog_Standard();
//--- Karl Marx ---//
//Dialogs
void dialog1_KarlMarx();
void dialog2_KarlMarx();
void dialog3_KarlMarx();
//--- Dog --- //
//Dialogs
void dialog_Dog();
//--- Friedirch Engels ---//
//Dialogs
void dialog_FriedrichEngels();
};
#endif