eqemu-server/zone/gm_commands/set/set_checksum.cpp
2025-12-26 20:58:07 -08:00

25 lines
784 B
C++

#include "common/repositories/account_repository.h"
#include "zone/client.h"
#include "zone/worldserver.h"
extern WorldServer worldserver;
void SetChecksum(Client *c, const Seperator *sep)
{
auto account = AccountRepository::FindOne(database, c->AccountID());
if (!account.id) {
c->Message(Chat::White, "Your account was not found!");
return;
}
database.SetVariable("crc_eqgame", account.crc_eqgame);
database.SetVariable("crc_skillcaps", account.crc_skillcaps);
database.SetVariable("crc_basedata", account.crc_basedata);
c->Message(Chat::White, "Attempting to reload Rules globally.");
worldserver.SendReload(ServerReload::Type::Rules);
c->Message(Chat::White, "Attempting to reload Variables globally.");
worldserver.SendReload(ServerReload::Type::Variables);
}