v92.7 changes

This commit is contained in:
Jgunishka 2021-08-21 18:18:41 +03:00
parent 99a4ca29b8
commit d2b6373b10
4 changed files with 25 additions and 7 deletions

View File

@ -203,6 +203,11 @@ public class GameChatAction implements V086Action, V086GameEventHandler
return; return;
} }
if(user.getGame() != user1.getGame()) {
user1.getGame().announce("User not in this game!", user1);
return;
}
if(user == clientHandler.getUser()){ if(user == clientHandler.getUser()){
user1.getGame().announce("You can't private message yourself!", user1); user1.getGame().announce("You can't private message yourself!", user1);
return; return;
@ -245,11 +250,11 @@ public class GameChatAction implements V086Action, V086GameEventHandler
//user1.getServer().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user1); //user1.getServer().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user1);
//user.getServer().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user); //user.getServer().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user);
if(user1.getGame() != null && user1.getGame() == user.getGame()){ if(user1.getGame() != null){
user1.getGame().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user1); user1.getGame().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user1);
} }
if(user.getGame() != null && user.getGame() == user1.getGame()){ if(user.getGame() != null){
user.getGame().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user); user.getGame().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user);
} }
return; return;
@ -273,6 +278,11 @@ public class GameChatAction implements V086Action, V086GameEventHandler
return; return;
} }
if(user.getGame() != user1.getGame()) {
user1.getGame().announce("User not in this game!", user1);
return;
}
if(user == clientHandler.getUser()){ if(user == clientHandler.getUser()){
user1.getGame().announce("You can't private message yourself!", user1); user1.getGame().announce("You can't private message yourself!", user1);
return; return;
@ -313,11 +323,11 @@ public class GameChatAction implements V086Action, V086GameEventHandler
//user1.getServer().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user1); //user1.getServer().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user1);
//user.getServer().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user); //user.getServer().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, false, user);
if(user1.getGame() != null && user1.getGame() == user.getGame()){ if(user1.getGame() != null){
user1.getGame().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user1); user1.getGame().announce("TO: <" + user.getName() + ">(" + user.getID() + ") <" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user1);
} }
if(user.getGame() != null && user.getGame() == user1.getGame()){ if(user.getGame() != null){
user.getGame().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user); user.getGame().announce("<" + clientHandler.getUser().getName() + "> (" + clientHandler.getUser().getID() + "): " + m, user);
} }
return; return;

View File

@ -148,6 +148,7 @@ public class GameOwnerCommandAction implements V086Action
else else
{ {
log.warn("GameOwner Command Denied: Not game owner: " + game + ": " + user + ": " + chat); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ log.warn("GameOwner Command Denied: Not game owner: " + game + ": " + user + ": " + chat); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
game.announce("GameOwner Command Error: You are not an owner!", user);
return; return;
} }
} }

View File

@ -536,6 +536,12 @@ public final class KailleraUserImpl implements KailleraUser, Executable
{ {
updateLastActivity(); updateLastActivity();
if (server.getUser(getID()) == null)
{
log.error(this + " create game failed: User don't exists!");
return null;
}
if (getStatus() == KailleraUser.STATUS_PLAYING) if (getStatus() == KailleraUser.STATUS_PLAYING)
{ {
log.warn(this + " create game failed: User status is Playing!"); //$NON-NLS-1$ log.warn(this + " create game failed: User status is Playing!"); //$NON-NLS-1$
@ -664,8 +670,9 @@ public final class KailleraUserImpl implements KailleraUser, Executable
if (status == KailleraUser.STATUS_PLAYING) if (status == KailleraUser.STATUS_PLAYING)
{ {
game.drop(this, playerNumber); //first set STATUS_IDLE and then call game.drop, otherwise if someone quit game whitout drop - game status will not change to STATUS_WAITING
setStatus(KailleraUser.STATUS_IDLE); setStatus(KailleraUser.STATUS_IDLE);
game.drop(this, playerNumber);
} }
game.quit(this, playerNumber); game.quit(this, playerNumber);

View File

@ -13,9 +13,9 @@ public final class KailleraServerReleaseInfo implements ReleaseInfo
private final int majorVersion = 0; private final int majorVersion = 0;
private final int minorVersion = 92; private final int minorVersion = 92;
private final int buildNumber = 4; private final int buildNumber = 7;
private final String releaseDate = "05-06-2021"; private final String releaseDate = "08-21-2021";
private final String licenseInfo = "Usage of this sofware is subject to the terms found in the included license"; private final String licenseInfo = "Usage of this sofware is subject to the terms found in the included license";
private final String website = "https://www.EmuLinker.org"; private final String website = "https://www.EmuLinker.org";