public InhibitorStateUpdate(Inhibitor inhi) : base(PacketCmd.PKT_S2C_InhibitorState, inhi.NetId) { buffer.Write((byte)inhi.getState()); buffer.Write((byte)0); buffer.Write((byte)0); }
public void NotifyInhibitorState(Inhibitor inhibitor, GameObject killer = null, List <Champion> assists = null) { UnitAnnounce announce; switch (inhibitor.getState()) { case InhibitorState.Dead: announce = new UnitAnnounce(UnitAnnounces.InhibitorDestroyed, inhibitor, killer, assists); _game.PacketHandlerManager.broadcastPacket(announce, Channel.CHL_S2C); var anim = new InhibitorDeathAnimation(inhibitor, killer); _game.PacketHandlerManager.broadcastPacket(anim, Channel.CHL_S2C); break; case InhibitorState.Alive: announce = new UnitAnnounce(UnitAnnounces.InhibitorSpawned, inhibitor, killer, assists); _game.PacketHandlerManager.broadcastPacket(announce, Channel.CHL_S2C); break; } var packet = new InhibitorStateUpdate(inhibitor); _game.PacketHandlerManager.broadcastPacket(packet, Channel.CHL_S2C); }