diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-18 17:49:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-18 17:49:18 +0300 |
commit | 70b520b1e876f9698bb95baa2d274ea289a0c6bd (patch) | |
tree | 152c7519b0d9b8fb424af2373ec48db823a85575 /src/net/ea | |
parent | 62ec17f6e489ec50f17219444468aeb8969dc961 (diff) | |
parent | 3b999f51c740d0541c53d223518e5e4bb482d996 (diff) | |
download | manaplus-stripped1.1.9.18.tar.gz manaplus-stripped1.1.9.18.tar.bz2 manaplus-stripped1.1.9.18.tar.xz manaplus-stripped1.1.9.18.zip |
Merge branch 'master' into strippedstripped1.1.9.18
Conflicts:
src/guichan/cliprectangle.cpp
src/guichan/focushandler.cpp
src/guichan/gui.cpp
src/guichan/include/guichan/cliprectangle.hpp
src/guichan/include/guichan/inputevent.hpp
src/guichan/include/guichan/keyevent.hpp
src/guichan/include/guichan/mouseevent.hpp
src/guichan/include/guichan/widgets/button.hpp
src/guichan/include/guichan/widgets/checkbox.hpp
src/guichan/include/guichan/widgets/dropdown.hpp
src/guichan/include/guichan/widgets/radiobutton.hpp
src/guichan/include/guichan/widgets/slider.hpp
src/guichan/include/guichan/widgets/tab.hpp
src/guichan/include/guichan/widgets/tabbedarea.hpp
src/guichan/include/guichan/widgets/textfield.hpp
src/guichan/include/guichan/widgets/window.hpp
src/guichan/inputevent.cpp
src/guichan/keyevent.cpp
src/guichan/mouseevent.cpp
src/guichan/widget.cpp
src/guichan/widgets/button.cpp
src/guichan/widgets/checkbox.cpp
src/guichan/widgets/dropdown.cpp
src/guichan/widgets/radiobutton.cpp
src/guichan/widgets/slider.cpp
src/guichan/widgets/tab.cpp
src/guichan/widgets/tabbedarea.cpp
src/guichan/widgets/textfield.cpp
src/guichan/widgets/window.cpp
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/ea/chathandler.cpp | 20 | ||||
-rw-r--r-- | src/net/ea/gamehandler.cpp | 3 | ||||
-rw-r--r-- | src/net/ea/gamehandler.h | 3 | ||||
-rw-r--r-- | src/net/ea/gui/guildtab.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 16 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 2 |
8 files changed, 32 insertions, 30 deletions
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 685562d6f..f38d17a59 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -70,7 +70,7 @@ void BuySellHandler::requestSellList(std::string nick) else { if (chatWindow) - chatWindow->whisper(nick, data, BY_PLAYER); + chatWindow->addWhisper(nick, data, BY_PLAYER); } } @@ -89,7 +89,7 @@ void BuySellHandler::requestBuyList(std::string nick) else { if (chatWindow) - chatWindow->whisper(nick, data, BY_PLAYER); + chatWindow->addWhisper(nick, data, BY_PLAYER); } } @@ -102,12 +102,12 @@ void BuySellHandler::sendBuyRequest(std::string nick, ShopItem* item, return; } std::string data = strprintf("!buyitem %d %d %d", - item->getId(), item->getPrice(), amount); + item->getId(), item->getPrice(), amount); if (config.getBoolValue("hideShopMessages")) Net::getChatHandler()->privateMessage(nick, data); else - chatWindow->whisper(nick, data, BY_PLAYER); + chatWindow->addWhisper(nick, data, BY_PLAYER); } void BuySellHandler::sendSellRequest(std::string nick, ShopItem* item, @@ -120,12 +120,12 @@ void BuySellHandler::sendSellRequest(std::string nick, ShopItem* item, } std::string data = strprintf("!sellitem %d %d %d", - item->getId(), item->getPrice(), amount); + item->getId(), item->getPrice(), amount); if (config.getBoolValue("hideShopMessages")) Net::getChatHandler()->privateMessage(nick, data); else - chatWindow->whisper(nick, data, BY_PLAYER); + chatWindow->addWhisper(nick, data, BY_PLAYER); } void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg) diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 5737cc2b2..c18b1bb9a 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -125,7 +125,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) case 0x01: if (chatWindow) { - chatWindow->whisper(nick, + chatWindow->addWhisper(nick, strprintf(_("Whisper could not be " "sent, %s is offline."), nick.c_str()), BY_SERVER); } @@ -133,7 +133,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) case 0x02: if (chatWindow) { - chatWindow->whisper(nick, + chatWindow->addWhisper(nick, strprintf(_("Whisper could not " "be sent, ignored by %s."), nick.c_str()), BY_SERVER); @@ -183,7 +183,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) if (tradeBot) { if (showMsg && chatWindow) - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); shopWindow->giveList(nick, ShopWindow::SELL); } @@ -193,7 +193,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) if (tradeBot) { if (showMsg && chatWindow) - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); shopWindow->giveList(nick, ShopWindow::BUY); } @@ -201,7 +201,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) else if (chatMsg.find("!buyitem ") == 0) { if (showMsg && chatWindow) - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); if (tradeBot) { shopWindow->processRequest(nick, chatMsg, @@ -211,7 +211,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) else if (chatMsg.find("!sellitem ") == 0) { if (showMsg && chatWindow) - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); if (tradeBot) { shopWindow->processRequest(nick, chatMsg, @@ -223,7 +223,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) { chatMsg = chatMsg.erase(0, 2); if (showMsg && chatWindow) - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); if (chatMsg.find("B1") == 0 || chatMsg.find("S1") == 0) { @@ -232,12 +232,12 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) } else if (chatWindow) { - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); } } else if (chatWindow) { - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); } } else @@ -246,7 +246,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) || (chatMsg.find("!selllist") != 0 && chatMsg.find("!buylist") != 0))) { - chatWindow->whisper(nick, chatMsg); + chatWindow->addWhisper(nick, chatMsg); } } } diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 04c13572f..a202cbc86 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -46,7 +46,8 @@ GameHandler::GameHandler() listen(Mana::CHANNEL_GAME); } -void GameHandler::event(Mana::Channels channel, const Mana::Event &event) +void GameHandler::processEvent(Mana::Channels channel, + const Mana::Event &event) { if (channel == Mana::CHANNEL_GAME) { diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index abfaaa6b4..6d8b88bd4 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -43,7 +43,8 @@ class GameHandler : public Net::GameHandler, public Mana::Listener public: GameHandler(); - virtual void event(Mana::Channels channel, const Mana::Event &event); + virtual void processEvent(Mana::Channels channel, + const Mana::Event &event); virtual void who(); diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index ab030be83..9836f5fa9 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -101,7 +101,7 @@ bool GuildTab::handleCommand(const std::string &type, const std::string &args) else if (type == "notice" && taGuild) { std::string str1 = args.substr(0, 60); - std::string str2 = ""; + std::string str2(""); if (args.size() > 60) str2 = args.substr(60); Net::getGuildHandler()->changeNotice(taGuild->getId(), str1, str2); diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 01000f8f1..1de681007 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -434,8 +434,8 @@ void InventoryHandler::processPlayerStorageStatus(Net::MessageIn &msg) if (!mStorage) mStorage = new Inventory(Inventory::STORAGE, size); - Ea::InventoryItems::iterator it = mInventoryItems.begin(); - Ea::InventoryItems::iterator it_end = mInventoryItems.end(); + Ea::InventoryItems::const_iterator it = mInventoryItems.begin(); + Ea::InventoryItems::const_iterator it_end = mInventoryItems.end(); for (; it != it_end; ++it) { mStorage->setItem((*it).slot, (*it).id, (*it).quantity, diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 4be4ddaa6..cb1e84673 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -114,15 +114,15 @@ class InventoryItem int refine; bool equip; - InventoryItem(int slot, int id, int quantity, int refine, - unsigned char color, bool equip) + InventoryItem(int slot0, int id0, int quantity0, int refine0, + unsigned char color0, bool equip0) { - this->slot = slot; - this->id = id; - this->quantity = quantity; - this->refine = refine; - this->color = color; - this->equip = equip; + slot = slot0; + id = id0; + quantity = quantity0; + refine = refine0; + color = color0; + equip = equip0; } }; diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index bd6f19d97..e006b9c71 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -203,7 +203,7 @@ void PartyHandler::processPartyInvited(Net::MessageIn &msg) { int id = msg.readInt32(); std::string partyName = msg.readString(24); - std::string nick = ""; + std::string nick(""); Being *being; if (actorSpriteManager) |