private void RepairButtonClicked(GameObject go) { if (this._benchItem != null) { NetCull.RPC(this._bench, "DoRepair", uLink.RPCMode.Server); } }
private void RepairButtonClicked(GameObject go) { if (this._benchItem != null) { NetCull.RPC((UnityEngine.MonoBehaviour) this._bench, "DoRepair", uLink.RPCMode.Server); } }
protected void SetLooter(uLink.NetworkPlayer ply) { this.occupierText = null; if (ply == uLink.NetworkPlayer.unassigned) { this.ClearLooter(); } else { if (ply == NetCull.player) { if (!this.thisClientIsInWindow) { try { this._currentlyUsingPlayer = ply; RPOS.OpenLootWindow(this); this.thisClientIsInWindow = true; } catch (Exception exception) { Debug.LogError(exception, this); NetCull.RPC((UnityEngine.MonoBehaviour) this, "StopLooting", uLink.RPCMode.Server); this.thisClientIsInWindow = false; ply = uLink.NetworkPlayer.unassigned; } } } else if ((this._currentlyUsingPlayer == NetCull.player) && (NetCull.player != uLink.NetworkPlayer.unassigned)) { this.ClearLooter(); } this._currentlyUsingPlayer = ply; } }
public void ClientClosedWorkbenchWindow() { if (this.IsLocalUsing()) { NetCull.RPC(this, "StopUsing", uLink.RPCMode.Server); } }
public void ClientClosedWorkbenchWindow() { if (this.IsLocalUsing()) { NetCull.RPC((MonoBehaviour)this, "StopUsing", RPCMode.Server); } }
private void SendWorkStatusUpdate() { if (this._currentlyUsingPlayer != NetworkPlayer.unassigned) { float num = (float)this._startTime_network; NetCull.RPC <float, float>((MonoBehaviour)this, "WorkStatusUpdate", this._currentlyUsingPlayer, num, this._workDuration); } }
private void SendWorkStatusUpdate() { if (this._currentlyUsingPlayer == uLink.NetworkPlayer.unassigned) { return; } float _startTimeNetwork = (float)this._startTime_network; NetCull.RPC <float, float>(this, "WorkStatusUpdate", this._currentlyUsingPlayer, _startTimeNetwork, this._workDuration); }
public void PlayerConnected(PlayerClient player) { byte[] buffer = new byte[this.StreamSize]; using (MemoryStream stream = new MemoryStream(buffer)) { using (BinaryWriter writer = new BinaryWriter(stream)) { this.Write(writer); } } NetCull.RPC <byte[]>((UnityEngine.MonoBehaviour) this, "ConnectSetup", player.netPlayer, buffer); }
public void PlayerConnected(PlayerClient player) { byte[] numArray = new byte[this.StreamSize]; using (MemoryStream memoryStream = new MemoryStream(numArray)) { using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream)) { this.Write(binaryWriter); } } NetCull.RPC <byte[]>(this, "ConnectSetup", player.netPlayer, numArray); }
private void ServerToggle(ulong timestamp) { this.on = !this.on; this.lastChangeTime = ((double)timestamp) / 1000.0; if (this.on) { this.TurnOn(); } else { this.TurnOff(); } NetCull.RPC <bool>((UnityEngine.MonoBehaviour) this, "ReadState", uLink.RPCMode.Others, this.on); }
private void ServerToggle(ulong timestamp) { this.on = !this.on; this.lastChangeTime = (double)((float)timestamp) / 1000; if (!this.on) { this.TurnOff(); } else { this.TurnOn(); } NetCull.RPC <bool>(this, "ReadState", uLink.RPCMode.Others, this.on); }
public void ClientClosedLootWindow() { try { if (this.IsLocalLooting()) { NetCull.RPC((UnityEngine.MonoBehaviour) this, "StopLooting", uLink.RPCMode.Server); } } finally { if (this.thisClientIsInWindow) { this.thisClientIsInWindow = false; } } }
public bool TossItem(int slot) { IInventoryItem inventoryItem; Facepunch.NetworkView networkView = base.networkView; if (!networkView || !networkView.isMine) { return(false); } Inventory inventory = this.inventory; if (!inventory || !inventory.GetItem(slot, out inventoryItem)) { return(false); } NetCull.RPC <byte>(this, "TOSS", uLink.RPCMode.Server, Inventory.RPCInteger(slot)); inventory.NULL_SLOT_FIX_ME(slot); return(true); }
public bool TossItem(int slot) { IInventoryItem item; NetworkView networkView = base.networkView; if ((networkView == null) || !networkView.isMine) { return(false); } Inventory inventory = this.inventory; if ((inventory == null) || !inventory.GetItem(slot, out item)) { return(false); } NetCull.RPC <byte>((MonoBehaviour)this, "TOSS", RPCMode.Server, Inventory.RPCInteger(slot)); inventory.NULL_SLOT_FIX_ME(slot); return(true); }
public void InvGetNetworkUpdate() { uLink.BitStream stream = new uLink.BitStream(false); FougeritePlayer.Inventory.InternalInventory.GenerateInvBitStream(ref stream, false); NetCull.RPC(FougeritePlayer.Inventory.InternalInventory, "GNUP", FougeritePlayer.NetworkPlayer, stream.GetDataByteArray()); }