public void CollectItem(ItemEntity item) { Client.SendPacket(new PlayerCollectItemEntityPacket { CollectEntityId = item.Id, CollectingEntityId = Id }); AddToInventory(item.TypeId); }
public SpawnItemEntityPacket(ItemEntity entity) { EntityId = entity.Id; TypeId = (short)entity.TypeId; Count = (byte)entity.Count; X = (int)Math.Floor(entity.X * 32); Y = (int)Math.Floor(entity.Y * 32); Z = (int)Math.Floor(entity.Z * 32); MoveX = (byte)(entity.MoveX * 128); MoveY = (byte)(entity.MoveY * 128); MoveZ = (byte)(entity.MoveZ * 128); }