getRestartRegion() not work properly
Issue #256
new
In MapRegionManager.java getTeleToLocation() should return a specific location if player race matchs BannedRace of the region. For example Dark Elf should return Dark Elf Village if they're trying to escape from Elf Village.
Comments (3)
-
reporter -
reporter I make a Region based workaround here
// Get the nearest town try { L2RespawnZone zone = ZoneManager.getInstance().getZone(activeChar, L2RespawnZone.class); if (zone != null) { return getRestartRegion(activeChar, zone.getRespawnPoint((L2PcInstance) activeChar)).getSpawnLoc(); } if (getMapRegion(activeChar).getBannedRace().containsKey(activeChar.getRace())) { return _regions.get(getMapRegion(activeChar).getBannedRace().get(activeChar.getRace())).getSpawnLoc(); } return getMapRegion(activeChar).getSpawnLoc(); } catch (Exception e) { // Port to the default respawn if no closest town found. return _regions.get(defaultRespawn).getSpawnLoc(); }
-
Nice ty
- Log in to comment
Forum Link