summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorSusu <bruant.bastien@gmail.com>2013-07-29 15:49:14 +0200
committerSusu <bruant.bastien@gmail.com>2013-07-29 15:49:14 +0200
commit853489bcb5f2acfce14731b117ddc2b246042883 (patch)
treea1418ef7a65a26af3693edd0576abdbf83ce24f7 /src/map/guild.c
parent9d5309327da9543f86385549001df7e9a7c98833 (diff)
downloadhercules-853489bcb5f2acfce14731b117ddc2b246042883.tar.gz
hercules-853489bcb5f2acfce14731b117ddc2b246042883.tar.bz2
hercules-853489bcb5f2acfce14731b117ddc2b246042883.tar.xz
hercules-853489bcb5f2acfce14731b117ddc2b246042883.zip
Added intif interface
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index e5ea6809d..601d88387 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -84,7 +84,7 @@ static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id)
if (sd->status.guild_id != guild_id)
{ //If player belongs to a different guild, kick him out.
- intif_guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **");
+ intif->guild_leave(guild_id,account_id,char_id,0,"** Guild Mismatch **");
return NULL;
}
@@ -179,7 +179,7 @@ static bool guild_read_castledb(char* str[], int columns, int current)
idb_put(castle_db,gc->castle_id,gc);
- //intif_guild_castle_info(gc->castle_id);
+ //intif->guild_castle_info(gc->castle_id);
return true;
}
@@ -313,7 +313,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
else
g->member[i].exp+= c->exp;
- intif_guild_change_memberinfo(g->guild_id,c->account_id,c->char_id,
+ intif->guild_change_memberinfo(g->guild_id,c->account_id,c->char_id,
GMI_EXP,&g->member[i].exp,sizeof(g->member[i].exp));
c->exp=0;
@@ -395,7 +395,7 @@ int guild_create(struct map_session_data *sd, const char *name)
guild_makemember(&m,sd);
m.position=0;
- intif_guild_create(name,&m);
+ intif->guild_create(name,&m);
return 1;
}
@@ -420,7 +420,7 @@ int guild_created(int account_id,int guild_id) {
//Information request
int guild_request_info(int guild_id)
{
- return intif_guild_request_info(guild_id);
+ return intif->guild_request_info(guild_id);
}
//Information request with event
@@ -733,7 +733,7 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag)
}
guild_makemember(&m,sd);
- intif_guild_addmember(guild_id, &m);
+ intif->guild_addmember(guild_id, &m);
//TODO: send a minimap update to this player
}
@@ -799,7 +799,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
// cancel if player not present or invalide guild_id invitation
if (flag == 0) {
ShowError("guild: member added error %d is not online\n",account_id);
- intif_guild_leave(guild_id,account_id,char_id,0,"** Data Error **");
+ intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **");
}
return 0;
}
@@ -851,7 +851,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c
((iMap->agit_flag || iMap->agit2_flag) && map[sd->bl.m].flag.gvg_castle))
return 0;
- intif_guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes);
+ intif->guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes);
return 0;
}
@@ -886,7 +886,7 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i
// find the member and perform expulsion
i = guild->getindex(g, account_id, char_id);
if( i != -1 && strcmp(g->member[i].name,g->master) != 0 ) //Can't expel the GL!
- intif_guild_leave(g->guild_id,account_id,char_id,1,mes);
+ intif->guild_leave(g->guild_id,account_id,char_id,1,mes);
return 0;
}
@@ -954,7 +954,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
if(!(g = sd->guild))
return 0;
- intif_guild_memberinfoshort(g->guild_id,
+ intif->guild_memberinfoshort(g->guild_id,
sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_);
if(!online){
@@ -1047,7 +1047,7 @@ int guild_send_message(struct map_session_data *sd,const char *mes,int len)
if(sd->status.guild_id==0)
return 0;
- intif_guild_message(sd->status.guild_id,sd->status.account_id,mes,len);
+ intif->guild_message(sd->status.guild_id,sd->status.account_id,mes,len);
guild->recv_message(sd->status.guild_id,sd->status.account_id,mes,len);
// Chat logging type 'G' / Guild Chat
@@ -1073,7 +1073,7 @@ int guild_recv_message(int guild_id,int account_id,const char *mes,int len)
*---------------------------------------------------*/
int guild_change_memberposition(int guild_id,int account_id,int char_id,short idx)
{
- return intif_guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx));
+ return intif->guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx));
}
/*====================================================
@@ -1106,7 +1106,7 @@ int guild_change_position(int guild_id,int idx,
p.mode=mode&0x11;
p.exp_mode=exp_mode;
safestrncpy(p.name,name,NAME_LENGTH);
- return intif_guild_position(guild_id,idx,&p);
+ return intif->guild_position(guild_id,idx,&p);
}
/*====================================================
@@ -1137,7 +1137,7 @@ int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes
if(guild_id!=sd->status.guild_id)
return 0;
- return intif_guild_notice(guild_id,mes1,mes2);
+ return intif->guild_notice(guild_id,mes1,mes2);
}
/*====================================================
@@ -1175,7 +1175,7 @@ int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
return 0;
}
- return intif_guild_emblem(sd->status.guild_id,len,data);
+ return intif->guild_emblem(sd->status.guild_id,len,data);
}
/*====================================================
@@ -1328,7 +1328,7 @@ int guild_skillup(TBL_PC* sd, uint16 skill_id)
if( g->skill_point > 0 &&
g->skill[idx].id != 0 &&
g->skill[idx].lv < max )
- intif_guild_skillup(g->guild_id, skill_id, sd->status.account_id, max);
+ intif->guild_skillup(g->guild_id, skill_id, sd->status.account_id, max);
return 0;
}
@@ -1529,18 +1529,18 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
for(i=0;i<MAX_GUILDALLIANCE;i++){
if(g->alliance[i].guild_id==tsd->status.guild_id &&
g->alliance[i].opposition==1)
- intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,9 );
}
for(i=0;i<MAX_GUILDALLIANCE;i++){
if(tg->alliance[i].guild_id==sd->status.guild_id &&
tg->alliance[i].opposition==1)
- intif_guild_alliance( tsd->status.guild_id,sd->status.guild_id,
+ intif->guild_alliance( tsd->status.guild_id,sd->status.guild_id,
tsd->status.account_id,sd->status.account_id,9 );
}
// inform other servers
- intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,0 );
return 0;
} else { // deny
@@ -1564,7 +1564,7 @@ int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
return 0;
} // end addition [Valaris]
- intif_guild_alliance( sd->status.guild_id,guild_id,sd->status.account_id,0,flag|8 );
+ intif->guild_alliance( sd->status.guild_id,guild_id,sd->status.account_id,0,flag|8 );
return 0;
}
@@ -1600,13 +1600,13 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
if(iMap->agit_flag || iMap->agit2_flag) // Prevent the changing of alliances to oppositions during WoE.
return 0;
//Change alliance to opposition.
- intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,8 );
}
}
// inform other serv
- intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ intif->guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,1 );
return 0;
}
@@ -1713,7 +1713,7 @@ int guild_broken_sub(DBKey key, DBData *data, va_list ap)
for(j=0;j<g->max_member;j++)
if( (sd=g->member[j].sd)!=NULL )
clif->guild_delalliance(sd,guild_id,g->alliance[i].opposition);
- intif_guild_alliance(g->guild_id, guild_id,0,0,g->alliance[i].opposition|8);
+ intif->guild_alliance(g->guild_id, guild_id,0,0,g->alliance[i].opposition|8);
g->alliance[i].guild_id=0;
}
}
@@ -1799,7 +1799,7 @@ int guild_gm_change(int guild_id, struct map_session_data *sd)
return 0;
//Notify servers that master has changed.
- intif_guild_change_gm(guild_id, sd->status.name, strlen(sd->status.name)+1);
+ intif->guild_change_gm(guild_id, sd->status.name, strlen(sd->status.name)+1);
return 1;
}
@@ -1905,7 +1905,7 @@ int guild_break(struct map_session_data *sd,char *name) {
}
}
- intif_guild_break(g->guild_id);
+ intif->guild_break(g->guild_id);
return 1;
}
@@ -1929,7 +1929,7 @@ void guild_castle_map_init(void)
*(cursor++) = gc->castle_id;
}
dbi_destroy(iter);
- if (intif_guild_castle_dataload(num, castle_ids))
+ if (intif->guild_castle_dataload(num, castle_ids))
ShowStatus("Requested '"CL_WHITE"%d"CL_RESET"' guild castles from char-server...\n", num);
aFree(castle_ids);
}
@@ -1996,7 +1996,7 @@ int guild_castledatasave(int castle_id, int index, int value)
return 0;
}
- if (!intif_guild_castle_datasave(castle_id, index, value)) {
+ if (!intif->guild_castle_datasave(castle_id, index, value)) {
guild->castle_reconnect(castle_id, index, value);
}
return 0;
@@ -2006,7 +2006,7 @@ void guild_castle_reconnect_sub(void *key, void *data, va_list ap)
{
int castle_id = GetWord((int)__64BPTRSIZE(key), 0);
int index = GetWord((int)__64BPTRSIZE(key), 1);
- intif_guild_castle_datasave(castle_id, index, *(int *)data);
+ intif->guild_castle_datasave(castle_id, index, *(int *)data);
aFree(data);
}