private string GetCDefDataID(
            string defName, string cdef)
        {
            BINEntry entry = myGameBin.GetEntryByName(defName);

            if (entry != null)
            {
                DefinitionType def =
                    FileDatabase.Instance.Definitions.GetDefinition(
                        entry.Definition);

                def.ReadIn(entry);

                if (def.CDefs != null)
                {
                    CDefLink link = def.get_CDefLinks(cdef);

                    if (link != null)
                    {
                        return(link.DataID.ToString());
                    }
                }
            }

            return(null);
        }
        private void DefTypeLink(
            BINEntry entryDst, BINEntry entrySrc, string cdef)
        {
            DefinitionType def =
                FileDatabase.Instance.Definitions.GetDefinition(
                    entryDst.Definition);

            def.ReadIn(entryDst);

            if (def.CDefs == null)
            {
                return;
            }

            CDefLink link = def.get_CDefLinks(cdef);

            if (link != null)
            {
                link.DataID = entrySrc.ID.ToString();

                def.Write(entryDst);

                return;
            }

            def = null;
        }