Fixed bugreport:5867 clones with cloaking skill are no longer "invincible"

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16182 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-05-31 16:04:04 +00:00
parent 166e32999d
commit 13067714a3
3 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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]

View File

@ -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;