aboutsummaryrefslogtreecommitdiff
path: root/backend/ObjectFactory.h
blob: 60123bde7d512596c24ebfaeb8a52de399b9a701 (plain)
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
#pragma once

#include "Object.h"

enum ObjectType {
	ARMOR,
	CONSUMABLE,
	GOLD,
	WEAPON,
};

// database object table row
struct UniversalObject {
	const char * name;
	const char * description;
	ObjectType type;
	int min_value;
	int max_value;
	int protection;
};

class ObjectFactory {
public:
	static Object * create_object(const UniversalObject & universal);
	static Object * create_object(const char * name = "", const char * description = "");

private:
	ObjectFactory() = delete;
};