summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-04 16:47:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-04 16:47:52 +0000
commitdea1baafdf08de3957a4f48d0b5ec1d0a5677742 (patch)
tree3608db644d5d2b657fed6df3c6668ceba9e88cd0 /src/map/mob.c
parent61c4bbdb3faf35679cd24ba3600ccbe372cf040f (diff)
downloadhercules-dea1baafdf08de3957a4f48d0b5ec1d0a5677742.tar.gz
hercules-dea1baafdf08de3957a4f48d0b5ec1d0a5677742.tar.bz2
hercules-dea1baafdf08de3957a4f48d0b5ec1d0a5677742.tar.xz
hercules-dea1baafdf08de3957a4f48d0b5ec1d0a5677742.zip
- Ordered up entries in skill_unit_db
- SC_REFLECTSHIELD will now be passed to devoted characters at cast-time. - Added a check to make a mob's level 1 if the read level from the db is less than it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8615 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 0d7fceb83..d0d182b4e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3172,6 +3172,9 @@ static int mob_readdb(void)
memcpy(mob_db_data[class_]->jname, str[2], NAME_LENGTH-1);
memcpy(mob_db_data[class_]->name, str[3], NAME_LENGTH-1);
mob_db_data[class_]->lv = atoi(str[4]);
+ if (mob_db_data[class_]->lv < 1)
+ mob_db_data[class_]->lv = 1;
+
status = &mob_db_data[class_]->status;
status->max_hp = atoi(str[5]);
@@ -3870,6 +3873,9 @@ static int mob_read_sqldb(void)
memcpy(mob_db_data[class_]->jname, TO_STR(2), NAME_LENGTH-1);
memcpy(mob_db_data[class_]->name, TO_STR(3), NAME_LENGTH-1);
mob_db_data[class_]->lv = TO_INT(4);
+ if (mob_db_data[class_]->lv < 1)
+ mob_db_data[class_]->lv = 1;
+
status = &mob_db_data[class_]->status;
status->max_hp = TO_INT(5);
status->max_sp = TO_INT(6);