private void SendUpdate() { this.isInvokingSendUpdate = false; if (!base.baseEntity.IsValid()) { return; } using (PlayerUpdateLoot d = Pool.Get <PlayerUpdateLoot>()) { if (this.entitySource && this.entitySource.net != null) { d.entityID = this.entitySource.net.ID; } if (this.itemSource != null) { d.itemID = this.itemSource.uid; } if (this.containers.Count > 0) { d.containers = Pool.Get <List <ProtoBuf.ItemContainer> >(); foreach (ItemContainer container in this.containers) { d.containers.Add(container.Save()); } } base.baseEntity.ClientRPCPlayer <PlayerUpdateLoot>(null, base.baseEntity, "UpdateLoot", d); } }
private void SendUpdate() { this.isInvokingSendUpdate = false; if (!this.baseEntity.IsValid()) { return; } using (PlayerUpdateLoot playerUpdateLoot = (PlayerUpdateLoot)Pool.Get <PlayerUpdateLoot>()) { if (Object.op_Implicit((Object)this.entitySource) && this.entitySource.net != null) { playerUpdateLoot.entityID = this.entitySource.net.ID; } if (this.itemSource != null) { playerUpdateLoot.itemID = (__Null)(int)this.itemSource.uid; } if (this.containers.Count > 0) { playerUpdateLoot.containers = (__Null)Pool.Get <List <ItemContainer> >(); foreach (ItemContainer container in this.containers) { ((List <ItemContainer>)playerUpdateLoot.containers).Add(container.Save()); } } this.baseEntity.ClientRPCPlayer <PlayerUpdateLoot>((Connection)null, this.baseEntity, "UpdateLoot", playerUpdateLoot); } }