summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
commit3c8999edce9e1f0d5c0dee3ff8311e781d64c684 (patch)
treed066567a720e5fad02e6f857d55bc165d9a3809a /src/map/pet.c
parentea320701794515d4ffa6a8e8ff8f3b8fdfe09860 (diff)
downloadhercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.gz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.bz2
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.xz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.zip
* Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index b54f5cf6f..cf5266047 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -343,7 +343,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
int flag;
pet_lootitem_drop(pd,sd);
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pd->petDB->EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -633,7 +633,7 @@ int pet_get_egg(int account_id,int pet_id,int flag)
return 0;
}
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pet_db[i].EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -761,7 +761,7 @@ static int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd)
pd->pet.equip = 0;
status_set_viewdata(&pd->bl, pd->pet.class_);
clif_pet_equip(pd);
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = nameid;
tmp_item.identify = 1;
if((flag = pc_additem(sd,&tmp_item,1))) {
@@ -1080,7 +1080,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
}
}
//The smart thing to do is use pd->loot->max (thanks for pointing it out, Shinomori)
- memset(pd->loot->item,0,pd->loot->max * sizeof(struct item));
+ malloc_set(pd->loot->item,0,pd->loot->max * sizeof(struct item));
pd->loot->count = 0;
pd->loot->weight = 0;
pd->ud.canact_tick = gettick()+10000; // 10*1000msの間拾わない
@@ -1278,7 +1278,7 @@ int read_petdb()
pet_db[j].script = NULL;
}
j = 0;
- memset(pet_db,0,sizeof(pet_db));
+ malloc_set(pet_db,0,sizeof(pet_db));
for(i=0;i<2;i++){
sprintf(line, "%s/%s", db_path, filename[i]);
fp=fopen(line,"r");
@@ -1354,7 +1354,7 @@ int read_petdb()
*/
int do_init_pet(void)
{
- memset(pet_db,0,sizeof(pet_db));
+ malloc_set(pet_db,0,sizeof(pet_db));
read_petdb();
item_drop_ers = ers_new((uint32)sizeof(struct item_drop));