summaryrefslogtreecommitdiff
path: root/src/emap/craft.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-23 15:42:58 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-23 17:47:01 +0300
commit722d18daaceebbebfd6a0faf8ad4b0497d2599d1 (patch)
tree8965152b4278a70246ca5416c1649c5acc83242e /src/emap/craft.h
parentb6ae6ce8496bcfd50b45110da63e1954d4bbec65 (diff)
downloadplugin-722d18daaceebbebfd6a0faf8ad4b0497d2599d1.tar.gz
plugin-722d18daaceebbebfd6a0faf8ad4b0497d2599d1.tar.bz2
plugin-722d18daaceebbebfd6a0faf8ad4b0497d2599d1.tar.xz
plugin-722d18daaceebbebfd6a0faf8ad4b0497d2599d1.zip
Add support for load and parse craft configuration file. For now unused.
Diffstat (limited to 'src/emap/craft.h')
-rw-r--r--src/emap/craft.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/emap/craft.h b/src/emap/craft.h
index 6d92bad..47fea8f 100644
--- a/src/emap/craft.h
+++ b/src/emap/craft.h
@@ -16,6 +16,12 @@ struct item_pair
int amount;
};
+struct skill_pair
+{
+ int id;
+ int level;
+};
+
struct craft_slot
{
VECTOR_DECL(struct item_pair) items;
@@ -26,6 +32,38 @@ struct craft_vardata
struct craft_slot slots[craft_inventory_size];
};
+struct craft_db_inventory
+{
+ struct item_pair items[craft_inventory_size];
+};
+
+VECTOR_STRUCT_DECL(craft_items_collection, struct item_pair);
+
+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_craft(void);
void do_final_craft(void);
bool craft_checkstr(TBL_PC *sd, const char *craftstr);