feat(Core): Add clustering support (#16832)

Co-authored-by: 3kynox <thierry.prost@gmail.com>
Co-authored-by: nox <nox@noxen.net>
Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
Anton Popovichenko
2026-07-27 18:51:04 +02:00
committed by GitHub
parent f23ac046ab
commit 6f0ba8e896
80 changed files with 3675 additions and 297 deletions
+31
View File
@@ -0,0 +1,31 @@
#include "player-money-api.h"
static GetMoneyForPlayerHandler getMoneyForPlayerHandler;
void SetGetMoneyForPlayerHandler(GetMoneyForPlayerHandler h) {
getMoneyForPlayerHandler = h;
}
GetMoneyForPlayerResponse CallGetMoneyForPlayerHandler(uint64_t player_guid) {
if (getMoneyForPlayerHandler == 0) {
GetMoneyForPlayerResponse resp;
resp.errorCode = PlayerMoneyErrorCodeNoHandler;
return resp;
}
return getMoneyForPlayerHandler(player_guid);
}
static ModifyMoneyForPlayerHandler modifyMoneyForPlayerHandler;
void SetModifyMoneyForPlayerHandler(ModifyMoneyForPlayerHandler h) {
modifyMoneyForPlayerHandler = h;
}
ModifyMoneyForPlayerResponse CallModifyMoneyForPlayerHandler(uint64_t player_guid, int32_t amount) {
if (modifyMoneyForPlayerHandler == 0) {
ModifyMoneyForPlayerResponse resp;
resp.errorCode = PlayerMoneyErrorCodeNoHandler;
return resp;
}
return modifyMoneyForPlayerHandler(player_guid, amount);
}