From 46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 22 Nov 2006 20:32:25 +0000 Subject: - Modified slaves_inherit_speed and slaves_inherit_mode so you get better control of when to copy/remove modes/speed. - Reenabled usage of mode MD_CHANGETARGET, so mobs with mode 0x200 will be able to switch targets while attacking. - Simplified some more the chase-changetarget function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9294 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index dcc1f9e1d..4c78c26ea 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1313,7 +1313,8 @@ int status_calc_mob(struct mob_data* md, int first) if (flag&8 && mbl) { struct status_data *mstatus = status_get_base_status(mbl); - if (mstatus) + if (mstatus && + battle_config.slaves_inherit_speed&(status->mode&MD_CANMOVE?1:2)) status->speed = mstatus->speed; } @@ -4607,6 +4608,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val struct status_data *bstatus = status_get_base_status(bl); if (!bstatus) return 0; mode = val2?val2:bstatus->mode; //Base mode + //Mode added AND removed? Added has priority. + if ((val3&val4)) + val4&= ~(val3&val4); if (val3) mode|= val3; //Add mode if (val4) mode&=~val4; //Del mode if (mode == bstatus->mode) { //No change. -- cgit v1.2.3-70-g09d2