mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 07:37:02 +00:00
Remove last remnants of obsolete npc_gossip table
This commit is contained in:
parent
5dd1316212
commit
c95097c759
5 changed files with 4 additions and 69 deletions
|
|
@ -9577,57 +9577,6 @@ void ObjectMgr::LoadActiveEntities(Map* _map)
|
|||
// Load Transports on Map _map
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadNpcGossips()
|
||||
{
|
||||
m_mCacheNpcTextIdMap.clear();
|
||||
|
||||
QueryResult* result = WorldDatabase.Query("SELECT npc_guid, textid FROM npc_gossip");
|
||||
if (!result)
|
||||
{
|
||||
BarGoLink bar(1);
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outErrorDb(">> Loaded `npc_gossip`, table is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
|
||||
uint32 count = 0;
|
||||
uint32 guid, textid;
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
guid = fields[0].GetUInt32();
|
||||
textid = fields[1].GetUInt32();
|
||||
|
||||
if (!GetCreatureData(guid))
|
||||
{
|
||||
sLog.outErrorDb("Table `npc_gossip` have nonexistent creature (GUID: %u) entry, ignore. ", guid);
|
||||
continue;
|
||||
}
|
||||
if (!GetGossipText(textid))
|
||||
{
|
||||
sLog.outErrorDb("Table `npc_gossip` for creature (GUID: %u) have wrong Textid (%u), ignore. ", guid, textid);
|
||||
continue;
|
||||
}
|
||||
|
||||
m_mCacheNpcTextIdMap[guid] = textid ;
|
||||
++count;
|
||||
|
||||
}
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %d NpcTextId ", count);
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadGossipMenu(std::set<uint32>& gossipScriptSet)
|
||||
{
|
||||
m_mGossipMenusMap.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue