diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-06 01:29:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-06 01:56:54 +0300 |
commit | f47097a4d585d91852fca51dd347faed92816839 (patch) | |
tree | 9bbde1334cfeff5e6772979a917cf1909b90a36d /src/actormanager.cpp | |
parent | 3acb4aa3b1248719a3896b419600864a68c65908 (diff) | |
download | manaverse-f47097a4d585d91852fca51dd347faed92816839.tar.gz manaverse-f47097a4d585d91852fca51dd347faed92816839.tar.bz2 manaverse-f47097a4d585d91852fca51dd347faed92816839.tar.xz manaverse-f47097a4d585d91852fca51dd347faed92816839.zip |
eathena: impliment packet SMSG_CHAT_ROOM_SETTINGS.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r-- | src/actormanager.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 954fe087f..cabd8fba1 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1832,3 +1832,26 @@ void ActorManager::removeRoom(const int chatId) } } } + +void ActorManager::updateRoom(const ChatObject *const newChat) +{ + if (!newChat) + return; + + for_actors + { + ActorSprite *const actor = *it; + if (actor && actor->getType() != ActorType::Player) + { + Being *const being = static_cast<Being*>(actor); + ChatObject *const chat = being->getChat(); + if (chat && chat->chatId == newChat->chatId) + { + chat->ownerId = newChat->ownerId; + chat->maxUsers = newChat->maxUsers; + chat->type = newChat->type; + chat->title = newChat->title; + } + } + } +} |