Ejemplo n.º 1
0
 private void RepairButtonClicked(GameObject go)
 {
     if (this._benchItem != null)
     {
         NetCull.RPC(this._bench, "DoRepair", uLink.RPCMode.Server);
     }
 }
Ejemplo n.º 2
0
 private void RepairButtonClicked(GameObject go)
 {
     if (this._benchItem != null)
     {
         NetCull.RPC((UnityEngine.MonoBehaviour) this._bench, "DoRepair", uLink.RPCMode.Server);
     }
 }
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
 public void ClientClosedWorkbenchWindow()
 {
     if (this.IsLocalUsing())
     {
         NetCull.RPC(this, "StopUsing", uLink.RPCMode.Server);
     }
 }
Ejemplo n.º 5
0
 public void ClientClosedWorkbenchWindow()
 {
     if (this.IsLocalUsing())
     {
         NetCull.RPC((MonoBehaviour)this, "StopUsing", RPCMode.Server);
     }
 }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
    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);
    }
Ejemplo n.º 8
0
 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);
 }
Ejemplo n.º 9
0
 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);
 }
Ejemplo n.º 10
0
 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);
 }
Ejemplo n.º 11
0
 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);
 }
Ejemplo n.º 12
0
 public void ClientClosedLootWindow()
 {
     try
     {
         if (this.IsLocalLooting())
         {
             NetCull.RPC((UnityEngine.MonoBehaviour) this, "StopLooting", uLink.RPCMode.Server);
         }
     }
     finally
     {
         if (this.thisClientIsInWindow)
         {
             this.thisClientIsInWindow = false;
         }
     }
 }
Ejemplo n.º 13
0
    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);
    }
Ejemplo n.º 14
0
    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);
    }
Ejemplo n.º 15
0
 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());
 }