diff options
author | megamage <none@none> | 2009-05-17 17:46:47 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-17 17:46:47 -0500 |
commit | cbc375b89570c144772df51245e1e5efeefb9348 (patch) | |
tree | 2a4d391763e45db0ee831fe55a0c825140df1ae8 /src/bindings/scripts/ScriptMgr.cpp | |
parent | 5784d03121ebbe9a20bf55a77e506c0f3d0a1ace (diff) |
*Fix a bug that event ai text is loaded twice.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/ScriptMgr.cpp')
-rw-r--r-- | src/bindings/scripts/ScriptMgr.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 849c4d64be5..0109e1fb8cb 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -663,71 +663,6 @@ void LoadDatabase() // Drop Existing Text Map, only done once and we are ready to add data from multiple sources. TextMap.clear(); - // Load EventAI Text - outstring_log("TSCR: Loading EventAI Texts..."); - LoadTrinityStrings(TScriptDB,"creature_ai_texts",-1,1+(TEXT_SOURCE_RANGE)); - - // Gather Additional data from EventAI Texts - result = TScriptDB.PQuery("SELECT entry, sound, type, language, emote FROM creature_ai_texts"); - - outstring_log("TSCR: Loading EventAI Texts additional data..."); - if (result) - { - barGoLink bar(result->GetRowCount()); - uint32 count = 0; - - do - { - bar.step(); - Field* fields = result->Fetch(); - StringTextData temp; - - int32 i = fields[0].GetInt32(); - temp.SoundId = fields[1].GetInt32(); - temp.Type = fields[2].GetInt32(); - temp.Language = fields[3].GetInt32(); - temp.Emote = fields[4].GetInt32(); - - if (i >= 0) - { - error_db_log("TSCR: Entry %i in table `creature_ai_texts` is not a negative value.",i); - continue; - } - - if (i <= TEXT_SOURCE_RANGE) - { - error_db_log("TSCR: Entry %i in table `creature_ai_texts` is out of accepted entry range for table.",i); - continue; - } - - if (temp.SoundId) - { - if (!GetSoundEntriesStore()->LookupEntry(temp.SoundId)) - error_db_log("TSCR: Entry %i in table `creature_ai_texts` has soundId %u but sound does not exist.",i,temp.SoundId); - } - - if (!GetLanguageDescByID(temp.Language)) - error_db_log("TSCR: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.",i,temp.Language); - - if (temp.Type > CHAT_TYPE_ZONE_YELL) - error_db_log("TSCR: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.",i,temp.Type); - - TextMap[i] = temp; - ++count; - } while (result->NextRow()); - - delete result; - - outstring_log(""); - outstring_log(">> TSCR: Loaded %u additional EventAI Texts data.", count); - }else - { - barGoLink bar(1); - bar.step(); - outstring_log(""); - outstring_log(">> Loaded 0 additional EventAI Texts data. DB table `creature_ai_texts` is empty."); - } - // Load Script Text outstring_log("TSCR: Loading Script Texts..."); LoadTrinityStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2)); |