From 04139592739a69aafe6cffb0ec52f65d50efb1fa Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 22 Aug 2013 17:49:11 -0300 Subject: Fixed MSVC warnings on 7f9f6e1b84061a7d393debf37395c8b4a2667db1 Special Thanks to KeiKun for bringing them to me. Signed-off-by: shennetsind --- src/map/status.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index c79fff44e..64a107b42 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1132,13 +1132,14 @@ int status_charge(struct block_list* bl, int64 hp, int64 sp) //If flag&2, fail if target does not has enough to substract. //If flag&4, if killed, mob must not give exp/loot. //flag will be set to &8 when damaging sp of a dead character -int status_damage(struct block_list *src,struct block_list *target,int64 hp, int64 sp, int walkdelay, int flag) { +int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, int64 in_sp, int walkdelay, int flag) { struct status_data *status; struct status_change *sc; + int hp,sp; /* here onwards we consider it a 32-type, the client does not support higher and from here onwards the value doesn't get thru percentage modifiers */ - hp = cap_value(hp,INT_MIN,INT_MAX); - sp = cap_value(sp,INT_MIN,INT_MAX); + hp = (int)cap_value(in_hp,INT_MIN,INT_MAX); + sp = (int)cap_value(in_sp,INT_MIN,INT_MAX); if(sp && !(target->type&BL_CONSUME)) sp = 0; //Not a valid SP target. @@ -1353,10 +1354,11 @@ int status_damage(struct block_list *src,struct block_list *target,int64 hp, int //Heals a character. If flag&1, this is forced healing (otherwise stuff like Berserk can block it) //If flag&2, when the player is healed, show the HP/SP heal effect. -int status_heal(struct block_list *bl,int64 hp,int64 sp, int flag) +int status_heal(struct block_list *bl,int64 in_hp,int64 in_sp, int flag) { struct status_data *status; struct status_change *sc; + int hp,sp; status = iStatus->get_status_data(bl); @@ -1364,8 +1366,8 @@ int status_heal(struct block_list *bl,int64 hp,int64 sp, int flag) return 0; /* here onwards we consider it a 32-type, the client does not support higher and from here onwards the value doesn't get thru percentage modifiers */ - hp = cap_value(hp,INT_MIN,INT_MAX); - sp = cap_value(sp,INT_MIN,INT_MAX); + hp = (int)cap_value(in_hp,INT_MIN,INT_MAX); + sp = (int)cap_value(in_sp,INT_MIN,INT_MAX); sc = iStatus->get_sc(bl); if (sc && !sc->count) -- cgit v1.2.3-60-g2f50