forked from kenygia/MooseEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameCharacter.h
75 lines (69 loc) · 1.87 KB
/
GameCharacter.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
#ifndef GAMECHARACTER_H
#define GAMECHARACTER_H
#include <QWidget>
#include "LsbObject.h"
#include "ItemGroup.h"
#include "InventoryHandler.h"
#define ATTRIB_STR 0
#define ATTRIB_DEX 1
#define ATTRIB_INT 2
#define ATTRIB_CONS 3
#define ATTRIB_SPD 4
#define ATTRIB_PER 5
class GameCharacter
{
LsbObject *object;
std::wstring name;
QWidget *widget;
ItemGroup inventory;
std::vector<TAG_LSB *> &tagList;
std::vector<LsbObject *> &globals;
InventoryHandler *inventoryHandler;
void ensureInventoryCapacity(LsbObject *viewMapValueObject, unsigned long viewSlot);
public:
GameCharacter(std::vector<LsbObject *> &globals, std::vector<TAG_LSB *> &tagList);
~GameCharacter() {
delete widget;
delete inventoryHandler;
}
ItemGroup& getInventory() {
return inventory;
}
std::wstring& getName() {
return name;
}
void setName(std::wstring& name) {
this->name = name;
}
LsbObject *getObject() {
return object;
}
void setObject(LsbObject *character) {
this->object = character;
}
QWidget *getWidget() {
return this->widget;
}
void setWidget(QWidget *widget) {
this->widget = widget;
}
InventoryHandler *getInventoryHandler() const {
return inventoryHandler;
}
void setInventoryHandler(InventoryHandler *value) {
this->inventoryHandler = value;
}
bool hasTalent(long talentId);
void setTalent(long talentId, bool enabled);
std::vector<LsbObject *> getAbilityList();
std::vector<LsbObject *> getTraitList();
std::vector<LsbObject *> getSkillList();
void addSkill(const char *skillName);
void removeSkill(const char *skillName);
LsbObject *getInventoryObject();
unsigned long getInventoryId();
unsigned long getCreatorId();
LsbObject *getPlayerCustomDataObject();
bool addItemToInventoryObject(LsbObject *itemCreatorObject, unsigned long viewSlot, unsigned long extraInventoryTab, unsigned long extraViewSlot, bool equippedItem);
};
#endif // GAMECHARACTER_H