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)
|
||||
{
|
||||
if (*args != 'a') // will be reloaded from all_gossips
|
||||
{ HandleReloadNpcGossipCommand((char*)"a"); }
|
||||
HandleReloadNpcTrainerCommand((char*)"a");
|
||||
HandleReloadNpcVendorCommand((char*)"a");
|
||||
HandleReloadPointsOfInterestCommand((char*)"a");
|
||||
@ -342,7 +340,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;
|
||||
}
|
||||
@ -572,14 +569,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.", SEC_MODERATOR);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString("Re-Loading `npc_text` Table!");
|
||||
|
@ -6923,7 +6923,7 @@ bool PlayerCondition::Meets(Player const* player, Map const* map, WorldObject co
|
||||
entry->param1 = m_value1;
|
||||
entry->param2 = m_value2;
|
||||
}
|
||||
|
||||
|
||||
if (!CheckParamRequirements(player, map, source, conditionSourceType))
|
||||
{ return false; }
|
||||
|
||||
@ -7973,7 +7973,7 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates)
|
||||
trainerSpell.reqLevel = fields[5].GetUInt32();
|
||||
|
||||
trainerSpell.isProvidedReqLevel = trainerSpell.reqLevel > 0;
|
||||
|
||||
|
||||
if (trainerSpell.reqLevel)
|
||||
{
|
||||
if (trainerSpell.reqLevel == spellinfo->spellLevel)
|
||||
@ -8110,55 +8110,6 @@ void ObjectMgr::LoadVendorTemplates()
|
||||
{ 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)
|
||||
{
|
||||
m_mGossipMenusMap.clear();
|
||||
|
@ -704,8 +704,6 @@ class ObjectMgr
|
||||
|
||||
void LoadGameTele();
|
||||
|
||||
void LoadNpcGossips();
|
||||
|
||||
void LoadGossipMenus();
|
||||
|
||||
void LoadVendorTemplates();
|
||||
@ -761,13 +759,13 @@ class ObjectMgr
|
||||
uint32 GenerateStaticCreatureLowGuid()
|
||||
{
|
||||
if (m_StaticCreatureGuids.GetNextAfterMaxUsed() >= m_FirstTemporaryCreatureGuid)
|
||||
{ return 0; }
|
||||
{ return 0; }
|
||||
return m_StaticCreatureGuids.Generate();
|
||||
}
|
||||
uint32 GenerateStaticGameObjectLowGuid()
|
||||
{
|
||||
if (m_StaticGameObjectGuids.GetNextAfterMaxUsed() >= m_FirstTemporaryGameObjectGuid)
|
||||
{ return 0; }
|
||||
{ return 0; }
|
||||
return m_StaticGameObjectGuids.Generate();
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,6 @@ ChatCommand* ChatHandler::getCommandTable()
|
||||
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", 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_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
||||
{ "npc_vendor", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
||||
|
@ -623,7 +623,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
setConfig(CONFIG_BOOL_ALL_TAXI_PATHS, "AllFlightPaths", false);
|
||||
setConfig(CONFIG_BOOL_INSTANT_TAXI, "InstantFlightPaths", false);
|
||||
|
||||
setConfig(CONFIG_UINT32_MOUNT_COST, "MountCost", 100000);
|
||||
setConfig(CONFIG_UINT32_MOUNT_COST, "MountCost", 100000);
|
||||
setConfigMin(CONFIG_UINT32_MIN_TRAIN_MOUNT_LEVEL, "MinTrainMountLevel", 40, 1);
|
||||
setConfig(CONFIG_UINT32_TRAIN_MOUNT_COST, "TrainMountCost", 900000);
|
||||
setConfig(CONFIG_UINT32_EPIC_MOUNT_COST, "EpicMountCost", 1000000);
|
||||
@ -1255,9 +1255,6 @@ void World::SetInitialWorldSettings()
|
||||
sLog.outString("Loading Skill Fishing base level requirements...");
|
||||
sObjectMgr.LoadFishingBaseSkillLevel();
|
||||
|
||||
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
|
||||
|
||||
@ -2102,10 +2099,10 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode)
|
||||
if (time == 0)
|
||||
{
|
||||
if (!(options & SHUTDOWN_MASK_IDLE) || GetActiveAndQueuedSessionCount() == 0)
|
||||
{
|
||||
{
|
||||
sObjectAccessor.SaveAllPlayers(); // save all players.
|
||||
m_stopEvent = true; // exist code already set
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ShutdownTimer = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user