public PlayerResult(string nickname, int experience, int money, int gainedCrownMoney, bool noCrownRewards, int sponsorPoints, int clanPoints, int bonusExperience, int bonusMoney, int bonusSponsorPoints, int experienceBoost, int moneyBoost, int sponsorPointsBoost, double experienceBoostPercent, double moneyBoostPercent, double sponsorPointsBoostPercent, int completedStages, bool isVip, int score, bool firstWin, string dynamicMultipliersInfo, int dynamicCrownMultiplier, [CanBeNull] PvpRatingOutcome pvpRatingOutcome) { Nickname = nickname; Experience = experience; Money = money; GainedCrownMoney = gainedCrownMoney; NoCrownRewards = noCrownRewards; SponsorPoints = sponsorPoints; ClanPoints = clanPoints; BonusExperience = bonusExperience; BonusMoney = bonusMoney; BonusSponsorPoints = bonusSponsorPoints; ExperienceBoost = experienceBoost; MoneyBoost = moneyBoost; SponsorPointsBoost = sponsorPointsBoost; ExperienceBoostPercent = experienceBoostPercent; MoneyBoostPercent = moneyBoostPercent; SponsorPointsBoostPercent = sponsorPointsBoostPercent; CompletedStages = completedStages; IsVip = isVip; Score = score; FirstWin = firstWin; DynamicMultipliersInfo = dynamicMultipliersInfo; DynamicCrownMultiplier = dynamicCrownMultiplier; PvpRatingOutcome_ = pvpRatingOutcome; }
public static PlayerResult ParseNode(HtmlNode playerResultNode) { string nickname = playerResultNode.Attributes["nickname"].Value; int experience = playerResultNode.Attributes["experience"].IntValue(); int money = playerResultNode.Attributes["money"].IntValue(); int gainedCrownMoney = playerResultNode.Attributes["gained_crown_money"].IntValue(); bool noCrownRewards = playerResultNode.Attributes["no_crown_rewards"].BoolValue(); int sponsorPoints = playerResultNode.Attributes["sponsor_points"].IntValue(); int clanPoints = playerResultNode.Attributes["clan_points"].IntValue(); int bonusExperience = playerResultNode.Attributes["bonus_experience"].IntValue(); int bonusMoney = playerResultNode.Attributes["bonus_money"].IntValue(); int bonusSponsorPoints = playerResultNode.Attributes["bonus_sponsor_points"].IntValue(); int experienceBoost = playerResultNode.Attributes["experience_boost"].IntValue(); int moneyBoost = playerResultNode.Attributes["money_boost"].IntValue(); int sponsorPointsBoost = playerResultNode.Attributes["sponsor_points_boost"].IntValue(); double experienceBoostPercent = playerResultNode.Attributes["experience_boost_percent"].DoubleValue(); double moneyBoostPercent = playerResultNode.Attributes["money_boost_percent"].DoubleValue(); double sponsorPointsBoostPercent = playerResultNode.Attributes["sponsor_points_boost_percent"].DoubleValue(); int completedStages = playerResultNode.Attributes["completed_stages"].IntValue(); bool isVip = playerResultNode.Attributes["is_vip"].BoolValue(); int score = playerResultNode.Attributes["score"].IntValue(); bool firstWin = playerResultNode.Attributes["first_win"].BoolValue(); string dynamicMultipliersInfo = playerResultNode.Attributes["dynamic_multipliers_info"].Value; int dynamicCrownMultiplier = playerResultNode.Attributes["dynamic_crown_multiplier"].IntValue(); PvpRatingOutcome pvpRatingOutcome = null; var pvpRatingOutcomeNode = playerResultNode.SelectSingleNode("./pvp_rating_outcome"); if (pvpRatingOutcomeNode != null) { pvpRatingOutcome = PvpRatingOutcome.ParseNode(pvpRatingOutcomeNode); } return(new PlayerResult(nickname, experience, money, gainedCrownMoney, noCrownRewards, sponsorPoints, clanPoints, bonusExperience, bonusMoney, bonusSponsorPoints, experienceBoost, moneyBoost, sponsorPointsBoost, experienceBoostPercent, moneyBoostPercent, sponsorPointsBoostPercent, completedStages, isVip, score, firstWin, dynamicMultipliersInfo, dynamicCrownMultiplier, pvpRatingOutcome)); }