diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-05 15:34:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-05 16:25:18 +0300 |
commit | 08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f (patch) | |
tree | 7cd9be72ab884387173b2aaaa6421ebba7be1ed4 /src/net/eathena | |
parent | 05a196194b8270c1ae2e63f8ae31f8a492022388 (diff) | |
download | manaverse-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.gz manaverse-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.bz2 manaverse-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.xz manaverse-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.zip |
On room creation show room name in general tab caption.
Not allow move if in room.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 1dfeb7ccb..eb7dfe375 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -26,6 +26,7 @@ #include "notifymanager.h" #include "being/localplayer.h" +#include "being/playerinfo.h" #include "being/playerrelations.h" #include "gui/chatconsts.h" @@ -852,8 +853,19 @@ void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg) switch(result) { case 0: - chatWindow->addChatRoomTab(mChatRoom, true); + { + PlayerInfo::setRoomName(mChatRoom); + chatWindow->joinRoom(true); + ChatObject *const obj = new ChatObject; + obj->ownerId = localPlayer->getId(); + obj->chatId = 0; + obj->maxUsers = 1000; + obj->currentUsers = 1; + obj->type = 1; + obj->title = mChatRoom; + localPlayer->setChat(obj); break; + } case 1: NotifyManager::notify(NotifyTypes::ROOM_LIMIT_EXCEEDED); break; @@ -864,6 +876,7 @@ void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg) UNIMPLIMENTEDPACKET; break; } + mChatRoom.clear(); } void ChatHandler::processChatRoomDestroy(Net::MessageIn &msg) |