Merge pull request #149 from Nemesis-/pre-beta

Fixes few bugs (Hope it went right this time)
This commit is contained in:
CodeForFame 2012-05-08 10:26:51 -07:00
commit bbacb63801
3 changed files with 16 additions and 3 deletions

View File

@ -132,7 +132,20 @@ public class Formulae {
}
return 1.0D;
}
public static int[] getBoltIDs() {
final int[] freeBolts = {190};
if(!Config.members) {
return freeBolts;
}
return boltIDs;
}
public static int[] getArrowIDs() {
final int[] freeArrows = {11};
if(!Config.members) {
return freeArrows;
}
return boltIDs;
}
/**
* Returns a power to assosiate with each arrow
*/

View File

@ -92,7 +92,7 @@ public class RangeEvent extends DelayedEvent {
}
boolean xbow = DataConversions.inArray(Formulae.xbowIDs, bowID);
int arrowID = -1;
for (int aID : (xbow ? Formulae.boltIDs : Formulae.arrowIDs)) {
for (int aID : (xbow ? Formulae.getBoltIDs() : Formulae.getArrowIDs())) {
int slot = owner.getInventory().getLastIndexById(aID);
if (slot < 0) {
continue;

View File

@ -351,7 +351,7 @@ public class Npc extends Mob {
|| !p.nextTo(this)
|| !p.getLocation().inBounds(loc.minX - 4,
loc.minY - 4, loc.maxX + 4,
loc.maxY + 4)) {
loc.maxY + 4) || GameEngine.getTime() - p.getLastPing() > 60000) {
continue;
}