Browse Source

Comment and clarity cleanup.

master
MagicBot 2 years ago
parent
commit
e31f320b45
  1. 12
      src/engine/objects/Mine.java
  2. 9
      src/engine/workthreads/HourlyJobThread.java

12
src/engine/objects/Mine.java

@ -20,13 +20,9 @@ package engine.objects; @@ -20,13 +20,9 @@ package engine.objects;
import engine.Enum;
import engine.InterestManagement.WorldGrid;
import engine.db.archive.DataWarehouse;
import engine.db.archive.MineRecord;
import engine.gameManager.*;
import engine.net.ByteBufferWriter;
import engine.net.DispatchMessage;
import engine.net.client.msg.ErrorPopupMsg;
import engine.net.client.msg.chat.ChatSystemMsg;
import engine.server.MBServerStatics;
import org.pmw.tinylog.Logger;
@ -381,7 +377,11 @@ public class Mine extends AbstractGameObject { @@ -381,7 +377,11 @@ public class Mine extends AbstractGameObject {
this.buildingID = buildingID;
}
public static boolean validClaimer(PlayerCharacter playerCharacter) {
public static boolean validateClaimer(PlayerCharacter playerCharacter) {
// Method validates that the claimer meets
// all the requirements to claim; landed
// guild with a warehouse, etc.
Guild playerGuild;
@ -491,7 +491,7 @@ public class Mine extends AbstractGameObject { @@ -491,7 +491,7 @@ public class Mine extends AbstractGameObject {
if (claimer == null)
return false;
if (!validClaimer(claimer))
if (!validateClaimer(claimer))
return false;
if (!this.isActive) {

9
src/engine/workthreads/HourlyJobThread.java

@ -237,8 +237,8 @@ public class HourlyJobThread implements Runnable { @@ -237,8 +237,8 @@ public class HourlyJobThread implements Runnable {
return false;
}
// Mine building still stands.
// It was never knocked down
// Mine building still stands; nothing to do.
// We can early exit here.
if (mineBuilding.getRank() > 0) {
mine.setActive(false);
@ -250,16 +250,13 @@ public class HourlyJobThread implements Runnable { @@ -250,16 +250,13 @@ public class HourlyJobThread implements Runnable {
// we will therefore set it to errant
// and keep the window open.
if (!Mine.validClaimer(mine.lastClaimer)) {
if (!Mine.validateClaimer(mine.lastClaimer)) {
mine.lastClaimer = null;
mine.updateGuildOwner(null);
mine.setActive(true);
return false;
}
if (mine.getOwningGuild().isEmptyGuild() || mine.getOwningGuild().getNation().isEmptyGuild())
return false;
//Update ownership to map
mine.guildName = mine.getOwningGuild().getName();

Loading…
Cancel
Save