mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
DB/Schema: Rename and change types of a few fields in locales_creature_text and locales_npc_text
locales_creature_text.textGroup -> locales_creature_text.groupid locales_npc_text.entry -> locales_npc_text.ID
This commit is contained in:
4
sql/updates/world/2012_12_27_02_world_locales.sql
Normal file
4
sql/updates/world/2012_12_27_02_world_locales.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE `locales_creature_text` CHANGE `entry` `entry` mediumint(8) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `locales_creature_text` CHANGE `textGroup` `groupid` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `locales_creature_text` CHANGE `id` `id` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `locales_npc_text` CHANGE `entry` `ID` mediumint(8) unsigned NOT NULL DEFAULT '0';
|
||||
@@ -5161,7 +5161,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
||||
|
||||
_npcTextLocaleStore.clear(); // need for reload case
|
||||
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, "
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, "
|
||||
"Text0_0_loc1, Text0_1_loc1, Text1_0_loc1, Text1_1_loc1, Text2_0_loc1, Text2_1_loc1, Text3_0_loc1, Text3_1_loc1, Text4_0_loc1, Text4_1_loc1, Text5_0_loc1, Text5_1_loc1, Text6_0_loc1, Text6_1_loc1, Text7_0_loc1, Text7_1_loc1, "
|
||||
"Text0_0_loc2, Text0_1_loc2, Text1_0_loc2, Text1_1_loc2, Text2_0_loc2, Text2_1_loc2, Text3_0_loc2, Text3_1_loc1, Text4_0_loc2, Text4_1_loc2, Text5_0_loc2, Text5_1_loc2, Text6_0_loc2, Text6_1_loc2, Text7_0_loc2, Text7_1_loc2, "
|
||||
"Text0_0_loc3, Text0_1_loc3, Text1_0_loc3, Text1_1_loc3, Text2_0_loc3, Text2_1_loc3, Text3_0_loc3, Text3_1_loc1, Text4_0_loc3, Text4_1_loc3, Text5_0_loc3, Text5_1_loc3, Text6_0_loc3, Text6_1_loc3, Text7_0_loc3, Text7_1_loc3, "
|
||||
|
||||
@@ -187,7 +187,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
|
||||
|
||||
mLocaleTextMap.clear(); // for reload case
|
||||
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, textGroup, id, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_creature_text");
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, groupid, id, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_creature_text");
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
@@ -197,7 +197,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), fields[2].GetUInt32())];
|
||||
CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), uint32(fields[2].GetUInt8()))];
|
||||
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
|
||||
{
|
||||
LocaleConstant locale = LocaleConstant(i);
|
||||
|
||||
Reference in New Issue
Block a user