summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/mmo.h8
-rw-r--r--src/map/clif.c22
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/packets.h6
4 files changed, 34 insertions, 3 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 257a3b42d..ef9a6693e 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _MMO_H_
#define _MMO_H_
@@ -50,6 +51,9 @@
#define PACKETVER 20120418
#endif
+/// uncomment if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE)
+#define PACKETVER_RE
+
//Remove/Comment this line to disable sc_data saving. [Skotlex]
#define ENABLE_SC_SAVING
//Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
diff --git a/src/map/clif.c b/src/map/clif.c
index 15d6aeb9d..0c5143ffd 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16869,7 +16869,27 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) {
}
}
+/* [Ind/Hercules] */
+void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) {
+ short tab = RFIFOW(fd, 2);
+ int j;
+ if( tab < 0 || tab > CASHSHOP_TAB_MAX )
+ return;
+
+ WFIFOHEAD(fd, 10 + ( clif->cs.item_count[tab] * 6 ) );
+ WFIFOW(fd, 0) = 0x8c0;
+ WFIFOW(fd, 2) = 10 + ( clif->cs.item_count[tab] * 6 );
+ WFIFOL(fd, 4) = tab;
+ WFIFOW(fd, 8) = clif->cs.item_count[tab];
+
+ for( j = 0; j < clif->cs.item_count[tab]; j++ ) {
+ WFIFOW(fd, 10 + ( 6 * j ) ) = clif->cs.data[tab][j]->id;
+ WFIFOL(fd, 12 + ( 6 * j ) ) = clif->cs.data[tab][j]->price;
+ }
+
+ WFIFOSET(fd, 10 + ( clif->cs.item_count[tab] * 6 ));
+}
/* [Ind/Hercules] */
void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
#if PACKETVER >= 20121010
@@ -16970,7 +16990,6 @@ int clif_parse(int fd) {
return 0;
cmd = RFIFOW(fd,0);
-
// filter out invalid / unsupported packets
if (cmd > MAX_PACKET_DB || packet_db[cmd].len == 0) {
ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x, %d bytes received), disconnecting session #%d.\n", cmd, RFIFOREST(fd), fd);
@@ -17813,6 +17832,7 @@ void clif_defaults(void) {
/* RagExe Cash Shop [Ind/Hercules] */
clif->pCashShopOpen = clif_parse_CashShopOpen;
clif->pCashShopClose = clif_parse_CashShopClose;
+ clif->pCashShopReqTab = clif_parse_CashShopReqTab;
clif->pCashShopSchedule = clif_parse_CashShopSchedule;
clif->pCashShopBuy = clif_parse_CashShopBuy;
/* */
diff --git a/src/map/clif.h b/src/map/clif.h
index 2aec3350a..3e3db98c1 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1081,6 +1081,7 @@ struct clif_interface {
/* RagExe Cash Shop [Ind/Hercules] */
void (*pCashShopOpen) (int fd, struct map_session_data *sd);
void (*pCashShopClose) (int fd, struct map_session_data *sd);
+ void (*pCashShopReqTab) (int fd, struct map_session_data *sd);
void (*pCashShopSchedule) (int fd, struct map_session_data *sd);
void (*pCashShopBuy) (int fd, struct map_session_data *sd);
void (*pPartyTick) (int fd, struct map_session_data *sd);
diff --git a/src/map/packets.h b/src/map/packets.h
index 997729b8c..7e14305b7 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1849,6 +1849,7 @@ packet(0x020d,-1);
#if PACKETVER >= 20110718
packet(0x0844,2,clif->pCashShopOpen,2);/* tell server cashshop window is being open */
packet(0x084a,2,clif->pCashShopClose,2);/* tell server cashshop window is being closed */
+ packet(0x0846,4,clif->pCashShopReqTab,2);
packet(0x08c9,2,clif->pCashShopSchedule,0);
packet(0x0848,-1,clif->pCashShopBuy,2);
#endif
@@ -1889,6 +1890,11 @@ packet(0x020d,-1);
packet(0x08ab,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
packet(0x088b,2,clif->pSearchStoreInfoNextPage,0);
packet(0x08a2,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ #ifndef PACKETVER_RE
+ packet(0x0835,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0892,5,clif->pWalkToXY,2);
+ packet(0x0899,6,clif->pTickSend,2);
+ #endif
#endif
//2012-03-07fRagexeRE