Turn map id magic numbers into constants

This commit is contained in:
P0nk
2021-11-07 14:26:34 +01:00
parent c022c3595f
commit b15a7e61d4
51 changed files with 615 additions and 341 deletions

View File

@@ -24,6 +24,7 @@ package client;
import client.inventory.InventoryType;
import config.YamlConfig;
import constants.game.GameConstants;
import constants.id.MapId;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.timeout.IdleStateEvent;
@@ -930,7 +931,7 @@ public class Client extends ChannelInboundHandlerAdapter {
if (player.getMap() != null) {
int mapId = player.getMapId();
player.getMap().removePlayer(player);
if (GameConstants.isDojo(mapId)) {
if (MapId.isDojo(mapId)) {
this.getChannelServer().freeDojoSectionIfEmpty(mapId);
}
}