This commit is contained in:
雪风 2025-05-27 22:03:07 +08:00
parent 1a792cf446
commit 1d93fa53cd
2 changed files with 22 additions and 13 deletions

View File

@ -641,7 +641,8 @@ public class PlayerStats implements Serializable {
if (!first_login) { if (!first_login) {
int currentDsbbh = dsbbh.incrementAndGet(); // 原子自增并获取最新值 int currentDsbbh = dsbbh.incrementAndGet(); // 原子自增并获取最新值
for (AotuNpc npc : Start.aotuNpcs) { for (AotuNpc npc : Start.aotuNpcs) {
Start.executor.schedule(() -> dsnpcfw(chra, npc, currentDsbbh), npc.getTime(), TimeUnit.MILLISECONDS); // Start.executor.schedule(() -> dsnpcfw(chra, npc, currentDsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
dsnpcfw(chra, npc, currentDsbbh);
} }
} }

View File

@ -13,9 +13,9 @@ public class AotuNpc {
int lv; int lv;
String mapId; String mapId="";
String noMapId; String noMapId="";
int itemId; int itemId;
@ -107,22 +107,30 @@ public class AotuNpc {
if (mapIdList ==null ){ if (mapIdList ==null ){
mapIdList =new ArrayList<>(); mapIdList =new ArrayList<>();
nomapIdList =new ArrayList<>(); nomapIdList =new ArrayList<>();
String[] split = this.mapId.split(",");
for (String s : split) { if (!this.mapId.isEmpty()) {
mapIdList.add(Integer.parseInt(s)); String[] split = this.mapId.split(",");
for (String s : split) {
mapIdList.add(Integer.parseInt(s));
}
} }
String[] split1 = this.noMapId.split(",");
for (String s : split1) { if (!this.noMapId.isEmpty()) {
nomapIdList.add(Integer.parseInt(s)); String[] split = this.noMapId.split(",");
for (String s : split) {
nomapIdList.add(Integer.parseInt(s));
}
} }
} }
for (Integer i : mapIdList) {
if (i == mapId){ for (Integer i : nomapIdList) {
if (i == mapId ){
return false; return false;
} }
} }
for (Integer i : nomapIdList) {
if (i == mapId){ for (Integer i : mapIdList) {
if (i == mapId|| i == 0){
return true; return true;
} }
} }