diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 26 | ||||
-rw-r--r-- | src/server/game/Entities/Item/ItemTemplate.h | 2 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 6 | ||||
-rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/World/World.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 16 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 2 |
8 files changed, 29 insertions, 29 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 07d55ada3ec..7c71b4dad48 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1516,7 +1516,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1533,7 +1533,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1550,7 +1550,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1567,7 +1567,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1584,7 +1584,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1601,7 +1601,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1618,7 +1618,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1635,7 +1635,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1652,7 +1652,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1669,7 +1669,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1686,7 +1686,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1703,7 +1703,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1830,7 +1830,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!itemTemplate) { - TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString().c_str()); return false; } break; diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index bbbacc62ce0..239fd77f2d2 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -112,7 +112,7 @@ enum ItemSpelltriggerType * death" of spell 57348 makes me think so) */ ITEM_SPELLTRIGGER_ON_OBTAIN = 5, - ITEM_SPELLTRIGGER_LEARN_SPELL_ID = 6 // used in item_template.spell_2 with spell_id with SPELL_GENERIC_LEARN in spell_1 + ITEM_SPELLTRIGGER_LEARN_SPELL_ID = 6 // used in ItemEffect in second slot with spell_id with SPELL_GENERIC_LEARN in spell_1 }; #define MAX_ITEM_SPELLTRIGGER 7 diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7e9b2839b6f..7f0ad515a83 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -19156,7 +19156,7 @@ Item* Player::_LoadMailedItem(ObjectGuid const& playerGuid, Player* player, uint ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry); if (!proto) { - TC_LOG_ERROR("entities.player", "Player '%s' (%s) has unknown item_template in mailed items (GUID: " UI64FMTD ", Entry: %u) in mail (%u), deleted.", + TC_LOG_ERROR("entities.player", "Player '%s' (%s) has unknown item in mailed items (GUID: " UI64FMTD ", Entry: %u) in mail (%u), deleted.", player ? player->GetName().c_str() : "<unknown>", playerGuid.ToString().c_str(), itemGuid, itemEntry, mailId); CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5d2c59c25ba..8a18c694894 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2947,7 +2947,7 @@ void ObjectMgr::LoadItemTemplates() } for (std::set<uint32>::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr) - TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr); + TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not exist but is referenced in `CharStartOutfit.dbc`", *itr); TC_LOG_INFO("server.loading", ">> Loaded %u item templates in %u ms", sparseCount, GetMSTimeDiffToNow(oldMSTime)); } @@ -3382,7 +3382,7 @@ void ObjectMgr::LoadPlayerInfo() if (!GetItemTemplate(item_id)) { - TC_LOG_ERROR("sql.sql", "Item id %u (race %u class %u) in `playercreateinfo_item` table but not listed in `item_template`, ignoring.", item_id, current_race, current_class); + TC_LOG_ERROR("sql.sql", "Item id %u (race %u class %u) in `playercreateinfo_item` table but it does not exist, ignoring.", item_id, current_race, current_class); continue; } @@ -4098,7 +4098,7 @@ void ObjectMgr::LoadQuests() Quest* qinfo = iter->second; - // additional quest integrity checks (GO, creature_template and item_template must be loaded already) + // additional quest integrity checks (GO, creature_template and items must be loaded already) if (qinfo->GetQuestType() >= MAX_QUEST_TYPES) TC_LOG_ERROR("sql.sql", "Quest %u has `Method` = %u, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestType()); diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 2a0b5cf684e..b7f20ee3fd0 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -311,7 +311,7 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid); if (!proto) { - TC_LOG_ERROR("sql.sql", "Table '%s' Entry %d Item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid); + TC_LOG_ERROR("sql.sql", "Table '%s' Entry %d Item %d: item does not exist - skipped", store.GetName(), entry, itemid); return false; } diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 8a1ee3f330a..596da1db913 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1780,7 +1780,7 @@ void World::SetInitialWorldSettings() WeatherMgr::LoadWeatherData(); TC_LOG_INFO("server.loading", "Loading Quests..."); - sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables + sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, items, gameobject tables TC_LOG_INFO("server.loading", "Checking Quest Disables"); DisableMgr::CheckQuestDisables(); // must be after loading quests diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index a0cd665868b..8da756abd54 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -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()); } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 8d509545460..67139741099 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -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) { |