From ca2ee819397f2243dd6c88ee72d9f8cfd0fd77fb Mon Sep 17 00:00:00 2001 From: Nefertumm Date: Sat, 27 Jan 2018 16:00:54 -0300 Subject: [PATCH] Wrong logs for creature_equip_template + startup errors fixes (#758) * Fixed wrong logs * Added some errors fixes on startup --- .../pending_db_world/rev_1516149942175144200.sql | 13 +++++++++++++ src/server/game/Globals/ObjectMgr.cpp | 10 +++++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1516149942175144200.sql diff --git a/data/sql/updates/pending_db_world/rev_1516149942175144200.sql b/data/sql/updates/pending_db_world/rev_1516149942175144200.sql new file mode 100644 index 000000000..8032f4ba0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1516149942175144200.sql @@ -0,0 +1,13 @@ +INSERT INTO version_db_world (`sql_rev`) VALUES ('1516149942175144200'); + +-- Useless loot +DELETE FROM `creature_loot_template` WHERE `entry` IN (1, 1175); +-- Conditions for lootid 1, useless +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 1 AND `SourceGroup` = 1; + +-- Attumen the Huntsman - Fix condition on item 23809 +UPDATE `conditions` SET `SourceGroup` = 16152 WHERE `SourceGroup` = 15550 AND `SourceEntry` = 23809; + +-- Conditions that aren't referenced and, still, aren't correct. +DELETE FROM `conditions` WHERE `SourceGroup` = 21060 AND `SourceEntry` = 23612; +DELETE FROM `conditions` WHERE `SourceGroup` = 21061 AND `SourceEntry` = 23612; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 2100308d6..f60921e21 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1149,7 +1149,7 @@ void ObjectMgr::LoadEquipmentTemplates() if (!sObjectMgr->GetCreatureTemplate(entry)) { - sLog->outError("Creature template (Entry: %u) does not exist but has a record in `creature_equip_template`", entry); + sLog->outError("Creature template (CreatureID: %u) does not exist but has a record in `creature_equip_template`", entry); continue; } @@ -1175,8 +1175,8 @@ void ObjectMgr::LoadEquipmentTemplates() 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); + sLog->outErrorDb("Unknown item (ID=%u) in creature_equip_template.ItemID%u for CreatureID = %u and ID = %u, forced to 0.", + equipmentInfo.ItemEntry[i], i+1, entry, id); equipmentInfo.ItemEntry[i] = 0; continue; } @@ -1191,8 +1191,8 @@ void ObjectMgr::LoadEquipmentTemplates() 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); + sLog->outErrorDb("Item (ID=%u) in creature_equip_template.ItemID%u for CreatureID = %u and ID = %u is not equipable in a hand, forced to 0.", + equipmentInfo.ItemEntry[i], i+1, entry, id); equipmentInfo.ItemEntry[i] = 0; } }