Browse Source

players removed when leaving mines

lakebane-master
FatBoy-DOTC 11 months ago
parent
commit
545796e297
  1. 19
      src/engine/objects/Mine.java

19
src/engine/objects/Mine.java

@ -632,29 +632,20 @@ public class Mine extends AbstractGameObject { @@ -632,29 +632,20 @@ public class Mine extends AbstractGameObject {
this.dividedPlayers = new HashMap<>();
for(Integer playerID : this._playerMemory){
player = PlayerCharacter.getFromCache(playerID);
Guild guild = player.getGuild();
Guild nation = guild.getNation();
Guild entry;
if(nation.equals(Guild.getErrantGuild())){
entry = nation;
}else if(guild.equals(Guild.getErrantGuild())){
entry = guild;
} else{
entry = Guild.getErrantGuild();
}
if(this.dividedPlayers.containsKey(entry)){
this.dividedPlayers.get(entry).add(playerID);
Guild nation = player.getGuild().getNation(); Guild entry;
if(this.dividedPlayers.containsKey(nation)){
this.dividedPlayers.get(nation).add(playerID);
}else{
ArrayList<Integer> newEntry = new ArrayList<>();
newEntry.add(playerID);
this.dividedPlayers.put(entry,newEntry);
this.dividedPlayers.put(nation,newEntry);
}
}
if(updated == true){
for(Integer playerID : this._playerMemory){
player = PlayerCharacter.getFromCache(playerID);
for(Guild present : this.dividedPlayers.keySet()) {
ChatManager.chatSystemInfo(player,present.getName() + "COUNT: " + this.dividedPlayers.get(present).size() + " (" + (this.dividedPlayers.get(present).size()/this.totalPlayers * 100) + "%)");
ChatManager.chatSystemInfo(player,present.getName() + "COUNT: " + this.dividedPlayers.get(present).size());
}
}
}

Loading…
Cancel
Save