Remove last reminents of obsolete npc_gossip table
This commit is contained in:
parent
ef8af71d36
commit
71593d747d
@ -270,8 +270,6 @@ bool ChatHandler::HandleReloadAllLootCommand(char* /*args*/)
|
|||||||
|
|
||||||
bool ChatHandler::HandleReloadAllNpcCommand(char* args)
|
bool ChatHandler::HandleReloadAllNpcCommand(char* args)
|
||||||
{
|
{
|
||||||
if (*args != 'a') // will be reloaded from all_gossips
|
|
||||||
{ HandleReloadNpcGossipCommand((char*)"a"); }
|
|
||||||
HandleReloadNpcTrainerCommand((char*)"a");
|
HandleReloadNpcTrainerCommand((char*)"a");
|
||||||
HandleReloadNpcVendorCommand((char*)"a");
|
HandleReloadNpcVendorCommand((char*)"a");
|
||||||
HandleReloadPointsOfInterestCommand((char*)"a");
|
HandleReloadPointsOfInterestCommand((char*)"a");
|
||||||
@ -342,7 +340,6 @@ bool ChatHandler::HandleReloadAllGossipsCommand(char* args)
|
|||||||
if (*args != 'a') // already reload from all_scripts
|
if (*args != 'a') // already reload from all_scripts
|
||||||
{ HandleReloadDBScriptsOnGossipCommand((char*)"a"); }
|
{ HandleReloadDBScriptsOnGossipCommand((char*)"a"); }
|
||||||
HandleReloadGossipMenuCommand((char*)"a");
|
HandleReloadGossipMenuCommand((char*)"a");
|
||||||
HandleReloadNpcGossipCommand((char*)"a");
|
|
||||||
HandleReloadPointsOfInterestCommand((char*)"a");
|
HandleReloadPointsOfInterestCommand((char*)"a");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -572,14 +569,6 @@ bool ChatHandler::HandleReloadMangosStringCommand(char* /*args*/)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChatHandler::HandleReloadNpcGossipCommand(char* /*args*/)
|
|
||||||
{
|
|
||||||
sLog.outString("Re-Loading `npc_gossip` Table!");
|
|
||||||
sObjectMgr.LoadNpcGossips();
|
|
||||||
SendGlobalSysMessage("DB table `npc_gossip` reloaded.", SEC_MODERATOR);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/)
|
bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/)
|
||||||
{
|
{
|
||||||
sLog.outString("Re-Loading `npc_text` Table!");
|
sLog.outString("Re-Loading `npc_text` Table!");
|
||||||
|
@ -8110,55 +8110,6 @@ void ObjectMgr::LoadVendorTemplates()
|
|||||||
{ sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr); }
|
{ sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr); }
|
||||||
}
|
}
|
||||||
|
|
||||||
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(">> Loaded `npc_gossip`, table is empty!");
|
|
||||||
sLog.outString();
|
|
||||||
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(">> Loaded %d NpcTextId", count);
|
|
||||||
sLog.outString();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ObjectMgr::LoadGossipMenu(std::set<uint32>& gossipScriptSet)
|
void ObjectMgr::LoadGossipMenu(std::set<uint32>& gossipScriptSet)
|
||||||
{
|
{
|
||||||
m_mGossipMenusMap.clear();
|
m_mGossipMenusMap.clear();
|
||||||
|
@ -704,8 +704,6 @@ class ObjectMgr
|
|||||||
|
|
||||||
void LoadGameTele();
|
void LoadGameTele();
|
||||||
|
|
||||||
void LoadNpcGossips();
|
|
||||||
|
|
||||||
void LoadGossipMenus();
|
void LoadGossipMenus();
|
||||||
|
|
||||||
void LoadVendorTemplates();
|
void LoadVendorTemplates();
|
||||||
|
@ -533,7 +533,6 @@ ChatCommand* ChatHandler::getCommandTable()
|
|||||||
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||||
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", NULL },
|
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", NULL },
|
||||||
{ "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
|
{ "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
|
||||||
{ "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL },
|
|
||||||
{ "npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTextCommand, "", NULL },
|
{ "npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTextCommand, "", NULL },
|
||||||
{ "npc_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
{ "npc_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
||||||
{ "npc_vendor", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
{ "npc_vendor", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
||||||
|
@ -1255,9 +1255,6 @@ void World::SetInitialWorldSettings()
|
|||||||
sLog.outString("Loading Skill Fishing base level requirements...");
|
sLog.outString("Loading Skill Fishing base level requirements...");
|
||||||
sObjectMgr.LoadFishingBaseSkillLevel();
|
sObjectMgr.LoadFishingBaseSkillLevel();
|
||||||
|
|
||||||
sLog.outString("Loading Npc Text Id...");
|
|
||||||
sObjectMgr.LoadNpcGossips(); // must be after load Creature and LoadGossipText
|
|
||||||
|
|
||||||
sLog.outString("Loading Gossip scripts...");
|
sLog.outString("Loading Gossip scripts...");
|
||||||
sScriptMgr.LoadDbScripts(DBS_ON_GOSSIP); // must be before gossip menu options
|
sScriptMgr.LoadDbScripts(DBS_ON_GOSSIP); // must be before gossip menu options
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user