feat(ascension): 승천 시스템 A1~A10 + UserDataStorage 개인 저장 (배포 퀄리티 P11) #46
@@ -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)",
|
"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,
|
"Scope": 2,
|
||||||
"ExecSpace": 1,
|
"ExecSpace": 5,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
"Name": "ReqLoadAscension"
|
"Name": "ReqLoadAscension"
|
||||||
},
|
},
|
||||||
@@ -599,7 +599,7 @@
|
|||||||
],
|
],
|
||||||
"Code": "self.AscensionUnlocked = n\nif self.AscensionLevel > self.AscensionUnlocked then\n\tself.AscensionLevel = self.AscensionUnlocked\nend\nself:RenderAscension()",
|
"Code": "self.AscensionUnlocked = n\nif self.AscensionLevel > self.AscensionUnlocked then\n\tself.AscensionLevel = self.AscensionUnlocked\nend\nself:RenderAscension()",
|
||||||
"Scope": 2,
|
"Scope": 2,
|
||||||
"ExecSpace": 2,
|
"ExecSpace": 6,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
"Name": "RecvAscension"
|
"Name": "RecvAscension"
|
||||||
},
|
},
|
||||||
@@ -629,7 +629,7 @@
|
|||||||
],
|
],
|
||||||
"Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nds:SetAndWait(\"ascensionUnlocked\", tostring(n))",
|
"Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nds:SetAndWait(\"ascensionUnlocked\", tostring(n))",
|
||||||
"Scope": 2,
|
"Scope": 2,
|
||||||
"ExecSpace": 1,
|
"ExecSpace": 5,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
"Name": "SaveAscension"
|
"Name": "SaveAscension"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
## 서버-클라 구조 (ExecSpace)
|
## 서버-클라 구조 (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)` 호출
|
- `ReqLoadAscension(userId)` **[Server=5]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")` → `RecvAscension(n, userId)` 호출
|
||||||
- `RecvAscension(n, userId)` **[Client=2]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더
|
- `RecvAscension(n, userId)` **[Client=6]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더
|
||||||
- `SaveAscension(n, userId)` **[Server=1]** — `SetAndWait`
|
- `SaveAscension(n, userId)` **[Server=5]** — `SetAndWait`
|
||||||
- 생성기의 `m.ExecSpace = 6` 일괄 적용을 "명시값(≠0)은 보존"으로 수정
|
- 생성기의 `m.ExecSpace = 6` 일괄 적용을 "명시값(≠0)은 보존"으로 수정
|
||||||
|
|
||||||
## 적용 지점
|
## 적용 지점
|
||||||
|
|||||||
@@ -2475,7 +2475,7 @@ local n = 0
|
|||||||
if errCode == 0 and value ~= nil and value ~= "" then
|
if errCode == 0 and value ~= nil and value ~= "" then
|
||||||
n = tonumber(value) or 0
|
n = tonumber(value) or 0
|
||||||
end
|
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
|
method('RecvAscension', `self.AscensionUnlocked = n
|
||||||
if self.AscensionLevel > self.AscensionUnlocked then
|
if self.AscensionLevel > self.AscensionUnlocked then
|
||||||
self.AscensionLevel = self.AscensionUnlocked
|
self.AscensionLevel = self.AscensionUnlocked
|
||||||
@@ -2483,12 +2483,12 @@ end
|
|||||||
self:RenderAscension()`, [
|
self:RenderAscension()`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
||||||
], 2),
|
], 6),
|
||||||
method('SaveAscension', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
method('SaveAscension', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
||||||
ds:SetAndWait("ascensionUnlocked", tostring(n))`, [
|
ds:SetAndWait("ascensionUnlocked", tostring(n))`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' },
|
||||||
], 1),
|
], 5),
|
||||||
method('AdjustAscension', `local v = self.AscensionLevel + delta
|
method('AdjustAscension', `local v = self.AscensionLevel + delta
|
||||||
if v < 0 then v = 0 end
|
if v < 0 then v = 0 end
|
||||||
if v > self.AscensionUnlocked then v = self.AscensionUnlocked end
|
if v > self.AscensionUnlocked then v = self.AscensionUnlocked end
|
||||||
|
|||||||
Reference in New Issue
Block a user