From 748ea8522a3f87c6030d3680bf2c1a229bd4c01b Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 16 Apr 2009 13:47:01 +0400 Subject: [PATCH] [7674] Fixed check of DB script string ids from `db_script_string` at loading. --- src/game/ObjectMgr.cpp | 13 ++++++++----- src/shared/revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 90ef2211c..fb6f07182 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7398,13 +7398,16 @@ void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set& ids) { for(ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM) { - if(itrM->second.dataint) + switch(itrM->second.command) { - if(!GetMangosStringLocale (itrM->second.dataint)) - sLog.outErrorDb( "Table `db_script_string` has not existed string id %u", itrM->first); + case SCRIPT_COMMAND_TALK: + { + if(!GetMangosStringLocale (itrM->second.dataint)) + sLog.outErrorDb( "Table `db_script_string` not has string id %u used db script (ID: %s)", itrM->second.dataint, itrMM->first); - if(ids.count(itrM->second.dataint)) - ids.erase(itrM->second.dataint); + if(ids.count(itrM->second.dataint)) + ids.erase(itrM->second.dataint); + } } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b260e12c8..ffd9eb987 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7673" + #define REVISION_NR "7674" #endif // __REVISION_NR_H__