public override string ToJson() { Serializer startedSerializer = base.GetStartedSerializer(); List <IStoryTrigger> activeSaveTriggers = Service.Get <CurrentPlayer>().ActiveSaveTriggers; startedSerializer.AddString("FueUid", Service.Get <CurrentPlayer>().CurrentQuest); startedSerializer.AddArray <IStoryTrigger>("triggers", activeSaveTriggers); return(startedSerializer.End().ToString()); }
public override string ToJson() { Serializer serializer = Serializer.Start(); serializer.AddString("playerId", base.PlayerId); serializer.AddString("battleId", this.BattleId); serializer.AddBool("guildTroopsSpent", this.SquadDeployed); serializer.AddArray <DeploymentRecord>("units", this.units); return(serializer.End().ToString()); }
public string ToJson() { Serializer serializer = Serializer.Start(); if (this.TroopData != null) { serializer.AddDictionary <int>("troop", this.TroopData); } if (this.TroopDataList != null) { serializer.AddArray <DeploymentRecord>("troopList", this.TroopDataList); } if (this.SpecialAttackData != null) { serializer.AddDictionary <int>("specialAttack", this.SpecialAttackData); } if (this.SpecialAttackDataList != null) { serializer.AddArray <DeploymentRecord>("specialAttackList", this.SpecialAttackDataList); } if (this.HeroData != null) { serializer.AddDictionary <int>("hero", this.HeroData); } if (this.HeroDataList != null) { serializer.AddArray <DeploymentRecord>("heroList", this.HeroDataList); } if (this.ChampionData != null) { serializer.AddDictionary <int>("champion", this.ChampionData); } if (this.ChampionDataList != null) { serializer.AddArray <DeploymentRecord>("championList", this.ChampionDataList); } 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()); }