mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Core/Creatures: Modify creature_template_model structure to accept unmodified sniffed data (#23427)
This commit is contained in:
2
sql/updates/world/master/2019_06_16_01_world.sql
Normal file
2
sql/updates/world/master/2019_06_16_01_world.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `creature_template_model` DROP PRIMARY KEY;
|
||||
ALTER TABLE `creature_template_model` ADD PRIMARY KEY (`CreatureID`, `Idx`);
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user