feat(Core/DB/Creature): Throw error if npcflag and gossip_menu_id is not c… (#9665)
* feat(DB/Creature): Throw error if npcflag and gossip_menu_id is not combined *cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/a513922fc1572137c4e8b7b75d7ba931b15cf26a) * test * Update ObjectMgr.cpp * codestyle * Update src/server/game/Globals/ObjectMgr.cpp Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com> * Update src/server/game/Globals/ObjectMgr.cpp Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
@@ -1160,6 +1160,21 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
|
||||
}
|
||||
|
||||
const_cast<CreatureTemplate*>(cInfo)->DamageModifier *= Creature::_GetDamageMod(cInfo->rank);
|
||||
|
||||
// Hack for modules
|
||||
switch (cInfo->Entry)
|
||||
{
|
||||
case 190010: // Transmog Module
|
||||
return;
|
||||
}
|
||||
if (cInfo->GossipMenuId && !(cInfo->npcflag & UNIT_NPC_FLAG_GOSSIP))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: %u) has assigned gossip menu %u, but npcflag does not include UNIT_NPC_FLAG_GOSSIP (1).", cInfo->Entry, cInfo->GossipMenuId);
|
||||
}
|
||||
else if (!cInfo->GossipMenuId && (cInfo->npcflag & UNIT_NPC_FLAG_GOSSIP))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: %u) has npcflag UNIT_NPC_FLAG_GOSSIP (1), but gossip menu is unassigned.", cInfo->Entry);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::CheckCreatureMovement(char const* table, uint64 id, CreatureMovementData& creatureMovement)
|
||||
|
||||
Reference in New Issue
Block a user