|
|
|
@ -99,6 +99,7 @@ public enum GuildManager {
@@ -99,6 +99,7 @@ public enum GuildManager {
|
|
|
|
|
DispatchMessage.sendToAllInRange(playerCharacter, new GuildInfoMsg(playerCharacter, guild, 2)); |
|
|
|
|
|
|
|
|
|
// Send guild join message
|
|
|
|
|
|
|
|
|
|
ChatManager.chatGuildInfo(playerCharacter, |
|
|
|
|
playerCharacter.getFirstName() + " has joined the guild"); |
|
|
|
|
|
|
|
|
@ -108,44 +109,44 @@ public enum GuildManager {
@@ -108,44 +109,44 @@ public enum GuildManager {
|
|
|
|
|
// TODO update player to world
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void enterWorldMOTD(PlayerCharacter pc) { |
|
|
|
|
public static void enterWorldMOTD(PlayerCharacter playerCharacter) { |
|
|
|
|
|
|
|
|
|
Guild guild; |
|
|
|
|
Guild nation; |
|
|
|
|
|
|
|
|
|
if (pc == null) { |
|
|
|
|
if (playerCharacter == null) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
guild = pc.getGuild(); |
|
|
|
|
guild = playerCharacter.getGuild(); |
|
|
|
|
|
|
|
|
|
if (guild == null || guild.getObjectUUID() == 0) // Don't send to errant
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
// Send Guild MOTD
|
|
|
|
|
|
|
|
|
|
String motd = guild.getMOTD(); |
|
|
|
|
if (motd.length() > 0) { |
|
|
|
|
ChatManager.chatGuildMOTD(pc, motd); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!motd.isEmpty()) |
|
|
|
|
ChatManager.chatGuildMOTD(playerCharacter, motd); |
|
|
|
|
|
|
|
|
|
// Send Nation MOTD
|
|
|
|
|
|
|
|
|
|
nation = guild.getNation(); |
|
|
|
|
|
|
|
|
|
if (nation != null) { |
|
|
|
|
if (nation != null) |
|
|
|
|
if (nation.getObjectUUID() != 0) { // Don't send to errant nation
|
|
|
|
|
motd = nation.getMOTD(); |
|
|
|
|
if (motd.length() > 0) { |
|
|
|
|
ChatManager.chatNationMOTD(pc, motd); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!motd.isEmpty()) |
|
|
|
|
ChatManager.chatNationMOTD(playerCharacter, motd); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Send IC MOTD if player is IC
|
|
|
|
|
if (GuildStatusController.isInnerCouncil(pc.getGuildStatus())) { |
|
|
|
|
if (GuildStatusController.isInnerCouncil(playerCharacter.getGuildStatus())) { |
|
|
|
|
motd = guild.getICMOTD(); |
|
|
|
|
if (motd.length() > 0) { |
|
|
|
|
ChatManager.chatICMOTD(pc, motd); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!motd.isEmpty()) |
|
|
|
|
ChatManager.chatICMOTD(playerCharacter, motd); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -156,12 +157,8 @@ public enum GuildManager {
@@ -156,12 +157,8 @@ public enum GuildManager {
|
|
|
|
|
if (guild == null) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
int cityID = (city != null) ? city.getObjectUUID() : 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//update binds ingame
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (PlayerCharacter playerCharacter : Guild.GuildRoster(guild)) { |
|
|
|
|
boolean updateBindBuilding = false; |
|
|
|
|
|
|
|
|
@ -170,7 +167,6 @@ public enum GuildManager {
@@ -170,7 +167,6 @@ public enum GuildManager {
|
|
|
|
|
if (oldBoundBuilding == null || oldBoundBuilding.getBlueprint() == null || oldBoundBuilding.getBlueprint().getBuildingGroup().equals(BuildingGroup.TOL)) |
|
|
|
|
updateBindBuilding = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (updateBindBuilding) { |
|
|
|
|
Building bindBuilding = null; |
|
|
|
|
if (city != null) |
|
|
|
@ -183,7 +179,6 @@ public enum GuildManager {
@@ -183,7 +179,6 @@ public enum GuildManager {
|
|
|
|
|
playerCharacter.setBindBuildingID(bindBuilding != null ? bindBuilding.getObjectUUID() : 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -193,12 +188,9 @@ public enum GuildManager {
@@ -193,12 +188,9 @@ public enum GuildManager {
|
|
|
|
|
if (guild == null) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
for (PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) { |
|
|
|
|
|
|
|
|
|
for (PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) |
|
|
|
|
if (player.getGuild().equals(guild)) |
|
|
|
|
DispatchMessage.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Boolean meetsLoreRequirements(Guild guild, PlayerCharacter player) { |
|
|
|
|