From d4f8ecd0b1e4c8a2ba6949f83c474eb4dcf9a5be Mon Sep 17 00:00:00 2001 From: David Athay Date: Thu, 24 Jul 2008 15:04:17 +0000 Subject: Reverted Alt-Gr fix. Added NPC error messages. --- ChangeLog | 5 +++++ src/game.cpp | 2 +- src/net/npchandler.cpp | 3 +++ src/net/protocol.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c7a099d7..4df1570c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-24 David Athay + + * src/game.cpp, src/net/protocol.h, src/net/npchandler.cpp: Reverted + Alt-Gr fix. Added NPC error messages. + 2008-07-22 David Athay * src/game.cpp, src/guild.cpp, src/player.cpp, src/guild.h, src/player.h, diff --git a/src/game.cpp b/src/game.cpp index afd4cba4..e2343f39 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -652,7 +652,7 @@ void Game::handleInput() // Keys pressed together with Alt/Meta // Emotions and some internal gui windows #ifndef __APPLE__ - if (event.key.keysym.mod & KMOD_ALT && event.key.keysym.mod ^ KMOD_LCTRL) + if (event.key.keysym.mod & KMOD_LALT) #else if (event.key.keysym.mod & KMOD_LMETA) #endif diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index a838c844..58c2c9ed 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -40,6 +40,7 @@ NPCHandler::NPCHandler() static const Uint16 _messages[] = { GPMSG_NPC_CHOICE, GPMSG_NPC_MESSAGE, + GPMSG_NPC_ERROR, 0 }; handledMessages = _messages; @@ -66,6 +67,8 @@ void NPCHandler::handleMessage(MessageIn &msg) npcListDialog->setVisible(true); break; + case GPMSG_NPC_ERROR: + current_npc = NULL; case GPMSG_NPC_MESSAGE: npcTextDialog->addText(msg.readString(msg.getUnreadLength())); npcListDialog->setVisible(false); diff --git a/src/net/protocol.h b/src/net/protocol.h index 52db350b..9213d329 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -113,6 +113,7 @@ enum { GPMSG_NPC_BUY = 0x02B5, // W being id, { W item id, W amount, W cost }* GPMSG_NPC_SELL = 0x02B6, // W being id, { W item id, W amount, W cost }* PGMSG_NPC_BUYSELL = 0x02B7, // W item id, W amount + GPMSG_NPC_ERROR = 0x02B8, // B error PGMSG_TRADE_REQUEST = 0x02C0, // W being id GPMSG_TRADE_REQUEST = 0x02C1, // W being id GPMSG_TRADE_START = 0x02C2, // - -- cgit v1.2.3-70-g09d2