From 8bc425ff48b7a874ca0fb9d2285044c75f3010ab Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 13 Feb 2010 15:04:58 -0700 Subject: Make NPC dialogs instance instead of global This change allows players to talk to multiple NPCs at a time (if the server agrees). Manaserv's netcode allows multiple commerce instances too. eAthena's is limited to one commerce instance, due to protocol limitations. --- src/net/ea/npchandler.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/net/ea/npchandler.h') diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index a42b88c5..072c97e3 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -27,6 +27,10 @@ #include "net/ea/messagehandler.h" +#include + +class NpcDialog; + namespace EAthena { class NpcHandler : public MessageHandler, public Net::NpcHandler @@ -62,6 +66,13 @@ class NpcHandler : public MessageHandler, public Net::NpcHandler void sellItem(int beingId, int itemId, int amount); void endShopping(int beingId); + + private: + typedef struct { + NpcDialog* dialog; + } Wrapper; + typedef std::map NpcDialogs; + NpcDialogs mNpcDialogs; }; } // namespace EAthena -- cgit v1.2.3-70-g09d2