diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-06-03 16:29:11 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-06-03 16:29:11 +0000 |
commit | 0fdbf1d62c1add8800ffc7171a1911e1e243ac2a (patch) | |
tree | c22e6d658d908d3050cfe3dd5970f356e28aa465 /src/gui/chat.cpp | |
parent | d4e8401e55c7bc3f5c8545b66167e8c3bf3cd380 (diff) | |
download | mana-0fdbf1d62c1add8800ffc7171a1911e1e243ac2a.tar.gz mana-0fdbf1d62c1add8800ffc7171a1911e1e243ac2a.tar.bz2 mana-0fdbf1d62c1add8800ffc7171a1911e1e243ac2a.tar.xz mana-0fdbf1d62c1add8800ffc7171a1911e1e243ac2a.zip |
channel announcements and leave / enter messages, chat code refactoring
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 3748b31c..e7b82621 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -203,14 +203,6 @@ ChatWindow::chatLog(std::string line, int own, const std::string &channelName) scroll->logic(); } -#if 0 -void -ChatWindow::chatLog(CHATSKILL act) -{ - chatLog(const_msg(act), BY_SERVER); -} -#endif - void ChatWindow::action(const gcn::ActionEvent &event) { @@ -385,94 +377,6 @@ void ChatWindow::chatSend(std::string const &nick, std::string const &msg, } } -#if 0 -std::string -ChatWindow::const_msg(CHATSKILL act) -{ - std::string msg; - if (act.success == SKILL_FAILED && act.skill == SKILL_BASIC) { - switch (act.bskill) { - case BSKILL_TRADE : - msg = "Trade failed!"; - break; - case BSKILL_EMOTE : - msg = "Emote failed!"; - break; - case BSKILL_SIT : - msg = "Sit failed!"; - break; - case BSKILL_CREATECHAT : - msg = "Chat creating failed!"; - break; - case BSKILL_JOINPARTY : - msg = "Could not join party!"; - break; - case BSKILL_SHOUT : - msg = "Cannot shout!"; - break; - } - - switch (act.reason) { - case RFAIL_SKILLDEP : - msg += " You have not yet reached a high enough lvl!"; - break; - case RFAIL_INSUFHP : - msg += " Insufficient HP!"; - break; - case RFAIL_INSUFSP : - msg += " Insufficient SP!"; - break; - case RFAIL_NOMEMO : - msg += " You have no memos!"; - break; - case RFAIL_SKILLDELAY : - msg += " You cannot do that right now!"; - break; - case RFAIL_ZENY : - msg += " Seems you need more Zeny... ;-)"; - break; - case RFAIL_WEAPON : - msg += " You cannot use this skill with that kind of weapon!"; - break; - case RFAIL_REDGEM : - msg += " You need another red gem!"; - break; - case RFAIL_BLUEGEM : - msg += " You need another blue gem!"; - break; - case RFAIL_OVERWEIGHT : - msg += " You're carrying to much to do this!"; - break; - default : - msg += " Huh? What's that?"; - break; - } - } else { - switch(act.skill) { - case SKILL_WARP : - msg = "Warp failed..."; - break; - case SKILL_STEAL : - msg = "Could not steal anything..."; - break; - case SKILL_ENVENOM : - msg = "Poison had no effect..."; - break; - } - } - - return msg; -} -#endif - -void -ChatWindow::addChannel(short channelId, const std::string &channelName) -{ - Channel *channel = new Channel(channelId); - channel->setName(channelName); - channelManager->addChannel(channel); -} - void ChatWindow::removeChannel(short channelId) { |