godLevel is now set and used

This commit is contained in:
Treeku
2014-04-13 13:17:23 +01:00
parent 33614f4c48
commit b436353904
10 changed files with 279 additions and 262 deletions
+16 -1
View File
@@ -44,7 +44,7 @@ import engine.resources.scene.Planet;
import engine.resources.scene.Point3D;
import engine.resources.scene.Quaternion;
@Persistent(version=10)
@Persistent(version=11)
public class PlayerObject extends IntangibleObject {
// PLAY 3
@@ -140,6 +140,8 @@ public class PlayerObject extends IntangibleObject {
private SurveyTool lastUsedSurveyTool;
private ResourceContainerObject recentContainer;
private byte godLevel = 0;
public PlayerObject() {
super();
messageBuilder = new PlayerMessageBuilder(this);
@@ -849,4 +851,17 @@ public class PlayerObject extends IntangibleObject {
{
return this.lotsRemaining;
}
public byte getGodLevel() {
return godLevel;
}
public void setGodLevel(int godLevel) {
this.godLevel = (byte) godLevel;
if (getContainer() != null) {
getContainer().getClient().getSession().write(messageBuilder.buildGodLevelDelta((byte) godLevel));
}
}
}