[10312] Allow store in DB same spell auras from different casters.

This fix errors at auras save to DB for like cases.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
zergtmn 2010-08-03 04:03:42 +04:00 committed by VladimirMangos
parent a48fdd8620
commit 131fb72006
6 changed files with 17 additions and 5 deletions

View file

@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `character_db_version`; DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` ( CREATE TABLE `character_db_version` (
`required_10254_01_characters_auctionhouse` bit(1) default NULL `required_10312_02_characters_pet_aura` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
-- --
@ -383,7 +383,7 @@ CREATE TABLE `character_aura` (
`remaintime1` INT(11) NOT NULL DEFAULT '0', `remaintime1` INT(11) NOT NULL DEFAULT '0',
`remaintime2` INT(11) NOT NULL DEFAULT '0', `remaintime2` INT(11) NOT NULL DEFAULT '0',
`effIndexMask` INT(11) NOT NULL DEFAULT '0', `effIndexMask` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`spell`) PRIMARY KEY (`guid`,`caster_guid`,`spell`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System';
-- --
@ -1468,7 +1468,7 @@ CREATE TABLE `pet_aura` (
`remaintime1` INT(11) NOT NULL DEFAULT '0', `remaintime1` INT(11) NOT NULL DEFAULT '0',
`remaintime2` INT(11) NOT NULL DEFAULT '0', `remaintime2` INT(11) NOT NULL DEFAULT '0',
`effIndexMask` INT(11) NOT NULL DEFAULT '0', `effIndexMask` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`spell`) PRIMARY KEY (`guid`,`caster_guid`,`spell`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet System'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet System';
-- --

View file

@ -0,0 +1,4 @@
ALTER TABLE character_db_version CHANGE COLUMN required_10254_01_characters_auctionhouse required_10312_01_characters_character_aura bit;
ALTER TABLE `character_aura` DROP PRIMARY KEY;
ALTER TABLE `character_aura` ADD PRIMARY KEY (`guid`,`caster_guid`,`spell`);

View file

@ -0,0 +1,4 @@
ALTER TABLE character_db_version CHANGE COLUMN required_10312_01_characters_character_aura required_10312_02_characters_pet_aura bit;
ALTER TABLE `pet_aura` DROP PRIMARY KEY;
ALTER TABLE `pet_aura` ADD PRIMARY KEY (`guid`,`caster_guid`,`spell`);

View file

@ -64,6 +64,8 @@ pkgdata_DATA = \
10307_01_mangos_instance_template.sql \ 10307_01_mangos_instance_template.sql \
10307_02_mangos_scripted_areatrigger.sql \ 10307_02_mangos_scripted_areatrigger.sql \
10307_03_mangos_scripted_event_id.sql \ 10307_03_mangos_scripted_event_id.sql \
10312_01_characters_character_aura.sql \
10312_02_characters_pet_aura.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -108,4 +110,6 @@ EXTRA_DIST = \
10307_01_mangos_instance_template.sql \ 10307_01_mangos_instance_template.sql \
10307_02_mangos_scripted_areatrigger.sql \ 10307_02_mangos_scripted_areatrigger.sql \
10307_03_mangos_scripted_event_id.sql \ 10307_03_mangos_scripted_event_id.sql \
10312_01_characters_character_aura.sql \
10312_02_characters_pet_aura.sql \
README README

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10311" #define REVISION_NR "10312"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_10254_01_characters_auctionhouse" #define REVISION_DB_CHARACTERS "required_10312_02_characters_pet_aura"
#define REVISION_DB_MANGOS "required_10307_03_mangos_scripted_event_id" #define REVISION_DB_MANGOS "required_10307_03_mangos_scripted_event_id"
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version" #define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__