Core/Misc: Removed references to item_template in logs
Port From (https://github.com/TrinityCore/TrinityCore/commit/4746331f495129f79531f4af0984aa0bd90eebda)
This commit is contained in:
@@ -342,7 +342,6 @@ namespace Game.Chat.Commands
|
||||
Player target;
|
||||
ObjectGuid targetGuid;
|
||||
string targetName;
|
||||
PreparedStatement stmt = null;
|
||||
|
||||
ObjectGuid parseGUID = ObjectGuid.Create(HighGuid.Player, args.NextUInt64());
|
||||
if (Global.CharacterCacheStorage.GetCharacterNameByGuid(parseGUID, out targetName))
|
||||
@@ -353,7 +352,7 @@ namespace Game.Chat.Commands
|
||||
else if (!handler.ExtractPlayerTarget(args, out target, out targetGuid, out targetName))
|
||||
return false;
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAIL_LIST_COUNT);
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAIL_LIST_COUNT);
|
||||
stmt.AddValue(0, targetGuid.GetCounter());
|
||||
SQLResult result = DB.Characters.Query(stmt);
|
||||
if (!result.IsEmpty())
|
||||
@@ -408,18 +407,19 @@ namespace Game.Chat.Commands
|
||||
{
|
||||
uint item_entry = result3.Read<uint>(0);
|
||||
uint item_count = result3.Read<uint>(1);
|
||||
SQLResult result4 = DB.World.Query("SELECT name, quality FROM item_template WHERE entry = '{0}'", item_entry);
|
||||
|
||||
string item_name = result4.Read<string>(0);
|
||||
int item_quality = result4.Read<byte>(1);
|
||||
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(item_entry);
|
||||
if (itemTemplate == null)
|
||||
continue;
|
||||
|
||||
if (handler.GetSession() != null)
|
||||
{
|
||||
uint color = ItemConst.ItemQualityColors[item_quality];
|
||||
string itemStr = "|c" + color + "|Hitem:" + item_entry + ":0:0:0:0:0:0:0:0:0|h[" + item_name + "]|h|r";
|
||||
uint color = ItemConst.ItemQualityColors[(int)itemTemplate.GetQuality()];
|
||||
string itemStr = $"|c{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.SendSysMessage(CypherStrings.ListMailInfoItem, itemStr, item_entry, item_guid, item_count);
|
||||
}
|
||||
else
|
||||
handler.SendSysMessage(CypherStrings.ListMailInfoItem, item_name, item_entry, item_guid, item_count);
|
||||
handler.SendSysMessage(CypherStrings.ListMailInfoItem, itemTemplate.GetName(handler.GetSessionDbcLocale()), item_entry, item_guid, item_count);
|
||||
}
|
||||
while (result3.NextRow());
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace Game.Chat
|
||||
bool found = false;
|
||||
uint count = 0;
|
||||
|
||||
// Search in `item_template`
|
||||
// Search in ItemSparse
|
||||
var its = Global.ObjectMgr.GetItemTemplates();
|
||||
foreach (var template in its.Values)
|
||||
{
|
||||
|
||||
@@ -735,7 +735,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, Item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -752,7 +752,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -769,7 +769,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -786,7 +786,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -803,7 +803,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -820,7 +820,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -837,7 +837,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -854,7 +854,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -871,7 +871,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -888,7 +888,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -905,7 +905,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -922,7 +922,7 @@ namespace Game
|
||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (pItemProto == null && !loot.IsReference((uint)cond.SourceEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1049,7 +1049,7 @@ namespace Game
|
||||
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||
if (itemTemplate == null)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "{0} SourceEntry in `condition` table does not exist in `item_template`, ignoring.", cond.ToString());
|
||||
Log.outError(LogFilter.Sql, "{0} SourceEntry in `condition` table item does not exist, ignoring.", cond.ToString());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1235,7 +1235,7 @@ namespace Game.Entities
|
||||
ItemTemplate proto = Global.ObjectMgr.GetItemTemplate(itemEntry);
|
||||
if (proto == null)
|
||||
{
|
||||
Log.outError(LogFilter.Player, $"Player {(player != null ? player.GetName() : "<unknown>")} ({playerGuid.ToString()}) has unknown item_template (ProtoType) in mailed items(GUID: {itemGuid} template: {itemEntry}) in mail ({mailId}), deleted.");
|
||||
Log.outError(LogFilter.Player, $"Player {(player != null ? player.GetName() : "<unknown>")} ({playerGuid.ToString()}) has unknown item in mailed items (GUID: {itemGuid} template: {itemEntry}) in mail ({mailId}), deleted.");
|
||||
|
||||
SQLTransaction trans = new SQLTransaction();
|
||||
|
||||
|
||||
@@ -4596,7 +4596,7 @@ namespace Game
|
||||
}
|
||||
|
||||
foreach (var id in notFoundOutfit)
|
||||
Log.outError(LogFilter.Sql, "Item (Entry: {0}) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", id);
|
||||
Log.outError(LogFilter.Sql, "Item (Entry: {0}) item does not exist but is referenced in `CharStartOutfit.dbc`", id);
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} item templates in {1} ms", sparseCount, Time.GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ namespace Game.Loots
|
||||
ItemTemplate proto = Global.ObjectMgr.GetItemTemplate(itemid);
|
||||
if (proto == null)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table '{0}' entry {1} item {2}: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid);
|
||||
Log.outError(LogFilter.Sql, "Table '{0}' entry {1} item {2}: item does not exist - skipped", store.GetName(), entry, itemid);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user