mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
a62bee6d66
commit
d287a17597
5 changed files with 25 additions and 9 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
DROP TABLE IF EXISTS `db_version`;
|
DROP TABLE IF EXISTS `db_version`;
|
||||||
CREATE TABLE `db_version` (
|
CREATE TABLE `db_version` (
|
||||||
`version` varchar(120) default NULL,
|
`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';
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
||||||
16
sql/updates/2008_11_14_01_mangos_scripts.sql
Normal file
16
sql/updates/2008_11_14_01_mangos_scripts.sql
Normal 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;
|
||||||
|
|
@ -132,6 +132,7 @@ pkgdata_DATA = \
|
||||||
2008_11_09_03_mangos_mangos_string.sql \
|
2008_11_09_03_mangos_mangos_string.sql \
|
||||||
2008_11_11_01_mangos_db_script_string.sql \
|
2008_11_11_01_mangos_db_script_string.sql \
|
||||||
2008_11_11_02_mangos_scripts.sql \
|
2008_11_11_02_mangos_scripts.sql \
|
||||||
|
2008_11_14_01_mangos_scripts.sql \
|
||||||
README
|
README
|
||||||
|
|
||||||
## Additional files to include when running 'make dist'
|
## 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_01_mangos_db_script_string.sql \
|
||||||
2008_11_11_02_mangos_scripts.sql \
|
2008_11_11_02_mangos_scripts.sql \
|
||||||
2008_11_12_01_character_character_aura.sql \
|
2008_11_12_01_character_character_aura.sql \
|
||||||
|
2008_11_14_01_mangos_scripts.sql \
|
||||||
README
|
README
|
||||||
|
|
|
||||||
|
|
@ -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);
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
if(!objmgr.GetMangosStringLocale(tmp.dataint))
|
|
||||||
{
|
// if(!objmgr.GetMangosStringLocale(tmp.dataint)) will checked after db_script_string loading
|
||||||
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;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7207,10 +7204,11 @@ void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids)
|
||||||
{
|
{
|
||||||
if(itrM->second.dataint)
|
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))
|
if(ids.count(itrM->second.dataint))
|
||||||
ids.erase(itrM->second.dataint);
|
ids.erase(itrM->second.dataint);
|
||||||
else
|
|
||||||
sLog.outErrorDb( "Table `db_script_string` has not existed string id %u", *itrM);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6823"
|
#define REVISION_NR "6824"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue