[6824] [2008_11_14_01_mangos_scripts.sql] Fixes in db_script_striong related code and DB.

Fixed field order in db script tables as expected base at mangos.sql.
Fixed unexpected errors output in some cases.
This commit is contained in:
VladimirMangos 2008-11-14 19:46:17 +03:00
parent a62bee6d66
commit d287a17597
5 changed files with 25 additions and 9 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`required_2008_11_11_02_mangos_scripts` bit(1) default NULL
`required_2008_11_14_01_mangos_scripts` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--

View file

@ -0,0 +1,16 @@
ALTER TABLE db_version CHANGE COLUMN required_2008_11_11_02_mangos_scripts required_2008_11_14_01_mangos_scripts bit;
ALTER TABLE event_scripts
CHANGE COLUMN dataint dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE gameobject_scripts
CHANGE COLUMN dataint dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE quest_end_scripts
CHANGE COLUMN dataint dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE quest_start_scripts
CHANGE COLUMN dataint dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE spell_scripts
CHANGE COLUMN dataint dataint int(11) NOT NULL default '0' AFTER datalong2;

View file

@ -132,6 +132,7 @@ pkgdata_DATA = \
2008_11_09_03_mangos_mangos_string.sql \
2008_11_11_01_mangos_db_script_string.sql \
2008_11_11_02_mangos_scripts.sql \
2008_11_14_01_mangos_scripts.sql \
README
## Additional files to include when running 'make dist'
@ -246,4 +247,5 @@ EXTRA_DIST = \
2008_11_11_01_mangos_db_script_string.sql \
2008_11_11_02_mangos_scripts.sql \
2008_11_12_01_character_character_aura.sql \
2008_11_14_01_mangos_scripts.sql \
README

View file

@ -3704,11 +3704,8 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
sLog.outErrorDb("Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.dataint,MIN_DB_SCRIPT_STRING_ID,MAX_DB_SCRIPT_STRING_ID,tmp.id);
continue;
}
if(!objmgr.GetMangosStringLocale(tmp.dataint))
{
sLog.outErrorDb("Table `%s` has not existed text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.dataint,tmp.id);
continue;
}
// if(!objmgr.GetMangosStringLocale(tmp.dataint)) will checked after db_script_string loading
break;
}
@ -7207,10 +7204,11 @@ void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids)
{
if(itrM->second.dataint)
{
if(!GetMangosStringLocale (itrM->second.dataint))
sLog.outErrorDb( "Table `db_script_string` has not existed string id %u", *itrM);
if(ids.count(itrM->second.dataint))
ids.erase(itrM->second.dataint);
else
sLog.outErrorDb( "Table `db_script_string` has not existed string id %u", *itrM);
}
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6823"
#define REVISION_NR "6824"
#endif // __REVISION_NR_H__