aboutsummaryrefslogtreecommitdiff
path: root/backend/ObjectFactory.h
blob: 440d4bd3af7ab85fb937bbd2ab0d8c0335903a20 (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 {
	String name;
	String 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 String & name = "", const String & description = "");

private:
	ObjectFactory() = delete;
};