diff options
author | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-15 12:32:48 +0000 |
---|---|---|
committer | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-15 12:32:48 +0000 |
commit | e1f5cd6307365b9af1e92d96f05119d2f0dec91c (patch) | |
tree | 2840ac589037d41297d08c01a1e745e82fdab860 /src/map | |
parent | e5b2c0f41c5705821dbf9c36c3e82228941c974a (diff) | |
download | hercules-e1f5cd6307365b9af1e92d96f05119d2f0dec91c.tar.gz hercules-e1f5cd6307365b9af1e92d96f05119d2f0dec91c.tar.bz2 hercules-e1f5cd6307365b9af1e92d96f05119d2f0dec91c.tar.xz hercules-e1f5cd6307365b9af1e92d96f05119d2f0dec91c.zip |
* Added spawning of monsters at specific level by adding ,# after the spawn name. [Valaris]
mobs_level_up option should be on when using this.
(Example: {ama_dun01.gat,0,0,0,0 monster Shinobi,99 1401,1,0,0,0} to spawn a level 99 shinobi.)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@193 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 65974aee8..d2fc58205 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1886,9 +1886,10 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li */ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4) { - int m,x,y,xs,ys,class,num,delay1,delay2; + int m,x,y,xs,ys,class,num,delay1,delay2,level; int i; char mapname[24]; + char mobname[24]; char eventname[24]=""; struct mob_data *md; @@ -1916,10 +1917,15 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4) md->bl.m=m; md->bl.x=x; md->bl.y=y; - if(strcmp(w3,"--en--")==0) - memcpy(md->name,mob_db[class].name,24); - else if(strcmp(w3,"--ja--")==0) - memcpy(md->name,mob_db[class].jname,24); + + if(sscanf(w3,"%[^,],%d",mobname,&level) > 1) { + if(strcmp(mobname,"--en--")==0) + memcpy(md->name,mob_db[class].name,24); + else if(strcmp(mobname,"--ja--")==0) + memcpy(md->name,mob_db[class].jname,24); + md->level=level; + } + else memcpy(md->name,w3,24); |