| 	
  
 
UID452322主题3阅读权限30帖子397精华0积分219金钱1766 荣誉2 人气4 在线时间521 小时评议0 
 
 帖子397精华0积分219金钱1766 荣誉2 人气4 评议0 
 |  
后半部分代码
| List<IngredientNameCount> list2 = new List<IngredientNameCount>(); foreach (string str3 in ingredients.Keys)
 {
 list2.Add(new IngredientNameCount(str3, ((float) ingredients[str3]) / ((float) fruitsUsed.Count)));
 }
 list2.Sort();
 string str4 = "";
 string str5 = "";
 if (list2.Count > 0)
 {
 str4 = IngredientData.NameToDataMap[list2[0].IngredientName].Name;
 }
 if (list2.Count > 1)
 {
 str5 = IngredientData.NameToDataMap[list2[1].IngredientName].Name;
 }
 List<NectarSkill.NectarBottleInfo> mTopNectarsMade = new List<NectarSkill.NectarBottleInfo>();
 if (skill != null)
 {
 mTopNectarsMade = skill.mTopNectarsMade;
 }
 string mBottleName = "";
 if (string.IsNullOrEmpty(str5))
 {
 mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarNameOneFruit", new object[] { str4 });
 }
 else
 {
 mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarName", new object[] { str4, str5 });
 if (mBottleName.Length > 40)
 {
 mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarNameOneFruit", new object[] { str4 });
 }
 }
 foreach (NectarSkill.NectarBottleInfo info in mTopNectarsMade)
 {
 if (info.mFruitHash == hash)
 {
 mBottleName = info.mBottleName;
 }
 }
 string entryKey = "Gameplay/Objects/HobbiesSkills/NectarMaker:";
 if (flag)
 {
 entryKey = entryKey + "NameBottleDialogJustOneFruit";
 }
 else if (num7 < kPoorComboThreshold)
 {
 entryKey = entryKey + "NameBottleDialogTerribly";
 }
 else if (num7 < kWellComboThreshold)
 {
 entryKey = entryKey + "NameBottleDialogPoor";
 }
 else if (num7 < kGreatComboThreshold)
 {
 entryKey = entryKey + "NameBottleDialogWell";
 }
 else if (num7 < kAmazingComboThreshold)
 {
 entryKey = entryKey + "NameBottleDialogGreat";
 }
 else
 {
 entryKey = entryKey + "NameBottleDialogAmazing";
 }
 string name = StringInputDialog.Show(Localization.LocalizeString("Gameplay/Objects/HobbiesSkills/NectarMaker:NameBottleDialog", new object[0]), Localization.LocalizeString(entryKey, new object[0]), mBottleName, 40, 5);
 bool flag2 = false;
 if (skill != null)
 {
 skill.MadeXBottles(numBottles);
 skill.UsedFruits(fruitsUsed);
 skill.NectarTypeMade(new NectarSkill.NectarBottleInfo(hash, name, ingredients, (int) baseValue));
 flag2 = skill.ReachedMaxLevel();
 }
 int dateNum = ((int) SimClock.ConvertFromTicks(GameStates.TimeInHomeworld.Ticks, TimeUnit.Weeks)) + 1;
 for (int i = 0; i < numBottles; i++)
 {
 NectarBottle item = GlobalFunctions.CreateObjectOutOfWorld("NectarBottle", null, new NectarBottleObjectInitParams(hash, name, list2, "Gameplay/Objects/HobbiesSkills/NectarMaker:Weeks", dateNum, baseValue, baseValue, this.mLastSimToMake, flag2)) as NectarBottle;
 this.mBottles.Add(item);
 EventTracker.SendEvent(EventTypeId.kMadeNectar, this.mLastSimToMake.CreatedSim, item);
 }
 if (this.mBottles.Count > 0)
 {
 this.mCurrentStateMachine.SetActor("nectarBottle", this.mBottles[0]);
 }
 this.mCurrentStateMachine.RequestState("nectarMaker", "Exit");
 this.mCurrentStateMachine.Dispose();
 this.mCurrentStateMachine = null;
 this.mMultiplierFromFeet = 1f;
 this.mLastUsedMakeStyle = MakeNectarStyle.Basic;
 this.mLastSimToMake = null;
 this.CurrentState = NectarMakerState.FruitAddable;
 }
 }
 | 
 |