예제 #1
0
파일: Lang.cs 프로젝트: xiongyaya/Terraria
        public static string BartenderHelpText(NPC npc)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject(npc);
            Player player             = Main.player[Main.myPlayer];

            if (player.bartenderQuestLog == 0)
            {
                ++player.bartenderQuestLog;
                Item newItem = new Item();
                newItem.SetDefaults(3817, false);
                newItem.stack    = 5;
                newItem.position = player.Center;
                Item obj = player.GetItem(player.whoAmI, newItem, true, false);
                if (obj.stack > 0)
                {
                    int number = Item.NewItem((int)player.position.X, (int)player.position.Y, player.width, player.height, obj.type, obj.stack, false, 0, true, false);
                    if (Main.netMode == 1)
                    {
                        NetMessage.SendData(21, -1, -1, (NetworkText)null, number, 1f, 0.0f, 0.0f, 0, 0, 0);
                    }
                }
                return(Language.GetTextValueWith("BartenderSpecialText.FirstHelp", substitutionObject));
            }
            LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("BartenderHelpText.", substitutionObject));
            if (Main.BartenderHelpTextIndex >= all.Length)
            {
                Main.BartenderHelpTextIndex = 0;
            }
            return(all[Main.BartenderHelpTextIndex++].FormatWith(substitutionObject));
        }
예제 #2
0
파일: Lang.cs 프로젝트: xiongyaya/Terraria
        public static string DyeTraderQuestChat(bool gotDye = false)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject((NPC)null);

            LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter(gotDye ? "DyeTraderSpecialText.HasPlant" : "DyeTraderSpecialText.NoPlant", substitutionObject));
            return(all[Main.rand.Next(all.Length)].FormatWith(substitutionObject));
        }
예제 #3
0
파일: Lang.cs 프로젝트: xiongyaya/Terraria
        public static string BartenderChat(NPC npc)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject(npc);

            if (Main.rand.Next(5) == 0)
            {
                return(Language.GetTextValueWith(!DD2Event.DownedInvasionT3 ? (!DD2Event.DownedInvasionT2 ? (!DD2Event.DownedInvasionT1 ? "BartenderSpecialText.BeforeDD2Tier1" : "BartenderSpecialText.AfterDD2Tier1") : "BartenderSpecialText.AfterDD2Tier2") : "BartenderSpecialText.AfterDD2Tier3", substitutionObject));
            }
            return(Language.SelectRandom(Lang.CreateDialogFilter("BartenderChatter.", substitutionObject), (UnifiedRandom)null).FormatWith(substitutionObject));
        }
예제 #4
0
        public static string BestiaryGirlChat(NPC npc)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject(npc);
            string startsWith         = "BestiaryGirlChatter.";

            if (npc.ShouldBestiaryGirlBeLycantrope())
            {
                startsWith = "BestiaryGirlLycantropeChatter.";
            }
            return(Language.SelectRandom(Lang.CreateDialogFilter(startsWith, substitutionObject), (UnifiedRandom)null).FormatWith(substitutionObject));
        }
예제 #5
0
파일: Lang.cs 프로젝트: xiongyaya/Terraria
        public static string AnglerQuestChat(bool turnIn = false)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject((NPC)null);

            if (turnIn)
            {
                return(Language.SelectRandom(Lang.CreateDialogFilter("AnglerQuestText.TurnIn_", substitutionObject), (UnifiedRandom)null).FormatWith(substitutionObject));
            }
            if (Main.anglerQuestFinished)
            {
                return(Language.SelectRandom(Lang.CreateDialogFilter("AnglerQuestText.NoQuest_", substitutionObject), (UnifiedRandom)null).FormatWith(substitutionObject));
            }
            int anglerQuestItemNetId = Main.anglerQuestItemNetIDs[Main.anglerQuest];

            Main.npcChatCornerItem = anglerQuestItemNetId;
            return(Language.GetTextValueWith("AnglerQuestText.Quest_" + ItemID.Search.GetName(anglerQuestItemNetId), substitutionObject));
        }
예제 #6
0
파일: Lang.cs 프로젝트: xiongyaya/Terraria
 public static string dialog(int l, bool english = false)
 {
     return(Language.GetTextValueWith("LegacyDialog." + (object)l, Lang.CreateDialogSubstitutionObject((NPC)null)));
 }
예제 #7
0
        public static string BunnyChat(NPC npc)
        {
            object substitutionObject = Lang.CreateDialogSubstitutionObject(npc);

            return(Language.SelectRandom(Lang.CreateDialogFilter("BunnyChatter.", substitutionObject), (UnifiedRandom)null).FormatWith(substitutionObject));
        }