summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-07 16:49:03 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-07 16:49:03 +0000
commitb795233e374987f4c427f59922f271810f937eef (patch)
tree047fafbeb99c4b12bcaadf046854af54e85dcad0 /src/map/skill.c
parentf4a6909849243c3e4776ddee4de962224e80ac9a (diff)
downloadhercules-b795233e374987f4c427f59922f271810f937eef.tar.gz
hercules-b795233e374987f4c427f59922f271810f937eef.tar.bz2
hercules-b795233e374987f4c427f59922f271810f937eef.tar.xz
hercules-b795233e374987f4c427f59922f271810f937eef.zip
Undid the memset->malloc_set replacement
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 77d3c185c..81788c88a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4440,8 +4440,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
struct item item_tmp;
struct block_list tbl;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- malloc_set(&item_tmp,0,sizeof(item_tmp));
- malloc_set(&tbl,0,sizeof(tbl)); // [MouseJstr]
+ memset(&item_tmp,0,sizeof(item_tmp));
+ memset(&tbl,0,sizeof(tbl)); // [MouseJstr]
item_tmp.nameid = 7049;
item_tmp.identify = 1;
tbl.id = 0;
@@ -5004,7 +5004,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if(battle_config.skill_removetrap_type){
for(i=0;i<10;i++) {
if(skill_db[su->group->skill_id].itemid[i] > 0){
- malloc_set(&item_tmp,0,sizeof(item_tmp));
+ memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = skill_db[su->group->skill_id].itemid[i];
item_tmp.identify = 1;
if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,skill_db[su->group->skill_id].amount[i]))){
@@ -5014,7 +5014,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
}
}else{
- malloc_set(&item_tmp,0,sizeof(item_tmp));
+ memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = 1065;
item_tmp.identify = 1;
if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,1))){
@@ -7765,7 +7765,7 @@ int skill_check_pc_partner (struct map_session_data *sd, int skill_id, int* skil
}
//Else: new search for partners.
c = 0;
- malloc_tsetdword (p_sd, 0, sizeof(p_sd));
+ memset (p_sd, 0, sizeof(p_sd));
i = map_foreachinrange(skill_check_condition_char_sub, &sd->bl,
range, BL_PC, &sd->bl, &c, &p_sd, skill_id);
@@ -10044,7 +10044,7 @@ int skill_unit_timer_sub (struct block_list *bl, va_list ap)
if(src && src->type==BL_PC && !group->state.into_abyss)
{ //Avoid generating trap items when it did not cost to create them. [Skotlex]
struct item item_tmp;
- malloc_set(&item_tmp,0,sizeof(item_tmp));
+ memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid=1065;
item_tmp.identify=1;
map_addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,NULL,NULL,NULL,0);
@@ -10211,7 +10211,7 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag)
if (flag&2 && !(flag&1))
{ //Onout, clear data
- malloc_tsetdword (&skill_unit_temp,0,sizeof(skill_unit_temp));
+ memset (&skill_unit_temp,0,sizeof(skill_unit_temp));
skill_unit_index=0;
}
@@ -10578,7 +10578,7 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
if(rand()%10000 < make_per || qty > 1){ //Success, or crafting multiple items.
struct item tmp_item;
- malloc_set(&tmp_item,0,sizeof(tmp_item));
+ memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid=nameid;
tmp_item.amount=1;
tmp_item.identify=1;
@@ -10746,7 +10746,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
pc_delitem(sd,j,1,0);
for(i=0;i<5;i++) {
- malloc_set(&tmp_item,0,sizeof(tmp_item));
+ memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.identify = 1;
tmp_item.nameid = skill_arrow_db[index].cre_id[i];
tmp_item.amount = skill_arrow_db[index].cre_amount[i];
@@ -10904,7 +10904,7 @@ void skill_init_unit_layout (void)
{
int i,j,size,pos = 0;
- malloc_set(skill_unit_layout,0,sizeof(skill_unit_layout));
+ memset(skill_unit_layout,0,sizeof(skill_unit_layout));
for (i=0; i<=MAX_SQUARE_LAYOUT; i++) {
size = i*2+1;
skill_unit_layout[i].count = size*size;
@@ -11140,7 +11140,7 @@ int skill_readdb (void)
char line[1024],path[1024],*p;
char *filename[]={"produce_db.txt","produce_db2.txt"};
- malloc_set(skill_db,0,sizeof(skill_db));
+ memset(skill_db,0,sizeof(skill_db));
sprintf(path, "%s/skill_db.txt", db_path);
fp=fopen(path,"r");
if(fp==NULL){
@@ -11299,7 +11299,7 @@ int skill_readdb (void)
while(fgets(line,1020,fp)){
char *split[50];
l++;
- malloc_tsetdword(split,0,sizeof(split)); // [Valaris] thanks to fov
+ memset(split,0,sizeof(split)); // [Valaris] thanks to fov
if(line[0]=='/' && line[1]=='/')
continue;
j = skill_split_str(line,split,6);
@@ -11384,7 +11384,7 @@ int skill_readdb (void)
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
skill_init_unit_layout();
- malloc_set(skill_produce_db,0,sizeof(skill_produce_db));
+ memset(skill_produce_db,0,sizeof(skill_produce_db));
for(m=0;m<2;m++){
sprintf(path, "%s/%s", db_path, filename[m]);
fp=fopen(path,"r");
@@ -11400,7 +11400,7 @@ int skill_readdb (void)
int x,y;
if(line[0]=='/' && line[1]=='/')
continue;
- malloc_tsetdword(split,0,sizeof(split));
+ memset(split,0,sizeof(split));
j = skill_split_str(line,split,(4 + MAX_PRODUCE_RESOURCE * 2));
if(split[0]==0) //fixed by Lupus
continue;
@@ -11424,7 +11424,7 @@ int skill_readdb (void)
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
}
- malloc_set(skill_arrow_db,0,sizeof(skill_arrow_db));
+ memset(skill_arrow_db,0,sizeof(skill_arrow_db));
sprintf(path, "%s/create_arrow_db.txt", db_path);
fp=fopen(path,"r");
@@ -11438,7 +11438,7 @@ int skill_readdb (void)
int x,y;
if(line[0]=='/' && line[1]=='/')
continue;
- malloc_tsetdword(split,0,sizeof(split));
+ memset(split,0,sizeof(split));
j = skill_split_str(line,split,13);
if(split[0]==0) //fixed by Lupus
continue;
@@ -11459,7 +11459,7 @@ int skill_readdb (void)
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
- malloc_set(skill_abra_db,0,sizeof(skill_abra_db));
+ memset(skill_abra_db,0,sizeof(skill_abra_db));
sprintf(path, "%s/abra_db.txt", db_path);
fp=fopen(path,"r");
if(fp==NULL){
@@ -11471,7 +11471,7 @@ int skill_readdb (void)
char *split[16];
if(line[0]=='/' && line[1]=='/')
continue;
- malloc_tsetdword(split,0,sizeof(split));
+ memset(split,0,sizeof(split));
j = skill_split_str(line,split,13);
if(split[0]==0) //fixed by Lupus
continue;
@@ -11499,7 +11499,7 @@ int skill_readdb (void)
char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
- malloc_tsetdword(split,0,sizeof(split));
+ memset(split,0,sizeof(split));
j = skill_split_str(line,split,3);
if(split[0]==0) //fixed by Lupus
continue;
@@ -11528,7 +11528,7 @@ int skill_readdb (void)
char *split[16];
if(line[0]=='/' && line[1]=='/')
continue;
- malloc_tsetdword(split,0,sizeof(split));
+ memset(split,0,sizeof(split));
j = skill_split_str(line,split,2);
if(split[0]==0) //fixed by Lupus
continue;