summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-06 01:29:08 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-06 01:56:54 +0300
commitf47097a4d585d91852fca51dd347faed92816839 (patch)
tree9bbde1334cfeff5e6772979a917cf1909b90a36d /src/actormanager.cpp
parent3acb4aa3b1248719a3896b419600864a68c65908 (diff)
downloadManaVerse-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.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;
+ }
+ }
+ }
+}