diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-24 17:48:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-24 17:48:55 +0300 |
commit | ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff (patch) | |
tree | 163c40267ec7ad9edf32ec6a3e06a12f6b1132b0 /src/emap/craft.c | |
parent | e7cd9086185804d815fb0dc72e3bfd36fdd9a33f (diff) | |
download | evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.gz evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.bz2 evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.xz evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.zip |
Add script function for get return code from craft entry.
New script function: getcraftcode ENTRY
Diffstat (limited to 'src/emap/craft.c')
-rw-r--r-- | src/emap/craft.c | 12 |
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; +} |