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:
committed by
GitHub
parent
f23ac046ab
commit
6f0ba8e896
+31
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user