summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-02 01:43:23 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-02 01:43:23 +0000
commita9740f772101b5ce448c8c04d4bb003fa7920db3 (patch)
tree8fbd883c950e5776394b80d4449f73231d53eb16 /src/map/pet.c
parent1a240133d1968564e84af8e8f62bc8b34ce9e337 (diff)
downloadhercules-a9740f772101b5ce448c8c04d4bb003fa7920db3.tar.gz
hercules-a9740f772101b5ce448c8c04d4bb003fa7920db3.tar.bz2
hercules-a9740f772101b5ce448c8c04d4bb003fa7920db3.tar.xz
hercules-a9740f772101b5ce448c8c04d4bb003fa7920db3.zip
- Corrected script_commands description of getequipid, it returns -1, not 0 on fail.
- Fixed the mob-id check during pet_db loading, it will also now print when a pet is not loaded due to having an invalid mob class specified. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8587 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index cf5266047..9b5f6a3a3 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1308,10 +1308,14 @@ int read_petdb()
}
nameid=atoi(str[0]);
- if(nameid<=0 || nameid>2000)
+ if(nameid<=0)
continue;
-
- //MobID,Name,JName,ItemID,EggID,AcceID,FoodID,"Fullness (1回の餌での満腹度増加率%)","HungryDeray (/min)","R_Hungry (空腹時餌やり親密度増加率%)","R_Full (とても満腹時餌やり親密度減少率%)","Intimate (捕獲時親密度%)","Die (死亡時親密度減少率%)","Capture (捕獲率%)",(Name)
+
+ if (!mobdb_checkid(nameid)) {
+ ShowWarning("pet_db reading: Invalid mob-class %d, pet not read.\n", nameid);
+ continue;
+ }
+
pet_db[j].class_ = nameid;
memcpy(pet_db[j].name,str[1],NAME_LENGTH-1);
memcpy(pet_db[j].jname,str[2],NAME_LENGTH-1);