fix(ascension): RPC ExecSpace 실측 보정 — Server=5·Client=6 (프로브 검증)
- 1은 ServerOnly(클라 호출 무시)라 저장/로드 RPC 미동작 → 5로 수정 - RecvAscension 6(Client): 서버→특정 클라 userId 라우팅 실측 확인 - 설계 문서 ExecSpace 표 갱신, 프로브 메서드 제거 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -569,7 +569,7 @@
|
||||
],
|
||||
"Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nlocal errCode, value = ds:GetAndWait(\"ascensionUnlocked\")\nlocal n = 0\nif errCode == 0 and value ~= nil and value ~= \"\" then\n\tn = tonumber(value) or 0\nend\nself:RecvAscension(n, userId)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 1,
|
||||
"ExecSpace": 5,
|
||||
"Attributes": [],
|
||||
"Name": "ReqLoadAscension"
|
||||
},
|
||||
@@ -599,7 +599,7 @@
|
||||
],
|
||||
"Code": "self.AscensionUnlocked = n\nif self.AscensionLevel > self.AscensionUnlocked then\n\tself.AscensionLevel = self.AscensionUnlocked\nend\nself:RenderAscension()",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "RecvAscension"
|
||||
},
|
||||
@@ -629,7 +629,7 @@
|
||||
],
|
||||
"Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nds:SetAndWait(\"ascensionUnlocked\", tostring(n))",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 1,
|
||||
"ExecSpace": 5,
|
||||
"Attributes": [],
|
||||
"Name": "SaveAscension"
|
||||
},
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
## 서버-클라 구조 (ExecSpace)
|
||||
|
||||
codeblock JSON ExecSpace는 플래그 (실측: Server=1·Client=2·ClientOnly=6 — Monster(1)·UIToast/MapCamera(6) 부합):
|
||||
codeblock JSON ExecSpace 실측(프로브): **Server=5**(클라→서버), **Client=6**(서버→클라·마지막 인자 userId로 특정 유저 라우팅), 1=ServerOnly(클라 호출 무시), 2=ClientOnly(서버 호출 무시). 기존 메서드의 6은 Client라 클라 호출 시 제자리 실행으로 동작 동일:
|
||||
|
||||
- `ReqLoadAscension(userId)` **[Server=1]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")` → `RecvAscension(n, userId)` 호출
|
||||
- `RecvAscension(n, userId)` **[Client=2]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더
|
||||
- `SaveAscension(n, userId)` **[Server=1]** — `SetAndWait`
|
||||
- `ReqLoadAscension(userId)` **[Server=5]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")` → `RecvAscension(n, userId)` 호출
|
||||
- `RecvAscension(n, userId)` **[Client=6]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더
|
||||
- `SaveAscension(n, userId)` **[Server=5]** — `SetAndWait`
|
||||
- 생성기의 `m.ExecSpace = 6` 일괄 적용을 "명시값(≠0)은 보존"으로 수정
|
||||
|
||||
## 적용 지점
|
||||
|
||||
@@ -2475,7 +2475,7 @@ local n = 0
|
||||
if errCode == 0 and value ~= nil and value ~= "" then
|
||||
n = tonumber(value) or 0
|
||||
end
|
||||
self:RecvAscension(n, userId)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }], 1),
|
||||
self:RecvAscension(n, userId)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }], 5),
|
||||
method('RecvAscension', `self.AscensionUnlocked = n
|
||||
if self.AscensionLevel > self.AscensionUnlocked then
|
||||
self.AscensionLevel = self.AscensionUnlocked
|
||||
@@ -2483,12 +2483,12 @@ end
|
||||
self:RenderAscension()`, [
|
||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
||||
], 2),
|
||||
], 6),
|
||||
method('SaveAscension', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
||||
ds:SetAndWait("ascensionUnlocked", tostring(n))`, [
|
||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
||||
], 1),
|
||||
], 5),
|
||||
method('AdjustAscension', `local v = self.AscensionLevel + delta
|
||||
if v < 0 then v = 0 end
|
||||
if v > self.AscensionUnlocked then v = self.AscensionUnlocked end
|
||||
|
||||
Reference in New Issue
Block a user