summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-08 15:52:15 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-08 15:52:15 +0000
commit4c8554d9bb073eccfde7525f2ad33d9de9f0b7f1 (patch)
tree8513a1c9783fd8a95db68ebf8a862491d5e0a528 /src/map/intif.c
parent67264ee2c1e40690401ddc1d3f509f21b3281735 (diff)
downloadhercules-4c8554d9bb073eccfde7525f2ad33d9de9f0b7f1.tar.gz
hercules-4c8554d9bb073eccfde7525f2ad33d9de9f0b7f1.tar.bz2
hercules-4c8554d9bb073eccfde7525f2ad33d9de9f0b7f1.tar.xz
hercules-4c8554d9bb073eccfde7525f2ad33d9de9f0b7f1.zip
- Added support for Auction Close and Cancel.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12323 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index a9fba59e9..ff18aecba 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1746,6 +1746,62 @@ static void intif_parse_Auction_register(int fd)
}
}
+int intif_Auction_cancel(int char_id, unsigned int auction_id)
+{
+ if( CheckForCharServer() )
+ return 0;
+
+ WFIFOHEAD(inter_fd,10);
+ WFIFOW(inter_fd,0) = 0x3052;
+ WFIFOL(inter_fd,2) = char_id;
+ WFIFOL(inter_fd,6) = auction_id;
+ WFIFOSET(inter_fd,10);
+
+ return 0;
+}
+
+static void intif_parse_Auction_cancel(int fd)
+{
+ struct map_session_data *sd = map_charid2sd(RFIFOL(fd,2));
+ int result = RFIFOB(fd,6);
+
+ if( sd == NULL )
+ return;
+
+ 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;
+ }
+}
+
+int intif_Auction_close(int char_id, unsigned int auction_id)
+{
+ if( CheckForCharServer() )
+ return 0;
+
+ WFIFOHEAD(inter_fd,10);
+ WFIFOW(inter_fd,0) = 0x3053;
+ WFIFOL(inter_fd,2) = char_id;
+ WFIFOL(inter_fd,6) = auction_id;
+ WFIFOSET(inter_fd,10);
+
+ return 0;
+}
+
+static void intif_parse_Auction_close(int fd)
+{
+ struct map_session_data *sd = map_charid2sd(RFIFOL(fd,2));
+ unsigned char result = RFIFOB(fd,6);
+
+ if( sd == NULL )
+ return;
+
+ clif_Auction_close(sd->fd, result);
+}
+
#endif
//-----------------------------------------------------------------
@@ -1827,6 +1883,8 @@ int intif_parse(int fd)
// Auction System
case 0x3850: intif_parse_Auction_results(fd); break;
case 0x3851: intif_parse_Auction_register(fd); break;
+ case 0x3852: intif_parse_Auction_cancel(fd); break;
+ case 0x3853: intif_parse_Auction_close(fd); break;
#endif
case 0x3880: intif_parse_CreatePet(fd); break;
case 0x3881: intif_parse_RecvPetData(fd); break;