11742 {
11743
11744
11745
11746
11747
11748
11749
11759 bool flag2 =
false;
11760 bool flag3 =
false;
11761 bool flag4 =
false;
11762 bool flag5 =
false;
11763 bool flag6 =
false;
11764 bool flag7 =
false;
11765 bool flag8 =
false;
11766 bool flag9 =
false;
11767 bool flag10 = LocalPlayer.townNPCs > 2
f;
11770 {
11772 }
11774 for (
int i = 0; i <
maxMusic; i++)
11775 {
11777 {
11780 {
11782 }
11783 }
11784 }
11786 {
11788 }
11792 {
11793 Rectangle
rectangle =
default(Rectangle);
11796 Rectangle value = default(Rectangle);
11797 for (
int j = 0;
j < 200;
j++)
11798 {
11799 if (!
npc[
j].active)
11800 {
11801 continue;
11802 }
11805 int type =
npc[
j].type;
11806 if ((uint)(type - 13) <= 2
u || (uint)(type - 127) <= 4
u)
11807 {
11809 }
11811 {
11812 if ((uint)(type - 113) > 1
u && (uint)(type - 125) > 1
u)
11813 {
11815 {
11817 }
11819 {
11820 switch (type)
11821 {
11822 case 245:
11824 break;
11825 case 222:
11827 break;
11828 case 262:
11829 case 263:
11830 case 264:
11832 break;
11833 default:
11835 {
11836 switch (type)
11837 {
11838 case 398:
11840 break;
11841 case 422:
11842 case 493:
11843 case 507:
11844 case 517:
11846 break;
11847 case 439:
11849 break;
11850 case 438:
11851 if (
npc[
j].ai[1] == 1
f)
11852 {
11855 }
11856 break;
11857 case 657:
11859 break;
11860 case 636:
11862 break;
11863 case 370:
11865 break;
11866 case 668:
11868 break;
11869 }
11870 }
11871 else
11872 {
11874 }
11875 break;
11876 }
11877 }
11878 else
11879 {
11881 }
11882 }
11883 else
11884 {
11886 }
11887 }
11888 else
11889 {
11891 }
11893 {
11895 }
11897 {
11899 }
11901 {
11903 }
11905 {
11907 }
11909 {
11910 continue;
11911 }
11914 {
11916 {
11919 }
11921 {
11922 case 1:
11924 break;
11925 case 2:
11927 break;
11928 case 3:
11930 break;
11931 case 4:
11933 break;
11934 case 5:
11936 break;
11937 case 6:
11939 break;
11940 case 7:
11942 break;
11943 case 8:
11945 break;
11946 case 9:
11948 break;
11949 case 10:
11951 break;
11952 case 11:
11954 break;
11955 case 12:
11957 break;
11958 case 13:
11960 break;
11961 case 14:
11963 break;
11964 case 15:
11966 break;
11967 case 16:
11969 break;
11970 case 17:
11972 break;
11973 }
11974 }
11975 }
11977 }
11980 {
11982 return;
11983 }
11985 {
11987 {
11989 {
11991 {
11993 }
11994 else
11995 {
11997 }
11998 }
12000 {
12002 }
12004 {
12006 }
12007 else if (
WorldGen.tenthAnniversaryWorldGen)
12008 {
12010 }
12011 else
12012 {
12014 }
12016 {
12019 {
12021 }
12022 }
12023 }
12024 else
12025 {
12027 }
12028 return;
12029 }
12034 {
12036 }
12038 {
12040 }
12042 {
12044 }
12046 {
12048 }
12050 {
12052 }
12054 {
12056 }
12058 {
12060 }
12062 {
12064 }
12066 {
12068 }
12070 {
12072 }
12074 {
12076 }
12078 {
12080 }
12082 {
12084 }
12086 {
12088 }
12090 {
12092 }
12094 {
12096 }
12098 {
12100 }
12102 {
12104 }
12106 {
12108 }
12110 {
12112 }
12114 {
12116 }
12118 {
12120 }
12122 {
12124 }
12126 {
12128 }
12130 {
12132 }
12134 {
12136 }
12138 {
12140 }
12142 {
12144 }
12146 {
12148 }
12150 {
12152 }
12154 {
12156 }
12158 {
12160 }
12162 {
12164 }
12166 {
12168 }
12169 else if (
num5 < 1
f)
12170 {
12172 }
12174 {
12176 }
12178 {
12180 }
12182 {
12184 }
12186 {
12188 }
12190 {
12192 {
12194 {
12196 }
12197 else
12198 {
12200 }
12201 }
12203 {
12205 }
12206 else
12207 {
12209 }
12210 }
12212 {
12214 {
12216 }
12217 else
12218 {
12220 }
12221 }
12223 {
12225 }
12227 {
12229 }
12231 {
12233 }
12235 {
12237 {
12239 {
12241 }
12243 {
12245 }
12247 {
12249 }
12250 else
12251 {
12253 }
12254 }
12256 {
12258 }
12260 {
12262 }
12264 {
12266 }
12268 {
12270 }
12271 else
12272 {
12274 }
12275 }
12277 {
12279 {
12281 {
12283 }
12284 else
12285 {
12287 }
12288 }
12290 {
12292 }
12293 else
12294 {
12296 }
12297 }
12299 {
12301 }
12303 {
12305 {
12307 {
12309 }
12310 else
12311 {
12313 }
12314 }
12316 {
12318 {
12320 }
12321 else
12322 {
12324 }
12325 }
12326 else
12327 {
12329 {
12331 }
12333 {
12335 {
12337 }
12339 {
12341 }
12342 switch (
rand.Next(2))
12343 {
12344 case 0:
12347 break;
12348 case 1:
12351 break;
12352 }
12353 }
12356 {
12358 {
12360 }
12362 {
12364 }
12366 {
12368 }
12369 }
12370 }
12371 }
12373 {
12375 {
12377 }
12379 {
12381 }
12383 {
12385 }
12386 else
12387 {
12389 }
12390 }
12392 {
12394 {
12396 }
12397 else
12398 {
12400 }
12401 }
12403 {
12405 {
12407 }
12409 {
12411 {
12413 }
12414 else
12415 {
12417 }
12418 }
12419 else
12420 {
12422 }
12423 }
12425 {
12427 {
12431 {
12433 }
12434 else
12435 {
12437 }
12438 }
12439 else
12440 {
12442 }
12443 }
12445 {
12447 }
12449 {
12451 {
12452 if (
time < 10800.0)
12453 {
12455 }
12456 else
12457 {
12459 }
12460 }
12461 else
12462 {
12464 {
12466 }
12468 {
12469 if (
rand.Next(2) == 0)
12470 {
12472 }
12473 else
12474 {
12476 }
12477 }
12480 {
12482 }
12483 }
12484 }
12486 {
12488 {
12490 }
12492 {
12494 }
12495 else
12496 {
12498 }
12499 }
12501 {
12503 }
12505 {
12507 }
12508 }
static bool IsEventOngoing
static bool[] BelongsToInvasionGoblinArmy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Goblin Army invasion...
static bool[] NoInvasionMusic
If true for a given NPC type (F:Terraria.NPC.type), then that NPC will not play its associated invasi...
static bool[] BelongsToInvasionMartianMadness
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Martian Madness inva...
static bool[] BelongsToInvasionOldOnesArmy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Old One's Army event...
static bool[] BelongsToInvasionPirate
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Pirate invasion....
static int[] InvasionSlotCount
If above 0 for a given NPC type (F:Terraria.NPC.type), and its associated invasion is NOT a wave-base...
static bool[] BelongsToInvasionFrostLegion
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Frost Legion invasio...
static bool[] HardenedSand
static SceneMetrics SceneMetrics
static readonly int maxMusic
static double time
The time that has passed since it last became day/night. Increased by F:Terraria....
static int maxTilesY
The height of the currently-loaded world in tiles.
static bool _shouldUseWindyDayMusic
static IAudioSystem audioSystem
static double worldSurface
The y-coordinate of the top of the dirt layer, in tile coordinates. Corresponds to 0' on the Depth Me...
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
static int netMode
Denotes the current network mode: 0 for single player client, 1 for multiplayer client,...
static double rockLayer
The y-coordinate of the top of the caverns layer, in tile coordinates.
static bool[] musicNoCrossFade
static bool _shouldUseStormMusic
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
static int undergroundBackground
static int maxTilesX
The width of the currently-loaded world in tiles.
static UnifiedRandom rand
static int UnderworldLayer
The y-coordinate of the top of the underworld, in tile coordinates.
static bool _isAsyncLoadComplete
static Player LocalPlayer
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria....
int Music
The ID of the music that plays when this NPC is on or near the screen. Defaults to -1,...
This class serves as a place for you to place all your properties and hooks for each NPC....
This serves as the central class from which SceneEffect functions are supported and carried out.
SceneEffectPriority
This enum dictates from low to high which SceneEffect selections take priority. Setting appropriate p...