Clean up code & Upgrade syntax to new Java

This commit is contained in:
Đạt Nhân Trương
2022-08-07 01:35:02 +07:00
parent bbdf236a10
commit f983b4dccf
17 changed files with 44 additions and 61 deletions

View File

@@ -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);