diff options
author | shennetsind <ind@henn.et> | 2013-08-22 17:49:11 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-08-22 17:49:11 -0300 |
commit | 04139592739a69aafe6cffb0ec52f65d50efb1fa (patch) | |
tree | 99ef119284f720891fbca448cef18e61d7caa1a4 /src/map/clif.c | |
parent | cfa452c483ceff012578f25b57da1bf7ac10051c (diff) | |
download | hercules-04139592739a69aafe6cffb0ec52f65d50efb1fa.tar.gz hercules-04139592739a69aafe6cffb0ec52f65d50efb1fa.tar.bz2 hercules-04139592739a69aafe6cffb0ec52f65d50efb1fa.tar.xz hercules-04139592739a69aafe6cffb0ec52f65d50efb1fa.zip |
Fixed MSVC warnings on 7f9f6e1b84061a7d393debf37395c8b4a2667db1
Special Thanks to KeiKun for bringing them to me.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 2ab379e31..847c426e5 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4380,7 +4380,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { //Modifies the type of damage according to status changes [Skotlex] //Aegis data specifies that: 4 endure against single hit sources, 9 against multi-hit. -static inline int clif_calc_delay(int type, int div, int64 damage, int delay) +static inline int clif_calc_delay(int type, int div, int damage, int delay) { return ( delay == 0 && damage > 0 ) ? ( div > 1 ? 9 : 4 ) : type; } @@ -4388,7 +4388,7 @@ static inline int clif_calc_delay(int type, int div, int64 damage, int delay) /*========================================== * Estimates walk delay based on the damage criteria. [Skotlex] *------------------------------------------*/ -int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int64 damage, int div_) { +int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, int div_) { if (type == 4 || type == 9 || damage <=0) return 0; @@ -4423,10 +4423,11 @@ int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int64 damage, /// 10 = critical hit /// 11 = lucky dodge /// 12 = (touch skill?) -int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) +int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int64 in_damage, int div, int type, int64 in_damage2) { unsigned char buf[33]; struct status_change *sc; + int damage,damage2; #if PACKETVER < 20071113 const int cmd = 0x8a; #else @@ -4436,8 +4437,9 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic nullpo_ret(src); nullpo_ret(dst); - damage = cap_value(damage,INT_MIN,INT_MAX); - damage2 = cap_value(damage2,INT_MIN,INT_MAX); + damage = (int)cap_value(in_damage,INT_MIN,INT_MAX); + damage2 = (int)cap_value(in_damage2,INT_MIN,INT_MAX); + type = clif_calc_delay(type,div,damage+damage2,ddelay); sc = iStatus->get_sc(dst); if(sc && sc->count) { @@ -5108,15 +5110,16 @@ void clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned /// Skill attack effect and damage. /// 0114 <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.W <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL) /// 01de <skill id>.W <src id>.L <dst id>.L <tick>.L <src delay>.L <dst delay>.L <damage>.L <level>.W <div>.W <type>.B (ZC_NOTIFY_SKILL2) -int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int64 damage,int div,uint16 skill_id,uint16 skill_lv,int type) +int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int64 in_damage,int div,uint16 skill_id,uint16 skill_lv,int type) { unsigned char buf[64]; struct status_change *sc; + int damage; nullpo_ret(src); nullpo_ret(dst); - damage = cap_value(damage,INT_MIN,INT_MAX); + damage = (int)cap_value(in_damage,INT_MIN,INT_MAX); type = clif_calc_delay(type,div,damage,ddelay); sc = iStatus->get_sc(dst); if(sc && sc->count) { |