public override void OnPickUp(GameObject powerGo, int clientGuid) { Debug.Log("In pick up of BackToschool"); Packet p = PacketBuilder.BuildBindOffensiveItem(clientGuid, Config.PowerType.BACK_TO_SCHOOL); GameMgr.Instance.s.SendPacketTo(GameMgr.Instance.s.GetTcpClient(clientGuid), p); base.OnPickUp(powerGo, clientGuid); }
public override void OnPickUp(GameObject powerGo, int clientGuid) { System.Net.Sockets.TcpClient client = GameMgr.Instance.s.GetTcpClient(clientGuid); GameMgr.Instance.s.SendPacketTo(client, PacketBuilder.BuildPlayAnnouncePacket(Announce.ANNOUNCE_PWR_PICK_UP, 0, "BRING A SWORD TO A BOMBFIGHT")); Packet p = PacketBuilder.BuildBindOffensiveItem(clientGuid, Config.PowerType.BRING_A_SW_TO_A_GF); GameMgr.Instance.s.SendPacketTo(client, p); GameObject go = ObjectMgr.Instance.Get(clientGuid); BomberController bc = go.GetComponent <BomberController>(); bc.hasOffensiveItem = (int)Config.PowerType.BRING_A_SW_TO_A_GF; base.OnPickUp(powerGo, clientGuid); }