namespace Supercell.Laser.Logic.Home.Quest { using Supercell.Laser.Titan.DataStream; using Supercell.Laser.Logic.Helper; public class Quest { public int MissionType { get; set; } public int CurrentGoal { get; set; } public int QuestGoal { get; set; } public int GameModeVariation { get; set; } public bool IsDailyQuest { get; set; } public bool BrawlPassExclusive { get; set; } public bool QuestSeen { get; set; } public int CharacterId { get; set; } public int Reward { get; set; } public int Progress { get; set; } public Quest Clone() { return new Quest() { MissionType = MissionType, CurrentGoal = CurrentGoal, QuestGoal = QuestGoal, GameModeVariation = GameModeVariation, IsDailyQuest = IsDailyQuest, BrawlPassExclusive = BrawlPassExclusive, QuestSeen = QuestSeen, CharacterId = CharacterId, Reward = Reward, Progress = Progress }; } public void Encode(ChecksumEncoder encoder) { encoder.WriteVInt(0); encoder.WriteVInt(6); //bpseason encoder.WriteVInt(MissionType); // mission type. 1 = win in battle; 2 = kill players; 3 = to damage; 4 = to heal; 5 = play again; 6 = play in command. encoder.WriteVInt(CurrentGoal); // now score encoder.WriteVInt(QuestGoal); // max score encoder.WriteVInt(Reward); // tokens reward encoder.WriteVInt(0); encoder.WriteVInt(0); // now lvl encoder.WriteVInt(0); // unk lvl encoder.WriteVInt(1000000); // timer encoder.WriteBoolean(BrawlPassExclusive); // only pro pass encoder.WriteBoolean(QuestSeen); // quest seen ByteStreamHelper.WriteDataReference(encoder, CharacterId); // brawler globalId encoder.WriteVInt(GameModeVariation); // game mode variation encoder.WriteVInt(Progress); encoder.WriteVInt(0); encoder.WriteVInt(0); } } /* public void Encode(ChecksumEncoder encoder) { encoder.WriteVInt(0); // Unknown encoder.WriteVInt(3); // Brawl pass season encoder.WriteVInt(MissionType); // Mission Type encoder.WriteVInt(CurrentGoal); // Achieved Goal encoder.WriteVInt(QuestGoal); // Quest Goal encoder.WriteVInt(Reward); // Tokens Reward encoder.WriteVInt(0); // Unknown encoder.WriteVInt(0); // Current level encoder.WriteVInt(0); // Max level encoder.WriteVInt(IsDailyQuest ? 1 : -1); // Quest Timer encoder.WriteBoolean(BrawlPassExclusive); // unknown encoder.WriteBoolean(QuestSeen); // quest seen ByteStreamHelper.WriteDataReference(encoder, CharacterId); encoder.WriteVInt(GameModeVariation); // Game mode variation encoder.WriteVInt(Progress); // Progress encoder.WriteVInt(0); encoder.WriteVInt(0); } }*/ }