feat(Core/Loot): Implement player_loot_template (#9198)

* Also fix AV player loot
This commit is contained in:
Skjalf
2021-11-17 08:07:21 -03:00
committed by GitHub
parent 0c5b307e7d
commit 39425e0c1f
7 changed files with 116 additions and 12 deletions

View File

@@ -156,6 +156,7 @@ public:
{ "spell_target_position", HandleReloadSpellTargetPositionCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "spell_threats", HandleReloadSpellThreatsCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "spell_group_stack_rules", HandleReloadSpellGroupStackRulesCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "player_loot_template", HandleReloadLootTemplatesPlayerCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "acore_string", HandleReloadAcoreStringCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "warden_action", HandleReloadWardenactionCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "waypoint_scripts", HandleReloadWpScriptsCommand, SEC_ADMINISTRATOR, Console::Yes },
@@ -658,6 +659,16 @@ public:
return true;
}
static bool HandleReloadLootTemplatesPlayerCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Re-Loading Loot Tables... (`player_loot_template`)");
LoadLootTemplates_Player();
LootTemplates_Player.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `player_loot_template` reloaded.");
sConditionMgr->LoadConditions(true);
return true;
}
static bool HandleReloadAcoreStringCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Re-Loading acore_string Table!");