diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-10-09 03:34:45 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-10-09 03:34:45 +0000 |
commit | 8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch) | |
tree | 537f717a339d1247cae222eb7a354ea5dbe8babf /src/gui/chat.cpp | |
parent | a246c08cef5e4d598fc07a681eb971bfbcf01519 (diff) | |
download | mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2 mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip |
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is
working as expected now.
* Made sure TMW compiles without warnings even when using "-Wconversion
-Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups.
* Added two new small tilesets that contain the desert tiles that are twice and
three times the height of a normal tile. One well in new_3-1 has been
converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index a091abc9..7e1458c9 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -183,9 +183,9 @@ void ChatWindow::chat_log(std::string line, int own) } } -void ChatWindow::chat_log(CHATSKILL action) +void ChatWindow::chat_log(CHATSKILL act) { - chat_log(const_msg(action), BY_SERVER); + chat_log(const_msg(act), BY_SERVER); } void ChatWindow::action(const std::string& eventId) @@ -227,7 +227,8 @@ bool ChatWindow::isFocused() return chatInput->hasFocus(); } -char *ChatWindow::chat_send(std::string nick, std::string msg) +void +ChatWindow::chat_send(std::string nick, std::string msg) { short packetId = CMSG_CHAT_MESSAGE; @@ -240,7 +241,6 @@ char *ChatWindow::chat_send(std::string nick, std::string msg) }*/ // prepare ordinary message chat_log("Sorry but /commands are not available yet", BY_PLAYER); - return ""; } else { nick += " : "; @@ -254,15 +254,13 @@ char *ChatWindow::chat_send(std::string nick, std::string msg) outMsg.writeShort(packetId); outMsg.writeShort(msg.length() + 4); outMsg.writeString(msg, msg.length()); - - return ""; } -std::string ChatWindow::const_msg(CHATSKILL action) +std::string ChatWindow::const_msg(CHATSKILL act) { std::string msg; - if (action.success == SKILL_FAILED && action.skill == SKILL_BASIC) { - switch (action.bskill) { + if (act.success == SKILL_FAILED && act.skill == SKILL_BASIC) { + switch (act.bskill) { case BSKILL_TRADE : msg = "Trade failed!"; break; @@ -283,7 +281,7 @@ std::string ChatWindow::const_msg(CHATSKILL action) break; } - switch (action.reason) { + switch (act.reason) { case RFAIL_SKILLDEP : msg += " You have not yet reached a high enough lvl!"; break; @@ -319,7 +317,7 @@ std::string ChatWindow::const_msg(CHATSKILL action) break; } } else { - switch(action.skill) { + switch(act.skill) { case SKILL_WARP : msg = "Warp failed..."; break; |