BezneR

L2Proxy_update_2

Apr 23rd, 2021
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.60 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_gameserver
  3. Index: java/net/sf/l2j/loginserver/network/serverpackets/ServerList.java
  4. ===================================================================
  5. --- java/net/sf/l2j/loginserver/network/serverpackets/ServerList.java   (revision 12)
  6. +++ java/net/sf/l2j/loginserver/network/serverpackets/ServerList.java   (working copy)
  7. @@ -56,8 +56,16 @@
  8.                        
  9.             proxiesForGameserver.forEach(l2Proxy ->
  10.             {
  11. -               var newType = l2Proxy.isHealthy() ? ServerType.GOOD : ServerType.DOWN;                
  12. -               _servers.add(new ServerData(newType, l2Proxy.getProxyServerId(), l2Proxy.getProxyAddress().getHostAddress(), l2Proxy.getProxyPort(), gsi));
  13. +               var newType = l2Proxy.isHealthy() ? ServerType.AUTO : ServerType.DOWN;
  14. +               var proxyGsi = gsi.cloneInfo();
  15. +               proxyGsi.setPort(l2Proxy.getProxyPort());
  16. +               proxyGsi.setId(l2Proxy.getProxyServerId());
  17. +               if(gsi.getType() == ServerType.DOWN)
  18. +               {
  19. +                   proxyGsi.setDown();
  20. +                   newType = ServerType.DOWN;
  21. +               }
  22. +               _servers.add(new ServerData(newType, l2Proxy.getProxyAddress().getHostAddress(), proxyGsi));
  23.             });
  24.         }
  25.                    
  26. Index: java/net/sf/l2j/loginserver/model/GameServerInfo.java
  27. ===================================================================
  28. --- java/net/sf/l2j/loginserver/model/GameServerInfo.java   (revision 12)
  29. +++ java/net/sf/l2j/loginserver/model/GameServerInfo.java   (working copy)
  30. @@ -174,4 +174,9 @@
  31.     {
  32.         return (_gst == null) ? 0 : _gst.getPlayerCount();
  33.     }
  34. +  
  35. +   public GameServerInfo cloneInfo()
  36. +   {
  37. +       return new GameServerInfo(_id, _hexId, _gst);
  38. +   }
  39.  }
  40. \ No newline at end of file
  41.  
Advertisement
Add Comment
Please, Sign In to add comment