Last active
June 16, 2020 18:01
-
-
Save LeonanCarvalho/4681f543399924d093524fa8ac0ec8bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FROM gameserver/server.jar!/l2/gameserver/network/l2/c2s/CharacterSelected.class | |
protected void runImpl() { | |
//... | |
if (Config.ALT_LIMIT_HWID_WINDOW != 0 && !StringUtils.isEmpty(var1.getHwid())) { | |
//You could simple check if the account is premium and byypass here... | |
int hwidCount = 0; | |
Iterator AllPlayers = GameObjectsStorage.getAllPlayersForIterate().iterator(); | |
while(AllPlayers.hasNext()) { | |
Player tPlayer = (Player)AllPlayers.next(); | |
if (tPlayer != null && !tPlayer.isLogoutStarted()) { | |
GameClient tGClient = tPlayer.getNetConnection(); | |
//Or.... | |
//ByPass premium from window verification, or check if the bonus service allows to bypass, or window extra counting, something else | |
//Some configs could be implemented | |
if(!tPlayer.isPremiumWindow()){ //TODO: Implement on Player Class the method isPremiumWindow() bool or someting else as did on startBonusTask method | |
if (tGClient != null && tGClient.isConnected() && StringUtils.equals(PlayerGameClient.getHwid(), tGClient.getHwid())) { | |
++hwidCount; | |
} | |
} | |
} | |
} | |
if (hwidCount >= Config.ALT_LIMIT_HWID_WINDOW) { | |
this.sendPacket(new ExShowScreenMessage("The number of windows is limited by " + Config.ALT_LIMIT_HWID_WINDOW + " HWID", 10000, ScreenMessageAlign.TOP_CENTER, true)); | |
this.sendPacket(ActionFail.STATIC); | |
return; | |
} | |
} | |
//.. |
Author
LeonanCarvalho
commented
May 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment