Added GroupChat, PlanetChat, and basic chat channels

This commit is contained in:
Waverunner
2014-04-16 16:52:11 -04:00
parent 9bed860429
commit ff6c2d7d4c
13 changed files with 258 additions and 65 deletions
+13
View File
@@ -83,6 +83,7 @@ import resources.common.collidables.AbstractCollidable;
import resources.datatables.PlayerFlags;
import resources.datatables.Posture;
import services.ai.LairActor;
import services.chat.ChatRoom;
import toxi.geom.Line3D;
import toxi.geom.Ray3D;
import toxi.geom.Vec3D;
@@ -837,6 +838,18 @@ public class SimulationService implements INetworkDispatch {
if(object.getPosture() == Posture.Dead)
core.playerService.sendCloningWindow(object, false);
ChatRoom zoneRoom = core.chatService.getChatRoomByAddress("SWG." + core.getGalaxyName() + "." + object.getPlanet().getName() + ".Planet");
if (zoneRoom != null) {
String chatName = object.getCustomName().toLowerCase();
if (chatName.contains(" "))
chatName = chatName.split(" ")[0];
if (!zoneRoom.getUserList().contains(chatName)) {
core.chatService.joinChatRoom(chatName, zoneRoom.getRoomId(), true);
}
}
}
public void transferToPlanet(SWGObject object, Planet planet, Point3D newPos, Quaternion newOrientation, SWGObject newParent) {