fix: 가오픈 명령과 GAME WALL 시간 경계 회귀 수정
This commit is contained in:
@@ -67,6 +67,7 @@ const buildAuth = (id: string, displayName: string, legacyMemberNo: number): Gam
|
||||
any: {
|
||||
ban: { expire: 4_102_444_800, value: 1 },
|
||||
expired: { expire: 1, value: 9 },
|
||||
expiredWall: { expire: Date.parse('2026-08-01T00:00:00.000Z') / 1000, value: 9 },
|
||||
},
|
||||
hwe: {
|
||||
ban: { expire: 4_102_444_800, value: 2 },
|
||||
@@ -149,8 +150,9 @@ integration('generic general creation through the durable turn daemon', () => {
|
||||
await seedScenarioToDatabase({
|
||||
scenarioId: 2,
|
||||
databaseUrl: databaseUrl!,
|
||||
now: new Date('2099-07-30T12:00:00.000Z'),
|
||||
now: new Date('2026-07-30T12:00:00.000Z'),
|
||||
installOptions: {
|
||||
openAt: new Date(Date.now() + 86_400_000),
|
||||
turnTermMinutes: 5,
|
||||
npcMode: 0,
|
||||
showImgLevel: 3,
|
||||
@@ -289,6 +291,7 @@ integration('generic general creation through the durable turn daemon', () => {
|
||||
},
|
||||
});
|
||||
expect(created.affinity).toBeGreaterThanOrEqual(1);
|
||||
expect(created.penalty).toEqual({ ban: 2, chat: 3 });
|
||||
expect(created.affinity).toBeLessThanOrEqual(150);
|
||||
expect(created.meta).toMatchObject({
|
||||
createdBy: 'join',
|
||||
@@ -305,6 +308,9 @@ integration('generic general creation through the durable turn daemon', () => {
|
||||
throw new Error('created general must have an initial access timestamp');
|
||||
}
|
||||
expect(createdAccess.lastRefresh).toEqual(acceptedEvent.createdAt);
|
||||
expect(acceptedEvent.processingGameTick).toBeLessThan(0n);
|
||||
expect(created.turnTick).toBeGreaterThanOrEqual(0n);
|
||||
expect(await db.worldState.findFirst()).toMatchObject({ clockPhase: 'PREOPEN', clockTick: 0n });
|
||||
expect(
|
||||
new Date((created.meta as Record<string, unknown>).prestart_delete_after as string).getTime() -
|
||||
acceptedEvent.createdAt.getTime()
|
||||
|
||||
@@ -379,7 +379,7 @@ integration('mode 1 NPC possession through token reservation and the durable dae
|
||||
attempts: 1,
|
||||
actorUserId: userId,
|
||||
});
|
||||
expect(access.lastRefresh?.getTime()).toBe(runtime!.world.getGameNow(event.createdAt).getTime());
|
||||
expect(access.lastRefresh?.getTime()).toBe(event.createdAt.getTime());
|
||||
const logs = await db.logEntry.findMany({
|
||||
where: {
|
||||
OR: [
|
||||
@@ -671,7 +671,7 @@ integration('mode 1 NPC possession through token reservation and the durable dae
|
||||
|
||||
await db.npcSelectionToken.update({
|
||||
where: { ownerUserId: rejectedUserId },
|
||||
data: { validUntil: new Date('2000-01-01T00:00:00.000Z') },
|
||||
data: { validUntilTick: -1n },
|
||||
});
|
||||
await expect(
|
||||
appRouter.createCaller(buildContext('npc-possession-reject-expired', rejectedAuth)).join.possessGeneral({
|
||||
|
||||
@@ -142,8 +142,9 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
|
||||
await seedScenarioToDatabase({
|
||||
scenarioId: 903,
|
||||
databaseUrl: databaseUrl!,
|
||||
now: new Date('2099-07-30T12:00:00.000Z'),
|
||||
now: new Date('2026-07-30T12:00:00.000Z'),
|
||||
installOptions: {
|
||||
openAt: new Date(Date.now() + 86_400_000),
|
||||
turnTermMinutes: 5,
|
||||
npcMode: 2,
|
||||
showImgLevel: 3,
|
||||
@@ -274,6 +275,9 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
|
||||
status: 'SUCCEEDED',
|
||||
result: { type: 'selectPoolCreate', ok: true, generalId: initial.id },
|
||||
});
|
||||
expect(acceptedEvent.processingGameTick).toBeLessThan(0n);
|
||||
expect(initial.turnTick).toBeGreaterThanOrEqual(0n);
|
||||
expect(await db.worldState.findFirst()).toMatchObject({ clockPhase: 'PREOPEN', clockTick: 0n });
|
||||
if (!initialAccess.lastRefresh) {
|
||||
throw new Error('selected general must have an initial access timestamp');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user