summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-08-26 18:02:40 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-08-26 18:02:40 +0800
commitcccc5bc9256b196b1f4e9ad881838ad32c8b3424 (patch)
tree4567d16e2293781ed5611be54bfbff48e173ca76 /src/map/itemdb.c
parent04139592739a69aafe6cffb0ec52f65d50efb1fa (diff)
downloadhercules-cccc5bc9256b196b1f4e9ad881838ad32c8b3424.tar.gz
hercules-cccc5bc9256b196b1f4e9ad881838ad32c8b3424.tar.bz2
hercules-cccc5bc9256b196b1f4e9ad881838ad32c8b3424.tar.xz
hercules-cccc5bc9256b196b1f4e9ad881838ad32c8b3424.zip
Fixed Bug#7584
-Where HW_SOULDRAIN should work only in single target. Fixed Bug#7670 -Where PA_GOSPEL is not working properly. Fixed Bug#7668 -Bonus 'bLongAtkRate' is not working properly. Fixed Bug#7512 -Bonus 'bCritAtkRate' is not working properly. Fixed Bug#7515 -Fixed MO_EXTREMITYFIST animation. -Fixed RE armor/weapon storage tab positioning. -Fixed HW_MAGICPOWER cast time. -Fixed '/item' '/monster' aegis command where it not working properly in some item names or monsters. -Added NC_DISJOINT cast time hidden modifier. -Updated RE ATK for post damage modifier. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 431ee3135..fcd4ccbc1 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -102,8 +102,11 @@ static int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap)
/*==========================================
* Founds up to N matches. Returns number of matches [Skotlex]
+ * search flag :
+ * 0 - approximate match
+ * 1 - exact match
*------------------------------------------*/
-int itemdb_searchname_array(struct item_data** data, int size, const char *str) {
+int itemdb_searchname_array(struct item_data** data, int size, const char *str, int flag) {
struct item_data* item;
int i;
int count=0;
@@ -115,7 +118,8 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str)
if( item == NULL )
continue;
- if( stristr(item->jname,str) || stristr(item->name,str) )
+ if( (!flag && (stristr(item->jname,str) || stristr(item->name,str))) ||
+ (flag && (strcmp(item->jname,str) == 0 || strcmp(item->name,str) == 0)) )
{
if( count < size )
data[count] = item;