summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-12 21:16:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-12 21:16:44 +0000
commite0efeb4efc069f8bbcfd801c0d59c55b483115cb (patch)
tree5a422fb631a9e73aca6b1a33ff237c9c5e9481f0 /src/map
parent0b960ee5b5373b5b8343e2310bc148a2c345bd61 (diff)
downloadhercules-e0efeb4efc069f8bbcfd801c0d59c55b483115cb.tar.gz
hercules-e0efeb4efc069f8bbcfd801c0d59c55b483115cb.tar.bz2
hercules-e0efeb4efc069f8bbcfd801c0d59c55b483115cb.tar.xz
hercules-e0efeb4efc069f8bbcfd801c0d59c55b483115cb.zip
- Reverted again the change that stuns the caster on Ske, Ska, Swoo when the target is a nonplayer (rather than always)
- Modified mob_spawn_once so that coordinates -1,-1 are "random around the player" while 0,0 are random around the whole map (regardless of whether there's a player attached or not) - Knockback will no longer work on traps during woe. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6566 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c24
-rw-r--r--src/map/skill.c11
2 files changed, 20 insertions, 15 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d6f68afac..708bb4a47 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -263,7 +263,8 @@ int mob_once_spawn (struct map_session_data *sd, char *mapname,
{
struct mob_data *md = NULL;
struct spawn_data data;
- int m, count, lv = 255;
+ int m, count, lv = 255, rand_flag=0;
+
if(sd) lv = sd->status.base_level;
@@ -287,20 +288,25 @@ int mob_once_spawn (struct map_session_data *sd, char *mapname,
}
strncpy(data.eventname, event, 50);
- if (x <= 0 || y <= 0) {
- if (sd)
- map_search_freecell(&sd->bl, m, &x, &y, 1, 1, 0);
- else
- if (!map_search_freecell(NULL, m, &x, &y, -1, -1, 1))
- return 0; //Not solved?
+ if (sd && (x < 0 || y < 0))
+ { //Locate spot around player.
+ map_search_freecell(&sd->bl, m, &x, &y, 1, 1, 0);
+ data.x = x;
+ data.y = y;
}
- data.x = x;
- data.y = y;
+
+ if (x <= 0 || y <= 0 || map_getcell(m,x,y,CELL_CHKNOREACH))
+ rand_flag = 1; //Randomize spot on map for each mob.
if (!mob_parse_dataset(&data))
return 0;
for (count = 0; count < amount; count++) {
+ if (rand_flag) { //Get a random cell for this mob.
+ map_search_freecell(NULL, m, &x, &y, -1, -1, 1);
+ data.x = x;
+ data.y = y;
+ }
md =mob_spawn_dataset (&data);
if (class_ < 0 && battle_config.dead_branch_active)
diff --git a/src/map/skill.c b/src/map/skill.c
index 5d00a0617..bf9c7668e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1621,8 +1621,8 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
nullpo_retr(0, src);
- if (src != target && map_flag_gvg(target->m) && target->type != BL_SKILL)
- return 0; //No knocking back in WoE, except for skills... because traps CAN be knocked back.
+ if (src != target && map_flag_gvg(target->m))
+ return 0; //No knocking back in WoE
if (!count&0xffff)
return 0; //Actual knockback distance is 0.
@@ -5363,17 +5363,16 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
case SL_SKA: // [marquis007]
case SL_SKE:
- if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB)
+ if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
clif_skill_fail(sd,skillid,0,0);
- else
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
+ } else
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
if (skillid == SL_SKE)
sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));
- //Regardless of who you target, caster gets stunned for 0.5 [Skotlex]
- status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break;
// New guild skills [Celest]