Example #1
0
 // Token: 0x06000DDD RID: 3549 RVA: 0x000630CC File Offset: 0x000612CC
 private void UpdateAttach()
 {
     if (this.m_nview.IsOwner())
     {
         base.CancelInvoke("UpdateAttach");
         Player localPlayer = Player.m_localPlayer;
         if (this.m_queuedItem != null && localPlayer != null && localPlayer.GetInventory().ContainsItem(this.m_queuedItem) && !this.HaveAttachment())
         {
             ItemDrop.ItemData itemData = this.m_queuedItem.Clone();
             itemData.m_stack = 1;
             this.m_nview.GetZDO().Set("item", this.m_queuedItem.m_dropPrefab.name);
             ItemDrop.SaveToZDO(itemData, this.m_nview.GetZDO());
             localPlayer.UnequipItem(this.m_queuedItem, true);
             localPlayer.GetInventory().RemoveOneItem(this.m_queuedItem);
             this.m_nview.InvokeRPC(ZNetView.Everybody, "SetVisualItem", new object[]
             {
                 itemData.m_dropPrefab.name,
                 itemData.m_variant
             });
             Transform attach = this.GetAttach(this.m_queuedItem);
             this.m_effects.Create(attach.transform.position, Quaternion.identity, null, 1f);
         }
         this.m_queuedItem = null;
     }
 }
Example #2
0
 private void Save()
 {
     if ((UnityEngine.Object) this.m_nview == (UnityEngine.Object)null || !this.m_nview.IsValid() || !this.m_nview.IsOwner())
     {
         return;
     }
     ItemDrop.SaveToZDO(this.m_itemData, this.m_nview.GetZDO());
 }
Example #3
0
 // Token: 0x060006D8 RID: 1752 RVA: 0x00038984 File Offset: 0x00036B84
 private void Save()
 {
     if (this.m_nview == null || !this.m_nview.IsValid())
     {
         return;
     }
     if (this.m_nview.IsOwner())
     {
         ItemDrop.SaveToZDO(this.m_itemData, this.m_nview.GetZDO());
     }
 }
Example #4
0
 // Token: 0x060006DA RID: 1754 RVA: 0x000389E8 File Offset: 0x00036BE8
 public void LoadFromExternalZDO(ZDO zdo)
 {
     ItemDrop.LoadFromZDO(this.m_itemData, zdo);
     ItemDrop.SaveToZDO(this.m_itemData, this.m_nview.GetZDO());
 }