summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 14:01:27 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 14:01:27 +0000
commit33c76a7156014abeea04b6fa6987856bb13d3729 (patch)
treecb9eb4503a0b2c3c115c91df3f9f48b61cef52d7
parent1dd4861490d5256e81f1cc245f215ef3f518b9ef (diff)
downloadhercules-33c76a7156014abeea04b6fa6987856bb13d3729.tar.gz
hercules-33c76a7156014abeea04b6fa6987856bb13d3729.tar.bz2
hercules-33c76a7156014abeea04b6fa6987856bb13d3729.tar.xz
hercules-33c76a7156014abeea04b6fa6987856bb13d3729.zip
* Fixed reading itemslottable.txt causing cards to become unuseable
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@729 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/itemdb.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 4deeb3cc8..ce7808a67 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
12/22
+ * Fixed reading itemslottable.txt causing cards to become unuseable [celest]
* Added error message if file renaming in lock_fclose fails [celest]
* Fixed frost diver not working ... my bad =p [celest]
* Corrected typo in clif_hpmeter - md -> sd [celest]
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 49d2a8387..566037c6a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -593,7 +593,9 @@ static int itemdb_read_itemslottable(void)
for(p=buf;p-buf<s;){
int nameid,equip;
sscanf(p,"%d#%d#",&nameid,&equip);
- itemdb_search(nameid)->equip=equip;
+ struct item_data* item = itemdb_search(nameid);
+ if (item && itemdb_isequip2(item))
+ item->equip=equip;
p=strchr(p,10);
if(!p) break;
p++;