Gets the T:Terraria.ID.InvasionID associated with the given NPC type (F:Terraria.NPC.type).
- Parameters
-
| npcID | The NPC type to check. |
- Returns
0 for NPCs not affiliated with any invasion.
A positive T:Terraria.ID.InvasionID for NPCs affiliated with standard events, such as the Goblin Army.
A negative T:Terraria.ID.InvasionID for NPCs affiliated with a wave-based event, such as the Pumpkin Moon. Wave-based events are prefixed with "Cached" in T:Terraria.ID.InvasionID.
Definition at line 83966 of file NPC.cs.
83967 {
83970 {
83972 }
83974 {
83976 }
83978 {
83980 }
83982 {
83984 {
83985 case 338:
83986 case 339:
83987 case 340:
83988 case 341:
83989 case 342:
83990 case 343:
83991 case 344:
83992 case 345:
83993 case 346:
83994 case 347:
83995 case 348:
83996 case 349:
83997 case 350:
83999 break;
84000 case 305:
84001 case 306:
84002 case 307:
84003 case 308:
84004 case 309:
84005 case 310:
84006 case 311:
84007 case 312:
84008 case 313:
84009 case 314:
84010 case 315:
84011 case 325:
84012 case 326:
84013 case 327:
84014 case 329:
84015 case 330:
84017 break;
84018 case 547:
84019 case 548:
84020 case 549:
84021 case 550:
84022 case 551:
84023 case 552:
84024 case 553:
84025 case 554:
84026 case 555:
84027 case 556:
84028 case 557:
84029 case 558:
84030 case 559:
84031 case 560:
84032 case 561:
84033 case 562:
84034 case 563:
84035 case 564:
84036 case 565:
84037 case 566:
84038 case 567:
84039 case 568:
84040 case 569:
84041 case 570:
84042 case 571:
84043 case 572:
84044 case 573:
84045 case 574:
84046 case 575:
84047 case 576:
84048 case 577:
84049 case 578:
84051 break;
84052 }
84053 }
84054 else
84055 {
84057 }
84059 }
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[] BelongsToInvasionMartianMadness
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Martian Madness inva...
static bool[] BelongsToInvasionPirate
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Pirate invasion....
static bool[] BelongsToInvasionFrostLegion
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Frost Legion invasio...
References Terraria.ID.NPCID.Sets.BelongsToInvasionFrostLegion, Terraria.ID.NPCID.Sets.BelongsToInvasionGoblinArmy, Terraria.ID.NPCID.Sets.BelongsToInvasionMartianMadness, and Terraria.ID.NPCID.Sets.BelongsToInvasionPirate.
Referenced by Terraria.Player.AllowShimmerDodge(), Terraria.NPC.checkDead(), Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.IsInvalid(), and Terraria.Main.UpdateAudio_DecideOnNewMusic().