public static void UpdateTime() { if (Main.netMode == 1) { return; } CultistRitual.delay -= Main.dayRate; if (CultistRitual.delay < 0) { CultistRitual.delay = 0; } CultistRitual.recheck -= Main.dayRate; if (CultistRitual.recheck < 0) { CultistRitual.recheck = 0; } if (CultistRitual.delay != 0 || CultistRitual.recheck != 0) { return; } CultistRitual.recheck = 600; if (NPC.AnyDanger()) { CultistRitual.recheck *= 6; } else { CultistRitual.TrySpawning(Main.dungeonX, Main.dungeonY); } }
public static void TrySpawning(int x, int y) { if (WorldGen.PlayerLOS(x - 6, y) || WorldGen.PlayerLOS(x + 6, y) || !CultistRitual.CheckRitual(x, y)) { return; } NPC.NewNPC(x * 16 + 8, (y - 4) * 16 - 8, 437, 0, 0.0f, 0.0f, 0.0f, 0.0f, (int)byte.MaxValue); }
private static bool CheckRitual(int x, int y) { if (CultistRitual.delay != 0 || !Main.hardMode || (!NPC.downedGolemBoss || !NPC.downedBoss3) || (y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7]) || NPC.AnyNPCs(437))) return false; Vector2 Center = new Vector2((float) (x * 16 + 8), (float) (y * 16 - 64 - 8 - 27)); Point[] spawnPoints = (Point[]) null; return CultistRitual.CheckFloor(Center, out spawnPoints); }
private static bool CheckRitual(int x, int y) { if (CultistRitual.delay != 0 || !Main.hardMode || (!NPC.downedGolemBoss || !NPC.downedBoss3) || (y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7]) || NPC.AnyNPCs(437))) { return(false); } Vector2 Center; // ISSUE: explicit reference operation ((Vector2)@Center).\u002Ector((float)(x * 16 + 8), (float)(y * 16 - 64 - 8 - 27)); Point[] spawnPoints = (Point[])null; return(CultistRitual.CheckFloor(Center, out spawnPoints)); }
private static bool CheckRitual(int x, int y) { if (CultistRitual.delay != 0 || !Main.hardMode || (!NPC.downedGolemBoss || !NPC.downedBoss3) || (y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7]) || NPC.AnyNPCs(437))) { return(false); } Vector2 Center = new Vector2((float)(x * 16 + 8), (float)(y * 16 - 64 - 8 - 27)); Point[] pointArray = (Point[])null; // ISSUE: explicit reference operation // ISSUE: variable of a reference type Point[]& spawnPoints = @pointArray; return(CultistRitual.CheckFloor(Center, spawnPoints)); }
public static void UpdateTime() { if (Main.netMode == 1) { return; } CultistRitual.delay = CultistRitual.delay - Main.dayRate; if (CultistRitual.delay < 0) { CultistRitual.delay = 0; } CultistRitual.recheck = CultistRitual.recheck - Main.dayRate; if (CultistRitual.recheck < 0) { CultistRitual.recheck = 0; } if (CultistRitual.delay == 0 && CultistRitual.recheck == 0) { CultistRitual.recheck = 600; bool flag = false; if (!flag) { int num = 0; while (num < 200) { if (!Main.npc[num].active || !Main.npc[num].boss && !NPCID.Sets.TechnicallyABoss[Main.npc[num].type]) { num++; } else { flag = true; break; } } } if (flag) { CultistRitual.recheck = CultistRitual.recheck * 6; return; } CultistRitual.TrySpawning(Main.dungeonX, Main.dungeonY); } }
// Token: 0x0600127D RID: 4733 RVA: 0x00417E48 File Offset: 0x00416048 private static bool CheckRitual(int x, int y) { if (CultistRitual.delay != 0 || !Main.hardMode || !NpcMgr.downedGolemBoss || !NpcMgr.downedBoss3) { return(false); } if (y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7])) { return(false); } if (NPC.AnyNPCs(437)) { return(false); } Vector2 arg_64_0 = new Vector2((float)(x * 16 + 8), (float)(y * 16 - 64 - 8 - 27)); Point[] array = null; return(CultistRitual.CheckFloor(arg_64_0, out array)); }
private static bool CheckRitual(int x, int y) { if (CultistRitual.delay != 0 || !Main.hardMode || !NPC.downedGolemBoss || !NPC.downedBoss3) { return(false); } if (y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7])) { return(false); } if (NPC.AnyNPCs(437)) { return(false); } Vector2 vector2 = new Vector2((float)(x * 16 + 8), (float)(y * 16 - 64 - 8 - 27)); Point[] pointArray = null; if (!CultistRitual.CheckFloor(vector2, out pointArray)) { return(false); } return(true); }