Move SoulNetwork to UUID system

*Should* work correctly. As for all major changes, needs to be
thoroughly tested.
This commit is contained in:
Nick 2015-12-28 20:13:11 -08:00
parent 8edb8a45e6
commit 24058d7350
14 changed files with 112 additions and 49 deletions

View file

@ -54,16 +54,16 @@ public class ItemBloodOrb extends ItemBindable implements IBloodOrb, IBindable {
if (PlayerHelper.isFakePlayer(player))
return stack;
if (Strings.isNullOrEmpty(stack.getTagCompound().getString(Constants.NBT.OWNER_NAME)))
if (Strings.isNullOrEmpty(stack.getTagCompound().getString(Constants.NBT.OWNER_UUID)))
return stack;
if (world.isRemote)
return stack;
if (stack.getTagCompound().getString(Constants.NBT.OWNER_NAME).equals(PlayerHelper.getUsernameFromPlayer(player)))
NetworkHelper.setMaxOrb(NetworkHelper.getSoulNetwork(stack.getTagCompound().getString(Constants.NBT.OWNER_NAME), world), getOrbLevel(stack.getItemDamage()));
if (stack.getTagCompound().getString(Constants.NBT.OWNER_UUID).equals(PlayerHelper.getUsernameFromPlayer(player)))
NetworkHelper.setMaxOrb(NetworkHelper.getSoulNetwork(stack.getTagCompound().getString(Constants.NBT.OWNER_UUID), world), getOrbLevel(stack.getItemDamage()));
NetworkHelper.getSoulNetwork(stack.getTagCompound().getString(Constants.NBT.OWNER_NAME), world).addLifeEssence(200, getMaxEssence(stack.getItemDamage()));
NetworkHelper.getSoulNetwork(stack.getTagCompound().getString(Constants.NBT.OWNER_UUID), world).addLifeEssence(200, getMaxEssence(stack.getItemDamage()));
hurtPlayer(player, 200);
return stack;
}