Browse Source

replace == "LORE" with .equals("LORE")

combat-2
FatBoy-DOTC 7 months ago
parent
commit
10db850de4
  1. 2
      src/engine/gameManager/PowersManager.java
  2. 2
      src/engine/net/client/handlers/GroupInviteHandler.java
  3. 2
      src/engine/net/client/handlers/InviteToGuildHandler.java
  4. 2
      src/engine/net/client/handlers/InviteToSubHandler.java
  5. 2
      src/engine/net/client/handlers/LeaveGuildHandler.java
  6. 2
      src/engine/net/client/handlers/SendSummonsMsgHandler.java
  7. 14
      src/engine/objects/City.java

2
src/engine/gameManager/PowersManager.java

@ -173,7 +173,7 @@ public enum PowersManager { @@ -173,7 +173,7 @@ public enum PowersManager {
public static void usePower(final PerformActionMsg msg, ClientConnection origin,
boolean sendCastToSelf) {
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID());
PlayerCharacter caster = origin.getPlayerCharacter();
PlayerCharacter target = PlayerCharacter.getFromCache(msg.getTargetID());

2
src/engine/net/client/handlers/GroupInviteHandler.java

@ -105,7 +105,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler { @@ -105,7 +105,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler {
if (target.isIgnoringPlayer(source))
return false;
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (source.guild.equals(Guild.getErrantGuild()))
return false;

2
src/engine/net/client/handlers/InviteToGuildHandler.java

@ -125,7 +125,7 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler { @@ -125,7 +125,7 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler {
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 135);// you do not meet the level required for this SWORN guild
return true;
}
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (GuildManager.meetsLoreRequirements(sourcePlayer.guild, targetPlayer) == false) {
ChatManager.chatGuildError(sourcePlayer, targetPlayer.getFirstName() + " does not meet charter requirements!");
return true;

2
src/engine/net/client/handlers/InviteToSubHandler.java

@ -112,7 +112,7 @@ public class InviteToSubHandler extends AbstractClientMsgHandler { @@ -112,7 +112,7 @@ public class InviteToSubHandler extends AbstractClientMsgHandler {
sendChat(source, "This Guild can't be subbed.");
return true;
}
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (source.guild.getGuildType().equals(target.guild.getGuildType()) == false) {
sendChat(source, "You Must Be The Same Charter To Form A Nation.");
return true;

2
src/engine/net/client/handlers/LeaveGuildHandler.java

@ -68,7 +68,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler { @@ -68,7 +68,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler {
ChatManager.chatGuildInfo(oldGuild, playerCharacter.getFirstName() + " has left the guild.");
oldGuild.removePlayer(playerCharacter, GuildHistoryType.LEAVE);
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (GroupManager.getGroup(playerCharacter) != null)
GroupManager.getGroup(playerCharacter).removeGroupMember(playerCharacter);
}

2
src/engine/net/client/handlers/SendSummonsMsgHandler.java

@ -69,7 +69,7 @@ public class SendSummonsMsgHandler extends AbstractClientMsgHandler { @@ -69,7 +69,7 @@ public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
return true;
}
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (playerCharacter.guild.getGuildType().equals(target.guild.getGuildType()) == false) {
ChatManager.chatInfoError(playerCharacter,
"Cannot summon player outside your charter.");

14
src/engine/objects/City.java

@ -322,7 +322,7 @@ public class City extends AbstractWorldObject { @@ -322,7 +322,7 @@ public class City extends AbstractWorldObject {
if (city.open && city.getTOL() != null && city.getTOL().getRank() > 4) {
if (!BuildingManager.IsPlayerHostile(city.getTOL(), pc)) {
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (city.getGuild().getGuildType().equals(pc.guild.getGuildType())) {
cities.add(city);
}
@ -343,20 +343,20 @@ public class City extends AbstractWorldObject { @@ -343,20 +343,20 @@ public class City extends AbstractWorldObject {
if (city.isNpc == 1)
if (city.isNoobIsle == 1) {
if (pc.getLevel() < 21)
if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(pc)) {
if (ConfigManager.MB_RULESET.getValue().equals("LORE") && city.getGuild().getGuildType().canJoin(pc)) {
cities.add(city);
} else {
cities.add(city); //verify nation or guild is same
}
} else if (pc.getLevel() > 9)
if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(pc)) {
if (ConfigManager.MB_RULESET.getValue().equals("LORE") && city.getGuild().getGuildType().canJoin(pc)) {
cities.add(city);
} else {
cities.add(city); //verify nation or guild is same
}
} else if (pc.getLevel() >= g.getTeleportMin() && pc.getLevel() <= g.getTeleportMax())
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (city.getGuild().getGuildType().equals(pc.guild.getGuildType())) {
cities.add(city);
}
@ -415,13 +415,13 @@ public class City extends AbstractWorldObject { @@ -415,13 +415,13 @@ public class City extends AbstractWorldObject {
if (city.isNpc == 1)
if (city.isNoobIsle == 1) {
if (playerCharacter.getLevel() < 21)
if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(playerCharacter)) {
if (ConfigManager.MB_RULESET.getValue().equals("LORE") && city.getGuild().getGuildType().canJoin(playerCharacter)) {
cities.add(city);
} else {
cities.add(city); //verify nation or guild is same
}
} else if (playerCharacter.getLevel() > 9)
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (city.getGuild().getGuildType().equals(playerCharacter.guild.getGuildType())) {
cities.add(city);
}
@ -430,7 +430,7 @@ public class City extends AbstractWorldObject { @@ -430,7 +430,7 @@ public class City extends AbstractWorldObject {
}
} else if (playerCharacter.getLevel() >= guild.getRepledgeMin() && playerCharacter.getLevel() <= guild.getRepledgeMax()) {
if (ConfigManager.MB_RULESET.getValue() == "LORE") {
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (city.getGuild().getGuildType().equals(playerCharacter.guild.getGuildType())) {
cities.add(city);
}

Loading…
Cancel
Save