[7886] Drop use table petcreateinfo_spell

This is first commit in chain for remove oudated and not used pet functionality.

    * Use instead dropped table CreatureSpellData.dbc if creature_template.PetSpellDataId set (mostly hunter pets)
    * Use creature_template.spellN if not set creature_template.PetSpellDataId (mostly different summon creatures)
    * Fixed bug with not removing from action bar spell icon for not ranked unlearned spells.

    Note: summoned controllable creatures without PetSpellDataId must have expected spells in spellN feilds for creature_template.

[7887] Drop pet spell teaching code, including field in character_pet.

Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-24 12:16:12 -05:00
parent aa67033cc7
commit 09b386a786
20 changed files with 236 additions and 263 deletions
-1
View File
@@ -548,7 +548,6 @@ CREATE TABLE `character_pet` (
`resettalents_cost` int(11) unsigned NOT NULL default '0',
`resettalents_time` bigint(20) unsigned NOT NULL default '0',
`abdata` longtext,
`teachspelldata` longtext,
`load_flags` int(3) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
+1 -24
View File
@@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`required_7884_02_mangos_playercreateinfo_action` bit(1) default NULL
`required_7886_01_mangos_petcreateinfo_spell` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@@ -3660,29 +3660,6 @@ INSERT INTO `pet_name_generation` (`word`,`entry`,`half`) VALUES
/*!40000 ALTER TABLE `pet_name_generation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `petcreateinfo_spell`
--
DROP TABLE IF EXISTS `petcreateinfo_spell`;
CREATE TABLE `petcreateinfo_spell` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`Spell1` mediumint(8) unsigned NOT NULL default '0',
`Spell2` mediumint(8) unsigned NOT NULL default '0',
`Spell3` mediumint(8) unsigned NOT NULL default '0',
`Spell4` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet Create Spells';
--
-- Dumping data for table `petcreateinfo_spell`
--
LOCK TABLES `petcreateinfo_spell` WRITE;
/*!40000 ALTER TABLE `petcreateinfo_spell` DISABLE KEYS */;
/*!40000 ALTER TABLE `petcreateinfo_spell` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pickpocketing_loot_template`
--
@@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_7879_01_mangos_spell_proc_event required_7884_01_mangos_playercreateinfo_spell bit;
DELETE FROM playercreateinfo_spell WHERE Spell = '28734';
@@ -0,0 +1,5 @@
ALTER TABLE db_version CHANGE COLUMN required_7884_01_mangos_playercreateinfo_spell required_7884_02_mangos_playercreateinfo_action bit;
DELETE FROM playercreateinfo_action WHERE action = '28734';
UPDATE playercreateinfo_action SET button = '3' WHERE race = '10' AND class IN ('8', '9', '5', '2', '3') AND button = '4';
UPDATE playercreateinfo_action SET button = '4' WHERE race = '10' AND class = '4' AND button = '5';
@@ -0,0 +1,3 @@
ALTER TABLE character_db_version CHANGE COLUMN required_7802_02_characters_character_achievement_progress required_7884_03_characters_character_spell bit;
DELETE FROM character_spell WHERE spell = '28734';
@@ -0,0 +1,3 @@
ALTER TABLE character_db_version CHANGE COLUMN required_7884_03_characters_character_spell required_7884_04_characters_character_aura bit;
DELETE FROM character_aura WHERE spell = '28734';
@@ -0,0 +1,3 @@
ALTER TABLE character_db_version CHANGE COLUMN required_7884_04_characters_character_aura required_7884_05_characters_character_action bit;
DELETE FROM character_action WHERE action = '28734' AND type = '0';
@@ -0,0 +1,4 @@
ALTER TABLE db_version CHANGE COLUMN required_7884_02_mangos_playercreateinfo_action required_7886_01_mangos_petcreateinfo_spell bit;
DROP TABLE IF EXISTS `petcreateinfo_spell`;
@@ -0,0 +1,4 @@
ALTER TABLE character_db_version CHANGE COLUMN required_7884_05_characters_character_action required_7887_01_characters_character_pet bit;
ALTER TABLE `character_pet`
DROP TeachSpelldata;