diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-22 20:32:25 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-22 20:32:25 +0000 |
commit | 46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2 (patch) | |
tree | 6c2d771580a35911711a0101cc4b1ca5e67bd896 /src/map/status.c | |
parent | 3fe27e962cf2084d380b6229fcc07c47d0c51e67 (diff) | |
download | hercules-46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2.tar.gz hercules-46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2.tar.bz2 hercules-46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2.tar.xz hercules-46c2eeef1fb61d251afe62f123c8f0cc6e25a7a2.zip |
- 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
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 6 |
1 files changed, 5 insertions, 1 deletions
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.
|