summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-01 19:21:04 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-01 19:21:04 +0000
commite62d775f7c6967141e2e5a470dbf3c2cb66a870e (patch)
treea440e64eb9eeaff784c03a5ba8225579db0b8878 /src/map
parentafda30c346bbf44415f330f92cd03428ad1e652b (diff)
downloadhercules-e62d775f7c6967141e2e5a470dbf3c2cb66a870e.tar.gz
hercules-e62d775f7c6967141e2e5a470dbf3c2cb66a870e.tar.bz2
hercules-e62d775f7c6967141e2e5a470dbf3c2cb66a870e.tar.xz
hercules-e62d775f7c6967141e2e5a470dbf3c2cb66a870e.zip
- Corrected setting slaves_inherit_mode to not apply to morphosis skills.
- Added define OPTION_CART which holds the 5 cart option values. - Corrected pc_setoption to invoke status_calc_pc when getting/removing the cart. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6914 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pc.c14
-rw-r--r--src/map/status.h2
3 files changed, 15 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 46d7f1c9d..88b06265c 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2416,7 +2416,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
md->status.hp = md->status.max_hp*hp_rate/100;
//Inherit the aggressive mode of the master.
- if (battle_config.slaves_inherit_mode) {
+ if (battle_config.slaves_inherit_mode && md->master_id) {
if (md2->status.mode&MD_AGGRESSIVE)
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 0);
else
diff --git a/src/map/pc.c b/src/map/pc.c
index fa11d56bd..91732ab2a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5399,7 +5399,17 @@ int pc_setoption(struct map_session_data *sd,int type)
clif_status_load(&sd->bl,SI_RIDING,0);
status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds.
}
-
+ if(type&OPTION_CART && !(p_type&OPTION_CART))
+ { //Cart On
+ if(pc_checkskill(sd, MC_PUSHCART) < 10)
+ status_calc_pc(sd,0); //Apply speed penalty.
+ } else
+ if(!(type&OPTION_CART) && p_type&OPTION_CART)
+ { //Cart Off
+ if(pc_checkskill(sd, MC_PUSHCART) < 10)
+ status_calc_pc(sd,0); //Remove speed penalty.
+ }
+
if (type&OPTION_FALCON && !(p_type&OPTION_FALCON)) //Falcon ON
clif_status_load(&sd->bl,SI_FALCON,1);
else if (!(type&OPTION_FALCON) && p_type&OPTION_FALCON) //Falcon OFF
@@ -5437,7 +5447,7 @@ int pc_setcart(struct map_session_data *sd,int type)
if(pc_checkskill(sd,MC_PUSHCART)>0){ // プッシュカ?トスキル所持
option = sd->sc.option;
//This should preserve the current option, only modifying the cart bit.
- option&=~(OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5);
+ option&=~OPTION_CART;
option|=cart[type];
if(!pc_iscarton(sd)){ // カ?トを付けていない
pc_setoption(sd,option);
diff --git a/src/map/status.h b/src/map/status.h
index a13ee7698..f242bbd7f 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -472,6 +472,8 @@ enum {
//TODO: Get these Missing options...
#define OPTION_SIGHTTRASHER 0x0001
+#define OPTION_CART (OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5)
+
//Define flags for the status_calc_bl function. [Skotlex]
#define SCB_NONE 0x00000000
#define SCB_BASE 0x00000001