Clean up code & Upgrade syntax to new Java
This commit is contained in:
@@ -1033,8 +1033,7 @@ public class ItemInformationProvider {
|
||||
public Item scrollEquipWithId(Item equip, int scrollId, boolean usingWhiteScroll, int vegaItemId, boolean isGM) {
|
||||
boolean assertGM = (isGM && YamlConfig.config.server.USE_PERFECT_GM_SCROLL);
|
||||
|
||||
if (equip instanceof Equip) {
|
||||
Equip nEquip = (Equip) equip;
|
||||
if (equip instanceof Equip nEquip) {
|
||||
Map<String, Integer> stats = this.getEquipStats(scrollId);
|
||||
|
||||
if (((nEquip.getUpgradeSlots() > 0 || ItemConstants.isCleanSlate(scrollId))) || assertGM) {
|
||||
|
||||
@@ -112,8 +112,7 @@ public class MapFactory {
|
||||
|
||||
private static void loadLifeRaw(MapleMap map, int id, String type, int cy, int f, int fh, int rx0, int rx1, int x, int y, int hide, int mobTime, int team) {
|
||||
AbstractLoadedLife myLife = loadLife(id, type, cy, f, fh, rx0, rx1, x, y, hide);
|
||||
if (myLife instanceof Monster) {
|
||||
Monster monster = (Monster) myLife;
|
||||
if (myLife instanceof Monster monster) {
|
||||
|
||||
if (mobTime == -1) { //does not respawn, force spawn once
|
||||
map.spawnMonster(monster);
|
||||
|
||||
@@ -1650,8 +1650,7 @@ public class MapleMap {
|
||||
objectRLock.lock();
|
||||
try {
|
||||
for (Object ob : list) {
|
||||
if (ob instanceof MapObject) {
|
||||
MapObject mmo = (MapObject) ob;
|
||||
if (ob instanceof MapObject mmo) {
|
||||
|
||||
if (mapobjects.containsValue(mmo) && mmo.getType() == MapObjectType.REACTOR) {
|
||||
listObjects.add(mmo);
|
||||
|
||||
Reference in New Issue
Block a user