Example #1
0
        public void BroadcastUnequip(Pickupable pickupable, GameObject owner, string slot)
        {
            string itemGuid  = GuidHelper.GetGuid(pickupable.gameObject);
            string ownerGuid = GuidHelper.GetGuid(owner);

            EquipmentRemoveItem removeEquipment = new EquipmentRemoveItem(ownerGuid, slot, itemGuid);

            packetSender.Send(removeEquipment);
        }
Example #2
0
        public void Unequip(Pickupable pickupable, GameObject owner, string slot)
        {
            string  itemGuid  = GuidHelper.GetGuid(pickupable.gameObject);
            string  ownerGuid = GuidHelper.GetGuid(owner);
            Vector3 ownerPos  = owner.transform.position;

            EquipmentRemoveItem removeEquipment = new EquipmentRemoveItem(ownerGuid, slot, itemGuid, ownerPos);

            packetSender.Send(removeEquipment);
        }
Example #3
0
        public void BroadcastUnequip(Pickupable pickupable, GameObject owner, string slot)
        {
            string itemGuid  = GuidHelper.GetGuid(pickupable.gameObject);
            string ownerGuid = GuidHelper.GetGuid(owner);

            Player player                   = owner.GetComponent <Player>();
            bool   isPlayerEquipment        = (player != null);
            EquipmentRemoveItem equipPacket = new EquipmentRemoveItem(ownerGuid, slot, itemGuid, isPlayerEquipment);

            packetSender.Send(equipPacket);
        }
Example #4
0
        public void BroadcastUnequip(Pickupable pickupable, GameObject owner, string slot)
        {
            string itemGuid  = GuidHelper.GetGuid(pickupable.gameObject);
            string ownerGuid = GuidHelper.GetGuid(owner);

            if (pickupable.GetTechType() == TechType.VehicleStorageModule)
            {
                List <InteractiveChildObjectIdentifier> childIdentifiers = VehicleChildObjectIdentifierHelper.ExtractGuidsOfInteractiveChildren(owner);
                VehicleChildUpdate vehicleChildInteractiveData           = new VehicleChildUpdate(ownerGuid, childIdentifiers);
                packetSender.Send(vehicleChildInteractiveData);
            }

            Player player                   = owner.GetComponent <Player>();
            bool   isPlayerEquipment        = (player != null);
            EquipmentRemoveItem equipPacket = new EquipmentRemoveItem(ownerGuid, slot, itemGuid, isPlayerEquipment);

            packetSender.Send(equipPacket);
        }