Created
July 17, 2013 16:20
-
-
Save residentkrm/6022109 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp | |
index 1489fd5..08ae7e3 100644 | |
--- a/src/game/Chat.cpp | |
+++ b/src/game/Chat.cpp | |
@@ -609,6 +609,7 @@ ChatCommand * ChatHandler::getCommandTable() | |
{ "spell_disabled", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellDisabledCommand, "", NULL }, | |
{ "spell_linked", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLinkedCommand, "", NULL }, | |
{ "anticheat", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAntiCheatCommand, "", NULL }, | |
+ { "item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemTemplateCommand, "", NULL }, | |
{ NULL, 0, false, NULL, "", NULL } | |
}; | |
diff --git a/src/game/Chat.h b/src/game/Chat.h | |
index 037f8a1..48bbfb8 100644 | |
--- a/src/game/Chat.h | |
+++ b/src/game/Chat.h | |
@@ -490,6 +490,7 @@ class MANGOS_DLL_SPEC ChatHandler | |
bool HandleReloadSpellLinkedCommand(char* args); | |
bool HandleReloadSpellDisabledCommand(char* args); | |
bool HandleReloadAntiCheatCommand(char* args); | |
+ bool HandleReloadItemTemplateCommand(char* args); | |
bool HandleResetAchievementsCommand(char* args); | |
bool HandleResetAllCommand(char* args); | |
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp | |
index cb86f0a..e59cbf7 100644 | |
--- a/src/game/Level3.cpp | |
+++ b/src/game/Level3.cpp | |
@@ -352,6 +352,7 @@ bool ChatHandler::HandleReloadAllGossipsCommand(char* args) | |
bool ChatHandler::HandleReloadAllItemCommand(char* /*args*/) | |
{ | |
HandleReloadPageTextsCommand((char*)"a"); | |
+ HandleReloadItemTemplateCommand((char*)"a"); | |
HandleReloadItemConvertCommand((char*)"a"); | |
HandleReloadItemEnchantementsCommand((char*)"a"); | |
HandleReloadItemRequiredTragetCommand((char*)"a"); | |
@@ -824,6 +825,17 @@ bool ChatHandler::HandleReloadPageTextsCommand(char* /*args*/) | |
return true; | |
} | |
+bool ChatHandler::HandleReloadItemTemplateCommand(char* /*arg*/) | |
+{ | |
+ sLog.outString( "Re-Loading `item_template` table..."); | |
+ | |
+ sObjectMgr.LoadItemPrototypes(); | |
+ | |
+ SendGlobalSysMessage("DB table `item_template` reloaded."); | |
+ | |
+ return true; | |
+} | |
+ | |
bool ChatHandler::HandleReloadItemEnchantementsCommand(char* /*args*/) | |
{ | |
sLog.outString( "Re-Loading Item Random Enchantments Table..." ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO command | |
(name, security, help) | |
VALUES | |
("reload item_template", 3, "Syntax: .reload all_item\r\n\r\nReload `item_template` table."); | |
UPDATE command SET | |
help = "Syntax: .reload all_item\r\n\r\nReload `item_required_target`, `page_texts`,`item_enchantment_template` and `item_template` tables." | |
WHERE | |
name = "reload all_item" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment