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( owner.getActionSender().sendMessage(
"You manage to obtain some " "You manage to obtain some "
+ ore.getDef().getName() + "."); + ore.getDef().getName() + ".");
owner.setSkillLoops(0);
owner.incExp(14, def.getExp(), true); owner.incExp(14, def.getExp(), true);
owner.getActionSender().sendStat(14); owner.getActionSender().sendStat(14);
world.registerGameObject(new GameObject(object world.registerGameObject(new GameObject(object
@ -147,10 +146,12 @@ public class Mining implements ObjectListener {
world.delayedSpawnObject(newobject.getLoc(), world.delayedSpawnObject(newobject.getLoc(),
def.getRespawnTime() * 1000); def.getRespawnTime() * 1000);
} }
owner.isMining(false);
owner.setSkillLoops(0);
owner.getActionSender().sendInventory(); owner.getActionSender().sendInventory();
} else { } else {
boolean retry = false; boolean retry = false;
if (retrytime >= swings) if (retrytime - swings > 0)
retry = true; retry = true;
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
"You only succeed in scratching the rock."); "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, save.setAppearance((byte) 2, (byte) 8, (byte) 14, (byte) 0, (byte) 1,
(byte) 2, true, 0l); (byte) 2, true, 0l);
int[] arrayOfOnes = new int[Config.statArray.length]; int[] exp = new int[Config.statArray.length];
Arrays.fill(arrayOfOnes, 1); Arrays.fill(exp, 1);
int[] stats = exp.clone();
save.setExp(arrayOfOnes.clone());
save.setCurStats(arrayOfOnes.clone()); exp[3] = 1200;
save.setExp(exp);
stats[3] = 10;
save.setCurStats(stats);
return save; return save;
} }