I know a lot of asked for reloading of items and creatures. On my realm, I'm building a custom zone with lots of new custom items. To save restarts, I decided to code it in and since I've seen it requested several times, thought I'd share. Sorry for no real patch, but my core has many changes and is 3.3.3, so it wouldn't match default GIT, so you'll have to commit it in manually.
Chat.cpp
{ "spell_threats", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellThreatsCommand, "", NULL },
+ { "item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemPrototypesCommand, "", NULL },
+ { "creature_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureTemplatesCommand, "", NULL },
Chat.h
bool HandleReloadSpellPetAurasCommand(const char* args);
+ bool HandleReloadItemPrototypesCommand(const char* args);
+ bool HandleReloadCreatureTemplatesCommand(const char* args);
Level3.cpp
HandleReloadLocalesQuestCommand("a");
return true;
}
+ bool ChatHandler::HandleReloadItemPrototypesCommand(const char * /*args*/)
+ {
+ sLog.outString( "Loading Item Data... (`item_template`)" );
+ sObjectMgr.LoadItemPrototypes();
+ SendGlobalSysMessage("DB table `item_template` reloaded.");
+ return true;
+ }
+ bool ChatHandler::HandleReloadCreatureTemplatesCommand(const char * /*args*/)
+ {
+ sLog.outString( "Loading Creature Data... (`creature_template`)" );
+ sObjectMgr.LoadCreatureTemplates();
+ SendGlobalSysMessage("DB table `creature_template` (creature data) reloaded.");
+ return true;
+ }
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('reload creature_template', 3, 'Syntax: .reload creature_template'),
('reload item_template', 3, 'Syntax: .reload item_template');