summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp23
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;
+ }
+ }
+ }
+}