mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +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
|
|
@ -281,8 +281,6 @@ bool ChatHandler::HandleReloadAllLootCommand(char* /*args*/)
|
|||
|
||||
bool ChatHandler::HandleReloadAllNpcCommand(char* args)
|
||||
{
|
||||
if (*args != 'a') // will be reloaded from all_gossips
|
||||
{ HandleReloadNpcGossipCommand((char*)"a"); }
|
||||
HandleReloadNpcTrainerCommand((char*)"a");
|
||||
HandleReloadNpcVendorCommand((char*)"a");
|
||||
HandleReloadPointsOfInterestCommand((char*)"a");
|
||||
|
|
@ -355,7 +353,6 @@ bool ChatHandler::HandleReloadAllGossipsCommand(char* args)
|
|||
if (*args != 'a') // already reload from all_scripts
|
||||
{ HandleReloadDBScriptsOnGossipCommand((char*)"a"); }
|
||||
HandleReloadGossipMenuCommand((char*)"a");
|
||||
HandleReloadNpcGossipCommand((char*)"a");
|
||||
HandleReloadPointsOfInterestCommand((char*)"a");
|
||||
return true;
|
||||
}
|
||||
|
|
@ -630,14 +627,6 @@ bool ChatHandler::HandleReloadMangosStringCommand(char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadNpcGossipCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString("Re-Loading `npc_gossip` Table!");
|
||||
sObjectMgr.LoadNpcGossips();
|
||||
SendGlobalSysMessage("DB table `npc_gossip` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString("Re-Loading `npc_text` Table!");
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -823,8 +823,6 @@ class ObjectMgr
|
|||
|
||||
void LoadGameTele();
|
||||
|
||||
void LoadNpcGossips();
|
||||
|
||||
void LoadGossipMenus();
|
||||
|
||||
void LoadVendorTemplates();
|
||||
|
|
|
|||
|
|
@ -580,7 +580,6 @@ ChatCommand* ChatHandler::getCommandTable()
|
|||
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", NULL },
|
||||
{ "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
|
||||
{ "milling_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMillingCommand, "", NULL },
|
||||
{ "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL },
|
||||
{ "npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTextCommand, "", NULL },
|
||||
{ "npc_spellclick_spells", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellClickSpellsCommand, "", NULL },
|
||||
{ "npc_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
||||
|
|
|
|||
|
|
@ -1347,9 +1347,6 @@ void World::SetInitialWorldSettings()
|
|||
sLog.outString("Loading Instance encounters data..."); // must be after Creature loading
|
||||
sObjectMgr.LoadInstanceEncounters();
|
||||
|
||||
sLog.outString("Loading Npc Text Id...");
|
||||
sObjectMgr.LoadNpcGossips(); // must be after load Creature and LoadGossipText
|
||||
|
||||
sLog.outString("Loading Gossip scripts...");
|
||||
sScriptMgr.LoadDbScripts(DBS_ON_GOSSIP); // must be before gossip menu options
|
||||
|
||||
|
|
@ -2218,7 +2215,10 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode)
|
|||
if (time == 0)
|
||||
{
|
||||
if (!(options & SHUTDOWN_MASK_IDLE) || GetActiveAndQueuedSessionCount() == 0)
|
||||
m_stopEvent = true; // exist code already set
|
||||
{
|
||||
sObjectAccessor.SaveAllPlayers(); // save all players.
|
||||
m_stopEvent = true; // exist code already set
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ShutdownTimer = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue