Resolves issue #26.

This commit is contained in:
Joe0 2011-12-16 16:36:55 -06:00
parent 5cf07057da
commit 9fdce3aeba
2 changed files with 11 additions and 8 deletions

View File

@ -138,7 +138,6 @@ public class Mining implements ObjectListener {
owner.getActionSender().sendMessage(
"You manage to obtain some "
+ ore.getDef().getName() + ".");
owner.setSkillLoops(0);
owner.incExp(14, def.getExp(), true);
owner.getActionSender().sendStat(14);
world.registerGameObject(new GameObject(object
@ -147,10 +146,12 @@ public class Mining implements ObjectListener {
world.delayedSpawnObject(newobject.getLoc(),
def.getRespawnTime() * 1000);
}
owner.isMining(false);
owner.setSkillLoops(0);
owner.getActionSender().sendInventory();
} else {
boolean retry = false;
if (retrytime >= swings)
if (retrytime - swings > 0)
retry = true;
owner.getActionSender().sendMessage(
"You only succeed in scratching the rock.");

View File

@ -168,12 +168,14 @@ class DummyStorageMedium implements StorageMedium {
save.setAppearance((byte) 2, (byte) 8, (byte) 14, (byte) 0, (byte) 1,
(byte) 2, true, 0l);
int[] arrayOfOnes = new int[Config.statArray.length];
Arrays.fill(arrayOfOnes, 1);
save.setExp(arrayOfOnes.clone());
save.setCurStats(arrayOfOnes.clone());
int[] exp = new int[Config.statArray.length];
Arrays.fill(exp, 1);
int[] stats = exp.clone();
exp[3] = 1200;
save.setExp(exp);
stats[3] = 10;
save.setCurStats(stats);
return save;
}