Core/Creatures: Modify creature_template_model structure to accept unmodified sniffed data (#23427)

This commit is contained in:
funjoker
2019-06-16 21:32:01 +02:00
committed by Shauren
parent 04a247f40e
commit eef87a9cc0
2 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `creature_template_model` DROP PRIMARY KEY;
ALTER TABLE `creature_template_model` ADD PRIMARY KEY (`CreatureID`, `Idx`);

View File

@@ -947,8 +947,6 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (!cInfo->Models.size())
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) does not have any existing display id in creature_template_model.", cInfo->Entry);
else if (std::accumulate(cInfo->Models.begin(), cInfo->Models.end(), 0.0f, [](float sum, CreatureModel const& model) { return sum + model.Probability; }) <= 0.0f)
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has zero total chance for all models in creature_template_model.", cInfo->Entry);
if (!cInfo->unit_class || ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
{