summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-20 16:55:07 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-20 16:55:07 +0000
commitcf6c884771293b2ecd4b491225d4f6bf3476a224 (patch)
tree27dc5ab99f8967128adfa13ef30773479343f4dd /src
parent48d9f7d2df2e06f6f272ba8d7e7459256429a0dd (diff)
downloadhercules-cf6c884771293b2ecd4b491225d4f6bf3476a224.tar.gz
hercules-cf6c884771293b2ecd4b491225d4f6bf3476a224.tar.bz2
hercules-cf6c884771293b2ecd4b491225d4f6bf3476a224.tar.xz
hercules-cf6c884771293b2ecd4b491225d4f6bf3476a224.zip
* Fixed small/big monster spawning crashing (mixed up the merge). [Valaris]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@272 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 6c1a62c65..1f953b75d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -156,10 +156,6 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
for(count=0;count<amount;count++){
md=(struct mob_data *)aCalloc(1,sizeof(struct mob_data));
memset(md, '\0', sizeof *md);
- if(mob_db[class].mode&0x02)
- md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
- else
- md->lootitem=NULL;
if(class>4000) { // large/tiny mobs [Valaris]
md->size=2;
@@ -170,6 +166,11 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
class-=2000;
}
+ if(mob_db[class].mode&0x02)
+ md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
+ else
+ md->lootitem=NULL;
+
mob_spawn_dataset(md,mobname,class);
md->bl.m=m;
md->bl.x=x;