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(); }
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(); } }