浏览代码

- Fixed buildin_isequip not working correctly with non-cards.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7838 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父节点
当前提交
c914fc106a
共有 2 个文件被更改,包括 9 次插入7 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 7 7
      src/map/script.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/07/23
+	* Fixed buildin_isequip not working correctly with non-cards. [Skotlex]
 2006/07/22
 	* Updated mob_db.sql to latest. [Skotlex]
 	* Applied Toms's suggested corrections to homun code. [Skotlex]

+ 7 - 7
src/map/script.c

@@ -9488,10 +9488,10 @@ int buildin_isequipped(struct script_state *st)
 				continue;
 
 			if(itemdb_type(id) != IT_CARD) { //Non card
-				if (sd->inventory_data[index]->nameid == id) {
-					flag = 1;
-					break;
-				}
+				if (sd->inventory_data[index]->nameid != id)
+					continue;
+				flag = 1;
+				break;
 			} else { //Card
 				if (itemdb_isspecial(sd->status.inventory[index].card[0]))
 					continue;
@@ -9594,7 +9594,6 @@ int buildin_isequipped(struct script_state *st)
 		FETCH (i+2, id) else id = 0;
 		if (id <= 0)
 			continue;
-		
 		flag = 0;
 		for (j=0; j<EQI_MAX; j++)
 		{
@@ -9608,8 +9607,9 @@ int buildin_isequipped(struct script_state *st)
 				continue;
 			
 			if (itemdb_type(id) != IT_CARD) {
-				if (sd->inventory_data[index]->nameid == id)
-					flag = 1;
+				if (sd->inventory_data[index]->nameid != id)
+					continue;
+				flag = 1;
 				break;
 			} else { //Cards
 				if (sd->inventory_data[index]->slot == 0 ||