Core/Misc: Removed references to item_template in logs

This commit is contained in:
Shauren
2020-01-25 14:15:20 +01:00
parent a4a266ed2c
commit 4746331f49
8 changed files with 29 additions and 29 deletions

View File

@@ -547,20 +547,20 @@ public:
Field* fields3 = result3->Fetch();
uint32 item_entry = fields3[0].GetUInt32();
uint32 item_count = fields3[1].GetUInt32();
QueryResult result4;
result4 = WorldDatabase.PQuery("SELECT name, quality FROM item_template WHERE entry = '%u'", item_entry);
Field* fields1 = result4->Fetch();
std::string item_name = fields1[0].GetString();
int item_quality = fields1[1].GetUInt8();
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(item_entry);
if (!itemTemplate)
continue;
if (handler->GetSession())
{
uint32 color = ItemQualityColors[item_quality];
uint32 color = ItemQualityColors[itemTemplate->GetQuality()];
std::ostringstream itemStr;
itemStr << "|c" << std::hex << color << "|Hitem:" << item_entry << ":0:0:0:0:0:0:0:0:0|h[" << item_name << "]|h|r";
itemStr << "|c" << std::hex << color << "|Hitem:" << item_entry << ":0:0:0:0:0:0:0:" << handler->GetSession()->GetPlayer()->getLevel()
<< ":0:0:0:0:0|h[" << itemTemplate->GetName(handler->GetSessionDbcLocale()) << "]|h|r";
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, itemStr.str().c_str(), item_entry, item_guid, item_count);
}
else
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, item_name.c_str(), item_entry, item_guid, item_count);
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, itemTemplate->GetName(handler->GetSessionDbcLocale()), item_entry, item_guid, item_count);
}
while (result3->NextRow());
}

View File

@@ -411,7 +411,7 @@ public:
uint32 count = 0;
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
// Search in `item_template`
// Search in ItemSparse
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
{