summaryrefslogtreecommitdiff
path: root/src/emap/craftconf.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-23 18:13:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-23 18:13:42 +0300
commit80956ecdab280f24708981f71bac50ec23587311 (patch)
treee11766d931bb8b22b9024e052ece9b01383100ff /src/emap/craftconf.h
parent722d18daaceebbebfd6a0faf8ad4b0497d2599d1 (diff)
downloadplugin-80956ecdab280f24708981f71bac50ec23587311.tar.gz
plugin-80956ecdab280f24708981f71bac50ec23587311.tar.bz2
plugin-80956ecdab280f24708981f71bac50ec23587311.tar.xz
plugin-80956ecdab280f24708981f71bac50ec23587311.zip
Move craft conf related things into separate file.
Also move itempair struct into separate file.
Diffstat (limited to 'src/emap/craftconf.h')
-rw-r--r--src/emap/craftconf.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/emap/craftconf.h b/src/emap/craftconf.h
new file mode 100644
index 0000000..b9f4a73
--- /dev/null
+++ b/src/emap/craftconf.h
@@ -0,0 +1,48 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 - 2015 Evol developers
+
+#ifndef EVOL_MAP_CRAFTCONF
+#define EVOL_MAP_CRAFTCONF
+
+#include "common/db.h"
+
+#include "emap/const/craft.h"
+
+#include "emap/struct/itempair.h"
+
+VECTOR_STRUCT_DECL(craft_items_collection, struct item_pair);
+
+struct craft_db_inventory
+{
+ struct item_pair items[craft_inventory_size];
+};
+
+struct craft_db_entry
+{
+ int id;
+ char name[32];
+ VECTOR_DECL(struct craft_db_inventory) inventories;
+ struct craft_items_collection create_items;
+ struct craft_items_collection delete_items;
+ struct craft_items_collection required_items;
+ struct craft_items_collection required_equips;
+ struct craft_items_collection required_skills;
+ struct craft_items_collection required_quests;
+ int priority;
+ int price;
+ int level;
+ int flag;
+};
+
+enum craft_field_type
+{
+ CRAFT_ITEM,
+ CRAFT_QUEST,
+ CRAFT_SKILL,
+ CRAFT_BOOL
+};
+
+void do_init_craftconf(void);
+void do_final_craftconf(void);
+
+#endif // EVOL_MAP_CRAFTCONF