summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/map.h3
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/skill.c7
4 files changed, 8 insertions, 11 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7910006e3..13e740e88 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4540,7 +4540,8 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int
}
if(sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && !(src->type == BL_MOB && is_boss(src)) ) {
uint8 dir = map_calc_dir(bl,src->x,src->y),
- t_dir = unit_getdir(bl), rd1 = 0;
+ t_dir = unit_getdir(bl);
+ int rd1 = 0;
if( distance_bl(src,bl) <= 0 || !map_check_dir(dir,t_dir) ) {
rd1 = (int64)min(damage,status_get_max_hp(bl)) * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage.
diff --git a/src/map/map.h b/src/map/map.h
index a9d5eb098..9d48dd445 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -490,7 +490,8 @@ struct mapcell
struct iwall_data {
char wall_name[50];
- short m, x, y, size, dir;
+ short m, x, y, size;
+ int8 dir;
bool shootable;
};
diff --git a/src/map/script.c b/src/map/script.c
index 630a52abd..143be2f03 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14108,12 +14108,6 @@ BUILDIN_FUNC(sscanf){
*(buf_p-len+1) = '*';
}
- // Passed more, than needed
- if(arg<argc){
- ShowWarning("buildin_sscanf: Unused arguments passed.\n");
- script_reportsrc(st);
- }
-
script_pushint(st, arg);
if(buf) aFree(buf);
if(ref_str) aFree(ref_str);
diff --git a/src/map/skill.c b/src/map/skill.c
index 069485b5f..c5303578d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -16914,10 +16914,10 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick,
{
int oskill_id = skill_id;
struct skill_cd* cd = NULL;
+ uint16 idx = skill_get_index(skill_id);
nullpo_retr (-1, sd);
- uint16 idx = skill_get_index(skill_id);
if (idx == 0)
return -1;
@@ -16960,9 +16960,10 @@ int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) //[o
int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) //[orn]
{
+ uint16 idx = skill_get_index(skill_id);
nullpo_retr (-1, hd);
- uint16 idx = skill_get_index(skill_id);
+
if (idx == 0)
return -1;
@@ -16986,9 +16987,9 @@ int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) //[or
int skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick)
{
+ uint16 idx = skill_get_index(skill_id);
nullpo_retr (-1, md);
- uint16 idx = skill_get_index(skill_id);
if (idx == 0)
return -1;
if( tick < 1 )