Exemplo n.º 1
0
        private static void exportSignedResponse(SignedResponse <T> obj, JsonWriter writer)
        {
            writer.WriteObjectStart();
            writer.WritePropertyName("goodUntil");
            writer.Write(obj.goodUntil);
            writer.WritePropertyName("signature");
            writer.Write(obj.signature);
            writer.WritePropertyName("swid");
            writer.Write(obj.swid);
            writer.WritePropertyName("data");
            ICommonGameSettings commonGameSettings = Service.Get <ICommonGameSettings>();

            if (commonGameSettings.OfflineMode && !string.IsNullOrEmpty(commonGameSettings.GameServerHost))
            {
                writer.WriteRaw(JsonMapper.ToJson(obj.Data));
            }
            else if (obj._rawJson != null)
            {
                writer.WriteRaw(obj._rawJson.ToJson());
            }
            else
            {
                writer.Write("");
            }
            writer.WriteObjectEnd();
        }
Exemplo n.º 2
0
 public FishingCatchRequest(SignedResponse <FishingResult> fishingCastResult, string winningRewardName)
 {
     this.fishingCastResult = fishingCastResult;
     this.winningRewardName = winningRewardName;
 }