mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10942] Implement .reload npc_text.
This commit is contained in:
parent
16768da053
commit
7a2478ff4f
7 changed files with 22 additions and 12 deletions
|
|
@ -491,17 +491,18 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL },
|
||||
{ "locales_points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPointsOfInterestCommand, "", NULL },
|
||||
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||
{ "mail_level_reward", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMailLevelRewardCommand, "", NULL },
|
||||
{ "mail_level_reward", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMailLevelRewardCommand, "", NULL },
|
||||
{ "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_spellclick_spells", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellClickSpellsCommand, "",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 },
|
||||
{ "npc_vendor", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
||||
{ "page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPageTextsCommand, "", NULL },
|
||||
{ "pickpocketing_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesPickpocketingCommand,"",NULL},
|
||||
{ "points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPointsOfInterestCommand, "",NULL},
|
||||
{ "points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPointsOfInterestCommand, "", NULL },
|
||||
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesProspectingCommand,"", NULL },
|
||||
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestEndScriptsCommand, "", NULL },
|
||||
{ "quest_poi", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestPOICommand, "", NULL },
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ class ChatHandler
|
|||
bool HandleReloadMailLevelRewardCommand(char* args);
|
||||
bool HandleReloadMangosStringCommand(char* args);
|
||||
bool HandleReloadNpcGossipCommand(char* args);
|
||||
bool HandleReloadNpcTextCommand(char* args);
|
||||
bool HandleReloadNpcTrainerCommand(char* args);
|
||||
bool HandleReloadNpcVendorCommand(char* args);
|
||||
bool HandleReloadPageTextsCommand(char* args);
|
||||
|
|
|
|||
|
|
@ -460,11 +460,19 @@ bool ChatHandler::HandleReloadMangosStringCommand(char* /*args*/)
|
|||
bool ChatHandler::HandleReloadNpcGossipCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading `npc_gossip` Table!" );
|
||||
sObjectMgr.LoadNpcTextId();
|
||||
sObjectMgr.LoadNpcGossips();
|
||||
SendGlobalSysMessage("DB table `npc_gossip` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading `npc_text` Table!" );
|
||||
sObjectMgr.LoadGossipText();
|
||||
SendGlobalSysMessage("DB table `npc_text` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadNpcTrainerCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading `npc_trainer_template` Table!" );
|
||||
|
|
@ -888,7 +896,7 @@ bool ChatHandler::HandleReloadLocalesItemCommand(char* /*args*/)
|
|||
bool ChatHandler::HandleReloadLocalesNpcTextCommand(char* /*args*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales NPC Text ... ");
|
||||
sObjectMgr.LoadNpcTextLocales();
|
||||
sObjectMgr.LoadGossipTextLocales();
|
||||
SendGlobalSysMessage("DB table `locales_npc_text` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4776,7 +4776,7 @@ void ObjectMgr::LoadGossipText()
|
|||
delete result;
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadNpcTextLocales()
|
||||
void ObjectMgr::LoadGossipTextLocales()
|
||||
{
|
||||
mNpcTextLocaleMap.clear(); // need for reload case
|
||||
|
||||
|
|
@ -8338,7 +8338,7 @@ void ObjectMgr::LoadVendorTemplates()
|
|||
sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr);
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadNpcTextId()
|
||||
void ObjectMgr::LoadNpcGossips()
|
||||
{
|
||||
|
||||
m_mCacheNpcTextIdMap.clear();
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ class ObjectMgr
|
|||
void LoadItemRequiredTarget();
|
||||
void LoadItemLocales();
|
||||
void LoadQuestLocales();
|
||||
void LoadNpcTextLocales();
|
||||
void LoadGossipTextLocales();
|
||||
void LoadPageTextLocales();
|
||||
void LoadGossipMenuItemsLocales();
|
||||
void LoadPointOfInterestLocales();
|
||||
|
|
@ -689,7 +689,7 @@ class ObjectMgr
|
|||
void LoadWeatherZoneChances();
|
||||
void LoadGameTele();
|
||||
|
||||
void LoadNpcTextId();
|
||||
void LoadNpcGossips();
|
||||
|
||||
void LoadGossipMenu();
|
||||
void LoadGossipMenuItems();
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@ void World::SetInitialWorldSettings()
|
|||
sLog.outString();
|
||||
|
||||
sLog.outString( "Loading Npc Text Id..." );
|
||||
sObjectMgr.LoadNpcTextId(); // must be after load Creature and LoadGossipText
|
||||
sObjectMgr.LoadNpcGossips(); // must be after load Creature and LoadGossipText
|
||||
|
||||
sLog.outString( "Loading Gossip scripts..." );
|
||||
sScriptMgr.LoadGossipScripts(); // must be before gossip menu options
|
||||
|
|
@ -1180,7 +1180,7 @@ void World::SetInitialWorldSettings()
|
|||
sObjectMgr.LoadGameObjectLocales(); // must be after GameobjectInfo loading
|
||||
sObjectMgr.LoadItemLocales(); // must be after ItemPrototypes loading
|
||||
sObjectMgr.LoadQuestLocales(); // must be after QuestTemplates loading
|
||||
sObjectMgr.LoadNpcTextLocales(); // must be after LoadGossipText
|
||||
sObjectMgr.LoadGossipTextLocales(); // must be after LoadGossipText
|
||||
sObjectMgr.LoadPageTextLocales(); // must be after PageText loading
|
||||
sObjectMgr.LoadGossipMenuItemsLocales(); // must be after gossip menu items loading
|
||||
sObjectMgr.LoadPointOfInterestLocales(); // must be after POI loading
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10941"
|
||||
#define REVISION_NR "10942"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue