Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IdleSounds()

void Terraria.NPC.IdleSounds ( )
inline

Definition at line 86893 of file NPC.cs.

86894 {
86895 if (!(shimmerTransparency > 0f))
86896 {
86897 if ((type == 239 || type == 240) && Main.rand.Next(900) == 0)
86898 {
86899 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(24, 26));
86900 }
86901 else if ((type == 62 || type == 156) && Main.rand.Next(700) == 0)
86902 {
86903 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(26, 30));
86904 }
86905 else if (type == 177 && Main.rand.Next(600) == 0)
86906 {
86907 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(30, 32));
86908 }
86909 else if (type == 226 && Main.rand.Next(800) == 0)
86910 {
86911 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 32);
86912 }
86913 else if (type == 153 && Main.rand.Next(1000) == 0)
86914 {
86915 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 33);
86916 }
86917 else if (wet && (type == 63 || type == 64 || type == 103) && Main.rand.Next(1000) == 0)
86918 {
86919 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(34, 36));
86920 }
86921 else if ((type == 198 || type == 199) && Main.rand.Next(1000) == 0)
86922 {
86923 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(36, 38));
86924 }
86925 else if ((type == 170 || type == 180 || type == 171) && Main.rand.Next(600) == 0)
86926 {
86927 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(38, 41));
86928 }
86929 else if (type == 250 && Main.rand.Next(700) == 0)
86930 {
86931 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(41, 44));
86932 }
86933 else if (type == 580 && Main.rand.Next(800) == 0)
86934 {
86935 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 44);
86936 }
86937 else if (type == 582 && Main.rand.Next(800) == 0)
86938 {
86939 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 44);
86940 }
86941 else if (type == 581 && Main.rand.Next(800) == 0)
86942 {
86943 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(44, 47));
86944 }
86945 else if (type == 508 && Main.rand.Next(800) == 0)
86946 {
86947 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 44);
86948 }
86949 else if (type == 509 && Main.rand.Next(800) == 0)
86950 {
86951 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(44, 47));
86952 }
86953 else if (type == 494 && Main.rand.Next(600) == 0)
86954 {
86955 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 47);
86956 }
86957 else if (type == 467 && Main.rand.Next(700) == 0)
86958 {
86959 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(48, 50));
86960 }
86961 else if (type == 468 && Main.rand.Next(700) == 0)
86962 {
86963 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(50, 53));
86964 }
86965 else if (type == 288 && Main.rand.Next(400) == 0)
86966 {
86967 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(53, 55));
86968 }
86969 else if ((type == 524 || type == 525 || type == 526 || type == 527) && Main.rand.Next(700) == 0)
86970 {
86971 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(55, 57));
86972 }
86973 else if ((type == 496 || type == 497) && Main.rand.Next(600) == 0)
86974 {
86975 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(57, 59));
86976 }
86977 else if (type == 389 && Main.rand.Next(800) == 0)
86978 {
86979 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(59, 61));
86980 }
86981 else if (type == 471 && Main.rand.Next(600) == 0)
86982 {
86983 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(61, 63));
86984 }
86985 else if (type == 482 && Main.rand.Next(600) == 0)
86986 {
86987 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(63, 66));
86988 }
86989 else if (type == 388 && Main.rand.Next(700) == 0)
86990 {
86991 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(66, 69));
86992 }
86993 else if (type == 520 && Main.rand.Next(800) == 0)
86994 {
86995 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(69, 73));
86996 }
86997 else if (type == 477 && Main.rand.Next(600) == 0)
86998 {
86999 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 73);
87000 }
87001 else if (type == 258 && Main.rand.Next(700) == 0)
87002 {
87003 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(74, 78));
87004 }
87005 else if (type == 252 && Main.rand.Next(700) == 0)
87006 {
87007 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 78);
87008 }
87009 else if (type == 469 && Main.rand.Next(700) == 0)
87010 {
87011 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(79, 81));
87012 }
87013 else if ((type == 253 || type == 82) && Main.rand.Next(700) == 0)
87014 {
87015 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(81, 84));
87016 }
87017 else if (type >= 498 && type <= 506 && Main.rand.Next(600) == 0)
87018 {
87019 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(84, 86));
87020 }
87021 else if (type == 391 && Main.rand.Next(700) == 0)
87022 {
87023 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, Main.rand.Next(86, 87));
87024 }
87025 }
87026 }
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 position
Definition Entity.cs:14
int type
Definition NPC.cs:445
float shimmerTransparency
Definition NPC.cs:207

References Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.rand, and System.type.