public void LoadOwnedArtifactPieceData() { new LogEventRequest() .SetEventKey("LoadOwnedArtifactPieceData") .Send((response) => { if (!response.HasErrors) { bool result = (bool)response.ScriptData.GetBoolean("Result"); if (result) { ownedPieceIdList = new List <int>(); var ownedArtifactPieceData = response.ScriptData.GetIntList("OwnedArtifactPieceData"); foreach (var ownedArtifactId in ownedArtifactPieceData) { ownedPieceIdList.Add(ownedArtifactId); } OnArtifactPieceChanged?.Invoke(); } else { InitializeOwnedArtifactPieceData(); } } else { Debug.Log("Error LoadOwnedRunes"); Debug.Log(response.Errors.JSON); } }); }
private void AddIdToOwnedPieceIdList(int id) { if (ownedPieceIdList.Contains(id)) { Debug.Log("Error 중복된 값이 들어왔습니다."); return; } ownedPieceIdList.Add(id); OnAddArtifactPiece(id); OnArtifactPieceChanged?.Invoke(); }