コード例 #1
0
    public void AddProperty(string name, int quantity, long currentBuyPrice)
    {
        foreach (var property in PropertyOwned)
        {
            if (property.propertyName == name)
            {
                property.propertyQuantity += quantity;
                property.CurrentBuyPrice   = currentBuyPrice;
                return;
            }
        }

        PropertyOwned newProperty = new PropertyOwned();

        newProperty.propertyName     = name;
        newProperty.propertyQuantity = quantity;
        newProperty.CurrentBuyPrice  = currentBuyPrice;
        PropertyOwned.Add(newProperty);

        TotalSellingPriceProperty = GetTotalSellingPriceProperty();
    }
コード例 #2
0
ファイル: Stats.cs プロジェクト: whampson/gta-save-data
        public bool Equals(Stats other)
        {
            if (other == null)
            {
                return(false);
            }

            return(PeopleKilledByPlayer.Equals(other.PeopleKilledByPlayer) &&
                   PeopleKilledByOthers.Equals(other.PeopleKilledByOthers) &&
                   CarsExploded.Equals(other.CarsExploded) &&
                   BoatsExploded.Equals(other.BoatsExploded) &&
                   TyresPopped.Equals(other.TyresPopped) &&
                   RoundsFiredByPlayer.Equals(other.RoundsFiredByPlayer) &&
                   PedsKilledOfThisType.SequenceEqual(other.PedsKilledOfThisType) &&
                   HelisDestroyed.Equals(other.HelisDestroyed) &&
                   ProgressMade.Equals(other.ProgressMade) &&
                   TotalProgressInGame.Equals(other.TotalProgressInGame) &&
                   KgsOfExplosivesUsed.Equals(other.KgsOfExplosivesUsed) &&
                   BulletsThatHit.Equals(other.BulletsThatHit) &&
                   HeadsPopped.Equals(other.HeadsPopped) &&
                   WantedStarsAttained.Equals(other.WantedStarsAttained) &&
                   WantedStarsEvaded.Equals(other.WantedStarsEvaded) &&
                   TimesArrested.Equals(other.TimesArrested) &&
                   TimesDied.Equals(other.TimesDied) &&
                   DaysPassed.Equals(other.DaysPassed) &&
                   SafeHouseVisits.Equals(other.SafeHouseVisits) &&
                   Sprayings.Equals(other.Sprayings) &&
                   MaximumJumpDistance.Equals(other.MaximumJumpDistance) &&
                   MaximumJumpHeight.Equals(other.MaximumJumpHeight) &&
                   MaximumJumpFlips.Equals(other.MaximumJumpFlips) &&
                   MaximumJumpSpins.Equals(other.MaximumJumpSpins) &&
                   BestStuntJump.Equals(other.BestStuntJump) &&
                   NumberOfUniqueJumpsFound.Equals(other.NumberOfUniqueJumpsFound) &&
                   TotalNumberOfUniqueJumps.Equals(other.TotalNumberOfUniqueJumps) &&
                   MissionsGiven.Equals(other.MissionsGiven) &&
                   PassengersDroppedOffWithTaxi.Equals(other.PassengersDroppedOffWithTaxi) &&
                   MoneyMadeWithTaxi.Equals(other.MoneyMadeWithTaxi) &&
                   IndustrialPassed.Equals(other.IndustrialPassed) &&
                   CommercialPassed.Equals(other.CommercialPassed) &&
                   SuburbanPassed.Equals(other.SuburbanPassed) &&
                   PamphletMissionPassed.Equals(other.PamphletMissionPassed) &&
                   NoMoreHurricanes.Equals(other.NoMoreHurricanes) &&
                   DistanceTravelledOnFoot.Equals(other.DistanceTravelledOnFoot) &&
                   DistanceTravelledByCar.Equals(other.DistanceTravelledByCar) &&
                   DistanceTravelledByBike.Equals(other.DistanceTravelledByBike) &&
                   DistanceTravelledByBoat.Equals(other.DistanceTravelledByBoat) &&
                   DistanceTravelledByGolfCart.Equals(other.DistanceTravelledByGolfCart) &&
                   DistanceTravelledByHelicopter.Equals(other.DistanceTravelledByHelicopter) &&
                   DistanceTravelledByPlane.Equals(other.DistanceTravelledByPlane) &&
                   LivesSavedWithAmbulance.Equals(other.LivesSavedWithAmbulance) &&
                   CriminalsCaught.Equals(other.CriminalsCaught) &&
                   FiresExtinguished.Equals(other.FiresExtinguished) &&
                   HighestLevelVigilanteMission.Equals(other.HighestLevelVigilanteMission) &&
                   HighestLevelAmbulanceMission.Equals(other.HighestLevelAmbulanceMission) &&
                   HighestLevelFireMission.Equals(other.HighestLevelFireMission) &&
                   PhotosTaken.Equals(other.PhotosTaken) &&
                   NumberKillFrenziesPassed.Equals(other.NumberKillFrenziesPassed) &&
                   TotalNumberKillFrenzies.Equals(other.TotalNumberKillFrenzies) &&
                   TotalNumberMissions.Equals(other.TotalNumberMissions) &&
                   FlightTime.Equals(other.FlightTime) &&
                   TimesDrowned.Equals(other.TimesDrowned) &&
                   SeagullsKilled.Equals(other.SeagullsKilled) &&
                   WeaponBudget.Equals(other.WeaponBudget) &&
                   FashionBudget.Equals(other.FashionBudget) &&
                   LoanSharks.Equals(other.LoanSharks) &&
                   StoresKnockedOff.Equals(other.StoresKnockedOff) &&
                   MovieStunts.Equals(other.MovieStunts) &&
                   Assassinations.Equals(other.Assassinations) &&
                   PizzasDelivered.Equals(other.PizzasDelivered) &&
                   GarbagePickups.Equals(other.GarbagePickups) &&
                   IceCreamSold.Equals(other.IceCreamSold) &&
                   TopShootingRangeScore.Equals(other.TopShootingRangeScore) &&
                   ShootingRank.Equals(other.ShootingRank) &&
                   LongestWheelie.Equals(other.LongestWheelie) &&
                   LongestStoppie.Equals(other.LongestStoppie) &&
                   Longest2Wheel.Equals(other.Longest2Wheel) &&
                   LongestWheelieDist.Equals(other.LongestWheelieDist) &&
                   LongestStoppieDist.Equals(other.LongestStoppieDist) &&
                   Longest2WheelDist.Equals(other.Longest2WheelDist) &&
                   PropertyBudget.Equals(other.PropertyBudget) &&
                   AutoPaintingBudget.Equals(other.AutoPaintingBudget) &&
                   PropertyDestroyed.Equals(other.PropertyDestroyed) &&
                   NumPropertyOwned.Equals(other.NumPropertyOwned) &&
                   BloodRingKills.Equals(other.BloodRingKills) &&
                   BloodRingTime.Equals(other.BloodRingTime) &&
                   PropertyOwned.SequenceEqual(other.PropertyOwned) &&
                   HighestChaseValue.Equals(other.HighestChaseValue) &&
                   FastestTimes.SequenceEqual(other.FastestTimes) &&
                   HighestScores.SequenceEqual(other.HighestScores) &&
                   BestPositions.SequenceEqual(other.BestPositions) &&
                   KillsSinceLastCheckpoint.Equals(other.KillsSinceLastCheckpoint) &&
                   TotalLegitimateKills.Equals(other.TotalLegitimateKills) &&
                   LastMissionPassedName.Equals(other.LastMissionPassedName) &&
                   CheatedCount.Equals(other.CheatedCount) &&
                   FavoriteRadioStationList.SequenceEqual(other.FavoriteRadioStationList));
        }