summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-24 16:55:10 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-24 16:55:10 +0000
commite38158dfce4969609ab4957446d1d9a631abbfb5 (patch)
tree0b223240cd1fefb86026a273029a0f176f3d2da4 /src/char
parent817a048b554ed05fda836a9b55e0dc9a816334b7 (diff)
downloadhercules-e38158dfce4969609ab4957446d1d9a631abbfb5.tar.gz
hercules-e38158dfce4969609ab4957446d1d9a631abbfb5.tar.bz2
hercules-e38158dfce4969609ab4957446d1d9a631abbfb5.tar.xz
hercules-e38158dfce4969609ab4957446d1d9a631abbfb5.zip
More G++ work
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@976 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/int_guild.c42
-rw-r--r--src/char/int_party.c14
-rw-r--r--src/char/int_pet.c10
-rw-r--r--src/char/int_storage.c12
4 files changed, 39 insertions, 39 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index b95817599..267b66f0f 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -398,7 +398,7 @@ int inter_guild_init() {
continue;
}
- g = aCalloc(sizeof(struct guild), 1);
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
if(g == NULL){
printf("int_guild: out of memory!\n");
exit(0);
@@ -426,7 +426,7 @@ int inter_guild_init() {
}
while(fgets(line, sizeof(line)-1, fp)) {
- gc = aCalloc(sizeof(struct guild_castle), 1);
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
if(gc == NULL){
printf("int_guild: out of memory!\n");
exit(0);
@@ -445,7 +445,7 @@ int inter_guild_init() {
printf(" %s - making Default Data...\n", castle_txt);
//デフォルトデータを作成
for(i = 0; i < MAX_GUILDCASTLE; i++) {
- gc = aCalloc(sizeof(struct guild_castle), 1);
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
if (gc == NULL) {
printf("int_guild: out of memory!\n");
exit(0);
@@ -491,7 +491,7 @@ int inter_guild_init() {
struct guild *inter_guild_search(int guild_id) {
struct guild *g;
- g=numdb_search(guild_db, guild_id);
+ g= (struct guild *) numdb_search(guild_db, guild_id);
return g;
}
@@ -965,7 +965,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
mapif_guild_created(fd, account_id, NULL);
return 0;
}
- g = aCalloc(sizeof(struct guild), 1);
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
if (g == NULL) {
printf("int_guild: CreateGuild: out of memory !\n");
mapif_guild_created(fd, account_id, NULL);
@@ -1005,7 +1005,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
int mapif_parse_GuildInfo(int fd, int guild_id) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g != NULL){
guild_calcinfo(g);
mapif_guild_info(fd, g);
@@ -1020,7 +1020,7 @@ int mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) {
struct guild *g;
int i;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL) {
mapif_guild_memberadded(fd, guild_id, m->account_id, m->char_id, 1);
return 0;
@@ -1046,7 +1046,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in
struct guild *g = NULL;
int i, j;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *)numdb_search(guild_db, guild_id);
if (g != NULL) {
for(i = 0; i < MAX_GUILD; i++) {
if (g->member[i].account_id == account_id && g->member[i].char_id == char_id) {
@@ -1089,7 +1089,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id,
struct guild *g;
int i, alv, c;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
@@ -1136,7 +1136,7 @@ int guild_break_sub(void *key, void *data, va_list ap) {
int mapif_parse_BreakGuild(int fd, int guild_id) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if(g == NULL)
return 0;
@@ -1162,7 +1162,7 @@ int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const char
struct guild *g;
short dw = *((short *)data);
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
@@ -1189,7 +1189,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int
int i;
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if(g == NULL)
return 0;
@@ -1224,7 +1224,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int
// ギルド役職名変更要求
int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) {
- struct guild *g = numdb_search(guild_db, guild_id);
+ struct guild *g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL || idx < 0 || idx >= MAX_GUILDPOSITION) {
return 0;
@@ -1238,7 +1238,7 @@ int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_positi
// ギルドスキルアップ要求
int mapif_parse_GuildSkillUp(int fd, int guild_id, int skill_num, int account_id) {
- struct guild *g = numdb_search(guild_db, guild_id);
+ struct guild *g = (struct guild *) numdb_search(guild_db, guild_id);
int idx = skill_num - GD_SKILLBASE;
if (g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
@@ -1261,8 +1261,8 @@ int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_
struct guild *g[2];
int j, i;
- g[0] = numdb_search(guild_db, guild_id1);
- g[1] = numdb_search(guild_db, guild_id2);
+ g[0] = (struct guild *) numdb_search(guild_db, guild_id1);
+ g[1] = (struct guild *) numdb_search(guild_db, guild_id2);
if (g[0] == NULL || g[1] == NULL)
return 0;
@@ -1294,7 +1294,7 @@ int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_
int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
memcpy(g->mes1, mes1, 60);
@@ -1307,7 +1307,7 @@ int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *
int mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
memcpy(g->emblem_data, data, len);
@@ -1318,7 +1318,7 @@ int mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char
}
int mapif_parse_GuildCastleDataLoad(int fd, int castle_id, int index) {
- struct guild_castle *gc = numdb_search(castle_db, castle_id);
+ struct guild_castle *gc = (struct guild_castle *) numdb_search(castle_db, castle_id);
if (gc == NULL) {
return mapif_guild_castle_dataload(castle_id, 0, 0);
@@ -1359,7 +1359,7 @@ int mapif_parse_GuildCastleDataLoad(int fd, int castle_id, int index) {
}
int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) {
- struct guild_castle *gc=numdb_search(castle_db, castle_id);
+ struct guild_castle *gc= (struct guild_castle *) numdb_search(castle_db, castle_id);
if (gc == NULL) {
return mapif_guild_castle_datasave(castle_id, index, value);
@@ -1368,7 +1368,7 @@ int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value)
case 1:
if (gc->guild_id != value) {
int gid = (value) ? value : gc->guild_id;
- struct guild *g = numdb_search(guild_db, gid);
+ struct guild *g = (struct guild *) numdb_search(guild_db, gid);
if(log_inter)
inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
(g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", castle_id);
diff --git a/src/char/int_party.c b/src/char/int_party.c
index c95d13620..02e4a5210 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -391,7 +391,7 @@ int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char
mapif_party_created(fd, account_id, NULL);
return 0;
}
- p = aCalloc(sizeof(struct party), 1);
+ p = (struct party *) aCalloc(sizeof(struct party), 1);
if (p == NULL) {
printf("int_party: out of memory !\n");
mapif_party_created(fd,account_id,NULL);
@@ -421,7 +421,7 @@ int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char
int mapif_parse_PartyInfo(int fd, int party_id) {
struct party *p;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p != NULL)
mapif_party_info(fd, p);
else
@@ -435,7 +435,7 @@ int mapif_parse_PartyAddMember(int fd, int party_id, int account_id, char *nick,
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL) {
mapif_party_memberadded(fd, party_id, account_id, 1);
return 0;
@@ -473,7 +473,7 @@ int mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp,
struct party *p;
int flag = 0;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
@@ -494,7 +494,7 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id) {
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p != NULL) {
for(i = 0; i < MAX_PARTY; i++) {
if (p->member[i].account_id == account_id) {
@@ -516,7 +516,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, char *map,
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
@@ -546,7 +546,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, char *map,
int mapif_parse_BreakParty(int fd, int party_id) {
struct party *p;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index f690e554e..8682860c0 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -136,7 +136,7 @@ int inter_pet_save()
int inter_pet_delete(int pet_id)
{
struct s_pet *p;
- p = numdb_search(pet_db,pet_id);
+ p = (struct s_pet *) numdb_search(pet_db,pet_id);
if( p == NULL)
return 1;
else {
@@ -210,7 +210,7 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet
short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
{
struct s_pet *p;
- p=aMalloc(sizeof(struct s_pet));
+ p= (struct s_pet *) aMalloc(sizeof(struct s_pet));
if(p==NULL){
printf("int_pet: out of memory !\n");
mapif_pet_created(fd,account_id,NULL);
@@ -253,7 +253,7 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet
int mapif_load_pet(int fd,int account_id,int char_id,int pet_id)
{
struct s_pet *p;
- p=numdb_search(pet_db,pet_id);
+ p=(struct s_pet *)numdb_search(pet_db,pet_id);
if(p!=NULL) {
if(p->incuvate == 1) {
p->account_id = p->char_id = 0;
@@ -280,9 +280,9 @@ int mapif_save_pet(int fd,int account_id,struct s_pet *data)
}
else{
pet_id = data->pet_id;
- p=numdb_search(pet_db,pet_id);
+ p=(struct s_pet *)numdb_search(pet_db,pet_id);
if(p == NULL) {
- p=aMalloc(sizeof(struct s_pet));
+ p=(struct s_pet *)aMalloc(sizeof(struct s_pet));
if(p==NULL){
printf("int_pet: out of memory !\n");
mapif_save_pet_ack(fd,account_id,1);
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 8e4711cec..3c5695c90 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -190,9 +190,9 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
struct storage *account2storage(int account_id)
{
struct storage *s;
- s=numdb_search(storage_db,account_id);
+ s= (struct storage *) numdb_search(storage_db,account_id);
if(s == NULL) {
- s = aCalloc(sizeof(struct storage), 1);
+ s = (struct storage *) aCalloc(sizeof(struct storage), 1);
if(s==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -208,9 +208,9 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(inter_guild_search(guild_id) != NULL) {
- gs=numdb_search(guild_storage_db,guild_id);
+ gs= (struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gs == NULL) {
- gs = aCalloc(sizeof(struct guild_storage), 1);
+ gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1);
if(gs==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -348,7 +348,7 @@ int inter_guild_storage_save()
// 倉庫データ削除
int inter_storage_delete(int account_id)
{
- struct storage *s = numdb_search(storage_db,account_id);
+ struct storage *s = (struct storage *) numdb_search(storage_db,account_id);
if(s) {
int i;
for(i=0;i<s->storage_amount;i++){
@@ -364,7 +364,7 @@ int inter_storage_delete(int account_id)
// ギルド倉庫データ削除
int inter_guild_storage_delete(int guild_id)
{
- struct guild_storage *gs = numdb_search(guild_storage_db,guild_id);
+ struct guild_storage *gs = (struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gs) {
int i;
for(i=0;i<gs->storage_amount;i++){