summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/npchandler.cpp6
-rw-r--r--src/net/eathena/npchandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/npchandler.h2
-rw-r--r--src/net/tmwa/npchandler.cpp4
-rw-r--r--src/net/tmwa/npchandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 8d8cff626..cef952252 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -241,6 +241,12 @@ void NpcHandler::selectArrow(const int nameId) const
outMsg.writeInt16(nameId, "name id");
}
+void NpcHandler::selectAutoSpell(const int skillId) const
+{
+ MessageOut outMsg(CMSG_NPC_SELECT_AUTO_SPELL);
+ outMsg.writeInt32(skillId, "skill id");
+}
+
int NpcHandler::getNpc(Net::MessageIn &msg)
{
if (msg.getId() == SMSG_NPC_CHOICE
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index 323b12d48..2f435b1a8 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -85,6 +85,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void selectArrow(const int nameId) const override final;
+ void selectAutoSpell(const int skillId) const override final;
+
protected:
static void processNpcCutin(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 906526e14..cbcf45488 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -320,6 +320,7 @@
#define CMSG_NPC_REFINE 0x0222
#define CMSG_NPC_IDENTIFY 0x0178
#define CMSG_NPC_SELECT_ARROW 0x01ae
+#define CMSG_NPC_SELECT_AUTO_SPELL 0x01ce
#define CMSG_PLAYER_MAPMOVE 0x0140
#define CMSG_REMOVE_OPTION 0x012a
diff --git a/src/net/npchandler.h b/src/net/npchandler.h
index abebf716f..9dfc7dbbc 100644
--- a/src/net/npchandler.h
+++ b/src/net/npchandler.h
@@ -87,6 +87,8 @@ class NpcHandler notfinal
virtual void identify(const int index) const = 0;
virtual void selectArrow(const int nameId) const = 0;
+
+ virtual void selectAutoSpell(const int skillId) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index e5815890a..ec5da280a 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -235,6 +235,10 @@ void NpcHandler::selectArrow(const int nameId A_UNUSED) const
{
}
+void NpcHandler::selectAutoSpell(const int skillId A_UNUSED) const
+{
+}
+
int NpcHandler::getNpc(Net::MessageIn &msg)
{
if (msg.getId() == SMSG_NPC_CHOICE
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index 34a8f18c2..d73e9c71d 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -88,6 +88,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void identify(const int index) const override final;
void selectArrow(const int nameId) const override final;
+
+ void selectAutoSpell(const int skillId) const override final;
};
} // namespace TmwAthena