diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-06 16:37:06 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-06 16:37:06 +0000 |
commit | 9827189a901458193bbc0c66081ae9a50576fd20 (patch) | |
tree | 9b6f328cb3fdbb0ab890f24f3b9b854f833a9284 /src/map/skill.c | |
parent | 3adaf8788b65a84ec4266c6621d30679a95f546d (diff) | |
download | hercules-9827189a901458193bbc0c66081ae9a50576fd20.tar.gz hercules-9827189a901458193bbc0c66081ae9a50576fd20.tar.bz2 hercules-9827189a901458193bbc0c66081ae9a50576fd20.tar.xz hercules-9827189a901458193bbc0c66081ae9a50576fd20.zip |
Cleaned up mob_once_spawn() and mob_once_spawn_area().
- now they use mapid instead of mapname as input parameter
- moved the responsibility to perform "this" -> mapid resolution to the caller
- added a pair of swap() operations to prevent working with a negative-dimensioned area (fixes bugreport:87)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12022 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index a2c636ddc..ae934d983 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3072,7 +3072,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case SA_SUMMONMONSTER: clif_skill_nodamage(src,bl,skillid,skilllv,1); - if (sd) mob_once_spawn(sd,map[src->m].name,src->x,src->y,"--ja--",-1,1,""); + if (sd) mob_once_spawn(sd,src->m,src->x,src->y,"--ja--",-1,1,""); break; case SA_LEVELUP: clif_skill_nodamage(src,bl,skillid,skilllv,1); @@ -5804,7 +5804,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk pc_delitem(sd,j,skill_db[skillid].amount[i],0); clif_skill_poseffect(src,skillid,skilllv,x,y,tick); if (rand()%100 < 50) - mob_once_spawn(sd, "this", x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, ""); + mob_once_spawn(sd, sd->bl.m, x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, ""); else clif_skill_fail(sd,skillid,0,0); } |