-- MySQL dump 10.16  Distrib 10.2.17-MariaDB, for Linux (x86_64)
--
-- Host: mariadb    Database: bnetdocs_phoenix_dev
-- ------------------------------------------------------
-- Server version	10.1.36-MariaDB

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Dumping routines for database 'bnetdocs_phoenix_dev'
--

--
-- Table structure for table `data_structures`
--

DROP TABLE IF EXISTS `data_structures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `data_structures` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `parent_id` bigint(20) unsigned DEFAULT NULL,
  `parent_offset` int(10) unsigned DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `data_structures`
--
-- ORDER BY:  `id`

LOCK TABLES `data_structures` WRITE;
/*!40000 ALTER TABLE `data_structures` DISABLE KEYS */;
INSERT INTO `data_structures` (`id`, `name`, `parent_id`, `parent_offset`, `description`) VALUES (0,'BNCS Header',NULL,NULL,NULL),(1,'BNLS Header',NULL,NULL,NULL),(2,'MCP Header',NULL,NULL,NULL),(3,'D2GS Uncompressed Header',NULL,NULL,NULL),(4,'D2GS Compressed Header',NULL,NULL,NULL),(5,'D2GS Compressed Header Extended',NULL,NULL,NULL),(6,'Botnet Header',NULL,NULL,NULL),(7,'W3GS Header',NULL,NULL,NULL),(8,'Storm UDP Packet',NULL,NULL,NULL);
/*!40000 ALTER TABLE `data_structures` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `data_structure_types`
--

DROP TABLE IF EXISTS `data_structure_types`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `data_structure_types` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `bit_size_min` int(10) unsigned NOT NULL,
  `bit_size_max` int(10) unsigned DEFAULT NULL,
  `big_endian` tinyint(1) DEFAULT NULL,
  `signed` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `data_structure_types`
--
-- ORDER BY:  `id`

LOCK TABLES `data_structure_types` WRITE;
/*!40000 ALTER TABLE `data_structure_types` DISABLE KEYS */;
INSERT INTO `data_structure_types` (`id`, `name`, `bit_size_min`, `bit_size_max`, `big_endian`, `signed`) VALUES (0,'uint8',8,8,0,0),(1,'uint16',16,16,0,0),(2,'uint32',32,32,0,0),(3,'uint64',64,64,0,0),(4,'int8',8,8,0,1),(5,'int16',16,16,0,1),(6,'int32',32,32,0,1),(7,'int64',64,64,0,1),(8,'string',8,NULL,NULL,NULL),(9,'void',0,NULL,NULL,NULL);
/*!40000 ALTER TABLE `data_structure_types` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `data_structure_skeleton`
--

DROP TABLE IF EXISTS `data_structure_skeleton`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `data_structure_skeleton` (
  `data_structure_id` bigint(20) unsigned NOT NULL,
  `offset` int(10) unsigned NOT NULL,
  `type_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `const_value_uint` bigint(20) unsigned DEFAULT NULL,
  `const_value_int` bigint(20) DEFAULT NULL,
  `const_value_string` text COLLATE utf8_unicode_ci,
  KEY `idx_data_structure_id` (`data_structure_id`),
  KEY `idx_offset` (`offset`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `data_structure_skeleton`
--

LOCK TABLES `data_structure_skeleton` WRITE;
/*!40000 ALTER TABLE `data_structure_skeleton` DISABLE KEYS */;
INSERT INTO `data_structure_skeleton` (`data_structure_id`, `offset`, `type_id`, `name`, `const_value_uint`, `const_value_int`, `const_value_string`) VALUES (0,0,0,'Padding Byte',255,NULL,NULL),(0,1,0,'Message Id',NULL,NULL,NULL),(0,2,1,'Message Length',NULL,NULL,NULL),(0,4,9,'Message Data',NULL,NULL,NULL),(1,0,1,'Message Length',NULL,NULL,NULL),(1,2,0,'Message Id',NULL,NULL,NULL),(1,3,9,'Message Data',NULL,NULL,NULL),(2,0,1,'Message Length',NULL,NULL,NULL),(2,2,0,'Message Id',NULL,NULL,NULL),(2,3,9,'Message Data',NULL,NULL,NULL),(3,0,0,'Message Id',NULL,NULL,NULL),(3,1,9,'Message Data',NULL,NULL,NULL),(4,0,0,'Message Length',NULL,NULL,NULL),(4,1,9,'Message Data',NULL,NULL,NULL),(5,0,0,'Message Length High Bits',NULL,NULL,NULL),(5,1,0,'Message Length Low Bits',NULL,NULL,NULL),(5,2,9,'Message Data',NULL,NULL,NULL),(6,0,0,'Protocol Version',1,NULL,NULL),(6,1,0,'Message Id',NULL,NULL,NULL),(6,2,1,'Message Length',NULL,NULL,NULL),(6,4,9,'Message Data',NULL,NULL,NULL),(7,0,0,'Padding Byte',247,NULL,NULL),(7,1,0,'Message Id',NULL,NULL,NULL),(7,2,1,'Message Length',NULL,NULL,NULL),(7,4,9,'Message Data',NULL,NULL,NULL),(8,0,1,'Checksum',NULL,NULL,NULL),(8,2,1,'Header Length',NULL,NULL,NULL),(8,4,1,'Seq1',NULL,NULL,NULL),(8,6,1,'Seq2',NULL,NULL,NULL),(8,8,0,'CLS',NULL,NULL,NULL),(8,9,0,'Command',NULL,NULL,NULL),(8,10,0,'PlayerID',NULL,NULL,NULL),(8,11,0,'Resend',NULL,NULL,NULL);
/*!40000 ALTER TABLE `data_structure_skeleton` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-10-21 18:33:34
