summaryrefslogtreecommitdiff
path: root/src/net/manaserv/npchandler.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-13 15:04:58 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-13 15:08:54 -0700
commit8bc425ff48b7a874ca0fb9d2285044c75f3010ab (patch)
tree5904c7f53cde9ffbe7df2a63f088561141e06b66 /src/net/manaserv/npchandler.h
parent28c9cec5d39c9a1b98694eba9a28281cf111e34a (diff)
downloadmana-client-8bc425ff48b7a874ca0fb9d2285044c75f3010ab.tar.gz
mana-client-8bc425ff48b7a874ca0fb9d2285044c75f3010ab.tar.bz2
mana-client-8bc425ff48b7a874ca0fb9d2285044c75f3010ab.tar.xz
mana-client-8bc425ff48b7a874ca0fb9d2285044c75f3010ab.zip
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.
Diffstat (limited to 'src/net/manaserv/npchandler.h')
-rw-r--r--src/net/manaserv/npchandler.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net/manaserv/npchandler.h b/src/net/manaserv/npchandler.h
index 8f353e5d..4b18487c 100644
--- a/src/net/manaserv/npchandler.h
+++ b/src/net/manaserv/npchandler.h
@@ -26,7 +26,9 @@
#include "net/manaserv/messagehandler.h"
-#include <list>
+#include <map>
+
+class NpcDialog;
namespace ManaServ {
@@ -63,6 +65,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<int, Wrapper> NpcDialogs;
+ NpcDialogs mNpcDialogs;
};
} // namespace ManaServ