示例#1
0
 private void AddGearToResults(GearResults results, GearItem item, bool strength, bool intellect, bool agility)
 {
     if (item != null)
     {
         if (strength)
         {
             results.strength += item.strength;
             results.strength += item.stragiint;
         }
         else if (intellect)
         {
             results.intellect += item.intellect;
             results.intellect += item.stragiint;
         }
         else if (agility)
         {
             results.agility += item.agility;
             results.agility += item.stragiint;
         }
         results.crit    += item.crit_rating;
         results.haste   += item.haste_rating;
         results.mastery += item.mastery_rating;
         results.vers    += item.versatility_rating;
     }
 }
 public ViewerReadyPlayerReforge(string name, GearResults gear, Point3D[,] mesh, double[,] meshTex, Brush brush, Model3DGroup lights, string xLabel, string yLabel, string zLabel, int total, int statcount)
 {
     this.PlayerName   = name;
     this.PlayerGear   = gear;
     this.PlayerMesh   = mesh;
     this.SurfaceBrush = brush;
     this.MeshColors   = meshTex;
     this.Lights       = lights;
     this.XAxis        = xLabel;
     this.YAxis        = yLabel;
     this.ZAxis        = zLabel;
     this.Total        = total;
     this.StatCount    = statcount;
 }
示例#3
0
        public GearResults GetStats()
        {
            bool strength = false, intellect = false, agility = false;
            var  results = new GearResults();

            if (collected_data.buffed_stats.attribute.strength > collected_data.buffed_stats.attribute.intellect && collected_data.buffed_stats.attribute.strength > collected_data.buffed_stats.attribute.agility)
            {
                strength = true;
            }
            if (collected_data.buffed_stats.attribute.agility > collected_data.buffed_stats.attribute.intellect && collected_data.buffed_stats.attribute.agility > collected_data.buffed_stats.attribute.strength)
            {
                agility = true;
            }
            if (collected_data.buffed_stats.attribute.intellect > collected_data.buffed_stats.attribute.strength && collected_data.buffed_stats.attribute.intellect > collected_data.buffed_stats.attribute.agility)
            {
                intellect = true;
            }

            if (gear != null)
            {
                AddGearToResults(results, gear.head, strength, intellect, agility);
                AddGearToResults(results, gear.neck, strength, intellect, agility);
                AddGearToResults(results, gear.shoulders, strength, intellect, agility);
                AddGearToResults(results, gear.chest, strength, intellect, agility);
                AddGearToResults(results, gear.waist, strength, intellect, agility);
                AddGearToResults(results, gear.legs, strength, intellect, agility);
                AddGearToResults(results, gear.feet, strength, intellect, agility);
                AddGearToResults(results, gear.wrists, strength, intellect, agility);
                AddGearToResults(results, gear.hands, strength, intellect, agility);
                AddGearToResults(results, gear.finger1, strength, intellect, agility);
                AddGearToResults(results, gear.finger2, strength, intellect, agility);
                AddGearToResults(results, gear.trinket1, strength, intellect, agility);
                AddGearToResults(results, gear.trinket2, strength, intellect, agility);
                AddGearToResults(results, gear.back, strength, intellect, agility);
                AddGearToResults(results, gear.main_hand, strength, intellect, agility);
                AddGearToResults(results, gear.off_hand, strength, intellect, agility);
            }
            return(results);
        }