private static ExecuteResponse.Builder GetHeroDigest(ExecuteRequest request) { var results = new List <OperationResult>(); foreach (Operation operation in request.OperationsList) { //var toonDigest = ToonHandle.ParseFrom(operation.RowId.Hash.ToByteArray().Skip(2).ToArray()); OperationResult.Builder operationResult = OperationResult.CreateBuilder().SetTableId(operation.TableId); var value = new EntityId.Builder { IdHigh = 0x300016200004433, IdLow = 2 }; operationResult.AddData( Cell.CreateBuilder() .SetColumnId(operation.ColumnId) .SetRowId(operation.RowId) .SetVersion(1) .SetData(D3.Hero.Digest.CreateBuilder().SetVersion(891) .SetHeroId(value) .SetHeroName("hazzik") .SetGbidClass(0) .SetPlayerFlags(0) .SetLevel(1) .SetVisualEquipment(new VisualEquipment.Builder().Build()) .SetLastPlayedAct(0) .SetHighestUnlockedAct(0) .SetLastPlayedDifficulty(0) .SetHighestUnlockedDifficulty(0) .SetLastPlayedQuest(-1) .SetLastPlayedQuestStep(-1) .SetTimePlayed(0) .Build() .ToByteString()) .Build() ); results.Add(operationResult.Build()); } ExecuteResponse.Builder builder = ExecuteResponse.CreateBuilder(); foreach (OperationResult result in results) { builder.AddResults(result); } return(builder); }
private static OperationResult CreateOperationResult(Operation operation, ulong version, ByteString data) { var operationResult = new OperationResult.Builder { TableId = operation.TableId }; operationResult.AddData( new Cell.Builder { ColumnId = operation.ColumnId, RowId = operation.RowId, Version = version, Data = data }.Build()); return(operationResult.Build()); }
private static OperationResult CreateOperationResult(Operation operation, ulong version, ByteString data) { var operationResult = new OperationResult.Builder { TableId = operation.TableId }; operationResult.AddData( new Cell.Builder { ColumnId = operation.ColumnId, RowId = operation.RowId, Version = version, Data = data }.Build()); return operationResult.Build(); }