public override string ToJson() { Serializer startedSerializer = base.GetStartedSerializer(); startedSerializer.AddString("cmsVersion", this.replayData.CmsVersion); startedSerializer.AddString("battleVersion", this.replayData.BattleVersion); startedSerializer.AddString("battleId", this.battle.RecordID); startedSerializer.AddString("battleUid", this.battle.BattleUid); startedSerializer.AddDictionary <int>("seededTroopsDeployed", this.seededTroopsDeployed); startedSerializer.AddDictionary <int>("defendingUnitsKilled", this.defendingUnitsKilled); startedSerializer.AddDictionary <int>("attackingUnitsKilled", this.attackingUnitsKilled); startedSerializer.AddDictionary <int>("defenderGuildTroopsSpent", this.defenderGuildUnitsSpent); startedSerializer.AddDictionary <int>("attackerGuildTroopsSpent", this.attackerGuildUnitsSpent); startedSerializer.AddDictionary <int>("loot", this.lootEarned); startedSerializer.AddDictionary <int>("damagedBuildings", this.buildingHealthMap); if (this.buildingUids != null) { startedSerializer.AddDictionary <string>("buildingUids", this.buildingUids); } startedSerializer.AddArrayOfPrimitives <string>("unarmedTraps", this.unarmedTraps); startedSerializer.AddObject <BattleRecord>("replayData", this.replayData); startedSerializer.Add <int>("baseDamagePercent", this.battle.DamagePercent); startedSerializer.AddDictionary <int>("numVisitors", this.battle.NumVisitors); startedSerializer.Add <int>("stars", this.battle.EarnedStars); startedSerializer.AddBool("isUserEnded", this.battle.Canceled); startedSerializer.AddString("planetId", this.planetId); return(startedSerializer.End().ToString()); }
public override string ToJson() { Serializer startedSerializer = base.GetStartedSerializer(); startedSerializer.AddArrayOfPrimitives <string>("buildingIds", this.BuildingIds); return(startedSerializer.End().ToString()); }
public override string ToJson() { Serializer serializer = Serializer.Start(); serializer.AddString("playerId", base.PlayerId); serializer.AddArrayOfPrimitives <string>("uids", this.uids); return(serializer.End().ToString()); }
public override string ToJson() { Serializer startedSerializer = base.GetStartedSerializer(); startedSerializer.AddArrayOfPrimitives <string>("participantIds", this.Participants); startedSerializer.AddBool("isSameFactionWarAllowed", this.AllowSameFactionMatchMaking); return(startedSerializer.End().ToString()); }
public override string ToJson() { Serializer serializer = Serializer.Start(); serializer.AddString("playerId", base.PlayerId); int num = Mathf.Min(this.uids.Count, 3); for (int i = 0; i < num; i++) { serializer.AddArrayOfPrimitives <string>("uids", this.uids); } return(serializer.End().ToString()); }
public string ToJson() { Serializer serializer = Serializer.Start(); serializer.AddObject <CombatEncounter>("combatEncounter", this.CombatEncounter); serializer.AddArray <IBattleAction>("battleActions", this.battleActions); serializer.AddObject <BattleDeploymentData>("attackerDeploymentData", this.AttackerDeploymentData); serializer.AddObject <BattleDeploymentData>("defenderDeploymentData", this.DefenderDeploymentData); serializer.Add <int>("lootCreditsAvailable", this.LootCreditsAvailable); serializer.Add <int>("lootMaterialsAvailable", this.LootMaterialsAvailable); serializer.Add <int>("lootContrabandAvailable", this.LootContrabandAvailable); if (this.BuildingLootCreditsMap != null) { serializer.AddDictionary <int>("lootBuildingCreditsMap", this.BuildingLootCreditsMap); } if (this.BuildingLootMaterialsMap != null) { serializer.AddDictionary <int>("lootBuildingMaterialsMap", this.BuildingLootMaterialsMap); } if (this.BuildingLootContrabandMap != null) { serializer.AddDictionary <int>("lootBuildingContrabandMap", this.BuildingLootContrabandMap); } serializer.AddString("battleType", this.BattleType.ToString()); serializer.Add <int>("battleLength", this.BattleLength); serializer.Add <int>("lowFPS", (int)this.LowestFPS); serializer.Add <int>("lowFPSTime", (int)this.LowestFPSTime); serializer.AddString("battleVersion", this.BattleVersion); serializer.AddString("planetId", this.PlanetId); serializer.AddString("manifestVersion", this.CmsVersion); serializer.AddObject <BattleAttributes>("battleAttributes", this.BattleAttributes); if (this.victoryConditionsUids != null) { serializer.AddArrayOfPrimitives <string>("victoryConditions", this.victoryConditionsUids); } serializer.AddString("failureCondition", this.failureConditionUid); if (this.DefenderGuildTroops != null) { serializer.AddDictionary <int>("donatedTroops", this.DefenderGuildTroops); } if (this.AttackerGuildTroops != null) { serializer.AddDictionary <int>("donatedTroopsAttacker", this.AttackerGuildTroops); } if (this.DefenderChampions != null) { serializer.AddDictionary <int>("champions", this.DefenderChampions); } if (!string.IsNullOrEmpty(this.DefenseEncounterProfile)) { serializer.AddString("defenseEncounterProfile", this.DefenseEncounterProfile); } if (!string.IsNullOrEmpty(this.BattleScript)) { serializer.AddString("battleScript", this.BattleScript); } if (this.DisabledBuildings != null) { serializer.AddArrayOfPrimitives <string>("disabledBuildings", this.DisabledBuildings); } serializer.Add <uint>("simSeedA", this.SimSeed.SimSeedA); serializer.Add <uint>("simSeedB", this.SimSeed.SimSeedB); serializer.Add <float>("viewTimePreBattle", this.ViewTimePassedPreBattle); if (this.AttackerWarBuffs != null) { serializer.AddArrayOfPrimitives <string>("attackerWarBuffs", this.AttackerWarBuffs); } if (this.DefenderWarBuffs != null) { serializer.AddArrayOfPrimitives <string>("defenderWarBuffs", this.DefenderWarBuffs); } if (this.AttackerEquipment != null) { serializer.AddArrayOfPrimitives <string>("attackerEquipment", this.AttackerEquipment); } if (this.DefenderEquipment != null) { serializer.AddArrayOfPrimitives <string>("defenderEquipment", this.DefenderEquipment); } return(serializer.End().ToString()); }