diff options
Diffstat (limited to 'src/emap/craft.h')
-rw-r--r-- | src/emap/craft.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/emap/craft.h b/src/emap/craft.h new file mode 100644 index 0000000..48acd31 --- /dev/null +++ b/src/emap/craft.h @@ -0,0 +1,35 @@ +// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// Copyright (c) 2014 - 2015 Evol developers + +#ifndef EVOL_MAP_CRAFT +#define EVOL_MAP_CRAFT + +#include "common/db.h" + +extern struct DBMap *craftvar_db; + +#define craft_inventory_size 9 + +struct item_pair +{ + int index; + int amount; +}; + +struct craft_slot +{ + VECTOR_DECL(struct item_pair) items; +}; + +struct craft_vardata +{ + struct craft_slot slots[craft_inventory_size]; +}; + +void do_init_craft(void); +void do_final_craft(void); +bool craft_checkstr(TBL_PC *sd, const char *craftstr); +int str_to_craftvar(TBL_PC *sd, const char *craftstr); +struct craft_vardata *craft_str_to_craft(const char *craftstr); + +#endif // EVOL_MAP_CRAFT |