summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/markethandler.cpp6
-rw-r--r--src/net/eathena/markethandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/markethandler.h2
-rw-r--r--src/net/tmwa/markethandler.cpp4
-rw-r--r--src/net/tmwa/markethandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index 3bbe678b7..915b850fd 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -20,6 +20,7 @@
#include "net/eathena/markethandler.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "debug.h"
@@ -67,4 +68,9 @@ void MarketHandler::processMarketOpen(Net::MessageIn &msg)
}
}
+void MarketHandler::close()
+{
+ createOutPacket(CMSG_NPC_MARKET_CLOSE);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h
index 0ff713ed1..ab12cc215 100644
--- a/src/net/eathena/markethandler.h
+++ b/src/net/eathena/markethandler.h
@@ -37,6 +37,8 @@ class MarketHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
+ void close() override final;
+
protected:
void processMarketOpen(Net::MessageIn &msg);
};
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 138cdc04d..fa5940ea3 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -382,6 +382,7 @@
#define CMSG_NPC_BUY_SELL_REQUEST 0x00c5
#define CMSG_NPC_BUY_REQUEST 0x00c8
#define CMSG_NPC_SELL_REQUEST 0x00c9
+#define CMSG_NPC_MARKET_CLOSE 0x09d8
#define CMSG_TRADE_REQUEST 0x00e4
#define CMSG_TRADE_RESPONSE 0x00e6
diff --git a/src/net/markethandler.h b/src/net/markethandler.h
index 2ff4d5d4d..348c262a6 100644
--- a/src/net/markethandler.h
+++ b/src/net/markethandler.h
@@ -33,6 +33,8 @@ class MarketHandler notfinal
public:
virtual ~MarketHandler()
{ }
+
+ virtual void close() = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/markethandler.cpp b/src/net/tmwa/markethandler.cpp
index 6fe4a22cd..5e7a6a9c4 100644
--- a/src/net/tmwa/markethandler.cpp
+++ b/src/net/tmwa/markethandler.cpp
@@ -47,4 +47,8 @@ void MarketHandler::handleMessage(Net::MessageIn &msg)
}
}
+void MarketHandler::close()
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/markethandler.h b/src/net/tmwa/markethandler.h
index 366191277..d3e1a3101 100644
--- a/src/net/tmwa/markethandler.h
+++ b/src/net/tmwa/markethandler.h
@@ -36,6 +36,8 @@ class MarketHandler final : public MessageHandler,
A_DELETE_COPY(MarketHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ void close() override final;
};
} // namespace TmwAthena