[8638] For TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT check also if target type in DB is GameObject target.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-10-14 03:04:55 +02:00
parent ed0b01c65c
commit 9fd4965299
2 changed files with 9 additions and 2 deletions

View file

@ -2193,7 +2193,7 @@ void SpellMgr::LoadSpellScriptTarget()
continue;
}
if ( type >= MAX_SPELL_TARGET_TYPE )
if (type >= MAX_SPELL_TARGET_TYPE)
{
sLog.outErrorDb("Table `spell_script_target`: target type %u for TargetEntry %u is incorrect.",type,targetEntry);
continue;
@ -2212,6 +2212,13 @@ void SpellMgr::LoadSpellScriptTarget()
ok = false;
break;
}
if (type != SPELL_TARGET_TYPE_GAMEOBJECT)
{
sLog.outErrorDb("Table `spell_script_target`: spellId %u has target type TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT but target in table is creature (must be gameobject).", spellId);
ok = false;
break;
}
}
}
if (!ok)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8637"
#define REVISION_NR "8638"
#endif // __REVISION_NR_H__