Example #1
0
        public void completeBundle(int which)
        {
            bool flag = false;

            for (int i = 0; i < this.bundles[which].Length; i++)
            {
                if (!flag && !this.bundles[which][i])
                {
                    flag = true;
                }
                this.bundles[which][i] = true;
            }
            if (flag)
            {
                this.bundleRewards[which] = true;
            }
            int num = this.bundleToAreaDictionary[which];

            if (!this.areasComplete[num])
            {
                bool flag2 = false;
                foreach (int current in this.areaToBundleDictionary[num])
                {
                    if (!this.isBundleComplete(current))
                    {
                        flag2 = true;
                        break;
                    }
                }
                if (!flag2)
                {
                    this.areasComplete[num] = true;
                    this.areaCompleteReward(num);
                    if (Game1.IsMultiplayer)
                    {
                        Game1.ChatBox.receiveChatMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", new object[]
                        {
                            CommunityCenter.getAreaDisplayNameFromNumber(num)
                        }), -1L);
                        return;
                    }
                    Game1.showGlobalMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", new object[]
                    {
                        CommunityCenter.getAreaDisplayNameFromNumber(num)
                    }));
                }
            }
        }
Example #2
0
        // Token: 0x060010C7 RID: 4295 RVA: 0x0015727C File Offset: 0x0015547C
        public void completeBundle(int which)
        {
            bool foundOneEmpty = false;

            for (int i = 0; i < this.bundles[which].Length; i++)
            {
                if (!foundOneEmpty && !this.bundles[which][i])
                {
                    foundOneEmpty = true;
                }
                this.bundles[which][i] = true;
            }
            if (foundOneEmpty)
            {
                this.bundleRewards[which] = true;
            }
            int whichArea = this.bundleToAreaDictionary[which];

            if (!this.areasComplete[whichArea])
            {
                bool foundAnIncomplete = false;
                foreach (int j in this.areaToBundleDictionary[whichArea])
                {
                    if (!this.isBundleComplete(j))
                    {
                        foundAnIncomplete = true;
                        break;
                    }
                }
                if (!foundAnIncomplete)
                {
                    this.areasComplete[whichArea] = true;
                    this.areaCompleteReward(whichArea);
                    if (Game1.IsMultiplayer)
                    {
                        Game1.ChatBox.receiveChatMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", new object[]
                        {
                            CommunityCenter.getAreaDisplayNameFromNumber(whichArea)
                        }), -1L);
                        return;
                    }
                    Game1.showGlobalMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", new object[]
                    {
                        CommunityCenter.getAreaDisplayNameFromNumber(whichArea)
                    }));
                }
            }
        }
Example #3
0
        public void completeBundle(int which)
        {
            bool flag1 = false;

            for (int index = 0; index < this.bundles[which].Length; ++index)
            {
                if (!flag1 && !this.bundles[which][index])
                {
                    flag1 = true;
                }
                this.bundles[which][index] = true;
            }
            if (flag1)
            {
                this.bundleRewards[which] = true;
            }
            int bundleToArea = this.bundleToAreaDictionary[which];

            if (this.areasComplete[bundleToArea])
            {
                return;
            }
            bool flag2 = false;

            foreach (int bundleIndex in this.areaToBundleDictionary[bundleToArea])
            {
                if (!this.isBundleComplete(bundleIndex))
                {
                    flag2 = true;
                    break;
                }
            }
            if (flag2)
            {
                return;
            }
            this.areasComplete[bundleToArea] = true;
            this.areaCompleteReward(bundleToArea);
            if (Game1.IsMultiplayer)
            {
                Game1.ChatBox.receiveChatMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", (object)CommunityCenter.getAreaDisplayNameFromNumber(bundleToArea)), -1L);
            }
            else
            {
                Game1.showGlobalMessage(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaRestored", (object)CommunityCenter.getAreaDisplayNameFromNumber(bundleToArea)));
            }
        }
Example #4
0
 public static string getAreaDisplayNameFromNumber(int areaNumber)
 {
     return(Game1.content.LoadString("Strings\\Locations:CommunityCenter_AreaName_" + CommunityCenter.getAreaNameFromNumber(areaNumber).Replace(" ", "")));
 }
Example #5
0
 public static string getAreaEnglishDisplayNameFromNumber(int areaNumber)
 {
     return(Game1.content.LoadBaseString("Strings\\Locations:CommunityCenter_AreaName_" + CommunityCenter.getAreaNameFromNumber(areaNumber).Replace(" ", ""), new object[0]));
 }