Fixed loading checks for SCRIPT_COMMAND_CAST_SPELL

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-28 10:33:14 +02:00
parent c173e84f25
commit 69a567b90e
+7 -1
View File
@@ -4735,12 +4735,18 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
tablename,tmp.datalong2,tmp.id);
continue;
}
if (tmp.dataint & ~0x1) // 1 bit (0,1)
if (tmp.datalong2 != 4 && tmp.dataint & ~0x1) // 1 bit (0,1)
{
sLog.outErrorDb("Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tablename,tmp.dataint,tmp.id);
continue;
}
else if (tmp.datalong2 == 4 && !GetCreatureTemplate(tmp.dataint))
{
sLog.outErrorDb("Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tablename,tmp.dataint,tmp.id);
continue;
}
break;
}