diff options
author | Haru <haru@dotalux.com> | 2019-09-23 02:04:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-23 02:04:43 +0200 |
commit | 579064db1eb50e73558dc8e81e81dd7a24f3b246 (patch) | |
tree | 48d1bb149fee8d3e4a27303d50d41d432c24fe8b /src/map/itemdb.h | |
parent | 7121899a562856863984ce90268e9af37769b346 (diff) | |
parent | 3be1dd0c728e31743c793c78ceab97b2391fb3ac (diff) | |
download | hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.gz hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.bz2 hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.xz hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.zip |
Merge pull request #2535 from HerculesWS/itemdb_violation
Fixed several issues in itemdb_search_name function
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r-- | src/map/itemdb.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 16a348797..e3264d7d8 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -412,6 +412,16 @@ enum ItemOptionTypes { IT_OPT_MAX }; +/** + * Item name search flags + **/ + +enum item_name_search_flag { + IT_SEARCH_NAME_PARTIAL, + IT_SEARCH_NAME_EXACT, + IT_SEARCH_NAME_MAX, +}; + /** Convenience item list (entry) used in various functions */ struct itemlist_entry { int id; ///< Item ID or (inventory) index @@ -635,7 +645,7 @@ struct itemdb_interface { /* */ struct item_data* (*name2id) (const char *str); struct item_data* (*search_name) (const char *name); - int (*search_name_array) (struct item_data** data, int size, const char *str, int flag); + int (*search_name_array) (struct item_data **data, const int size, const char *str, enum item_name_search_flag flag); struct item_data* (*load)(int nameid); struct item_data* (*search)(int nameid); struct item_data* (*exists) (int nameid); |