public static void SpawnParticlesDirect( ParticleOrchestraType type, ParticleOrchestraSettings settings) { if (Main.netMode == 2) { return; } switch (type) { case ParticleOrchestraType.Keybrand: ParticleOrchestrator.Spawn_Keybrand(settings); break; case ParticleOrchestraType.FlameWaders: ParticleOrchestrator.Spawn_FlameWaders(settings); break; case ParticleOrchestraType.StellarTune: ParticleOrchestrator.Spawn_StellarTune(settings); break; case ParticleOrchestraType.WallOfFleshGoatMountFlames: ParticleOrchestrator.Spawn_WallOfFleshGoatMountFlames(settings); break; case ParticleOrchestraType.BlackLightningHit: ParticleOrchestrator.Spawn_BlackLightningHit(settings); break; case ParticleOrchestraType.RainbowRodHit: ParticleOrchestrator.Spawn_RainbowRodHit(settings); break; case ParticleOrchestraType.BlackLightningSmall: ParticleOrchestrator.Spawn_BlackLightningSmall(settings); break; case ParticleOrchestraType.StardustPunch: ParticleOrchestrator.Spawn_StardustPunch(settings); break; } }
public static void RequestParticleSpawn( bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int?overrideInvokingPlayerIndex = null) { settings.IndexOfPlayerWhoInvokedThis = (byte)Main.myPlayer; if (overrideInvokingPlayerIndex.HasValue) { settings.IndexOfPlayerWhoInvokedThis = (byte)overrideInvokingPlayerIndex.Value; } if (clientOnly) { ParticleOrchestrator.SpawnParticlesDirect(type, settings); } else { NetManager.Instance.SendToServerOrLoopback(NetParticlesModule.Serialize(type, settings)); } }