[10307] Rename two tables to prefix scripted_, making the tables have consistent names

Both tables (areatrigger / event_id) are used explicit to store ScriptName for script library use.
In addition rename to ScriptName in instance_template

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-08-01 23:09:27 +02:00
parent 0880454847
commit c6f2f16e05
8 changed files with 69 additions and 54 deletions

View file

@ -5200,7 +5200,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
void ObjectMgr::LoadAreaTriggerScripts()
{
mAreaTriggerScripts.clear(); // need for reload case
QueryResult *result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts");
QueryResult *result = WorldDatabase.Query("SELECT entry, ScriptName FROM scripted_areatrigger");
uint32 count = 0;
@ -5210,7 +5210,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
bar.step();
sLog.outString();
sLog.outString( ">> Loaded %u areatrigger scripts", count );
sLog.outString( ">> Loaded %u scripted areatrigger", count );
return;
}
@ -5229,7 +5229,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)
{
sLog.outErrorDb("Table `areatrigger_scripts` has area trigger (ID:%u) not listed in `AreaTrigger.dbc`.", Trigger_ID);
sLog.outErrorDb("Table `scripted_areatrigger` has area trigger (ID:%u) not listed in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
@ -5245,7 +5245,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
void ObjectMgr::LoadEventIdScripts()
{
mEventIdScripts.clear(); // need for reload case
QueryResult *result = WorldDatabase.Query("SELECT id, ScriptName FROM event_id_scripts");
QueryResult *result = WorldDatabase.Query("SELECT id, ScriptName FROM scripted_event_id");
uint32 count = 0;
@ -5255,7 +5255,7 @@ void ObjectMgr::LoadEventIdScripts()
bar.step();
sLog.outString();
sLog.outString( ">> Loaded %u event id scripts", count );
sLog.outString( ">> Loaded %u scripted event id", count );
return;
}
@ -5314,7 +5314,7 @@ void ObjectMgr::LoadEventIdScripts()
std::set<uint32>::const_iterator itr = evt_scripts.find(eventId);
if (itr == evt_scripts.end())
sLog.outErrorDb("Table `event_id_scripts` has id %u not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u or path taxi node data",
sLog.outErrorDb("Table `scripted_event_id` has id %u not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u or path taxi node data",
eventId, SPELL_EFFECT_SEND_EVENT);
mEventIdScripts[eventId] = GetScriptId(scriptName);
@ -5323,7 +5323,7 @@ void ObjectMgr::LoadEventIdScripts()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u event id scripts", count );
sLog.outString( ">> Loaded %u scripted event id", count );
}
uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team )
@ -8859,11 +8859,11 @@ void ObjectMgr::LoadScriptNames()
"UNION "
"SELECT DISTINCT(ScriptName) FROM item_template WHERE ScriptName <> '' "
"UNION "
"SELECT DISTINCT(ScriptName) FROM areatrigger_scripts WHERE ScriptName <> '' "
"SELECT DISTINCT(ScriptName) FROM scripted_areatrigger WHERE ScriptName <> '' "
"UNION "
"SELECT DISTINCT(ScriptName) FROM event_id_scripts WHERE ScriptName <> '' "
"SELECT DISTINCT(ScriptName) FROM scripted_event_id WHERE ScriptName <> '' "
"UNION "
"SELECT DISTINCT(script) FROM instance_template WHERE script <> ''");
"SELECT DISTINCT(ScriptName) FROM instance_template WHERE ScriptName <> ''");
if( !result )
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10306"
#define REVISION_NR "10307"
#endif // __REVISION_NR_H__

View file

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