Browse Source

Must wait for a mine window to close to change your guild's WOO to it.

master
MagicBot 2 years ago
parent
commit
dab9097680
  1. 14
      src/engine/net/client/handlers/MineWindowChangeHandler.java

14
src/engine/net/client/handlers/MineWindowChangeHandler.java

@ -64,7 +64,8 @@ public class MineWindowChangeHandler extends AbstractClientMsgHandler {
return true; return true;
Guild mineGuild = treeOfLife.getGuild(); Guild mineGuild = treeOfLife.getGuild();
if (mineGuild == null)
if (mineGuild.isErrant())
return true; return true;
if (!Guild.sameGuild(mineGuild, playerCharacter.getGuild())) if (!Guild.sameGuild(mineGuild, playerCharacter.getGuild()))
@ -85,8 +86,15 @@ public class MineWindowChangeHandler extends AbstractClientMsgHandler {
//hodge podge sanity check to make sure they don't set it before early window and is not set at late window. //hodge podge sanity check to make sure they don't set it before early window and is not set at late window.
if (newMineTime < MBServerStatics.MINE_EARLY_WINDOW && if (newMineTime < MBServerStatics.MINE_EARLY_WINDOW &&
newMineTime != MBServerStatics.MINE_LATE_WINDOW) newMineTime != MBServerStatics.MINE_LATE_WINDOW) {
return true; //invalid mine time, must be in range ErrorPopupMsg.sendErrorMsg(playerCharacter, "Mine time is outside the NA Woo window.");
return true;
}
if (newMineTime <= LocalDateTime.now().getHour()) {
ErrorPopupMsg.sendErrorMsg(playerCharacter, "You must first wait for that mine window to close.");
return true;
}
// Update guild mine time // Update guild mine time

Loading…
Cancel
Save