mirror of
https://bitbucket.org/projectswg/pswgcommon.git
synced 2026-01-15 22:04:33 -05:00
Fixed some long-overdue modernization of LoginClusterStatus and LoginEnumCluster
This commit is contained in:
@@ -26,23 +26,32 @@
|
||||
***********************************************************************************/
|
||||
package com.projectswg.common.network.packets.swg.login;
|
||||
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import com.projectswg.common.data.encodables.galaxy.Galaxy;
|
||||
import com.projectswg.common.network.NetBuffer;
|
||||
import com.projectswg.common.network.packets.SWGPacket;
|
||||
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class LoginClusterStatus extends SWGPacket {
|
||||
|
||||
public static final int CRC = getCrc("LoginClusterStatus");
|
||||
|
||||
private Vector <Galaxy> galaxies;
|
||||
private List<Galaxy> galaxies;
|
||||
|
||||
public LoginClusterStatus() {
|
||||
galaxies = new Vector<Galaxy>();
|
||||
galaxies = new ArrayList<>();
|
||||
}
|
||||
|
||||
public LoginClusterStatus(List<Galaxy> galaxies) {
|
||||
this.galaxies = new ArrayList<>(galaxies);
|
||||
}
|
||||
|
||||
public LoginClusterStatus(NetBuffer data) {
|
||||
galaxies = new ArrayList<>();
|
||||
decode(data);
|
||||
}
|
||||
|
||||
public void decode(NetBuffer data) {
|
||||
@@ -96,7 +105,7 @@ public class LoginClusterStatus extends SWGPacket {
|
||||
galaxies.add(g);
|
||||
}
|
||||
|
||||
public List <Galaxy> getGalaxies() {
|
||||
public List<Galaxy> getGalaxies() {
|
||||
return galaxies;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,11 @@ public class LoginEnumCluster extends SWGPacket {
|
||||
galaxies = new Vector<Galaxy>();
|
||||
}
|
||||
|
||||
public LoginEnumCluster(List<Galaxy> galaxies, int maxCharacters) {
|
||||
this.galaxies = new Vector<Galaxy>(galaxies);
|
||||
this.maxCharacters = maxCharacters;
|
||||
}
|
||||
|
||||
public LoginEnumCluster(int maxCharacters) {
|
||||
galaxies = new Vector<Galaxy>();
|
||||
this.maxCharacters = maxCharacters;
|
||||
|
||||
Reference in New Issue
Block a user