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;
|
Player target;
|
||||||
ObjectGuid targetGuid;
|
ObjectGuid targetGuid;
|
||||||
string targetName;
|
string targetName;
|
||||||
PreparedStatement stmt = null;
|
|
||||||
|
|
||||||
ObjectGuid parseGUID = ObjectGuid.Create(HighGuid.Player, args.NextUInt64());
|
ObjectGuid parseGUID = ObjectGuid.Create(HighGuid.Player, args.NextUInt64());
|
||||||
if (Global.CharacterCacheStorage.GetCharacterNameByGuid(parseGUID, out targetName))
|
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))
|
else if (!handler.ExtractPlayerTarget(args, out target, out targetGuid, out targetName))
|
||||||
return false;
|
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());
|
stmt.AddValue(0, targetGuid.GetCounter());
|
||||||
SQLResult result = DB.Characters.Query(stmt);
|
SQLResult result = DB.Characters.Query(stmt);
|
||||||
if (!result.IsEmpty())
|
if (!result.IsEmpty())
|
||||||
@@ -408,18 +407,19 @@ namespace Game.Chat.Commands
|
|||||||
{
|
{
|
||||||
uint item_entry = result3.Read<uint>(0);
|
uint item_entry = result3.Read<uint>(0);
|
||||||
uint item_count = result3.Read<uint>(1);
|
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);
|
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(item_entry);
|
||||||
int item_quality = result4.Read<byte>(1);
|
if (itemTemplate == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (handler.GetSession() != null)
|
if (handler.GetSession() != null)
|
||||||
{
|
{
|
||||||
uint color = ItemConst.ItemQualityColors[item_quality];
|
uint color = ItemConst.ItemQualityColors[(int)itemTemplate.GetQuality()];
|
||||||
string itemStr = "|c" + color + "|Hitem:" + item_entry + ":0:0:0:0:0:0:0:0:0|h[" + item_name + "]|h|r";
|
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);
|
handler.SendSysMessage(CypherStrings.ListMailInfoItem, itemStr, item_entry, item_guid, item_count);
|
||||||
}
|
}
|
||||||
else
|
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());
|
while (result3.NextRow());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ namespace Game.Chat
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
uint count = 0;
|
uint count = 0;
|
||||||
|
|
||||||
// Search in `item_template`
|
// Search in ItemSparse
|
||||||
var its = Global.ObjectMgr.GetItemTemplates();
|
var its = Global.ObjectMgr.GetItemTemplates();
|
||||||
foreach (var template in its.Values)
|
foreach (var template in its.Values)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -752,7 +752,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -769,7 +769,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -786,7 +786,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -803,7 +803,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -820,7 +820,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -837,7 +837,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -854,7 +854,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -871,7 +871,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -888,7 +888,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -905,7 +905,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -922,7 +922,7 @@ namespace Game
|
|||||||
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate pItemProto = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (pItemProto == null && !loot.IsReference((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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1049,7 +1049,7 @@ namespace Game
|
|||||||
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate((uint)cond.SourceEntry);
|
||||||
if (itemTemplate == null)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1235,7 +1235,7 @@ namespace Game.Entities
|
|||||||
ItemTemplate proto = Global.ObjectMgr.GetItemTemplate(itemEntry);
|
ItemTemplate proto = Global.ObjectMgr.GetItemTemplate(itemEntry);
|
||||||
if (proto == null)
|
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();
|
SQLTransaction trans = new SQLTransaction();
|
||||||
|
|
||||||
|
|||||||
@@ -4596,7 +4596,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (var id in notFoundOutfit)
|
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));
|
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);
|
ItemTemplate proto = Global.ObjectMgr.GetItemTemplate(itemid);
|
||||||
if (proto == null)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user