potential stability improvements

This commit is contained in:
ceikry 2021-07-25 18:58:15 -05:00
parent e2cc31387f
commit 04fe370603
4 changed files with 6 additions and 2 deletions

View file

@ -111,6 +111,7 @@ public final class DialogueInterpreter {
npc.getWalkingQueue().reset();
npc.getPulseManager().clear();
} catch(Exception e){
e.printStackTrace();
}
} else if (args.length < 1) {
args = new Object[] { dialogueKey };

View file

@ -97,6 +97,7 @@ public final class GrandExchangeDatabase {
}
initialized = true;
} catch (Exception e){
e.printStackTrace();
initNewDB();
}
}

View file

@ -32,6 +32,7 @@ public final class PlayerParser {
}
return true;
} catch (Exception e){
e.printStackTrace();
return false;
}
}
@ -58,7 +59,7 @@ public final class PlayerParser {
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
} catch (Exception ignored){
} catch (Exception e){ e.printStackTrace();
} finally {
try {
assert is != null;
@ -67,6 +68,7 @@ public final class PlayerParser {
os.close();
} catch (Exception f){
SystemLogger.logWarn("Unable to close file copiers in PlayerParser.java line 216.");
f.printStackTrace();
}
}
}

View file

@ -184,7 +184,7 @@ class MiningSkillPulse(private val player: Player, private val node: Node) : Pul
altered = true
}
if (RandomFunction.roll(chance)) {
val gem = RandomFunction.rollChanceTable(true, *GEM_REWARDS)[0]
val gem = GEM_REWARDS.random()
player.packetDispatch.sendMessage("You find a " + gem.name + "!")
if (!player.inventory.add(gem, player)) {
player.packetDispatch.sendMessage("You do not have enough space in your inventory, so you drop the gem on the floor.")