public override void Load() { base.Load(); TimeStopManager = new TimeStopManager(); TimeSkipManager = new TimeSkipManager(); if (!Main.dedServ) { UIManager.Instance.Initialize(); TextureLoader.Load(); Ref <Effect> screenRef = new Ref <Effect>(GetEffect("Effects/ShockwaveEffect")); // The path to the compiled shader file. Filters.Scene["Shockwave"] = new Filter(new ScreenShaderData(screenRef, "Shockwave"), EffectPriority.VeryHigh); Filters.Scene["Shockwave"].Load(); SkyManager.Instance["TBA:TimeStopInvert"] = new PerfectlyNormalSky(); Filters.Scene["TBA:TimeStopInvert"] = new Filter(new ScreenShaderData("FilterInvert"), EffectPriority.High); Filters.Scene["TBA:FreezeSky"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(.7f, .7f, .7f), EffectPriority.VeryHigh); SkyManager.Instance["TBA:FreezeSky"] = new FreezeSky(); AddEquipTexture(null, EquipType.Head, "DiavoloHead", "TBAR/Items/Vanity/VinegarDisguise/DiavoloHead_Head"); AddEquipTexture(null, EquipType.Body, "DiavoloBody", "TBAR/Items/Vanity/VinegarDisguise/DiavoloChest_Body", "TBAR/Items/Vanity/VinegarDisguise/DiavoloChest_Arms"); } SteamHelper.Initialize(); OnEdits.Instance.LoadEdits(); StandLoader.Instance.Load(); TBARInputs.Load(this); }
public override void HandlePacket(BinaryReader reader, int whoAmI) { PacketType type = (PacketType)reader.ReadByte(); switch (type) { case PacketType.SyncStand: byte playerNumber = reader.ReadByte(); string name = reader.ReadString(); TBARPlayer plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand = StandLoader.Instance.Get(name); if (IsServer) { plr.PlayerStand = StandLoader.Instance.Get(name); } break; case PacketType.UsedCombo: this.Logger.Debug("Combo packet received"); playerNumber = reader.ReadByte(); string comboName = reader.ReadString(); this.Logger.Debug($"Combo Name {comboName}"); plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand.ForceCombo(comboName, plr.player); if (IsServer) { StandCombo.SendPacket(plr.player, comboName, playerNumber); } break; case PacketType.StandChanged: playerNumber = reader.ReadByte(); name = reader.ReadString(); plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand = StandLoader.Instance.Get(name); if (IsServer) { plr.PlayerStand = StandLoader.Instance.Get(name); plr.SendStandChangedPacket(playerNumber); } break; case PacketType.RemoveTimeStopInstance: var timeStopIndex = reader.ReadInt32(); TimeStopManager.RemoveEffectAt(timeStopIndex); break; } }