forked from MagicBane/Server
Single map color stored as hex string.
This commit is contained in:
@@ -74,11 +74,11 @@ public class Realm {
|
|||||||
*/
|
*/
|
||||||
public Realm(ResultSet rs) throws SQLException, UnknownHostException {
|
public Realm(ResultSet rs) throws SQLException, UnknownHostException {
|
||||||
|
|
||||||
this.mapColor = new Color(rs.getInt("mapColor"));
|
this.mapColor = new Color(Integer.parseInt(rs.getString("realmColor"), 16));
|
||||||
this.mapR = rs.getFloat("mapR");
|
this.mapR = (float) (mapColor.getRed() * 0.00392156863);
|
||||||
this.mapG = rs.getFloat("mapG");
|
this.mapG = (float) (mapColor.getGreen() * 0.00392156863);
|
||||||
this.mapB = rs.getFloat("mapB");
|
this.mapB = (float) (mapColor.getBlue() * 0.00392156863);
|
||||||
this.mapA = rs.getFloat("mapA");
|
this.mapA = 1;
|
||||||
this.canBeClaimed = rs.getBoolean("canBeClaimed");
|
this.canBeClaimed = rs.getBoolean("canBeClaimed");
|
||||||
this.canPlaceCities = rs.getBoolean("canPlaceCities");
|
this.canPlaceCities = rs.getBoolean("canPlaceCities");
|
||||||
this.numCities = rs.getInt("numCities");
|
this.numCities = rs.getInt("numCities");
|
||||||
|
|||||||
Reference in New Issue
Block a user