summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c64
1 files changed, 31 insertions, 33 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 613a71e66..ba14ad6f3 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -142,7 +142,7 @@ int intif_broadcast(const char* mes, int len, int type)
int lp = type ? 4 : 0;
// Send to the local players
- clif_broadcast(NULL, mes, len, type, ALL_CLIENT);
+ clif->broadcast(NULL, mes, len, type, ALL_CLIENT);
if (CheckForCharServer())
return 0;
@@ -171,9 +171,9 @@ int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fo
{
// Send to the local players
if (fontColor == 0xFE000000) // This is main chat message [LuzZza]
- clif_MainChatMessage(mes);
+ clif->MainChatMessage(mes);
else
- clif_broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT);
+ clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT);
if (CheckForCharServer())
return 0;
@@ -224,7 +224,7 @@ int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int me
if (other_mapserver_count < 1)
{ //Character not found.
- clif_wis_end(sd->fd, 1);
+ clif->wis_end(sd->fd, 1);
return 0;
}
@@ -888,7 +888,7 @@ int intif_parse_WisMessage(int fd)
return 0;
}
//Success to send whisper.
- clif_wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
+ clif->wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
intif_wis_replay(id,0); // succes
return 0;
}
@@ -902,7 +902,7 @@ int intif_parse_WisEnd(int fd)
ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
sd = (struct map_session_data *)map_nick2sd((char *) RFIFOP(fd,2));
if (sd != NULL)
- clif_wis_end(sd->fd, RFIFOB(fd,26));
+ clif->wis_end(sd->fd, RFIFOB(fd,26));
return 0;
}
@@ -919,7 +919,7 @@ static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
wisp_name = va_arg(va, char*);
message = va_arg(va, char*);
len = va_arg(va, int);
- clif_wis_message(sd->fd, wisp_name, message, len);
+ clif->wis_message(sd->fd, wisp_name, message, len);
return 1;
}
@@ -1523,12 +1523,12 @@ int intif_parse_Mail_inboxreceived(int fd)
sd->mail.changed = false; // cache is now in sync
if (flag)
- clif_Mail_refreshinbox(sd);
+ clif->mail_refreshinbox(sd);
else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) )
{
char output[128];
sprintf(output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked);
- clif_disp_onlyself(sd, output, strlen(output));
+ clif->disp_onlyself(sd, output, strlen(output));
}
return 0;
}
@@ -1633,7 +1633,7 @@ int intif_parse_Mail_delete(int fd)
intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
}
- clif_Mail_delete(sd->fd, mail_id, failed);
+ clif->mail_delete(sd->fd, mail_id, failed);
return 0;
}
/*------------------------------------------
@@ -1679,7 +1679,7 @@ int intif_parse_Mail_return(int fd)
intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
}
- clif_Mail_return(sd->fd, mail_id, fail);
+ clif->mail_return(sd->fd, mail_id, fail);
return 0;
}
/*------------------------------------------
@@ -1725,7 +1725,7 @@ static void intif_parse_Mail_send(int fd)
mail_deliveryfail(sd, &msg);
else
{
- clif_Mail_send(sd->fd, false);
+ clif->mail_send(sd->fd, false);
if( save_settings&16 )
chrif_save(sd, 0);
}
@@ -1743,7 +1743,7 @@ static void intif_parse_Mail_new(int fd)
return;
sd->mail.changed = true;
- clif_Mail_new(sd->fd, mail_id, sender_name, title);
+ clif->mail_new(sd->fd, mail_id, sender_name, title);
}
/*==========================================
@@ -1780,7 +1780,7 @@ static void intif_parse_Auction_results(int fd)
if( sd == NULL )
return;
- clif_Auction_results(sd, count, pages, data);
+ clif->auction_results(sd, count, pages, data);
}
int intif_Auction_register(struct auction_data *auction)
@@ -1816,7 +1816,7 @@ static void intif_parse_Auction_register(int fd)
if( auction.auction_id > 0 )
{
- clif_Auction_message(sd->fd, 1); // Confirmation Packet ??
+ clif->auction_message(sd->fd, 1); // Confirmation Packet ??
if( save_settings&32 )
chrif_save(sd,0);
}
@@ -1824,7 +1824,7 @@ static void intif_parse_Auction_register(int fd)
{
int zeny = auction.hours*battle_config.auction_feeperhour;
- clif_Auction_message(sd->fd, 4);
+ clif->auction_message(sd->fd, 4);
pc_additem(sd, &auction.item, auction.item.amount, LOG_TYPE_AUCTION);
pc_getzeny(sd, zeny, LOG_TYPE_AUCTION, NULL);
@@ -1855,10 +1855,10 @@ static void intif_parse_Auction_cancel(int fd)
switch( result )
{
- case 0: clif_Auction_message(sd->fd, 2); break;
- case 1: clif_Auction_close(sd->fd, 2); break;
- case 2: clif_Auction_close(sd->fd, 1); break;
- case 3: clif_Auction_message(sd->fd, 3); break;
+ case 0: clif->auction_message(sd->fd, 2); break;
+ case 1: clif->auction_close(sd->fd, 2); break;
+ case 2: clif->auction_close(sd->fd, 1); break;
+ case 3: clif->auction_message(sd->fd, 3); break;
}
}
@@ -1884,11 +1884,11 @@ static void intif_parse_Auction_close(int fd)
if( sd == NULL )
return;
- clif_Auction_close(sd->fd, result);
+ clif->auction_close(sd->fd, result);
if( result == 0 )
{
// FIXME: Leeching off a parse function
- clif_parse_Auction_cancelreg(fd, sd);
+ clif->Auction_cancelreg(fd, sd);
intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1);
}
}
@@ -1921,14 +1921,12 @@ static void intif_parse_Auction_bid(int fd)
if( sd == NULL )
return;
- clif_Auction_message(sd->fd, result);
- if( bid > 0 )
- {
+ clif->auction_message(sd->fd, result);
+ if( bid > 0 ) {
pc_getzeny(sd, bid, LOG_TYPE_AUCTION,NULL);
}
- if( result == 1 )
- { // To update the list, display your buy list
- clif_parse_Auction_cancelreg(fd, sd);
+ if( result == 1 ) { // To update the list, display your buy list
+ clif->Auction_cancelreg(fd, sd);
intif_Auction_requestlist(sd->status.char_id, 7, 0, "", 1);
}
}
@@ -1942,7 +1940,7 @@ static void intif_parse_Auction_message(int fd)
if( sd == NULL )
return;
- clif_Auction_message(sd->fd, result);
+ clif->auction_message(sd->fd, result);
}
/*==========================================
@@ -2147,7 +2145,7 @@ void intif_parse_MessageToFD(int fd) {
if( sd->bl.id == aid ) {
char msg[512];
safestrncpy(msg, (char*)RFIFOP(fd,12), RFIFOW(fd,2) - 12);
- clif_displaymessage(u_fd,msg);
+ clif->displaymessage(u_fd,msg);
}
}
@@ -2182,11 +2180,11 @@ int intif_parse(int fd)
switch(cmd){
case 0x3800:
if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
- clif_broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, 0, ALL_CLIENT);
+ clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, 0, ALL_CLIENT);
else if (RFIFOL(fd,4) == 0xFE000000) //Main chat message [LuzZza]
- clif_MainChatMessage((char *)RFIFOP(fd,16));
+ clif->MainChatMessage((char *)RFIFOP(fd,16));
else //Color announce.
- clif_broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
+ clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
break;
case 0x3801: intif_parse_WisMessage(fd); break;
case 0x3802: intif_parse_WisEnd(fd); break;