[8687] Fixes in TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT.

* Removed my too script check on data load.
* Allow looking up fo DB target also if spell has required focus set.
* Makes DB targets optional not required.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-10-20 23:12:38 +02:00
parent 5bae4fccf8
commit 58139610eb
3 changed files with 13 additions and 33 deletions

View file

@ -2205,31 +2205,6 @@ void SpellMgr::LoadSpellScriptTarget()
continue;
}
// More checks on TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT
bool ok = true;
for (int i = 0; i < 3; ++i)
{
if (spellProto->EffectImplicitTargetA[i] == TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT ||
spellProto->EffectImplicitTargetB[i] == TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT)
{
if (spellProto->RequiresSpellFocus)
{
sLog.outErrorDb("Table `spell_script_target`: spellId %u for TargetEnty %u of type TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT is wrong because spell has implicit ReqSpellFocus %u.", spellId, targetEntry, spellProto->RequiresSpellFocus);
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)
continue;
// Checks by target type
switch (type)
{