summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6c7a5b07b..9a9343d31 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -81,7 +81,7 @@ struct block_list* battle_gettargeted(struct block_list *target)
int c = 0;
nullpo_retr(NULL, target);
- malloc_tsetdword(bl_list, 0, sizeof(bl_list));
+ memset(bl_list, 0, sizeof(bl_list));
map_foreachinrange(battle_gettargeted_sub, target, AREA_SIZE, BL_CHAR, bl_list, &c, target->id);
if (c == 0 || c > 24)
return NULL;
@@ -826,8 +826,8 @@ static struct Damage battle_calc_weapon_attack(
unsigned cardfix : 1;
} flag;
- malloc_tsetdword(&wd,0,sizeof(wd));
- malloc_tsetdword(&flag,0,sizeof(flag));
+ memset(&wd,0,sizeof(wd));
+ memset(&flag,0,sizeof(flag));
if(src==NULL || target==NULL)
{
@@ -2157,8 +2157,8 @@ struct Damage battle_calc_magic_attack(
unsigned cardfix : 1;
} flag;
- malloc_tsetdword(&ad,0,sizeof(ad));
- malloc_tsetdword(&flag,0,sizeof(flag));
+ memset(&ad,0,sizeof(ad));
+ memset(&flag,0,sizeof(flag));
if(src==NULL || target==NULL)
{
@@ -2518,8 +2518,8 @@ struct Damage battle_calc_misc_attack(
unsigned cardfix : 1;
} flag;
- malloc_tsetdword(&md,0,sizeof(md));
- malloc_tsetdword(&flag,0,sizeof(flag));
+ memset(&md,0,sizeof(md));
+ memset(&flag,0,sizeof(flag));
if( src == NULL || target == NULL ){
nullpo_info(NLP_MARK);
@@ -2777,7 +2777,7 @@ struct Damage battle_calc_attack( int attack_type,
default:
if (battle_config.error_log)
ShowError("battle_calc_attack: unknown attack type! %d\n",attack_type);
- malloc_tsetdword(&d,0,sizeof(d));
+ memset(&d,0,sizeof(d));
break;
}
if (d.damage + d.damage2 < 1)