mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure
This commit is contained in:
@@ -1171,9 +1171,9 @@ void ObjectMgr::LoadEquipmentTemplates()
|
||||
if (!equipmentInfo.ItemEntry[i])
|
||||
continue;
|
||||
|
||||
ItemEntry const* dbcItem = sItemStore.LookupEntry(equipmentInfo.ItemEntry[i]);
|
||||
const ItemTemplate* item = GetItemTemplate(equipmentInfo.ItemEntry[i]);
|
||||
|
||||
if (!dbcItem)
|
||||
if (!item)
|
||||
{
|
||||
sLog->outErrorDb("Unknown item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u, forced to 0.",
|
||||
equipmentInfo.ItemEntry[i], i+1, entry);
|
||||
@@ -1181,15 +1181,15 @@ void ObjectMgr::LoadEquipmentTemplates()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dbcItem->InventoryType != INVTYPE_WEAPON &&
|
||||
dbcItem->InventoryType != INVTYPE_SHIELD &&
|
||||
dbcItem->InventoryType != INVTYPE_RANGED &&
|
||||
dbcItem->InventoryType != INVTYPE_2HWEAPON &&
|
||||
dbcItem->InventoryType != INVTYPE_WEAPONMAINHAND &&
|
||||
dbcItem->InventoryType != INVTYPE_WEAPONOFFHAND &&
|
||||
dbcItem->InventoryType != INVTYPE_HOLDABLE &&
|
||||
dbcItem->InventoryType != INVTYPE_THROWN &&
|
||||
dbcItem->InventoryType != INVTYPE_RANGEDRIGHT)
|
||||
if (item->InventoryType != INVTYPE_WEAPON &&
|
||||
item->InventoryType != INVTYPE_SHIELD &&
|
||||
item->InventoryType != INVTYPE_RANGED &&
|
||||
item->InventoryType != INVTYPE_2HWEAPON &&
|
||||
item->InventoryType != INVTYPE_WEAPONMAINHAND &&
|
||||
item->InventoryType != INVTYPE_WEAPONOFFHAND &&
|
||||
item->InventoryType != INVTYPE_HOLDABLE &&
|
||||
item->InventoryType != INVTYPE_THROWN &&
|
||||
item->InventoryType != INVTYPE_RANGEDRIGHT)
|
||||
{
|
||||
sLog->outErrorDb("Item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u is not equipable in a hand, forced to 0.",
|
||||
equipmentInfo.ItemEntry[i], i+1, entry);
|
||||
@@ -2266,7 +2266,6 @@ void ObjectMgr::LoadItemTemplates()
|
||||
|
||||
_itemTemplateStore.rehash(result->GetRowCount());
|
||||
uint32 count = 0;
|
||||
bool enforceDBCAttributes = sWorld->getBoolConfig(CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -2383,53 +2382,6 @@ void ObjectMgr::LoadItemTemplates()
|
||||
itemTemplate.FlagsCu = fields[137].GetUInt32();
|
||||
|
||||
// Checks
|
||||
|
||||
ItemEntry const* dbcitem = sItemStore.LookupEntry(entry);
|
||||
|
||||
if (dbcitem)
|
||||
{
|
||||
if (itemTemplate.Class != dbcitem->Class)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) does not have a correct class %u, must be %u .", entry, itemTemplate.Class, dbcitem->Class);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.Class = dbcitem->Class;
|
||||
}
|
||||
|
||||
if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclass)
|
||||
{
|
||||
sLog->outError("Item (Entry: %u) does not have a correct SoundOverrideSubclass (%i), must be %i .", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclass);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclass;
|
||||
}
|
||||
if (itemTemplate.Material != dbcitem->Material)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) does not have a correct material (%i), must be %i .", entry, itemTemplate.Material, dbcitem->Material);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.Material = dbcitem->Material;
|
||||
}
|
||||
if (itemTemplate.InventoryType != dbcitem->InventoryType)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) does not have a correct inventory type (%u), must be %u .", entry, itemTemplate.InventoryType, dbcitem->InventoryType);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.InventoryType = dbcitem->InventoryType;
|
||||
}
|
||||
if (itemTemplate.DisplayInfoID != dbcitem->DisplayId)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) does not have a correct display id (%u), must be %u .", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayId);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.DisplayInfoID = dbcitem->DisplayId;
|
||||
}
|
||||
if (itemTemplate.Sheath != dbcitem->Sheath)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) does not have a correct sheathid (%u), must be %u .", entry, itemTemplate.Sheath, dbcitem->Sheath);
|
||||
if (enforceDBCAttributes)
|
||||
itemTemplate.Sheath = dbcitem->Sheath;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
sLog->outErrorDb("Item (Entry: %u) does not exist in item.dbc! (not correct id?).", entry);
|
||||
|
||||
if (itemTemplate.Class >= MAX_ITEM_CLASS)
|
||||
{
|
||||
sLog->outErrorDb("Item (Entry: %u) has wrong Class value (%u)", entry, itemTemplate.Class);
|
||||
@@ -2720,7 +2672,7 @@ void ObjectMgr::LoadItemTemplates()
|
||||
itemTemplate.ItemSet = 0;
|
||||
}
|
||||
|
||||
if (itemTemplate.Area && !GetAreaEntryByAreaID(itemTemplate.Area))
|
||||
if (itemTemplate.Area && !sAreaTableStore.LookupEntry(itemTemplate.Area))
|
||||
sLog->outErrorDb("Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area);
|
||||
|
||||
if (itemTemplate.Map && !sMapStore.LookupEntry(itemTemplate.Map))
|
||||
@@ -4022,7 +3974,7 @@ void ObjectMgr::LoadQuests()
|
||||
// client quest log visual (area case)
|
||||
if (qinfo->ZoneOrSort > 0)
|
||||
{
|
||||
if (!GetAreaEntryByAreaID(qinfo->ZoneOrSort))
|
||||
if (!sAreaTableStore.LookupEntry(qinfo->ZoneOrSort))
|
||||
{
|
||||
sLog->outErrorDb("Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.",
|
||||
qinfo->GetQuestId(), qinfo->ZoneOrSort);
|
||||
@@ -5845,7 +5797,7 @@ void ObjectMgr::LoadGraveyardZones()
|
||||
continue;
|
||||
}
|
||||
|
||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId);
|
||||
if (!areaEntry)
|
||||
{
|
||||
sLog->outErrorDb("Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId);
|
||||
@@ -7893,7 +7845,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
int32 skill = fields[1].GetInt16();
|
||||
|
||||
AreaTableEntry const* fArea = GetAreaEntryByAreaID(entry);
|
||||
AreaTableEntry const* fArea = sAreaTableStore.LookupEntry(entry);
|
||||
if (!fArea)
|
||||
{
|
||||
sLog->outErrorDb("AreaId %u defined in `skill_fishing_base_level` does not exist", entry);
|
||||
|
||||
Reference in New Issue
Block a user