Skip to content

Commit

Permalink
Update NPC Bots db_characters SQL
Browse files Browse the repository at this point in the history
Updated the db_characters SQL files relating to NPC Bots.

- Updated charset to utf8mb4.
- Added collate utf8mb_unicode_ci.
- Added comments.
- Replaced /custom SQL files with top level SQL files.
  • Loading branch information
JackRayfish committed Jul 31, 2024
1 parent 1801baa commit f2dca29
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 51 deletions.
7 changes: 4 additions & 3 deletions data/sql/base/db_characters/characters_npcbot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `characters_npcbot`;
CREATE TABLE `characters_npcbot` (
`entry` int(10) unsigned NOT NULL COMMENT 'creature_template.entry',
`owner` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'characters.guid (lowguid)',
`roles` int(10) unsigned NOT NULL COMMENT 'bitmask: tank(1),dps(2),heal(4),ranged(8)',
`owner` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'characters.guid',
`roles` int(10) unsigned NOT NULL COMMENT 'Bitmask: Tank(1), DPS(2), Healer(4), Ranged(8)',
`spec` tinyint(3) unsigned NOT NULL DEFAULT '1',
`faction` int(10) unsigned NOT NULL DEFAULT '35',
`hire_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`equipMhEx` int(10) unsigned NOT NULL DEFAULT '0',
`equipOhEx` int(10) unsigned NOT NULL DEFAULT '0',
`equipRhEx` int(10) unsigned NOT NULL DEFAULT '0',
Expand All @@ -30,4 +31,4 @@ CREATE TABLE `characters_npcbot` (
`equipNeck` int(10) unsigned NOT NULL DEFAULT '0',
`spells_disabled` longtext,
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Character System';
14 changes: 14 additions & 0 deletions data/sql/base/db_characters/characters_npcbot_gear_storage.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for characters_npcbot_gear_storage
-- ----------------------------
DROP TABLE IF EXISTS `characters_npcbot_gear_storage`;
CREATE TABLE `characters_npcbot_gear_storage` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`item_guid` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`item_guid`),
KEY `existing_player` (`guid`),
CONSTRAINT `FK_npcbot_gear_storage_item_guid` FOREIGN KEY (`item_guid`) REFERENCES `item_instance` (`guid`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_npcbot_gear_storage_guid` FOREIGN KEY (`guid`) REFERENCES `characters` (`guid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Gear Storage System';
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ CREATE TABLE `characters_npcbot_group_member` (
`subgroup` tinyint(3) unsigned NOT NULL DEFAULT '0',
`roles` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Group System';
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for characters_npcbot_logs
-- ----------------------------
DROP TABLE IF EXISTS `characters_npcbot_logs`;
CREATE TABLE `characters_npcbot_logs` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
Expand All @@ -16,4 +19,4 @@ CREATE TABLE `characters_npcbot_logs` (
`param5` varchar(51) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Logs System';
2 changes: 1 addition & 1 deletion data/sql/base/db_characters/characters_npcbot_stats.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ CREATE TABLE `characters_npcbot_stats` (
`expertise` int(10) unsigned NOT NULL DEFAULT '0',
`armorPenPct` float unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Stats System';
8 changes: 4 additions & 4 deletions data/sql/base/db_characters/characters_npcbot_transmog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE `characters_npcbot_transmog` (
`entry` int(10) unsigned NOT NULL,
`slot` tinyint(3) unsigned NOT NULL,
`item_id` int(10) unsigned NOT NULL DEFAULT '0',
`fake_id` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`slot`),
CONSTRAINT `bot_id` FOREIGN KEY (`entry`) REFERENCES `characters_npcbot` (`entry`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`fake_id` int(10) unsigned NOT NULL DEFAULT '-1',
PRIMARY KEY (`entry`, `slot`),
CONSTRAINT `FK_npcbot_transmog_entry` FOREIGN KEY (`entry`) REFERENCES `characters_npcbot` (`entry`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Transmog System';
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE `creature_template_npcbot_appearance` (
`haircolor` tinyint(3) unsigned NOT NULL DEFAULT '0',
`features` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Appearance System';

-- ----------------------------
-- Records
Expand Down
2 changes: 1 addition & 1 deletion data/sql/base/db_world/creature_template_npcbot_extras.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CREATE TABLE `creature_template_npcbot_extras` (
`class` tinyint(3) unsigned NOT NULL DEFAULT '1',
`race` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Extras System';

-- ----------------------------
-- Records
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
--
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for creature_template_outfits
-- Table structure for creature_template_npcbot_outfits
-- ----------------------------
DROP TABLE IF EXISTS `creature_template_outfits`;
CREATE TABLE IF NOT EXISTS `creature_template_outfits` (
DROP TABLE IF EXISTS `creature_template_npcbot_outfits`;
CREATE TABLE IF NOT EXISTS `creature_template_npcbot_outfits` (
`entry` int(10) unsigned NOT NULL,
`race` tinyint(3) unsigned NOT NULL DEFAULT '1',
`gender` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0 for male, 1 for female',
`gender` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Male (0) or Female (1)',
`skin` tinyint(3) unsigned NOT NULL DEFAULT '0',
`face` tinyint(3) unsigned NOT NULL DEFAULT '0',
`hair` tinyint(3) unsigned NOT NULL DEFAULT '0',
Expand All @@ -25,11 +25,11 @@ CREATE TABLE IF NOT EXISTS `creature_template_outfits` (
`back` int(10) unsigned NOT NULL DEFAULT '0',
`tabard` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='NPC Bot Outfit System';

-- ----------------------------
-- Records
-- ----------------------------
INSERT INTO `creature_template_outfits` VALUES
INSERT INTO `creature_template_npcbot_outfits` VALUES
('70551', '2', '0', '0', '14', '9', '7', '5', '0', '0', '0', '0', '59194', '64674', '0', '36248', '0', '0', '0'),
('70552', '2', '0', '0', '14', '9', '7', '5', '0', '0', '0', '0', '59194', '64674', '0', '36248', '0', '0', '0');

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions data/sql/custom/db_characters/2024_03_12_00_characters_npcbot.sql

This file was deleted.

0 comments on commit f2dca29

Please sign in to comment.