Skip to content

Commit

Permalink
[13957] Playerbot: move SQL updates into core
Browse files Browse the repository at this point in the history
  • Loading branch information
cala committed Jul 31, 2017
1 parent 188a95c commit 3784564
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 60 deletions.
194 changes: 193 additions & 1 deletion sql/base/characters.sql

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions sql/base/mangos.sql
Expand Up @@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) DEFAULT NULL,
`creature_ai_version` varchar(120) DEFAULT NULL,
`cache_id` int(10) DEFAULT '0',
`required_13956_01_mangos_spell_chain_totems_typos` bit(1) DEFAULT NULL
`required_13957_01_mangos_gossip_menu_option` bit(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Used DB version notes';

--
Expand Down Expand Up @@ -2216,7 +2216,8 @@ INSERT INTO `gossip_menu_option` VALUES
(0,12,0,'GOSSIP_OPTION_STABLEPET',14,4194304,0,0,0,0,0,NULL,0),
(0,13,1,'GOSSIP_OPTION_ARMORER',15,4096,0,0,0,0,0,NULL,0),
(0,14,0,'GOSSIP_OPTION_UNLEARNTALENTS',16,16,0,0,0,0,0,NULL,0),
(0,15,2,'GOSSIP_OPTION_UNLEARNPETSKILLS',17,16,0,0,0,0,0,NULL,0);
(0,15,2,'GOSSIP_OPTION_UNLEARNPETSKILLS',17,16,0,0,0,0,0,NULL,0),
(0,16,0,'GOSSIP_OPTION_BOT',99,1,0,0,0,0,0,NULL,0);
/*!40000 ALTER TABLE `gossip_menu_option` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down
@@ -1,28 +1,4 @@
-- MySQL Manual Build
--
-- Host: localhost Database: characters
-- ------------------------------------------------------

--
-- Table structure for table `playerbot_db_version`
--

-- When updating, don't forget to update revision_sql.h

DROP TABLE IF EXISTS `playerbot_db_version`;
CREATE TABLE `playerbot_db_version` (
`version` varchar(120) default NULL,
`characters_playerbot_saved_data_001` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';

--
-- Dumping data for table `playerbot_db_version`
--

LOCK TABLES `playerbot_db_version` WRITE;
INSERT INTO `playerbot_db_version` VALUES
('PlayerbotAI default database.',NULL);
UNLOCK TABLES;
ALTER TABLE character_db_version CHANGE COLUMN required_12949_01_characters_mangle_cleanup required_13957_01_characters_playerbot_talentspec bit;

--
-- Table structure for table `playerbot_talentspec`
Expand Down Expand Up @@ -189,29 +165,3 @@ INSERT INTO `playerbot_talentspec` VALUES
(NULL,'Pet Tenacity BM Hunter (Bear suggested)',-3,0x00000001,2116,2116,2116,2173,2173,2117,2277,2117,2122,2163,2163,2122,2172,2237,2123,2255,2255,2258,2258,2123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(NULL,'Pet Cunning PvP (Bird of Prey suggested)',-1,0x00220000,2118,2118,2119,2127,2127,2127,2120,2120,2120,2165,2167,2167,2257,2257,2184,2278,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
UNLOCK TABLES;

-- ----------------------------
-- Table structure for `playerbot_saved_data`
-- ----------------------------
DROP TABLE IF EXISTS `playerbot_saved_data`;
CREATE TABLE `playerbot_saved_data` (
`guid` int(11) unsigned NOT NULL DEFAULT '0',
`combat_order` int(11) unsigned NOT NULL DEFAULT '0',
`primary_target` int(11) unsigned NOT NULL DEFAULT '0',
`secondary_target` int(11) unsigned NOT NULL DEFAULT '0',
`pname` varchar(12) NOT NULL DEFAULT '',
`sname` varchar(12) NOT NULL DEFAULT '',
`combat_delay` INT(11) unsigned NOT NULL DEFAULT '0',
`auto_follow` INT(11) unsigned NOT NULL DEFAULT '1',
`autoequip` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Persistent Playerbot settings per alt';

-- ----------------------------
-- Table structure for `playerbot_quest_data`
-- ----------------------------
DROP TABLE IF EXISTS `playerbot_quest_data`;
CREATE TABLE `playerbot_quest_data` (
`autocomplete` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`autocomplete`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
@@ -0,0 +1,19 @@
ALTER TABLE character_db_version CHANGE COLUMN required_13957_01_characters_playerbot_talentspec required_13957_02_characters_playerbot_saved_data bit;

-- ----------------------------
-- Table structure for `playerbot_saved_data`
-- ----------------------------
DROP TABLE IF EXISTS `playerbot_saved_data`;
CREATE TABLE `playerbot_saved_data` (
`guid` int(11) unsigned NOT NULL DEFAULT '0',
`combat_order` int(11) unsigned NOT NULL DEFAULT '0',
`primary_target` int(11) unsigned NOT NULL DEFAULT '0',
`secondary_target` int(11) unsigned NOT NULL DEFAULT '0',
`pname` varchar(12) NOT NULL DEFAULT '',
`sname` varchar(12) NOT NULL DEFAULT '',
`combat_delay` INT(11) unsigned NOT NULL DEFAULT '0',
`auto_follow` INT(11) unsigned NOT NULL DEFAULT '1',
`autoequip` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Persistent Playerbot settings per alt';

@@ -0,0 +1,10 @@
ALTER TABLE character_db_version CHANGE COLUMN required_13957_02_characters_playerbot_saved_data required_13957_03_characters_playerbot_quest_data bit;

-- ----------------------------
-- Table structure for `playerbot_quest_data`
-- ----------------------------
DROP TABLE IF EXISTS `playerbot_quest_data`;
CREATE TABLE `playerbot_quest_data` (
`autocomplete` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`autocomplete`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
@@ -1 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_13956_01_mangos_spell_chain_totems_typos required_13957_01_mangos_gossip_menu_option bit;

INSERT INTO `gossip_menu_option` VALUES('0','16','0','GOSSIP_OPTION_BOT','99','1','0','0','0','0','0',NULL,'0','0','0','0','0','0','0','0','0');

This comment has been minimized.

Copy link
@NeatElves

NeatElves Jul 31, 2017

Long stitch )

INSERT INTO `gossip_menu_option` VALUES('0','16','0','GOSSIP_OPTION_BOT','99','1','0','0','0','0','0',NULL,'0');

This comment has been minimized.

Copy link
@Grz3s

Grz3s Aug 6, 2017

Member

@cala even after correcting this still throws error:

Table gossip_menu_option for menu 0, id 16 has unknown option id 99. Option will not be used

Pls correct it.

This comment has been minimized.

Copy link
@cala

cala via email Aug 6, 2017

Author Contributor

This comment has been minimized.

Copy link
@Grz3s

Grz3s Aug 6, 2017

Member

x64 release Win7 build without any mods;)

1 change: 0 additions & 1 deletion src/game/PlayerBot/revision_sql.h

This file was deleted.

3 changes: 0 additions & 3 deletions src/mangosd/Master.cpp
Expand Up @@ -36,9 +36,6 @@
#include "RASocket.h"
#include "Util.h"
#include "revision_sql.h"
#ifdef BUILD_PLAYERBOT
#include "PlayerBot/revision_sql.h"
#endif
#include "MaNGOSsoap.h"
#include "Mails/MassMailMgr.h"
#include "Server/DBCStores.h"
Expand Down
4 changes: 2 additions & 2 deletions src/shared/revision_sql.h
@@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#define REVISION_DB_CHARACTERS "required_12949_01_characters_mangle_cleanup"
#define REVISION_DB_MANGOS "required_13956_01_mangos_spell_chain_totems_typos"
#define REVISION_DB_CHARACTERS "required_13957_03_characters_playerbot_quest_data"
#define REVISION_DB_MANGOS "required_13957_01_mangos_gossip_menu_option"
#endif // __REVISION_SQL_H__

0 comments on commit 3784564

Please sign in to comment.