summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
commit49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch)
tree4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/map/mob.c
parentfda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff)
downloadhercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index bd9ed5d43..6463c2103 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -209,7 +209,7 @@ int mob_parse_dataset(struct spawn_data *data)
*------------------------------------------*/
struct mob_data* mob_spawn_dataset(struct spawn_data *data)
{
- struct mob_data *md = aCalloc(1, sizeof(struct mob_data));
+ struct mob_data *md = (struct mob_data*)aCalloc(1, sizeof(struct mob_data));
md->bl.id= npc_get_new_npc_id();
md->bl.type = BL_MOB;
md->bl.m = data->m;
@@ -419,7 +419,7 @@ int mob_once_spawn(struct map_session_data* sd, int m, short x, short y, const c
struct guild_castle* gc = guild_mapindex2gc(map[m].index);
struct guild* g = gc?guild_search(gc->guild_id):NULL;
if(gc) {
- md->guardian_data = aCalloc(1, sizeof(struct guardian_data));
+ md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data));
md->guardian_data->castle = gc;
md->guardian_data->number = MAX_GUARDIANS;
md->guardian_data->guild_id = gc->guild_id;
@@ -586,7 +586,7 @@ void mob_barricade_get(struct map_session_data *sd)
return;
iter = barricade_db->iterator(barricade_db);
- for( barricade = iter->first(iter,&key); iter->exists(iter); barricade = iter->next(iter,&key) )
+ for( barricade = (struct barricade_data *)iter->first(iter,&key); iter->exists(iter); barricade = (struct barricade_data *)iter->next(iter,&key) )
{
if( sd->bl.m != barricade->m )
continue;
@@ -655,7 +655,7 @@ void mod_barricade_clearall(void)
int i;
iter = barricade_db->iterator(barricade_db);
- for( barricade = iter->first(iter,&key); iter->exists(iter); barricade = iter->next(iter,&key) )
+ for( barricade = (struct barricade_data *)iter->first(iter,&key); iter->exists(iter); barricade = (struct barricade_data *)iter->next(iter,&key) )
{
for( i = 0; i < barricade->count; i++ )
{
@@ -789,8 +789,8 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
}
}
- md= mob_spawn_dataset(&data);
- md->guardian_data = aCalloc(1, sizeof(struct guardian_data));
+ md = mob_spawn_dataset(&data);
+ md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data));
md->guardian_data->number = guardian;
md->guardian_data->guild_id = gc->guild_id;
md->guardian_data->castle = gc;
@@ -3539,7 +3539,7 @@ static bool mob_parse_dbrow(char** str)
}
if (mob_db_data[class_] == NULL)
- mob_db_data[class_] = aCalloc(1, sizeof (struct mob_db));
+ mob_db_data[class_] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db));
db = mob_db_data[class_];
status = &db->status;
@@ -4379,7 +4379,7 @@ void mob_clear_spawninfo()
int do_init_mob(void)
{ //Initialize the mob database
memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array
- mob_db_data[0] = aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns
+ mob_db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns
mob_makedummymobdb(0); //The first time this is invoked, it creates the dummy mob
item_drop_ers = ers_new(sizeof(struct item_drop));
item_drop_list_ers = ers_new(sizeof(struct item_drop_list));