Ejemplo n.º 1
0
        public void SendBoltTaken()
        {
            if (!BoltNetwork.isRunning)
            {
                return;
            }
            if (base.entity.isOwner || base.entity.source == null)
            {
                return;
            }
            TakeClothingOutfit takeClothingOutfit = TakeClothingOutfit.Create(base.entity.source);

            takeClothingOutfit.target = base.entity;
            takeClothingOutfit.Send();
        }
Ejemplo n.º 2
0
 public override void OnEvent(TakeClothingOutfit evnt)
 {
     if (this.ValidateSender(evnt, SenderTypes.Any))
     {
         if (evnt.target == null)
         {
             return;
         }
         if (!evnt.target.isOwner)
         {
             return;
         }
         ClothingPickup componentInChildren = evnt.target.GetComponentInChildren <ClothingPickup>(true);
         if (componentInChildren == null)
         {
             return;
         }
         componentInChildren.DoBoltTaken();
     }
 }