Added Enter & Leave Messages for ChatRooms as well as info stats for the

room
This commit is contained in:
Waverunner
2014-04-17 16:01:12 -04:00
parent 8379c2f87b
commit 9252ebaaea
9 changed files with 245 additions and 23 deletions
+10
View File
@@ -57,6 +57,7 @@ import resources.common.collidables.AbstractCollidable;
import resources.datatables.PlayerFlags;
import resources.objects.creature.CreatureObject;
import resources.objects.player.PlayerObject;
import services.chat.ChatRoom;
@SuppressWarnings("unused")
@@ -239,6 +240,14 @@ public class ConnectionService implements INetworkDispatch {
}
core.chatService.playerStatusChange(objectShortName, (byte) 0);
for (Integer roomId : ghost.getJoinedChatChannels()) {
ChatRoom room = core.chatService.getChatRoom(roomId.intValue());
if (room != null) { core.chatService.leaveChatRoom(object, roomId.intValue()); }
// work-around for any channels that may have been deleted, or only spawn on server startup, that were added to the joined channels
else { ghost.removeChannel(roomId); }
}
}
long parentId = object.getParentId();
@@ -260,6 +269,7 @@ public class ConnectionService implements INetworkDispatch {
observerClient.getParent().makeUnaware(object);
}
}*/
ghost.toggleFlag(PlayerFlags.LD);
object.setPerformanceListenee(null);