forked from MagicBane/Server
various console error fixes
This commit is contained in:
@@ -34,10 +34,15 @@ public class ModTableEntry {
|
||||
|
||||
itemTableEntryList = LootManager._modTables.get(modTablwe);
|
||||
|
||||
for (ModTableEntry iteration : itemTableEntryList)
|
||||
if(itemTableEntryList == null)
|
||||
return null;
|
||||
|
||||
for (ModTableEntry iteration : itemTableEntryList) {
|
||||
if (iteration == null)
|
||||
continue;
|
||||
if (roll >= iteration.minRoll && roll <= iteration.maxRoll)
|
||||
modTableEntry = iteration;
|
||||
|
||||
}
|
||||
return modTableEntry;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class Bounds {
|
||||
//player is inside building region, skip collision check. we only do collision from the outside.
|
||||
if (player.region != null && player.region.parentBuildingID == building.getObjectUUID())
|
||||
continue;
|
||||
if (building.getBounds().colliders == null)
|
||||
if (building.getBounds() == null || building.getBounds().colliders == null)
|
||||
continue;
|
||||
|
||||
for (Colliders collider : building.getBounds().colliders) {
|
||||
|
||||
@@ -155,7 +155,9 @@ public class MobAI {
|
||||
public static void AttackBuilding(Mob mob, Building target) {
|
||||
|
||||
try {
|
||||
|
||||
if(target == null){
|
||||
return;
|
||||
}
|
||||
if (target.getRank() == -1 || !target.isVulnerable() || BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) {
|
||||
mob.setCombatTarget(null);
|
||||
return;
|
||||
@@ -202,6 +204,7 @@ public class MobAI {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
mob.setCombatTarget(null);
|
||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackBuilding" + " " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
return false;
|
||||
|
||||
// Check if contract can be slotted in this building
|
||||
Logger.error("inserting contract: " + contract.getContractID());
|
||||
//Logger.error("inserting contract: " + contract.getContractID());
|
||||
if (contract.canSlotinBuilding(building) == false) {
|
||||
boolean override = false;
|
||||
if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) {
|
||||
@@ -152,7 +152,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Logger.error("override successful: " + contract.getContractID());
|
||||
//Logger.error("override successful: " + contract.getContractID());
|
||||
if (!BuildingManager.addHireling(building, player, zone, contract, contractItem))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user