summaryrefslogtreecommitdiff
path: root/src/emap/craft.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/craft.c')
-rw-r--r--src/emap/craft.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/craft.c b/src/emap/craft.c
index 2ea33bc..7081911 100644
--- a/src/emap/craft.c
+++ b/src/emap/craft.c
@@ -834,3 +834,15 @@ bool craft_use(TBL_PC *sd,
clif->updatestatus(sd, SP_WEIGHT);
return true;
}
+
+int craft_get_entry_code(TBL_PC *sd,
+ const int id)
+{
+ struct craft_db_entry *entry = idb_get(craftconf_db, id);
+ if (!entry)
+ {
+ ShowError("Craft config entry with id %d not exists.\n", id);
+ return -1;
+ }
+ return entry->return_code;
+}