Jump to content

[9370] implemented new reload commands for quest_poi


Guest Thyros

Recommended Posts

i have write reload for the quest poi system:

here is the Code:

commit e7ea22d3a867576bb076089843c902834d283c7b
Author: unknown <Thyros@.(none)>
Date:   Sat Feb 13 16:56:29 2010 +0100

   implemented .reload quest_poi and quest_poi_points.

diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index cfcfa9f..c8cdf5d 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -453,6 +453,8 @@ ChatCommand * ChatHandler::getCommandTable()
        { "quest_end_scripts",           SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadQuestEndScriptsCommand,         "", NULL },
        { "quest_start_scripts",         SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadQuestStartScriptsCommand,       "", NULL },
        { "quest_template",              SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadQuestTemplateCommand,           "", NULL },
+        { "quest_poi",                   SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadQuestPOICommand,                "", NULL },
+        { "quest_poi_points",            SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadQuestPOIPointsCommand,          "", NULL },
        { "reference_loot_template",     SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadLootTemplatesReferenceCommand,  "", NULL },
        { "reserved_name",               SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadReservedNameCommand,            "", NULL },
        { "skill_discovery_template",    SEC_ADMINISTRATOR, true,  &ChatHandler::HandleReloadSkillDiscoveryTemplateCommand,  "", NULL },
diff --git a/src/game/Chat.h b/src/game/Chat.h
index e2adf0d..1861085 100644
--- a/src/game/Chat.h
+++ b/src/game/Chat.h
@@ -375,6 +375,8 @@ class ChatHandler
        bool HandleReloadQuestEndScriptsCommand(const char* args);
        bool HandleReloadQuestStartScriptsCommand(const char* args);
        bool HandleReloadQuestTemplateCommand(const char* args);
+        bool HandleReloadQuestPOICommand(const char* args);
+        bool HandleReloadQuestPOIPointsCommand(const char* args);
        bool HandleReloadReservedNameCommand(const char*);
        bool HandleReloadSkillDiscoveryTemplateCommand(const char* args);
        bool HandleReloadSkillExtraItemTemplateCommand(const char* args);
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 525fbc7..40434e7 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -473,6 +473,22 @@ bool ChatHandler::HandleReloadPointsOfInterestCommand(const char*)
    return true;
}

+bool ChatHandler::HandleReloadQuestPOICommand(const char*)
+{
+    sLog.outString( "Re-Loading `quest_poi` Table!" );
+    sObjectMgr.LoadQuestPOI();
+    SendGlobalSysMessage("DB Table `quest_poi` reloaded.");
+    return true;
+}
+
+bool ChatHandler::HandleReloadQuestPOIPointsCommand(const char*)
+{
+    sLog.outString( "Re-Loading `quest_poi_points` Table!" );
+    sObjectMgr.LoadQuestPOI();
+    SendGlobalSysMessage("DB Table `quest_poi_points` reloaded.");
+    return true;
+}
+
bool ChatHandler::HandleReloadSpellClickSpellsCommand(const char*)
{
    sLog.outString( "Re-Loading `npc_spellclick_spells` Table!" );
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 5639a9f..38fc729 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -6476,6 +6476,8 @@ void ObjectMgr::LoadPointsOfInterest()

void ObjectMgr::LoadQuestPOI()
{
+    mQuestPOIMap.clear();                              // need for reload case
+
    uint32 count = 0;

    //                                                0        1         2      3     4     5     6

Fixed all Build errors, please test this.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use