Merge remote-tracking branch 'origin/master' into LootSystem

Conflicts:
	src/main/NGECore.java
	src/services/DevService.java
This commit is contained in:
CharonInferar
2014-04-10 00:38:13 +02:00
22 changed files with 580 additions and 1776 deletions
@@ -22,7 +22,6 @@
package resources.objects.creature;
import java.lang.System;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@@ -63,6 +62,7 @@ import engine.resources.objects.SWGObject;
import engine.resources.scene.Planet;
import engine.resources.scene.Point3D;
import engine.resources.scene.Quaternion;
import resources.objects.player.PlayerObject;
import resources.objects.tangible.TangibleObject;
import resources.objects.weapon.WeaponObject;
@@ -1777,6 +1777,11 @@ public class CreatureObject extends TangibleObject implements IPersistent {
return 0L;
}
public PlayerObject getPlayerObject()
{
return (PlayerObject) this.getSlottedObject("ghost");
}
//public float getCooldown(String cooldownGroup) {
//return ((float) getCooldown(cooldownGroup) / (float) 1000);
//}
+29 -1
View File
@@ -45,7 +45,7 @@ import engine.resources.scene.Planet;
import engine.resources.scene.Point3D;
import engine.resources.scene.Quaternion;
@Persistent(version=9)
@Persistent(version=10)
public class PlayerObject extends IntangibleObject {
// PLAY 3
@@ -127,6 +127,8 @@ public class PlayerObject extends IntangibleObject {
private String holoEmote;
private int holoEmoteUses;
private int lotsRemaining = 10;
@NotPersistent
private PlayerMessageBuilder messageBuilder;
@@ -822,4 +824,30 @@ public class PlayerObject extends IntangibleObject {
public void setRecentContainer(ResourceContainerObject recentContainer) {
this.recentContainer = recentContainer;
}
public void setLotsRemaining(int amount)
{
this.lotsRemaining = amount;
}
public boolean addLots(int amount)
{
this.lotsRemaining += amount;
return true;
}
public boolean deductLots(int amount)
{
if(this.lotsRemaining - amount > 0)
{
this.lotsRemaining -= amount;
return true;
}
return false;
}
public int getLotsRemaining()
{
return this.lotsRemaining;
}
}