From 9827189a901458193bbc0c66081ae9a50576fd20 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 6 Jan 2008 16:37:06 +0000 Subject: 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 --- src/map/skill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/skill.c') 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); } -- cgit v1.2.3-60-g2f50