gdle/Source/command/admin/ConfigCommands.cpp
Michael Rath a611b1658b Reload quests and events json live
/reloadevents
/reloadquests
2020-04-27 18:44:20 -07:00

42 lines
1,020 B
C++

#include <StdAfx.h>
#include "easylogging++.h"
#include "Client.h"
#include "WeenieObject.h"
#include "Monster.h"
#include "Player.h"
#include "World.h"
#include "Config.h"
#include "Server.h"
#include "ClientCommands.h"
#include "InferredPortalData.h"
CLIENT_COMMAND(setvoidconfig, "[multipler]", "Used to limit void damage 0.1 = 10%, 1.0 = 100%", ADMIN_ACCESS, SERVER_CATEGORY)
{
if (argc < 1)
{
pPlayer->SendText("Multiplier missing", LTT_DEFAULT);
return true;
}
double newValue = atof(argv[0]);
g_pConfig->SetVoidDamageReduction(newValue);
pPlayer->SendText(csprintf("Void Damage set to %f of max", newValue), LTT_DEFAULT);
return false;
}
CLIENT_COMMAND(reloadquests, "", "Reloads quests.json", ADMIN_ACCESS, SERVER_CATEGORY)
{
if(g_pPortalDataEx->ReloadQuestData())
return false;
return true;
}
CLIENT_COMMAND(reloadevents, "", "Reloads events.json and sets active per json settings", ADMIN_ACCESS, SERVER_CATEGORY)
{
if (g_pPortalDataEx->ReloadEventData())
return false;
return true;
}