mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10021] Move item disenchanting static req. checks to server start.
This commit is contained in:
parent
d6c5207867
commit
e823b30f4f
5 changed files with 53 additions and 20 deletions
|
|
@ -2058,6 +2058,44 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
if(proto->GemProperties && !sGemPropertiesStore.LookupEntry(proto->GemProperties))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong GemProperties (%u)",i,proto->GemProperties);
|
||||
|
||||
if (proto->RequiredDisenchantSkill < -1)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong RequiredDisenchantSkill (%i), set to (-1).",i,proto->RequiredDisenchantSkill);
|
||||
const_cast<ItemPrototype*>(proto)->RequiredDisenchantSkill = -1;
|
||||
}
|
||||
else if (proto->RequiredDisenchantSkill != -1)
|
||||
{
|
||||
if (proto->Quality > ITEM_QUALITY_EPIC || proto->Quality < ITEM_QUALITY_UNCOMMON)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has unexpected RequiredDisenchantSkill (%u) for non-disenchantable quality (%u), reset it.",i,proto->RequiredDisenchantSkill,proto->Quality);
|
||||
const_cast<ItemPrototype*>(proto)->RequiredDisenchantSkill = -1;
|
||||
}
|
||||
else if (proto->Class != ITEM_CLASS_WEAPON && proto->Class != ITEM_CLASS_ARMOR)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has unexpected RequiredDisenchantSkill (%u) for non-disenchantable item class (%u), reset it.",i,proto->RequiredDisenchantSkill,proto->Class);
|
||||
const_cast<ItemPrototype*>(proto)->RequiredDisenchantSkill = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (proto->DisenchantID)
|
||||
{
|
||||
if (proto->Quality > ITEM_QUALITY_EPIC || proto->Quality < ITEM_QUALITY_UNCOMMON)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong quality (%u) for disenchanting, remove disenchanting loot id.",i,proto->Quality);
|
||||
const_cast<ItemPrototype*>(proto)->DisenchantID = 0;
|
||||
}
|
||||
else if (proto->Class != ITEM_CLASS_WEAPON && proto->Class != ITEM_CLASS_ARMOR)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong item class (%u) for disenchanting, remove disenchanting loot id.",i,proto->Class);
|
||||
const_cast<ItemPrototype*>(proto)->DisenchantID = 0;
|
||||
}
|
||||
else if (proto->RequiredDisenchantSkill < 0)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) marked as non-disenchantable by RequiredDisenchantSkill == -1, remove disenchanting loot id.",i);
|
||||
const_cast<ItemPrototype*>(proto)->DisenchantID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(proto->FoodType >= MAX_PET_DIET)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong FoodType value (%u)",i,proto->FoodType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue