This commit is contained in:
雪风 2025-06-04 13:44:45 +08:00
parent 1d93fa53cd
commit 153d0fe5fa
1 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,7 @@ public class PlayerStats implements Serializable {
public void recalcLocalStats() {
this.recalcLocalStats(false);
}
private final AtomicInteger dsbbh = new AtomicInteger(0); // 替代 int dsbbh
private static final AtomicInteger dsbbh = new AtomicInteger(0); // 替代 int dsbbh
public void recalcLocalStats(final boolean first_login) {
final MapleCharacter chra = (MapleCharacter) this.chr.get();
if (chra == null) {
@ -641,8 +641,8 @@ public class PlayerStats implements Serializable {
if (!first_login) {
int currentDsbbh = dsbbh.incrementAndGet(); // 原子自增并获取最新值
for (AotuNpc npc : Start.aotuNpcs) {
// Start.executor.schedule(() -> dsnpcfw(chra, npc, currentDsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
dsnpcfw(chra, npc, currentDsbbh);
Start.executor.schedule(() -> dsnpcfw(chra, npc, currentDsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
// dsnpcfw(chra, npc, currentDsbbh);
}
}