summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-31 16:04:04 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-31 16:04:04 +0000
commit09f8a1dfa523f9574aa7f4003fb32cb39f18f29c (patch)
tree36294621024db5370b36081fc7045f255764f632 /src/map
parent0f4fad15c74141d817cc8505b4c5d95c74e96bf2 (diff)
downloadhercules-09f8a1dfa523f9574aa7f4003fb32cb39f18f29c.tar.gz
hercules-09f8a1dfa523f9574aa7f4003fb32cb39f18f29c.tar.bz2
hercules-09f8a1dfa523f9574aa7f4003fb32cb39f18f29c.tar.xz
hercules-09f8a1dfa523f9574aa7f4003fb32cb39f18f29c.zip
Fixed bugreport:5867 clones with cloaking skill are no longer "invincible"
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16182 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/mob.h1
-rw-r--r--src/map/status.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 51f283fde..e8ec4e0a7 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3047,7 +3047,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
}
if (rnd() % 10000 > ms[i].permillage) //Lupus (max value = 10000)
continue;
-
+
if (ms[i].cond1 == event)
flag = 1; //Trigger skill.
else if (ms[i].cond1 == MSC_SKILLUSED)
@@ -3152,6 +3152,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
break;
}
if (!bl) continue;
+
x = bl->x;
y = bl->y;
// Look for an area to cast the spell around...
@@ -3198,6 +3199,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
break;
}
if (!bl) continue;
+
md->skillidx = i;
map_freeblock_lock();
if( !battle_check_range(&md->bl,bl,skill_get_range2(&md->bl, ms[i].skill_id,ms[i].skill_lv)) ||
@@ -3443,6 +3445,8 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
md = mob_once_spawn_sub(&sd->bl, m, x, y, "--en--",class_,event);
if (!md) return 0; //Failed?
+ md->special_state.clone = 1;
+
if (master_id || flag || duration) { //Further manipulate crafted char.
if (flag&1) //Friendly Character
md->special_state.ai = 1;
diff --git a/src/map/mob.h b/src/map/mob.h
index cdb692df8..b7069c258 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -126,6 +126,7 @@ struct mob_data {
//1: Standard summon, attacks mobs.
//2: Alchemist Marine Sphere
//3: Alchemist Summon Flora
+ unsigned int clone : 1;/* is clone? 1:0 */
} special_state; //Special mob information that does not needs to be zero'ed on mob respawn.
struct {
unsigned int aggressive : 1; //Signals whether the mob AI is in aggressive mode or reactive mode. [Skotlex]
diff --git a/src/map/status.c b/src/map/status.c
index c52ead56d..970029302 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6906,7 +6906,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
//val4&1 signals the presence of a wall.
//val4&2 makes cloak not end on normal attacks [Skotlex]
//val4&4 makes cloak not end on using skills
- if (bl->type == BL_PC) //Standard cloaking.
+ if (bl->type == BL_PC || (bl->type == BL_MOB && ((TBL_MOB*)bl)->special_state.clone) ) //Standard cloaking.
val4 |= battle_config.pc_cloak_check_type&7;
else
val4 |= battle_config.monster_cloak_check_type&7;