Move some Client#forceDisconnect calls to TransitionService

This commit is contained in:
P0nk
2023-08-11 22:00:33 +02:00
parent cd75e85bec
commit f33df59f49
7 changed files with 53 additions and 27 deletions

View File

@@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package client;
import config.YamlConfig;
import constants.game.GameConstants;
import constants.id.MapId;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
@@ -1092,22 +1091,6 @@ public class Client extends ChannelInboundHandlerAdapter {
return disconnect;
}
public void checkChar(int accid) { /// issue with multiple chars from same account login found by shavit, resinate
if (!YamlConfig.config.server.USE_CHARACTER_ACCOUNT_CHECK) {
return;
}
for (World w : Server.getInstance().getWorlds()) {
for (Character chr : w.getPlayerStorage().getAllCharacters()) {
if (accid == chr.getAccountID()) {
log.warn("Chr {} has been removed from world {}. Possible Dupe attempt.", chr.getName(), GameConstants.WORLD_NAMES[w.getId()]);
chr.getClient().forceDisconnect();
w.getPlayerStorage().removePlayer(chr.getId());
}
}
}
}
public void lockClient() {
lock.lock();
}