[9883] Change SCRIPT_COMMAND_TALK to support CHAT_TYPE_* using enum ChatType

Making data consistent with other, similar tables like EventAI's text tables.
This convert existing data and also adds support for all chat types.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-05-12 14:08:32 +02:00
parent 41c58f3be9
commit b208effca6
8 changed files with 57 additions and 17 deletions

View file

@ -4200,9 +4200,9 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
{
case SCRIPT_COMMAND_TALK:
{
if(tmp.datalong > 3)
if(tmp.datalong > CHAT_TYPE_ZONE_YELL)
{
sLog.outErrorDb("Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.datalong,tmp.id);
sLog.outErrorDb("Table `%s` has invalid CHAT_TYPE_ (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.datalong,tmp.id);
continue;
}
if(tmp.dataint==0)